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