import{_ as k,d as q,aP as T,w as g,aL as M,r as i,o as _,G as b,C as F,l as y,u as n,M as O,a as j,aY as L}from"./index.fd765376.js";import{h as R}from"./index.74cb5163.js";import{a,r as w}from"./columnRenderHelper.d64097c5.js";import{n as h,s as x,e as r,c as B,d as E,h as V}from"./status.0f05917e.js";import G from"./purchase-modal.10beaf17.js";import{u as I}from"./use-page-search.414f397e.js";import{u as C,w as H}from"./xlsx.ed122d16.js";import"./basic-descriptions.6db97105.js";import"./porder.24af2c44.js";import"./tootip.99c35844.js";const U=[{width:40,type:"selection",align:"center",fixed:"left"},{label:"\u91C7\u8D2D\u5355\u7F16\u7801",prop:"sequenceNo",width:"150px"},{label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801",prop:"cxCode",width:"150px"},{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"qrdCode",width:"150px"},{label:"\u72B6\u6001",prop:"status",width:95,...a(h,"status")},{label:"\u9500\u552E\u5355\u53D1\u8D27\u72B6\u6001",prop:"qrdSend",width:105,...a(x,"qrdSend")},{label:"\u5165\u5E93\u72B6\u6001",prop:"sendStatus",width:95,...a(r,"sendStatus")},{label:"\u72B6\u6001",prop:"sendStatus",width:95,...a(r,"sendStatus")},{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:95,...a(B,"cgdSource")},{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:95,...a(E,"cgdType")},{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type",width:95},{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150px"},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180px"},{label:"\u7A0E\u7387",prop:"tax",width:"45px"},{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"80px"},{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice",width:"80px"},{label:"\u5546\u54C1\u603B\u4EF7",prop:"totalPrice",width:"80px"},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:"150px",...w("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierNo",width:"150px",...w("supplierNo","supplierName","\u4E70\u53A8\u623F\u516C\u53F8\u7F16\u7801:")},{label:"\u5907\u5E93\u5355",prop:"bkCode",width:"150px"},{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:75},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:140},{label:"\u64CD\u4F5C",fixed:"right",width:55,slot:"operation"}],W={title:"\u91C7\u8D2D\u5355\u7BA1\u7406",columns:U,companyProp:"supplierNo",listNoRelation:!0,apis:{httpList:R,httpAdd:!0}},m={formItems:[{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"sequenceNo",label:"\u91C7\u8D2D\u5355\u7F16\u7801"},{value:"cxCode",label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801"},{value:"qrdCode",label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801"},{value:"goodNo",label:"\u5546\u54C1\u7F16\u7801"},{value:"goodName",label:"\u5546\u54C1\u540D\u79F0"},{value:"cgder",label:"\u4E70\u5165\u65B9\u91C7\u8D2D\u5458"}]}},{field:"companyNo",type:"business-query"},{field:"status",type:"select",placeholder:"\u662F\u5426\u5BF9\u8D26",options:h},{field:"sendstatus",type:"select",placeholder:"\u72B6\u6001",options:r},{field:"cgdsource",type:"select",placeholder:"\u8BA2\u5355\u6765\u6E90",options:B},{field:"cgdtype",type:"select",placeholder:"\u5546\u54C1\u7C7B\u578B",options:E}]},Y={\u91C7\u8D2D\u5355\u7F16\u7801:"",\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801:"",\u9500\u552E\u8BA2\u5355\u7F16\u7801:"",\u4F9B\u5E94\u5546\u7AEF:"",\u72B6\u6001:"",\u9500\u552E\u5355\u53D1\u8D27\u72B6\u6001:"",\u5165\u5E93\u72B6\u6001:"",\u8BA2\u5355\u6765\u6E90:"",\u5546\u54C1\u6765\u6E90:"",\u652F\u4ED8\u65B9\u5F0F:"",\u5546\u54C1\u7F16\u7801:"",\u5546\u54C1\u540D\u79F0:"",\u7A0E\u7387:"",\u5546\u54C1\u6570\u91CF:"",\u5546\u54C1\u5355\u4EF7:"",\u5546\u54C1\u603B\u4EF7:"",\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:"",\u5356\u51FA\u65B9\u516C\u53F8\u540D\u79F0:"",\u5907\u5E93\u5355\u7F16\u7801:"",\u91C7\u8D2D\u5458:"",\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u53F7:"",\u4E70\u5165\u65B9\u516C\u53F8\u540D\u79F0:"",\u521B\u5EFA\u65F6\u95F4:""},$=q({__name:"index",setup(z){const D="supplyPorder",N=T(!1),d=g([]),f=g(null),{hasPermissionWithCode:A}=M(D),v={pageSearchHook:()=>I(void 0,void 0,m)},S={content:{preview:t=>f.value.onDisplay(t)}};async function P(){if(d.value.length===0){L.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u91C7\u8D2D\u5355");return}const t=Y,s="\u91C7\u8D2D\u5355\u5BFC\u51FA",p=[];d.value.forEach(u=>{const e={...t};e.\u91C7\u8D2D\u5355\u7F16\u7801=u.sequenceNo,e.\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801=u.cxCode,e.\u9500\u552E\u8BA2\u5355\u7F16\u7801=u.qrdCode,e.\u4F9B\u5E94\u5546\u7AEF=u.has_account&&(V.find(o=>o.value==u.has_account+"")||{}).label||"",e.\u72B6\u6001=u.status&&(h.find(o=>o.value==u.status+"")||{}).label||"",e.\u9500\u552E\u5355\u53D1\u8D27\u72B6\u6001=u.qrdSend&&(x.find(o=>o.value==u.qrdSend+"")||{}).label||"",e.\u5165\u5E93\u72B6\u6001=u.sendStatus&&(r.find(o=>o.value==u.sendStatus+"")||{}).label||"",e.\u8BA2\u5355\u6765\u6E90=u.cgdSource&&(B.find(o=>o.value==u.cgdSource+"")||{}).label||"",e.\u5546\u54C1\u6765\u6E90=u.cgdType&&(E.find(o=>o.value==u.cgdType+"")||{}).label||"",e.\u652F\u4ED8\u65B9\u5F0F=u.pay_type,e.\u5546\u54C1\u7F16\u7801=u.goodNo,e.\u5546\u54C1\u540D\u79F0=u.goodName,e.\u7A0E\u7387=u.tax,e.\u5546\u54C1\u6570\u91CF=u.goodNum,e.\u5546\u54C1\u5355\u4EF7=u.goodPrice,e.\u5546\u54C1\u603B\u4EF7=u.totalPrice,e.\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801=u.supplierNo,e.\u5356\u51FA\u65B9\u516C\u53F8\u540D\u79F0=u.supplierName,e.\u5907\u5E93\u5355\u7F16\u7801=u.bkCode,e.\u91C7\u8D2D\u5458=u.ownerName,e.\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u53F7=u.companyNo,e.\u4E70\u5165\u65B9\u516C\u53F8\u540D\u79F0=u.companyName,e.\u521B\u5EFA\u65F6\u95F4=u.addtime,p.push(e)});const l=C.book_new(),c=C.json_to_sheet(p);C.book_append_sheet(l,c,"sheet"),H(l,`${s}.xlsx`,{bookType:"xlsx"})}return(t,s)=>{const p=i("ElButton"),l=i("PageContainer"),c=i("PageAuth");return _(),b(c,{pageName:D},{default:F(()=>[y(l,{hooks:v,events:S,contentConfig:n(W),"search-config":n(m),onContentSelectChange:s[0]||(s[0]=u=>d.value=u)},{content_header:F(()=>[n(A)("048")?(_(),b(p,{key:0,type:"primary",onClick:P,loading:n(N)},{default:F(()=>[O("\u5BFC\u51FA")]),_:1},8,["loading"])):j("v-if",!0)]),_:1},8,["contentConfig","search-config"]),y(G,{ref_key:"purchaseModalRef",ref:f},null,512)]),_:1})}}});var su=k($,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supply/porder/index.vue"]]);export{su as default};