import{a as N}from"./status.7319085b.js";import{q as g,a2 as B,r,o as i,n as m,p as A,t as e,H as o,S as u,O as b,v as l,P as C,K as E,I as x,aF as S}from"./index.10c3f8e5.js";const L={flex:"","justify-between":"","w-full":"","mb-1":""},O={key:0},V=u("\u6DFB\u52A0\u91C7\u8D2D\u5355"),q=u("\u5220\u9664"),P={key:0,flex:"","gap-1":"","mt-2":""},$=u("\u4FDD\u5B58"),H=g({__name:"basic-purchase",props:{purchaseOrderList:null,readonly:{type:Boolean},supplierNo:null,companyNo:null},emits:["addBtnClick","delBtnClick","crateBtnClick","changeSupplieList"],setup(h,{emit:p}){const c=h,d=B(()=>!c.readonly),F=B(()=>c.purchaseOrderList.length);function k(a){p("delBtnClick",a)}function y(){const{supplierNo:a,companyNo:n}=c;if(!a||!n)return S.warning("\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546\u548C\u4E1A\u52A1\u516C\u53F8");p("addBtnClick")}return(a,n)=>{const w=r("el-tag"),_=r("el-button"),t=r("el-table-column"),D=r("el-table");return i(),m(x,null,[A("div",L,[e(w,{type:"warning"},{default:o(()=>[u("\u5171\u8BA1:"+b(l(F))+"\u4E2A\u8BA2\u5355",1)]),_:1}),l(d)?(i(),m("div",O,[e(_,{type:"primary",onClick:y},{default:o(()=>[V]),_:1})])):C("",!0)]),e(D,{data:h.purchaseOrderList,size:"small"},{default:o(()=>[e(t,{label:"\u91C7\u8D2D\u5355\u7F16\u53F7",prop:"sequenceNo",width:"180"}),e(t,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F","show-overflow-tooltip":""},{default:o(()=>[e(t,{label:"\u8D27\u6B3E",prop:"totalPrice","show-overflow-tooltip":""}),e(t,{label:"\u4F9B\u8D27\u5546",prop:"supplierName","show-overflow-tooltip":""}),e(t,{label:"\u8054\u7CFB\u4EBA","show-overflow-tooltip":""}),e(t,{label:"\u91C7\u8D2D\u5458",prop:"ownerName","show-overflow-tooltip":""}),e(t,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus","show-overflow-tooltip":""},{default:o(({row:s})=>[e(w,null,{default:o(()=>{var f;return[u(b((f=l(N).find(v=>v.value===s.sendStatus))==null?void 0:f.label),1)]}),_:2},1024)]),_:1}),e(t,{label:"\u5F00\u7968\u7F16\u53F7","show-overflow-tooltip":""}),e(t,{label:"\u5F00\u7968\u516C\u53F8",prop:"companyName","show-overflow-tooltip":""})]),_:1}),l(d)?(i(),E(t,{key:0,label:"\u64CD\u4F5C"},{default:o(({row:s})=>[e(_,{link:"",type:"primary",onClick:f=>k(s)},{default:o(()=>[q]),_:2},1032,["onClick"])]),_:1})):C("",!0)]),_:1},8,["data"]),l(d)?(i(),m("div",P,[e(_,{type:"primary",onClick:n[0]||(n[0]=s=>p("crateBtnClick"))},{default:o(()=>[$]),_:1})])):C("",!0)],64)}}});export{H as default};
