import{aL as X,aM as Y,_ as J,q as K,A as j,B as i,a4 as B,C as G,aD as Q,r as s,o as g,n as E,L as V,M as A,p as W,t as l,H as u,I as Z,J as ee,v as m,K as S,P as ae,S as L,aF as te}from"./index.10c3f8e5.js";import{useColumns as le}from"./columns.f37f43b7.js";import{T as oe}from"./index.1c15f518.js";import{u as y}from"./hooks.5f77ce90.js";import ue from"./preview-dialog.818701e2.js";import"./status.7319085b.js";const{VITE_PROXY_DOMAIN_REAL:be,VITE_PROXY_USER_REAL:ne}=Y(),se=ne+"/admin/",re=F=>X.request("post",`${se}cgdlist`,{data:F});const ie={class:"main porder"},ce=L(" \u641C\u7D22 "),pe=L(" \u91CD\u7F6E "),de={name:"porder"},me=K({...de,setup(F){const{logout:R}=j(),w=i([{value:"sequenceNo",label:"\u91C7\u8D2D\u5355\u7F16\u53F7"},{value:"companyNo",label:"\u4E1A\u52A1\u516C\u53F8\u7F16\u53F7"},{value:"companyName",label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0"},{value:"bkCode",label:"\u5907\u5E93\u5355\u53F7"},{value:"goodNo",label:"\u5546\u54C1\u5355\u53F7"},{value:"goodName",label:"\u5546\u54C1\u540D\u79F0"},{value:"supplierName",label:"\u4F9B\u5E94\u5546\u540D\u79F0"},{value:"supplierNo",label:"\u4F9B\u5E94\u5546\u7F16\u53F7"}]),e=B({input:"",select:"sequenceNo",status:"",page:1,size:15}),h=i([]),c=i([]),_=i(!0),{columns:z}=le(),D=i(),k=i(null),f=B({total:0,pageSize:15,currentPage:1,background:!0});async function P(t){e.page=t,await r()}async function x(t){e.size=t,e.page=1,await r()}function T(t){}async function r(){_.value=!0;let t={status:e.status,page:e.page,size:e.size};w.value.forEach(n=>{t[n.value]=n.value===e.select?e.input:""});const{code:o,data:p,message:v}=await re({...e,...t});if(o===0){const{list:n,count:d}=p;h.value=n!=null?n:[],f.total=d!=null?d:0,f.pageSize=e.size,f.currentPage=e.page}else o>100&&o<140?R():te.error(v);_.value=!1}async function I(){e.page=1,await r()}function M(t){k.value.onDisplay(t)}const q=t=>{!t||(t.resetFields(),e.input="",e.select="sequenceNo",e.status="",e.size=15,e.page=1,r())};return G(()=>{c.value=Q().getMenuActions("porder"),c.value.some(t=>t=="001")&&r()}),(t,o)=>{const p=s("el-option"),v=s("el-select"),n=s("el-form-item"),d=s("el-input"),C=s("el-button"),U=s("el-form"),O=s("PureTable"),$=s("NoAuth");return g(),E("div",ie,[V(W("div",null,[l(U,{ref_key:"formRef",ref:D,inline:!0,model:e,"label-width":0,class:"bg-white w-99/100 pl-8 pt-4"},{default:u(()=>[l(n,{prop:"status"},{default:u(()=>[l(v,{modelValue:e.status,"onUpdate:modelValue":o[0]||(o[0]=a=>e.status=a),style:{width:"100%"},placeholder:"\u91C7\u8D2D\u5355\u72B6\u6001",clearable:""},{default:u(()=>[l(p,{value:"0",label:"\u672A\u5BF9\u8D26"}),l(p,{value:"1",label:"\u5BF9\u8D26"})]),_:1},8,["modelValue"])]),_:1}),l(n,{prop:"input"},{default:u(()=>[l(d,{modelValue:e.input,"onUpdate:modelValue":o[2]||(o[2]=a=>e.input=a),placeholder:"\u5173\u952E\u5B57",class:"input-with-select",clearable:""},{prepend:u(()=>[l(v,{modelValue:e.select,"onUpdate:modelValue":o[1]||(o[1]=a=>e.select=a),placeholder:"\u5173\u952E\u5B57\u7C7B\u578B",style:{width:"130px"}},{default:u(()=>[(g(!0),E(Z,null,ee(w.value,(a,b)=>(g(),S(p,{key:"si"+a.value+b,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),l(n,null,{default:u(()=>[l(C,{type:"primary",icon:m(y)("search"),loading:_.value,onClick:I},{default:u(()=>[ce]),_:1},8,["icon","loading"]),l(C,{icon:m(y)("refresh"),onClick:o[3]||(o[3]=a=>q(D.value))},{default:u(()=>[pe]),_:1},8,["icon"])]),_:1})]),_:1},8,["model"]),l(m(oe),{title:"\u91C7\u8D2D\u5355\u7BA1\u7406",loading:_.value,dataList:h.value,onRefresh:r},{buttons:u(()=>[]),default:u(({size:a,checkList:b})=>[l(O,{border:"",align:"left",showOverflowTooltip:"","table-layout":"auto",size:a,data:h.value,columns:m(z),checkList:b,pagination:f,paginationSmall:a==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:T,onSizeChange:x,onCurrentChange:P},{operation:u(({row:H})=>[c.value.some(N=>N=="007")?(g(),S(C,{key:0,class:"reset-margin",link:"",type:"primary",size:a,onClick:N=>M(H),icon:m(y)("eye-view")},null,8,["size","onClick","icon"])):ae("",!0)]),_:2},1032,["size","data","columns","checkList","pagination","paginationSmall"])]),_:1},8,["loading","dataList"]),l(ue,{ref_key:"PreviewDialogRef",ref:k},null,512)],512),[[A,c.value.some(a=>a=="001")]]),V(l($,null,null,512),[[A,!c.value.some(a=>a=="001")]])])}}});var ye=J(me,[["__scopeId","data-v-e0a0e4dc"]]);export{ye as default};
