import{_,d as C,x as u,ah as x,r as w,aD as D,o as B,G as b,D as T,H as E,l as O,m,aN as g,am as o,cq as l,bz as F}from"./index.js";import{p as h,a as N}from"./porder.cb2a60e8.js";import{a as W}from"./index.111a3480.js";import{a as k}from"./index.5a7a3827.js";const I=C({__name:"purchase-modal",setup(P,{expose:v}){const r=u(!1),i=u(!1),n=u(!1),p=u([]);x(()=>p.value.length===0?h:N);const t=u({}),f={label:"\u5B50\u5546\u54C1\u4FE1\u606F",span:24,render(s,{child:e}){return o(F,{data:e,border:!0,size:"small",width:"100%"},{default:()=>[o(l,{prop:"childCode",label:"\u5B50\u5546\u54C1\u7F16\u7801",minWidth:"150px",showOverflowTooltip:!0}),o(l,{prop:"child_name",label:"\u5B50\u5546\u54C1\u540D\u79F0",minWidth:"150px",showOverflowTooltip:!0}),o(l,{prop:"child_num",label:"\u7EC4\u5408\u6BD4\u4F8B",minWidth:"80px",showOverflowTooltip:!0}),o(l,{prop:"in_tax_merge",label:"\u7C7B\u76EE\u7F16\u7801",minWidth:"150px",showOverflowTooltip:!0}),o(l,{prop:"in_tax_name",label:"\u8D27\u7269\u548C\u52B3\u52A1\u540D\u79F0",minWidth:"130px",showOverflowTooltip:!0}),o(l,{prop:"in_tax_short",label:"\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0",minWidth:"130px",showOverflowTooltip:!0}),o(l,{prop:"in_tax",label:"\u7A0E\u70B9",minWidth:"60px",showOverflowTooltip:!0},{default:({row:a})=>a.in_tax?a.in_tax+"%":""})]})}};return v({onDisplay:async s=>{i.value=!0,t.value=s,n.value=!0;const e=await W({sequenceNo:s.sequenceNo});t.value.orderTax=e.data.orderTax;const{goodNo:a}=e.data;if(r.value=a.indexOf("SSU")!==-1,r.value){const d=await k({spuCode:a});p.value=d.data||[]}n.value=!1}}),(s,e)=>{const a=w("ElDialog"),d=D("loading");return B(),b(a,{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=c=>i.value=c),title:"\u91C7\u8D2D\u5355\u8BE6\u60C5",width:"1100px",center:"","close-on-click-modal":!1,"close-on-press-escape":!1,onClose:e[1]||(e[1]=c=>t.value={})},{default:T(()=>[E(O(m(g),{columns:[...m(h),...r.value?[f]:[]],data:{...t.value,child:p.value}},null,8,["columns","data"]),[[d,n.value]])]),_:1},8,["modelValue"])}}});var y=_(I,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/porder/components/purchase-modal.vue"]]);export{y as default};
