import{_,d as C,n as u,aa as w,r as x,aw as B,o as D,A as b,y as T,B as E,h as O,i as m,ca as g,af as o,dQ as l,cY as F}from"./index.js";import{p as h,a as W}from"./porder.827c74bc.js";import{a as N}from"./index.d978a290.js";import{a as k}from"./index.904472d8.js";const y=C({__name:"purchase-modal",setup(A,{expose:v}){const r=u(!1),i=u(!1),n=u(!1),p=u([]);w(()=>p.value.length===0?h:W);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 N({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=x("ElDialog"),d=B("loading");return D(),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 S=_(y,[["__file","D:/work/jiesuan/settle-vue3/src/views/supply/porder/components/purchase-modal.vue"]]);export{S as default};
