purchase-order.f66db0af.js 2.5 KB

1
  1. import{d as k}from"./index.8f3e7834.js";import{u as F}from"./use-response-handle.a0fb8de0.js";import{q as v,a2 as N,L as g,K as S,t as i,o as c,n as w,p as _,w as e,x as o,z as r,y as E,D as L,v as f,u as y,F as x}from"./index.f47bb45b.js";const A={flex:"","justify-between":"","w-full":"","mb-1":""},q={key:0},V=r("\u660E\u7EC6\u4E0B\u8F7D"),O=r("\u6DFB\u52A0\u91C7\u8D2D\u5355"),$=r("\u5220\u9664"),H={flex:"","gap-1":"","mt-2":""},j=r("\u4FDD\u5B58"),T=v({__name:"purchase-order",props:{purchaseOrderList:{type:Array,required:!0},supplierNo:{type:String},companyNo:{type:String},isShowButton:{type:Boolean}},emits:["addBtnClick","delBtnClick","crateBtnClick","changeSupplieList"],setup(n,{emit:p}){const l=n,B=F(),C=N(()=>l.purchaseOrderList.length);async function h(){const{supplierNo:s,companyNo:u}=l;if(!u||!s)return;const{code:d,data:a,message:t}=await k({supplierNo:s,companyNo:u});B({code:d,message:t,handler:()=>p("changeSupplieList",a.list)})}function D(s){p("delBtnClick",s)}return g(()=>[l.companyNo,l.supplierNo],()=>{!l.companyNo||!l.supplierNo||h()},{deep:!0}),S(()=>h()),(s,u)=>{const d=i("el-tag"),a=i("el-button"),t=i("el-table-column"),b=i("el-table");return c(),w(x,null,[_("div",A,[e(d,{type:"warning"},{default:o(()=>[r("\u5171\u8BA1:"+E(L(C))+"\u4E2A\u8BA2\u5355",1)]),_:1}),n.isShowButton?(c(),w("div",q,[e(a,{type:"primary"},{default:o(()=>[V]),_:1}),e(a,{type:"primary",onClick:u[0]||(u[0]=m=>p("addBtnClick"))},{default:o(()=>[O]),_:1})])):f("",!0)]),e(b,{data:n.purchaseOrderList},{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:"\u8D37\u6B3E","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":""}),e(t,{label:"\u5F00\u7968\u7F16\u53F7","show-overflow-tooltip":""}),e(t,{label:"\u5F00\u7968\u516C\u53F8",prop:"companyName","show-overflow-tooltip":""})]),_:1}),n.isShowButton?(c(),y(t,{key:0,label:"\u64CD\u4F5C"},{default:o(({row:m})=>[e(a,{link:"",type:"primary",onClick:z=>D(m)},{default:o(()=>[$]),_:2},1032,["onClick"])]),_:1})):f("",!0)]),_:1},8,["data"]),_("div",H,[n.isShowButton?(c(),y(a,{key:0,type:"primary",onClick:u[1]||(u[1]=m=>p("crateBtnClick"))},{default:o(()=>[j]),_:1})):f("",!0)])],64)}}});export{T as default};