import{al as H,aO as Z,_ as j,d as M,ag as Q,o as p,G as B,u as r,w as k,b2 as ee,Z as de,x as pe,r as h,aC as ue,c as T,l as e,C as u,F as $,D as J,b as L,M as _,H as G,L as x,bn as re,a as z,z as X,aV as ce,aW as se,W as me,aM as le,c3 as fe,c4 as ve,bw as oe,aN as he}from"./index.0bc83371.js";import{b as ye,c as we,d as ge}from"./index.a6946a3d.js";import{B as _e}from"./basic-descriptions.10a27b1b.js";import{c as ae}from"./tootip.d8389d77.js";import"./porder.1fe952aa.js";import{s as W,h as Y,j as K,k as be}from"./status.d6b2a53d.js";const te=[{field:"payNo",label:"\u5BF9\u8D26\u5355\u53F7",span:6},{field:"status",label:"\u5BF9\u8D26\u72B6\u6001",render(o){return H(Z,null,{default:()=>{var m;return(m=Fe.find(f=>f.value===String(o)))==null?void 0:m.label}})}},{field:"apply_name",label:"\u7533\u8BF7\u4EBA",span:6},{field:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",span:6},{field:"supplierName",label:"\u5356\u51FA\u65B9\u516C\u53F8",span:12,render:(o,{supplierNo:m})=>ae(o,"\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801 : "+m,270)},{field:"companyName",label:"\u4E70\u5165\u65B9\u516C\u53F8",span:12,render:(o,{companyNo:m})=>ae(o,"\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801 : "+m,270)},{field:"pay_status",label:"\u4ED8\u6B3E\u72B6\u6001",render(o){return H(Z,null,{default:()=>{var m;return(m=Ee.find(f=>f.value===String(o)))==null?void 0:m.label}})}},{field:"apay_fee",label:"\u5DF2\u4ED8\u6B3E"},{field:"pay_fee",label:"\u4ED8\u6B3E\u4E2D"},{field:"wpay_fee",label:"\u672A\u4ED8\u6B3E"},{field:"inv_status",label:"\u5F00\u7968\u72B6\u6001",render(o){return H(Z,null,{default:()=>{var m;return(m=Ce.find(f=>f.value===String(o)))==null?void 0:m.label}})}},{field:"ainv_fee",label:"\u5DF2\u5F00\u7968"},{field:"inv_fee",label:"\u5F00\u7968\u4E2D"},{field:"winv_fee",label:"\u672A\u5F00\u7968"},{field:"total_fee",label:"\u5BF9\u8D26\u603B\u989D"},{field:"pay_type",label:"\u4F9B\u5E94\u5546\u652F\u4ED8\u65B9\u5F0F"},{field:"remark",span:12,label:"\u5907\u6CE8"}],Fe=[{label:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838",value:"1"},{label:"\u5BF9\u8D26\u6210\u529F",value:"2"},{label:"\u5BF9\u8D26\u9A73\u56DE",value:"3"},{label:"\u5DF2\u64A4\u9500\u5BF9\u8D26",value:"4"}],Ee=[{value:"1",label:"\u672A\u4ED8\u6B3E"},{value:"2",label:"\u90E8\u5206\u4ED8\u6B3E"},{value:"3",label:"\u5DF2\u4ED8\u6B3E"}],Ce=[{value:"1",label:"\u672A\u5F00\u7968"},{value:"2",label:"\u5F00\u7968\u4E2D"},{value:"3",label:"\u5DF2\u5F00\u7968"}],De=M({__name:"purchase-descriptions",props:{data:{type:Object,required:!0},showTicketColumn:{type:Boolean,required:!1},isPurchPay:{type:Boolean,required:!1}},setup(o){const m=o,f=["inv_tag_fee","inv_status","ainv_fee","winv_fee","inv_fee","remark"],E=Q(()=>!m.isPurchPay||m.showTicketColumn?te:te.filter(b=>!f.includes(b.field)));return(b,g)=>(p(),B(r(_e),{data:o.data,columns:r(E)},null,8,["data","columns"]))}});var Be=j(De,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ReconciliationForm/src/cpns/purchase-descriptions.vue"]]);const Ne={"w-full":"",flex:"","justify-between":""},Pe={flex:"","mt-2":"","justify-between":""},Se=M({__name:"single-mode",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1}},emits:["selection"],setup(o,{emit:m}){const f=o,E=k(null),b=k([]),{data:g,loading:N,run:P}=ee({isList:!0,success:w=>v.total=w.count}),n=k({timer:[],sequenceNo:"",goodNo:"",goodName:"",cgder:"",cxCode:"",sendstatus:"",cgdsource:"",cgdtype:"",code:"",qrdCode:""}),v=de({pageSize:15,currentPage:1,total:0});async function y(){N.value=!0;const{companyNo:w,supplierNo:l}=f,{currentPage:D,pageSize:a}=v,{timer:c,...s}=n.value,S={...s,start:c[0],end:c[1],status:"0",supplierNo:l,companyNo:w,page:D,size:a};P(ye(S))}function F(){v.currentPage=1,n.value={timer:[],sequenceNo:"",goodNo:"",goodName:"",cgder:"",cxCode:"",sendstatus:"",cgdsource:"",cgdtype:"",code:"",qrdCode:""},y()}function i(w){b.value=w}function R(){m("selection",r(b))}const C=()=>{v.currentPage=1,y()};return pe(()=>{y()}),(w,l)=>{const D=h("ElDatePicker"),a=h("ElCol"),c=h("ElInput"),s=h("ElRow"),S=h("ElOption"),q=h("ElSelect"),V=h("ElButton"),d=h("ElTableColumn"),A=h("ElTag"),O=h("ElPagination"),ie=ue("loading");return p(),T($,null,[e(s,{gutter:5,"mb-1":""},{default:u(()=>[e(a,{span:6},{default:u(()=>[e(D,{size:"small",type:"daterange",modelValue:n.value.timer,"onUpdate:modelValue":l[0]||(l[0]=t=>n.value.timer=t),"start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4","value-format":"YYYY-MM-DD",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e(a,{span:6},{default:u(()=>[e(c,{size:"small",placeholder:"\u91C7\u8D2D\u5355\u7F16\u7801",modelValue:n.value.sequenceNo,"onUpdate:modelValue":l[1]||(l[1]=t=>n.value.sequenceNo=t)},null,8,["modelValue"])]),_:1}),e(a,{span:6},{default:u(()=>[e(c,{size:"small",placeholder:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801",modelValue:n.value.cxCode,"onUpdate:modelValue":l[2]||(l[2]=t=>n.value.cxCode=t)},null,8,["modelValue"])]),_:1}),e(a,{span:6},{default:u(()=>[e(c,{size:"small",placeholder:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",modelValue:n.value.qrdCode,"onUpdate:modelValue":l[3]||(l[3]=t=>n.value.qrdCode=t)},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{gutter:5,"mb-2":""},{default:u(()=>[e(a,{span:6},{default:u(()=>[e(c,{size:"small",placeholder:"\u5546\u54C1\u7F16\u7801",modelValue:n.value.goodNo,"onUpdate:modelValue":l[4]||(l[4]=t=>n.value.goodNo=t)},null,8,["modelValue"])]),_:1}),e(a,{span:6},{default:u(()=>[e(c,{size:"small",placeholder:"\u5546\u54C1\u540D\u79F0",modelValue:n.value.goodName,"onUpdate:modelValue":l[5]||(l[5]=t=>n.value.goodName=t)},null,8,["modelValue"])]),_:1}),e(a,{span:6},{default:u(()=>[e(c,{size:"small",placeholder:"\u91C7\u8D2D\u5458\u540D\u79F0",modelValue:n.value.cgder,"onUpdate:modelValue":l[6]||(l[6]=t=>n.value.cgder=t)},null,8,["modelValue"])]),_:1}),e(a,{span:6},{default:u(()=>[e(q,{placeholder:"\u53D1\u8D27\u72B6\u6001",modelValue:n.value.sendstatus,"onUpdate:modelValue":l[7]||(l[7]=t=>n.value.sendstatus=t),size:"small",clearable:"","w-full":""},{default:u(()=>[(p(!0),T($,null,J(r(W),t=>(p(),B(S,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(s,{"mb-2":""},{default:u(()=>[L("div",Ne,[e(a,{span:12,style:{display:"flex",gap:"10px"}},{default:u(()=>[e(q,{modelValue:n.value.cgdsource,"onUpdate:modelValue":l[8]||(l[8]=t=>n.value.cgdsource=t),size:"small",placeholder:"\u8BA2\u5355\u6765\u6E90",clearable:"","w-full":""},{default:u(()=>[(p(!0),T($,null,J(r(Y),t=>(p(),B(S,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e(q,{modelValue:n.value.cgdtype,"onUpdate:modelValue":l[9]||(l[9]=t=>n.value.cgdtype=t),size:"small","w-full":"",placeholder:"\u5546\u54C1\u6765\u6E90",clearable:""},{default:u(()=>[(p(!0),T($,null,J(r(K),t=>(p(),B(S,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(a,{span:3},{default:u(()=>[e(V,{size:"small",onClick:y,type:"primary"},{default:u(()=>[_("\u641C\u7D22")]),_:1}),e(V,{size:"small",onClick:F},{default:u(()=>[_("\u91CD\u7F6E")]),_:1})]),_:1})])]),_:1}),G((p(),B(r(re),{ref_key:"tableRef",ref:E,size:"small",data:r(g),onSelectionChange:i,"max-height":"580px"},{default:u(()=>[e(d,{type:"selection",fixed:"left",align:"center",width:"40"}),e(d,{label:"\u91C7\u8D2D\u5355\u7F16\u7801",prop:"sequenceNo","show-overflow-tooltip":"",width:"150"}),e(d,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"qrdCode","show-overflow-tooltip":"",width:"150"}),e(d,{label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801",prop:"cxCode","show-overflow-tooltip":"",width:"150"}),e(d,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[e(d,{label:"\u4F9B\u8D27\u5546",prop:"supplierName",width:"160","show-overflow-tooltip":""}),e(d,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type",width:"85","show-overflow-tooltip":""}),e(d,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:t})=>[e(A,{size:"small"},{default:u(()=>{var U;return[_(x((U=r(W).find(I=>I.value===String(t.sendStatus)))==null?void 0:U.label),1)]}),_:2},1024)]),_:1}),e(d,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",width:"180","show-overflow-tooltip":""}),e(d,{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:t})=>[e(A,{size:"small"},{default:u(()=>{var U;return[_(x((U=r(Y).find(I=>I.value===String(t.cgdSource)))==null?void 0:U.label),1)]}),_:2},1024)]),_:1}),e(d,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""})]),_:1}),e(d,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(d,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(d,{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:t})=>[e(A,{size:"small"},{default:u(()=>{var U;return[_(x((U=r(K).find(I=>I.value===String(t.cgdType)))==null?void 0:U.label),1)]}),_:2},1024)]),_:1}),e(d,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""})]),_:1}),e(d,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"70","show-overflow-tooltip":""})]),_:1},8,["data"])),[[ie,r(N)]]),z(" \u5206\u9875\u5668 "),L("div",Pe,[e(O,{"current-page":v.currentPage,"onUpdate:currentPage":l[10]||(l[10]=t=>v.currentPage=t),"page-size":v.pageSize,"onUpdate:pageSize":l[11]||(l[11]=t=>v.pageSize=t),total:v.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:y,onSizeChange:l[12]||(l[12]=()=>C())},null,8,["current-page","page-size","total"]),e(V,{type:"primary",onClick:R},{default:u(()=>[_("\u4FDD\u5B58")]),_:1})])],64)}}});var xe=j(Se,[["__scopeId","data-v-c8e26204"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ReconciliationForm/src/cpns/single-mode.vue"]]);const ke={flex:"","w-full":"","justify-end":"","mt-2":""},Ae=M({__name:"batch-mode",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},type:{type:String,required:!0}},emits:["selection"],setup(o,{emit:m}){const f=o,E=k(f.type),b=k(w(E.value)),g=k(null),N=k(""),{data:P,loading:n,run:v}=ee({success:l=>{}}),y=" ",F=` `;function i(l=""){if(!l)return"";let D=l;const a=D.includes(y),c=D.includes(F);return a&&(D=D.split(y).join("")),c&&(D=D.split(F).join("")),D}function R(){const l=i(N.value),D=l.replace(/[,。;、; .]/g,",").replace(/(^,*)|(,*$)/g,""),a=D.split(",");if(D.length===0||a.length===0){se.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),N.value=l;return}v(we(E.value=="2"?{size:100,cgdNoArr:a,companyNo:f.companyNo,supplierNo:f.supplierNo}:{size:100,qrdNoArr:a,companyNo:f.companyNo,supplierNo:f.supplierNo})),N.value=""}function C(){m("selection",r(P))}function w(l){return`\u8F93\u5165${l==="2"?"\u91C7\u8D2D\u5355":"\u9500\u552E\u5355"}\u7F16\u7801(\u5C0F\u4E8E100\u6761)\uFF0C\u7CFB\u7EDF\u652F\u6301\u7684\u5206\u5272\u7B26\u4E3A\u9017\u53F7(,)\u3001\u53E5\u53F7(.)\u3001\u5206\u53F7(;)\u3001\u987F\u53F7(\u3001)\uFF0C\u56DE\u8F66\u540E\u5F00\u59CB\u89E3\u6790\u3002`}return X(()=>f.type,l=>{E.value=l,b.value=w(l),P.value=[],n.value=!1,N.value=""},{immediate:!0}),(l,D)=>{const a=h("ElInput"),c=h("el-table-column"),s=h("ElTableColumn"),S=h("ElTag"),q=h("ElButton"),V=ue("loading");return p(),T($,null,[e(a,{rows:4,modelValue:N.value,"onUpdate:modelValue":D[0]||(D[0]=d=>N.value=d),style:{"margin-bottom":"10px"},placeholder:b.value,type:"textarea",onKeydown:ce(R,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),G((p(),B(r(re),{ref_key:"tableRef",ref:g,size:"small",data:r(P),"max-height":"580px"},{default:u(()=>[e(c,{type:"index",width:"50","show-overflow-tooltip":"",label:"\u5E8F\u53F7"}),e(s,{label:"\u91C7\u8D2D\u5355\u7F16\u7801",prop:"sequenceNo","show-overflow-tooltip":"",width:"150"}),e(s,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"qrdCode","show-overflow-tooltip":"",width:"150"}),e(s,{label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"cxCode",width:"150"}),e(s,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[e(s,{label:"\u4F9B\u8D27\u5546",prop:"supplierName",width:"160","show-overflow-tooltip":""}),e(s,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type",width:"85","show-overflow-tooltip":""}),e(s,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:d})=>[e(S,{size:"small"},{default:u(()=>{var A;return[_(x((A=r(W).find(O=>O.value===String(d.sendStatus)))==null?void 0:A.label),1)]}),_:2},1024)]),_:1}),e(s,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",width:"180","show-overflow-tooltip":""}),e(s,{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:d})=>[e(S,{size:"small"},{default:u(()=>{var A;return[_(x((A=r(Y).find(O=>O.value===String(d.cgdSource)))==null?void 0:A.label),1)]}),_:2},1024)]),_:1}),e(s,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""})]),_:1}),e(s,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(s,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(s,{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:d})=>[e(S,{size:"small"},{default:u(()=>{var A;return[_(x((A=r(K).find(O=>O.value===String(d.cgdType)))==null?void 0:A.label),1)]}),_:2},1024)]),_:1}),e(s,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""})]),_:1}),e(s,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"70","show-overflow-tooltip":""})]),_:1},8,["data"])),[[V,r(n)]]),L("div",ke,[e(q,{type:"primary",onClick:C},{default:u(()=>[_("\u4FDD\u5B58")]),_:1})])],64)}}});var qe=j(Ae,[["__scopeId","data-v-6a6f6fd0"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ReconciliationForm/src/cpns/batch-mode.vue"]]);const Ve=M({__name:"purchase-modal",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1}},emits:["pushOrder"],setup(o,{expose:m,emit:f}){const E=k(!1),b=k("1");function g(N){E.value=!1,f("pushOrder",N)}return m({onDisplay:()=>E.value=!0}),(N,P)=>{const n=h("el-radio"),v=h("el-radio-group"),y=h("ElDialog");return p(),B(y,{"close-on-click-modal":!1,top:"5vh",modelValue:E.value,"onUpdate:modelValue":P[1]||(P[1]=F=>E.value=F),title:"\u9009\u62E9\u91C7\u8D2D\u5355",center:"","destroy-on-close":"",width:"1040px"},{default:u(()=>[e(v,{modelValue:b.value,"onUpdate:modelValue":P[0]||(P[0]=F=>b.value=F)},{default:u(()=>[e(n,{label:"1"},{default:u(()=>[_("\u52FE\u9009\u67E5\u627E")]),_:1}),e(n,{label:"2"},{default:u(()=>[_("\u6279\u91CF\u67E5\u627E(\u91C7\u8D2D\u5355\u53F7)")]),_:1}),e(n,{label:"3"},{default:u(()=>[_("\u6279\u91CF\u67E5\u627E(\u9500\u552E\u5355\u53F7)")]),_:1})]),_:1},8,["modelValue"]),b.value==="1"?(p(),B(xe,{key:0,"company-no":o.companyNo,"supplier-no":o.supplierNo,onSelection:g},null,8,["company-no","supplier-no"])):(p(),B(qe,{key:1,"company-no":o.companyNo,"supplier-no":o.supplierNo,type:b.value,onSelection:g},null,8,["company-no","supplier-no","type"]))]),_:1},8,["modelValue"])}}});var ze=j(Ve,[["__scopeId","data-v-ed8ff04a"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ReconciliationForm/src/cpns/purchase-modal.vue"]]);const Te={flex:"","justify-between":"","w-full":"","mb-1":""},Re=M({__name:"purchase-table",props:{companyNo:{type:String,required:!1},supplierNo:{type:String,required:!1},purchaseOrders:{type:null,required:!0},readonly:{type:Boolean,required:!0},isPurchPay:{type:Boolean,required:!1}},emits:["push","delete","choose"],setup(o,{emit:m}){const f=o,E=k(null);function b(n,v){var y,F,i;try{y=n.toString().split(".")[1].length}catch{y=0}try{F=v.toString().split(".")[1].length}catch{F=0}return i=Math.pow(10,Math.max(y,F)),(n*i+v*i)/i}const g=Q(()=>f.purchaseOrders.length),N=Q(()=>{const{purchaseOrders:n}=f,v=n.reduce((y,{totalPrice:F})=>b(y,F||0),0);return Number(v).toFixed(2)});function P(){const{supplierNo:n,companyNo:v}=f;if(!n||!v)return se.warning("\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546\u548C\u4E1A\u52A1\u516C\u53F8");E.value.onDisplay()}return(n,v)=>{const y=h("ElTag"),F=h("ElButton"),i=h("ElTableColumn"),R=h("ElTable");return p(),T("div",null,[L("div",Te,[e(y,{type:"warning"},{default:u(()=>[_("\u5171\u8BA1:"+x(r(g))+"\u4E2A\u8BA2\u5355,\u5171\u8BA1 "+x(r(N))+" \u5143",1)]),_:1}),!o.readonly&&!o.isPurchPay?(p(),B(F,{key:0,type:"primary",onClick:P},{default:u(()=>[_("\u6DFB\u52A0\u91C7\u8D2D\u5355")]),_:1})):z("v-if",!0)]),e(R,{ref:"tableRef","row-key":"id",size:"small",data:o.purchaseOrders,"max-height":"400"},{default:u(()=>[e(i,{label:"\u91C7\u8D2D\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"sequenceNo",width:"150"}),e(i,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"qrdCode",width:"150"}),e(i,{label:"\u91C7\u8D2D\u4E3B\u5355\u53F7","show-overflow-tooltip":"",prop:"cxCode",width:"150"}),e(i,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[e(i,{label:"\u4F9B\u8D27\u5546",prop:"supplierName","min-width":"160","show-overflow-tooltip":""}),o.readonly?z("v-if",!0):(p(),B(i,{key:0,label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","min-width":"160","show-overflow-tooltip":""})),e(i,{label:"\u9500\u552E\u5355\u53D1\u8D27\u72B6\u6001",prop:"qrdSend",width:"110","show-overflow-tooltip":""},{default:u(({row:C})=>[e(y,null,{default:u(()=>{var w;return[_(x(((w=r(W).find(l=>l.value===String(C.qrdSend)))==null?void 0:w.label)||"--"),1)]}),_:2},1024)]),_:1}),e(i,{label:"\u5165\u5E93\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:C})=>[e(y,null,{default:u(()=>{var w;return[_(x(((w=r(be).find(l=>l.value===String(C.sendStatus)))==null?void 0:w.label)||"--"),1)]}),_:2},1024)]),_:1}),e(i,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName","min-width":"180","show-overflow-tooltip":""}),e(i,{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:C})=>[e(y,null,{default:u(()=>{var w;return[_(x((w=r(Y).find(l=>l.value===C.cgdSource))==null?void 0:w.label),1)]}),_:2},1024)]),_:1}),e(i,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""})]),_:1}),e(i,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(i,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:C})=>[e(y,null,{default:u(()=>{var w;return[_(x((w=r(K).find(l=>l.value===String(C.cgdType)))==null?void 0:w.label),1)]}),_:2},1024)]),_:1}),e(i,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""}),e(i,{label:"\u7A0E\u7387",prop:"tax","show-overflow-tooltip":""},{default:u(({row:C})=>[_(x(C.tax)+"% ",1)]),_:1})]),_:1}),e(i,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"75","show-overflow-tooltip":""}),o.readonly?z("v-if",!0):(p(),B(i,{key:0,label:"\u64CD\u4F5C",fixed:"right"},{default:u(({$index:C})=>[e(F,{link:"",type:"primary",onClick:()=>m("delete",C)},{default:u(()=>[_("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1}))]),_:1},8,["data"]),e(ze,{ref_key:"PurchaseModalRef",ref:E,companyNo:o.companyNo,supplierNo:o.supplierNo,onPushOrder:v[0]||(v[0]=C=>m("push",C))},null,8,["companyNo","supplierNo"])])}}});var ne=j(Re,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ReconciliationForm/src/cpns/purchase-table.vue"]]);const Ue={cids:{required:!0,trigger:"change",message:"\u8BF7\u6DFB\u52A0\u91C7\u8D2D\u5355\u4FE1\u606F"},companyNo:{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8"},supplierNo:{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546"}},Oe={class:"w-full"},je={key:0,class:"w-full flex justify-end"},Me={key:0,flex:"","gap-10":""},Ie={key:0,class:"flex w-full justify-end"},$e=M({__name:"index",props:{id:{type:String,required:!1},isPurch:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},isPurchPay:{type:Boolean,required:!1},showTicketColumn:{type:Boolean,required:!1}},emits:["create","choose","getRecord"],setup(o,{expose:m,emit:f}){const E=o,{currentCompany:b}=me(),g=k({companyNo:"",supplierNo:"",companyItem:{},cids:[]}),N=k(null),P=k([]),{run:n,data:v,loading:y}=ee({initalData:{},success:function(a){f("getRecord",a),F(a.cgdlist)}});function F(a){if(!!a)for(let c=0;cn(ge({payNo:E.id})),l=a=>{const{code:c,name:s,type:S}=a,V=S==="3"||S==="\u4E1A\u52A1\u516C\u53F8"?"(\u5DF2\u5347\u7EA7\u4E3A\u4E1A\u52A1\u516C\u53F8)":"";return c+" / "+s+V},D=a=>{const{companyNo:c,company_name:s}=a;return c+" / "+s};return X(()=>E.id,a=>a&&w(),{immediate:!0}),X(()=>b.value,({companyNo:a})=>{g.value[E.isPurch?"companyNo":"supplierNo"]=a},{immediate:!0}),m({detail:v,refresh:()=>w()}),(a,c)=>{const s=h("ElButton"),S=h("ElInput"),q=h("ElFormItem"),V=ue("loading");return G((p(),T("div",Oe,[o.isPurchPay?(p(),T("div",je,[e(s,{text:"",type:"primary",onClick:c[0]||(c[0]=()=>f("choose"))},{default:u(()=>[_(" \u9009\u62E9")]),_:1})])):z("v-if",!0),o.readonly?(p(),B(Be,{key:1,showTicketColumn:o.showTicketColumn,isPurchPay:o.isPurchPay,data:r(v)},null,8,["showTicketColumn","isPurchPay","data"])):z("v-if",!0),o.isPurchPay?z("v-if",!0):G((p(),B(r(he),{key:2,class:"w-full",ref_key:"formRef",ref:N,model:g.value,rules:r(Ue)},{default:u(()=>[o.readonly?z("v-if",!0):(p(),T("div",Me,[e(q,{label:"\u4E70\u65B9\u516C\u53F8",prop:"companyNo"},{default:u(()=>[o.isPurch?(p(),B(S,{key:1,style:{width:"300px"},value:r(b).companyName,disabled:""},null,8,["value"])):(p(),B(r(le),{key:0,value:g.value.companyNo,"onUpdate:value":c[1]||(c[1]=d=>g.value.companyNo=d),style:{width:"386px"},api:r(fe),placeholder:"\u8BF7\u9009\u62E9\u4E70\u65B9\u516C\u53F8","request-prop":"company_name","response-label-prop":"company_name","response-val-prop":"companyNo","disabled-value":r(b).companyNo,getLabel:D,onItemChange:R},null,8,["value","api","disabled-value"]))]),_:1}),e(q,{label:"\u5356\u65B9\u516C\u53F8",prop:"supplierNo"},{default:u(()=>[o.isPurch?(p(),B(r(le),{key:1,value:g.value.supplierNo,"onUpdate:value":c[2]||(c[2]=d=>g.value.supplierNo=d),style:{width:"386px"},api:r(ve),placeholder:"\u8BF7\u9009\u62E9\u5356\u65B9\u516C\u53F8","request-prop":"name","response-label-prop":"name","response-val-prop":"code","disabled-value":r(b).companyNo,getLabel:l},null,8,["value","api","disabled-value"])):(p(),B(S,{key:0,style:{width:"300px"},value:r(b).companyName,disabled:""},null,8,["value"]))]),_:1})])),e(q,{label:o.readonly?"":"\u91C7\u8D2D\u5355\u4FE1\u606F",prop:o.readonly?"":"cids"},{default:u(()=>[e(ne,oe({class:"w-full mt-1"},g.value,{readonly:o.readonly,purchaseOrders:P.value,onDelete:i,onPush:F}),null,16,["readonly","purchaseOrders"])]),_:1},8,["label","prop"]),e(q,null,{default:u(()=>[o.readonly?z("v-if",!0):(p(),T("div",Ie,[e(s,{type:"primary",onClick:C,loading:o.loading},{default:u(()=>[_("\u4FDD\u5B58")]),_:1},8,["loading"])]))]),_:1})]),_:1},8,["model","rules"])),[[V,o.loading]]),o.isPurchPay?(p(),B(ne,oe({key:3,class:"w-full mt-1"},g.value,{readonly:o.readonly,isPurchPay:o.isPurchPay,purchaseOrders:P.value,onDelete:i,onPush:F}),null,16,["readonly","isPurchPay","purchaseOrders"])):z("v-if",!0)])),[[V,r(y)||o.loading]])}}});var Ze=j($e,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ReconciliationForm/src/index.vue"]]);export{Ze as R};