index.8ad79f80.js 38 KB

12345678910
  1. import{_ as Y,d as G,ah as ne,o as n,G as y,m as i,aN as re,x as z,bc as ie,Z as ve,y as ge,r as B,aD as se,c as A,l as e,D as u,F as W,E as ae,b3 as ue,h as Q,c9 as le,ca as oe,M as F,H as te,L as P,a as f,cb as de,bz as he,cc as Fe,aZ as H,A as Z,aY as Ee,cd as _e,aV as Be,bY as ye,ar as Ce,ce as we,am as be,cf as De,aP as X,J as Pe,W as Ne,b7 as xe,cg as ce,ch as Se,ci as ke,bJ as pe,aQ as Ae,cj as Te,ck as qe,b4 as J}from"./index.js";import{o as fe}from"./orderRecord.4d98a397.js";import"./porder.9a85976d.js";const Ve=G({__name:"purchase-descriptions",props:{data:{type:Object,required:!0},showTicketColumn:{type:Boolean,required:!1},isPurchPay:{type:Boolean,required:!1}},setup(o){const $=o,E=["inv_tag_fee","inv_status","ainv_fee","winv_fee","inv_fee","remark"],p=ne(()=>!$.isPurchPay||$.showTicketColumn?fe:fe.filter(v=>!E.includes(v.field)));return(v,k)=>(n(),y(i(re),{columns:i(p),data:o.data},null,8,["columns","data"]))}});var Oe=Y(Ve,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/purchase-descriptions.vue"]]);const ze={"w-full":"",flex:"","justify-between":""},Re={key:0},Ie={key:0},Ue={key:0},$e={key:0},je={key:0},Me={flex:"","mt-2":"","justify-between":""},Le=G({__name:"single-mode",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},isComon:{type:String,required:!1}},emits:["selection"],setup(o,{emit:$}){const E=o,p=z(null),v=z([]),{data:k,loading:I,run:T}=ie({isList:!0,success:O=>c.total=O.count}),d=z({timer:[],sequenceNo:"",goodNo:"",goodName:"",cgder:"",cxCode:"",sendstatus:"",cgdsource:"",cgdtype:"",code:"",qrdCode:"",total:"2"}),c=ve({pageSize:15,currentPage:1,total:0});async function S(){I.value=!0;const{companyNo:O,supplierNo:s}=E,{currentPage:g,pageSize:_}=c,{timer:r,...w}=d.value,b={...w,start:r[0],end:r[1],is_comon:E.isComon,status:"0",supplierNo:s,companyNo:O,page:g,size:_};T(Fe(b))}function D(){c.currentPage=1,d.value={timer:[],sequenceNo:"",goodNo:"",goodName:"",cgder:"",cxCode:"",sendstatus:"",cgdsource:"",cgdtype:"",code:"",qrdCode:"",total:"2"},S()}function j(O){v.value=O}function N(){if(v.value.filter(({cgd_status:g})=>String(g)==="0").length!==0){H.warning("\u4E0D\u80FD\u9009\u62E9\u91C7\u8D2D\u5355\u72B6\u6001\u4E3A '\u5F85\u4E0E\u4F9B\u5E94\u5546\u786E\u8BA4' \u7684\u7684\u91C7\u8D2D\u5355");return}const s=v.value.filter(({totalPrice:g})=>Number(g)===0);if(s.length!==0){H.warning(`\u91C7\u8D2D\u5355${s.map(({sequenceNo:g})=>g).join("\u3001")}\u6DFB\u52A0\u5931\u8D25,\u603B\u8D27\u6B3E\u4E0D\u80FD\u4E3A0\u5143`);return}$("selection",i(v))}const M=()=>{c.currentPage=1,S()};return ge(()=>{S()}),(O,s)=>{const g=B("ElDatePicker"),_=B("ElCol"),r=B("ElInput"),w=B("ElRow"),b=B("ElOption"),q=B("ElSelect"),a=B("ElButton"),m=B("ElTableColumn"),U=B("IconifyIconOffline"),C=B("ElTooltip"),t=B("ElTag"),h=B("ElPagination"),V=se("loading");return n(),A(W,null,[e(w,{gutter:5,"mb-1":""},{default:u(()=>[e(_,{span:6},{default:u(()=>[e(g,{size:"small",type:"daterange",modelValue:d.value.timer,"onUpdate:modelValue":s[0]||(s[0]=l=>d.value.timer=l),"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(_,{span:6},{default:u(()=>[e(r,{size:"small",placeholder:"\u91C7\u8D2D\u5355\u7F16\u7801",modelValue:d.value.sequenceNo,"onUpdate:modelValue":s[1]||(s[1]=l=>d.value.sequenceNo=l)},null,8,["modelValue"])]),_:1}),e(_,{span:6},{default:u(()=>[e(r,{size:"small",placeholder:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801",modelValue:d.value.cxCode,"onUpdate:modelValue":s[2]||(s[2]=l=>d.value.cxCode=l)},null,8,["modelValue"])]),_:1}),e(_,{span:6},{default:u(()=>[e(r,{size:"small",placeholder:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",modelValue:d.value.qrdCode,"onUpdate:modelValue":s[3]||(s[3]=l=>d.value.qrdCode=l)},null,8,["modelValue"])]),_:1})]),_:1}),e(w,{gutter:5,"mb-2":""},{default:u(()=>[e(_,{span:6},{default:u(()=>[e(r,{size:"small",placeholder:"\u5546\u54C1\u7F16\u7801",modelValue:d.value.goodNo,"onUpdate:modelValue":s[4]||(s[4]=l=>d.value.goodNo=l)},null,8,["modelValue"])]),_:1}),e(_,{span:6},{default:u(()=>[e(r,{size:"small",placeholder:"\u5546\u54C1\u540D\u79F0",modelValue:d.value.goodName,"onUpdate:modelValue":s[5]||(s[5]=l=>d.value.goodName=l)},null,8,["modelValue"])]),_:1}),e(_,{span:6},{default:u(()=>[e(r,{size:"small",placeholder:"\u91C7\u8D2D\u5458\u540D\u79F0",modelValue:d.value.cgder,"onUpdate:modelValue":s[6]||(s[6]=l=>d.value.cgder=l)},null,8,["modelValue"])]),_:1}),e(_,{span:6},{default:u(()=>[e(q,{placeholder:"\u53D1\u8D27\u72B6\u6001",modelValue:d.value.sendstatus,"onUpdate:modelValue":s[7]||(s[7]=l=>d.value.sendstatus=l),size:"small",clearable:"","w-full":""},{default:u(()=>[(n(!0),A(W,null,ae(i(ue),l=>(n(),y(b,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(w,{"mb-2":""},{default:u(()=>[Q("div",ze,[e(_,{span:16,style:{display:"flex",gap:"10px"}},{default:u(()=>[e(q,{modelValue:d.value.cgdsource,"onUpdate:modelValue":s[8]||(s[8]=l=>d.value.cgdsource=l),size:"small",placeholder:"\u8BA2\u5355\u6765\u6E90",clearable:"","w-full":""},{default:u(()=>[(n(!0),A(W,null,ae(i(le),l=>(n(),y(b,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e(q,{modelValue:d.value.cgdtype,"onUpdate:modelValue":s[9]||(s[9]=l=>d.value.cgdtype=l),size:"small","w-full":"",placeholder:"\u5546\u54C1\u6765\u6E90",clearable:""},{default:u(()=>[(n(!0),A(W,null,ae(i(oe),l=>(n(),y(b,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e(q,{style:{width:"100%"},size:"small",placeholder:"\u603B\u8D27\u6B3E\u662F\u5426\u4E3A\u96F6",modelValue:d.value.total,"onUpdate:modelValue":s[10]||(s[10]=l=>d.value.total=l),disabled:""},{default:u(()=>[e(b,{value:"2",label:"\u603B\u8D27\u6B3E\u4E0D\u4E3A\u96F6"}),e(b,{value:"1",label:"\u603B\u8D27\u6B3E\u4E3A\u96F6"})]),_:1},8,["modelValue"])]),_:1}),e(_,{span:3},{default:u(()=>[e(a,{size:"small",onClick:S,type:"primary"},{default:u(()=>[F("\u641C\u7D22")]),_:1}),e(a,{size:"small",onClick:D},{default:u(()=>[F("\u91CD\u7F6E")]),_:1})]),_:1})])]),_:1}),te((n(),y(i(he),{ref_key:"tableRef",ref:p,size:"small",data:i(k),onSelectionChange:j,"max-height":"580px"},{default:u(()=>[e(m,{type:"selection",fixed:"left",align:"center",width:"40"}),e(m,{label:"\u91C7\u8D2D\u5355\u7F16\u7801",prop:"sequenceNo","show-overflow-tooltip":"",width:"150"}),e(m,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"qrdCode","show-overflow-tooltip":"",width:"150"}),e(m,{label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801",prop:"cxCode","show-overflow-tooltip":"",width:"150"}),e(m,{label:"\u7C7B\u76EE\u4FE1\u606F"},{default:u(()=>[e(m,{label:"\u7C7B\u76EE\u7F16\u7801","show-overflow-tooltip":"",width:"120"},{default:u(({row:l})=>[l.orderTax?(n(),A("span",Re,P(l.orderTax.cat_code),1)):f("v-if",!0)]),_:1}),e(m,{label:"\u8D27\u7269\u548C\u52B3\u52A1\u540D\u79F0","show-overflow-tooltip":"",width:"130"},{default:u(({row:l})=>[l.orderTax?(n(),A("span",Ie,P(l.orderTax.cat_name),1)):f("v-if",!0)]),_:1}),e(m,{label:"\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0","show-overflow-tooltip":"",width:"160"},{default:u(({row:l})=>[l.orderTax?(n(),A("span",Ue,P(l.orderTax.short_name),1)):f("v-if",!0)]),_:1}),e(m,{label:"\u5F00\u7968\u5546\u54C1\u540D\u79F0","show-overflow-tooltip":"",width:"130"},{default:u(({row:l})=>[l.orderTax?(n(),A("span",$e,P(l.orderTax.inv_good_name),1)):f("v-if",!0)]),_:1}),e(m,{label:"\u5F00\u7968\u7A0E\u7387","show-overflow-tooltip":"",width:"80"},{default:u(({row:l})=>[l.orderTax?(n(),A("span",je,P(l.orderTax.tax?l.orderTax.tax+"%":""),1)):f("v-if",!0)]),_:1})]),_:1}),e(m,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[e(m,{label:"\u4F9B\u8D27\u5546",prop:"supplierName",width:"160","show-overflow-tooltip":""},{default:u(({row:l})=>[e(C,{placement:"left",content:"\u4F9B\u5E94\u5546\u7F16\u7801:"+l.supplierNo},{default:u(()=>[e(U,{class:"inline-block mr-[2px] cursor-pointer",icon:"information-line"})]),_:2},1032,["content"]),F(" "+P(l.supplierName),1)]),_:1}),e(m,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type",width:"85","show-overflow-tooltip":""}),O.edit?f("v-if",!0):(n(),y(m,{key:0,label:"\u91C7\u8D2D\u5355\u72B6\u6001",prop:"cgd_status","min-width":"140","show-overflow-tooltip":""},{default:u(({row:l})=>[e(t,null,{default:u(()=>{var x;return[F(P(((x=i(de).find(L=>L.value===String(l.cgd_status)))==null?void 0:x.label)||"--"),1)]}),_:2},1024)]),_:1})),e(m,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:l})=>[e(t,{size:"small"},{default:u(()=>{var x;return[F(P((x=i(ue).find(L=>L.value===String(l.sendStatus)))==null?void 0:x.label),1)]}),_:2},1024)]),_:1}),e(m,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",width:"180","show-overflow-tooltip":""},{default:u(({row:l})=>[e(C,{placement:"left",content:"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801:"+l.companyNo},{default:u(()=>[e(U,{class:"inline-block mr-[2px] cursor-pointer",icon:"information-line"})]),_:2},1032,["content"]),F(" "+P(l.companyName),1)]),_:1}),e(m,{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:l})=>[e(t,{size:"small"},{default:u(()=>{var x;return[F(P((x=i(le).find(L=>L.value===String(l.cgdSource)))==null?void 0:x.label),1)]}),_:2},1024)]),_:1}),e(m,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""})]),_:1}),e(m,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(m,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(m,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(m,{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:l})=>[e(t,{size:"small"},{default:u(()=>{var x;return[F(P((x=i(oe).find(L=>L.value===String(l.cgdType)))==null?void 0:x.label),1)]}),_:2},1024)]),_:1}),e(m,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""})]),_:1}),e(m,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"70","show-overflow-tooltip":""})]),_:1},8,["data"])),[[V,i(I)]]),f(" \u5206\u9875\u5668 "),Q("div",Me,[e(h,{"current-page":c.currentPage,"onUpdate:currentPage":s[11]||(s[11]=l=>c.currentPage=l),"page-size":c.pageSize,"onUpdate:pageSize":s[12]||(s[12]=l=>c.pageSize=l),total:c.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:S,onSizeChange:s[13]||(s[13]=()=>M())},null,8,["current-page","page-size","total"]),e(a,{type:"primary",onClick:N},{default:u(()=>[F("\u4FDD\u5B58")]),_:1})])],64)}}});var He=Y(Le,[["__scopeId","data-v-c8e26204"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/single-mode.vue"]]);const Ye={flex:"","w-full":"","justify-end":"","mt-2":""},Ge=G({__name:"batch-mode",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},isComon:{type:String,required:!0},type:{type:String,required:!0}},emits:["selection"],setup(o,{emit:$}){const E=o,p=z(""),v=z(E.type),k=z(O(v.value)),I=z(null),{run:T,loading:d,data:c}=ie({success:s=>{}}),S=" ",D=`
  2. `;function j(s=""){if(!s)return"";let g=s;const _=g.includes(S),r=g.includes(D);return _&&(g=g.split(S).join("")),r&&(g=g.split(D).join("")),g}function N(){const s=j(p.value),g=s.replace(/[,。;、; .]/g,",").replace(/(^,*)|(,*$)/g,""),_=g.split(",");if(g.length===0||_.length===0){H.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),p.value=s;return}const r={size:100,companyNo:E.companyNo,supplierNo:E.supplierNo,is_comon:E.isComon};r[v.value=="2"?"cgdNoArr":"qrdNoArr"]=_,T(_e(r)),p.value=""}function M(){if(c.value.filter(({cgd_status:_})=>String(_)==="0").length!==0){H.warning("\u4E0D\u80FD\u9009\u62E9\u91C7\u8D2D\u5355\u72B6\u6001\u4E3A '\u5F85\u4E0E\u4F9B\u5E94\u5546\u786E\u8BA4' \u7684\u7684\u91C7\u8D2D\u5355");return}const g=c.value.filter(({totalPrice:_})=>Number(_)===0);if(g.length!==0){H.warning(`\u91C7\u8D2D\u5355${g.map(({sequenceNo:_})=>_).join("\u3001")}\u6DFB\u52A0\u5931\u8D25,\u603B\u8D27\u6B3E\u4E0D\u80FD\u4E3A0\u5143`);return}$("selection",i(c))}function O(s){return`\u8F93\u5165${s==="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 Z(()=>E.type,s=>{v.value=s,k.value=O(s),p.value="",d.value=!1,c.value=[]},{immediate:!0}),(s,g)=>{const _=B("ElInput"),r=B("ElTableColumn"),w=B("ElTag"),b=B("ElButton"),q=se("loading");return n(),A(W,null,[e(_,{rows:4,modelValue:p.value,"onUpdate:modelValue":g[0]||(g[0]=a=>p.value=a),style:{"margin-bottom":"10px"},placeholder:k.value,type:"textarea",onKeydown:Ee(N,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),te((n(),y(i(he),{ref_key:"tableRef",ref:I,size:"small",data:i(c),"max-height":"580px"},{default:u(()=>[e(r,{type:"index",width:"50","show-overflow-tooltip":"",label:"\u5E8F\u53F7"}),e(r,{label:"\u91C7\u8D2D\u5355\u7F16\u7801",prop:"sequenceNo","show-overflow-tooltip":"",width:"150"}),e(r,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"qrdCode","show-overflow-tooltip":"",width:"150"}),e(r,{label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"cxCode",width:"150"}),e(r,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[e(r,{label:"\u4F9B\u8D27\u5546",prop:"supplierName",width:"160","show-overflow-tooltip":""}),e(r,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type",width:"85","show-overflow-tooltip":""}),s.edit?f("v-if",!0):(n(),y(r,{key:0,label:"\u91C7\u8D2D\u5355\u72B6\u6001",prop:"cgd_status","min-width":"140","show-overflow-tooltip":""},{default:u(({row:a})=>[e(w,null,{default:u(()=>{var m;return[F(P(((m=i(de).find(U=>U.value===String(a.cgd_status)))==null?void 0:m.label)||"--"),1)]}),_:2},1024)]),_:1})),e(r,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:a})=>[e(w,{size:"small"},{default:u(()=>{var m;return[F(P((m=i(ue).find(U=>U.value===String(a.sendStatus)))==null?void 0:m.label),1)]}),_:2},1024)]),_:1}),e(r,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",width:"180","show-overflow-tooltip":""}),e(r,{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:a})=>[e(w,{size:"small"},{default:u(()=>{var m;return[F(P((m=i(le).find(U=>U.value===String(a.cgdSource)))==null?void 0:m.label),1)]}),_:2},1024)]),_:1}),e(r,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""})]),_:1}),e(r,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(r,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:a})=>[e(w,{size:"small"},{default:u(()=>{var m;return[F(P((m=i(oe).find(U=>U.value===String(a.cgdType)))==null?void 0:m.label),1)]}),_:2},1024)]),_:1}),e(r,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""})]),_:1}),e(r,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"70","show-overflow-tooltip":""})]),_:1},8,["data"])),[[q,i(d)]]),Q("div",Ye,[e(b,{type:"primary",onClick:M},{default:u(()=>[F("\u4FDD\u5B58")]),_:1})])],64)}}});var Ke=Y(Ge,[["__scopeId","data-v-6a6f6fd0"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/batch-mode.vue"]]);const We=G({__name:"purchase-modal",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},isComon:{type:String,required:!1}},emits:["pushOrder"],setup(o,{expose:$,emit:E}){const p=z(!1),v=z("1");function k(I){p.value=!1,E("pushOrder",I)}return $({onDisplay:()=>p.value=!0}),(I,T)=>{const d=B("el-radio"),c=B("el-radio-group"),S=B("ElDialog");return n(),y(S,{top:"5vh",modelValue:p.value,"onUpdate:modelValue":T[1]||(T[1]=D=>p.value=D),title:"\u9009\u62E9\u91C7\u8D2D\u5355",center:"","destroy-on-close":"",width:"1040px","close-on-click-modal":!1,"close-on-press-escape":!1},{default:u(()=>[e(c,{modelValue:v.value,"onUpdate:modelValue":T[0]||(T[0]=D=>v.value=D)},{default:u(()=>[e(d,{label:"1"},{default:u(()=>[F("\u52FE\u9009\u67E5\u627E")]),_:1}),e(d,{label:"2"},{default:u(()=>[F("\u6279\u91CF\u67E5\u627E(\u91C7\u8D2D\u5355\u53F7)")]),_:1}),e(d,{label:"3"},{default:u(()=>[F("\u6279\u91CF\u67E5\u627E(\u9500\u552E\u5355\u53F7)")]),_:1})]),_:1},8,["modelValue"]),v.value==="1"?(n(),y(He,{key:0,"company-no":o.companyNo,"supplier-no":o.supplierNo,isComon:o.isComon,onSelection:k},null,8,["company-no","supplier-no","isComon"])):(n(),y(Ke,{key:1,"company-no":o.companyNo,"supplier-no":o.supplierNo,type:v.value,isComon:o.isComon,onSelection:k},null,8,["company-no","supplier-no","type","isComon"]))]),_:1},8,["modelValue"])}}});var Je=Y(We,[["__scopeId","data-v-ed8ff04a"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/purchase-modal.vue"]]);const Ze={class:"flex justify-end w-full"},Qe=G({__name:"purpay-modal",props:{visible:{type:Boolean,required:!0},index:{type:Number,required:!0},data:{type:null,required:!0}},emits:["save"],setup(o,{emit:$}){const E=o,p=Be(E,"visible"),v=z({}),k=[{field:"sequenceNo",label:"\u9500\u552E\u5355\u7F16\u53F7",span:6},{field:"cxCode",label:"\u9500\u552E\u5355\u4E3B\u7F16\u53F7",span:6},{field:"goodNo",label:"\u5546\u54C1\u7F16\u7801",span:6},{field:"goodPrice",label:"\u5546\u54C1\u5355\u4EF7"},{field:"goodName",label:"\u5546\u54C1\u540D\u79F0",span:24},{field:"goodNum",label:"\u5546\u54C1\u603B\u6570\u91CF",span:8},{field:"ainv_num",label:"\u5DF2\u5F00\u7968\u6570\u91CF",span:8},{field:"winv_num",label:"\u672A\u5F00\u7968\u6570\u91CF",span:8},{field:"totalPrice",label:"\u8BA2\u5355\u603B\u91D1\u989D",span:8},{field:"apay_fee",label:"\u5DF2\u4ED8\u6B3E\u91D1\u989D",span:8},{field:"wpay_fee",label:"\u672A\u4ED8\u6B3E\u91D1\u989D",span:8},{span:8,label:"\u672C\u6B21\u4ED8\u6B3E\u91D1\u989D",render(){return be(De,{precision:2,min:0,size:"small","controls-position":"right",max:v.value.wpay_fee,modelValue:v.value.currentTotal,onChange:T=>v.value.currentTotal=T})}}];function I(){$("save",v.value,E.index),p.value=!1}return Z(()=>E.visible,()=>{!E.visible||(v.value={...E.data})}),(T,d)=>(n(),y(i(we),{width:"1024px",modelValue:i(p),"onUpdate:modelValue":d[0]||(d[0]=c=>Ce(p)?p.value=c:null),title:"\u4FEE\u6539\u4ED8\u6B3E\u91D1\u989D",center:"","close-on-click-modal":!1,"close-on-press-escape":!1},{default:u(()=>[e(i(re),{data:v.value,columns:k},null,8,["data"]),Q("div",Ze,[e(i(ye),{type:"primary",onClick:I},{default:u(()=>[F(" \u4FDD\u5B58 ")]),_:1})])]),_:1},8,["modelValue"]))}});var Xe=Y(Qe,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/purpay-modal.vue"]]);const eu={class:"flex justify-end w-full"},uu=G({__name:"edit-modal",emits:["save"],setup(o,{expose:$,emit:E}){const p=X(!1),v=z({}),k=[{field:"sequenceNo",label:"\u9500\u552E\u5355\u7F16\u53F7",span:6},{field:"cxCode",label:"\u9500\u552E\u5355\u4E3B\u7F16\u53F7",span:6},{field:"goodNo",label:"\u5546\u54C1\u7F16\u7801",span:6},{field:"goodPrice",label:"\u5546\u54C1\u5355\u4EF7"},{field:"goodName",label:"\u5546\u54C1\u540D\u79F0",span:24},{field:"goodNum",label:"\u5546\u54C1\u603B\u6570\u91CF",span:8},{field:"ainv_num",label:"\u5DF2\u5F00\u7968\u6570\u91CF",span:8},{field:"winv_num",label:"\u672A\u5F00\u7968\u6570\u91CF",span:8},{field:"totalPrice",label:"\u8BA2\u5355\u603B\u91D1\u989D",span:8},{field:"ainv_fee",label:"\u5DF2\u5F00\u7968\u91D1\u989D",span:8},{field:"winv_fee",label:"\u672A\u5F00\u7968\u91D1\u989D",span:8},{label:"\u672C\u6B21\u5F00\u7968\u6570\u91CF",span:8,render(){return v.value.num}},{label:"\u672C\u6B21\u5F00\u7968\u91D1\u989D",span:8,render(c,S){return be(De,{precision:2,min:0,max:S.winv_fee,size:"small","controls-position":"right",modelValue:v.value.inv_fee,onChange:T})}}];function I(c,S){var D=c.toString(),j=S.toString(),N,M,O=arguments[2];return N=(j.split(".")[1]?j.split(".")[1].length:0)-(D.split(".")[1]?D.split(".")[1].length:0),M=Number(D.replace(".",""))/Number(j.replace(".",""))*Math.pow(10,N),Number(typeof O!="number"?M:M.toFixed(parseInt(O)))}function T(c){v.value.inv_fee=c,v.value.num=Number(I(v.value.inv_fee,v.value.goodPrice)).toFixed(8)}function d(){E("save",v.value),p.value=!1}return $({onDisplay:c=>{p.value=!0,v.value={...c,num:c.num,inv_fee:c.inv_fee,totalOpenAmount:c.totalOpenAmount}}}),(c,S)=>(n(),y(i(we),{width:"1024px",modelValue:i(p),"onUpdate:modelValue":S[0]||(S[0]=D=>Ce(p)?p.value=D:null),title:"\u7F16\u8F91\u91C7\u8D2D\u5355",center:"","close-on-click-modal":!1,"close-on-press-escape":!1},{default:u(()=>[e(i(re),{data:v.value,columns:k},null,8,["data"]),Q("div",eu,[e(i(ye),{type:"primary",onClick:d},{default:u(()=>[F(" \u4FDD\u5B58 ")]),_:1})])]),_:1},8,["modelValue"]))}});var lu=Y(uu,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/edit-modal.vue"]]);const ou={flex:"","justify-between":"","w-full":"","mb-1":""},tu={key:0,class:"mb-2"},au={key:0},nu={key:0},ru={key:0},iu={key:0},su={key:0},du={key:0},cu=G({__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},isComon:{type:String,required:!1},totalCommonPrice:{type:Number,required:!1},totalCommonCount:{type:Number,required:!1},isChoosePurchaseOrder:{type:Boolean,required:!1},totalCommonPayPrice:{type:Number,required:!1},edit:{type:Boolean,required:!1}},emits:["push","delete","choose","edit","selectionChange","batchSelection","batchCancelSelection"],setup(o,{expose:$,emit:E}){const p=o,v=z(null),k=z([]),I=z(null),T=z(null),d=X(-1),c=ve({visible:!1,index:-1,data:{}});function S(r,w){var b,q,a;try{b=r.toString().split(".")[1].length}catch{b=0}try{q=w.toString().split(".")[1].length}catch{q=0}return a=Math.pow(10,Math.max(b,q)),(r*a+w*a)/a}const D=ne(()=>p.purchaseOrders.length),j=ne(()=>{const{purchaseOrders:r}=p,w=r.reduce((b,{totalPrice:q})=>S(b,q||0),0);return Number(w).toFixed(2)}),N=r=>{var w;p.isChoosePurchaseOrder?(c.visible=!0,c.data={...p.purchaseOrders[r]},c.index=r):(d.value=r,(w=T.value)==null||w.onDisplay(p.purchaseOrders[r]))},M=r=>{E("edit",r,d.value),d.value=-1};function O(r,w){E("edit",r,w)}const s=r=>{k.value=r};function g(){const{supplierNo:r,companyNo:w}=p;if(!r||!w)return H.warning("\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546\u548C\u4E1A\u52A1\u516C\u53F8");I.value.onDisplay()}function _(r=!0){if(k.value.length===0){H.warning(p.isChoosePurchaseOrder?"\u8BF7\u9009\u62E9\u91C7\u8D2D\u5355":"\u8BF7\u9009\u62E9\u901A\u7528\u8BA2\u5355");return}if(p.isChoosePurchaseOrder&&r){const b=[];for(const{currentTotal:q,sequenceNo:a}of k.value)(!q||q==="0.00")&&b.push(a);if(b.length!==0){H.warning("\u91C7\u8D2D\u5355 "+b.join("\u3001")+" \u4ED8\u6B3E\u91D1\u989D\u4E0D\u80FD\u4E3A0");return}}const w=k.value.map(({id:b})=>b);E(r?"batchSelection":"batchCancelSelection",w),v.value.clearSelection()}return $({getOpenInvInfo:()=>k.value.map(({num:r,inv_fee:w,sequenceNo:b})=>({num:r,inv_fee:w,sequenceNo:b}))}),(r,w)=>{const b=B("ElTag"),q=B("ElButton"),a=B("ElTableColumn"),m=B("IconifyIconOffline"),U=B("ElTooltip"),C=B("ElTable");return n(),A("div",null,[Q("div",ou,[!o.edit&&!o.isChoosePurchaseOrder?(n(),y(b,{key:0,type:"warning"},{default:u(()=>[F(" \u5171\u8BA1:"+P(i(D))+"\u4E2A\u8BA2\u5355,\u5171\u8BA1 "+P(i(j))+" \u5143 ",1)]),_:1})):f("v-if",!0),!o.readonly&&!o.isPurchPay?(n(),y(q,{key:1,type:"primary",onClick:g},{default:u(()=>[F("\u6DFB\u52A0\u91C7\u8D2D\u5355 ")]),_:1})):f("v-if",!0)]),(o.edit||o.isChoosePurchaseOrder)&&o.purchaseOrders.length!==0?(n(),A("div",tu,[e(b,{class:"mr-[10px]"},{default:u(()=>[F(P(o.totalCommonCount)+"/150 ",1)]),_:1}),e(b,{class:"mr-[10px]"},{default:u(()=>[F(P(o.isChoosePurchaseOrder?o.totalCommonPayPrice:o.totalCommonPrice)+"\u5143",1)]),_:1}),e(q,{size:"small",onClick:_},{default:u(()=>[F("\u6279\u91CF\u9009\u4E2D\u8BA2\u5355")]),_:1}),e(q,{size:"small",onClick:w[0]||(w[0]=t=>_(!1))},{default:u(()=>[F("\u6279\u91CF\u53D6\u6D88\u9009\u4E2D\u8BA2\u5355")]),_:1})])):f("v-if",!0),f(" {{ purchaseOrders }} "),e(C,{ref_key:"tableRef",ref:v,"row-key":"id",size:"small",data:o.purchaseOrders,"max-height":"400",onSelectionChange:s},{default:u(()=>[o.edit||o.isChoosePurchaseOrder?(n(),y(a,{key:0,fixed:"left",type:"selection"})):f("v-if",!0),o.edit?(n(),y(a,{key:1,fixed:"left",label:"\u5E8F\u53F7",type:"index"})):f("v-if",!0),o.edit||o.isChoosePurchaseOrder?(n(),y(a,{key:2,fixed:"left",width:"65px",label:"\u662F\u5426\u9009\u4E2D"},{default:u(({row:t})=>[t.isSelection?(n(),y(m,{key:0,icon:"success",style:{color:"#67C23A"}})):f("v-if",!0)]),_:1})):f("v-if",!0),o.edit?f("v-if",!0):(n(),y(a,{key:3,label:"\u91C7\u8D2D\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"sequenceNo",width:"150"})),e(a,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:o.edit?"sequenceNo":"qrdCode",width:"150"},null,8,["prop"]),e(a,{label:o.edit?"\u9500\u552E\u4E3B\u5355\u53F7":"\u91C7\u8D2D\u4E3B\u5355\u53F7","show-overflow-tooltip":"",prop:"cxCode",width:"150"},null,8,["label"]),o.edit?(n(),y(a,{key:4,label:"\u91C7\u8D2D\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"cgdNo",width:"165"})):f("v-if",!0),e(a,{label:"\u7C7B\u76EE\u4FE1\u606F"},{default:u(()=>[e(a,{label:"\u7C7B\u76EE\u7F16\u7801","show-overflow-tooltip":"",width:"120"},{default:u(({row:t})=>[t.orderTax?(n(),A("span",au,P(t.orderTax.cat_code),1)):f("v-if",!0)]),_:1}),e(a,{label:"\u8D27\u7269\u548C\u52B3\u52A1\u540D\u79F0","show-overflow-tooltip":"",width:"130"},{default:u(({row:t})=>[t.orderTax?(n(),A("span",nu,P(t.orderTax.cat_name),1)):f("v-if",!0)]),_:1}),e(a,{label:"\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0","show-overflow-tooltip":"",width:"160"},{default:u(({row:t})=>[t.orderTax?(n(),A("span",ru,P(t.orderTax.short_name),1)):f("v-if",!0)]),_:1}),e(a,{label:"\u5F00\u7968\u5546\u54C1\u540D\u79F0","show-overflow-tooltip":"",width:"130"},{default:u(({row:t})=>[t.orderTax?(n(),A("span",iu,P(t.orderTax.inv_good_name),1)):f("v-if",!0)]),_:1}),e(a,{label:"\u5F00\u7968\u7A0E\u7387","show-overflow-tooltip":"",width:"80"},{default:u(({row:t})=>[t.orderTax?(n(),A("span",su,P(t.orderTax.tax?t.orderTax.tax+"%":""),1)):f("v-if",!0)]),_:1}),e(a,{label:"\u5F00\u7968\u7C7B\u578B","show-overflow-tooltip":"",width:"80"},{default:u(({row:t})=>[t.open_type?(n(),A("span",du,P(t.open_type=="1"?"\u539F\u5546\u54C1\u5F00\u7968":t.open_type==="2"?"\u5B50\u5546\u54C1\u5F00\u7968":""),1)):f("v-if",!0)]),_:1})]),_:1}),o.edit?f("v-if",!0):(n(),y(a,{key:5,label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[o.edit?f("v-if",!0):(n(),y(a,{key:0,label:"\u4F9B\u8D27\u5546",prop:"supplierName","min-width":"160","show-overflow-tooltip":""})),o.readonly?f("v-if",!0):(n(),y(a,{key:1,label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","min-width":"160","show-overflow-tooltip":""})),o.edit?f("v-if",!0):(n(),y(a,{key:2,label:"\u91C7\u8D2D\u5355\u72B6\u6001",prop:"cgd_status","min-width":"140","show-overflow-tooltip":""},{default:u(({row:t})=>[e(b,null,{default:u(()=>{var h;return[F(P(((h=i(de).find(V=>V.value===String(t.cgd_status)))==null?void 0:h.label)||"--"),1)]}),_:2},1024)]),_:1})),o.edit?f("v-if",!0):(n(),y(a,{key:3,label:"\u9500\u552E\u5355\u53D1\u8D27\u72B6\u6001",prop:"qrdSend",width:"110","show-overflow-tooltip":""},{default:u(({row:t})=>[e(b,null,{default:u(()=>{var h;return[F(P(((h=i(ue).find(V=>V.value===String(t.qrdSend)))==null?void 0:h.label)||"--"),1)]}),_:2},1024)]),_:1})),o.edit?f("v-if",!0):(n(),y(a,{key:4,label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName","min-width":"180","show-overflow-tooltip":""})),o.edit?f("v-if",!0):(n(),y(a,{key:5,label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:t})=>[e(b,null,{default:u(()=>{var h;return[F(P((h=i(le).find(V=>V.value==t.cgdSource))==null?void 0:h.label),1)]}),_:2},1024)]),_:1})),e(a,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""}),f(` <ElTableColumn\r
  3. v-if="!isChoosePurchaseOrder"\r
  4. label="\u5F00\u7968\u91D1\u989D"\r
  5. prop="inv_fee"\r
  6. width="80"\r
  7. show-overflow-tooltip\r
  8. /> `),o.isChoosePurchaseOrder?(n(),A(W,{key:6},[e(a,{label:"\u672A\u4ED8\u6B3E\u91D1\u989D",prop:"wpay_fee",width:"80","show-overflow-tooltip":""}),e(a,{label:"\u5DF2\u4ED8\u6B3E\u91D1\u989D",prop:"apay_fee",width:"80","show-overflow-tooltip":""}),e(a,{label:"\u672C\u6B21\u4ED8\u6B3E\u91D1\u989D",prop:"currentTotal",width:"100","show-overflow-tooltip":""})],64)):f("v-if",!0)]),_:1})),e(a,{label:"\u53D1\u7968\u5173\u8054\u91D1\u989D"},{default:u(()=>[e(a,{label:"\u5DF2\u5173\u8054",prop:"ainv_fee",width:"80","show-overflow-tooltip":""}),e(a,{label:"\u5173\u8054\u4E2D",prop:"inv_fee_ing",width:"80","show-overflow-tooltip":""}),e(a,{label:"\u672A\u5173\u8054",prop:"winv_fee",width:"80","show-overflow-tooltip":""})]),_:1}),e(a,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(a,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice","show-overflow-tooltip":""}),o.edit?f("v-if",!0):(n(),y(a,{key:0,label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:t})=>[e(b,null,{default:u(()=>{var h;return[F(P((h=i(oe).find(V=>V.value===String(t.cgdType)))==null?void 0:h.label),1)]}),_:2},1024)]),_:1})),e(a,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""}),e(a,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"75","show-overflow-tooltip":""}),f(` <ElTableColumn label="\u7A0E\u7387" prop="tax" show-overflow-tooltip>\r
  9. <template #="{ row }"> {{ row.tax }}% </template>\r
  10. </ElTableColumn> `)]),_:1}),o.edit?(n(),A(W,{key:6},[e(a,{label:"\u672A\u5F00\u7968\u91D1\u989D",prop:"winv_fee",width:"90","show-overflow-tooltip":""}),e(a,{label:"\u672C\u6B21\u5F00\u7968\u91D1\u989D",prop:"inv_fee",width:"110","show-overflow-tooltip":""}),e(a,{label:"\u672A\u5F00\u7968\u6570\u91CF",prop:"winv_num",width:"90","show-overflow-tooltip":""}),e(a,{label:"\u672C\u6B21\u5F00\u7968\u6570\u91CF",prop:"num",width:"110","show-overflow-tooltip":""})],64)):f("v-if",!0),!o.readonly&&!o.edit&&!o.isChoosePurchaseOrder?(n(),y(a,{key:7,label:"\u64CD\u4F5C",fixed:"right"},{default:u(({$index:t})=>[e(q,{link:"",type:"primary",onClick:()=>E("delete",t)},{default:u(()=>[F(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})):f("v-if",!0),o.edit||o.isChoosePurchaseOrder?(n(),y(a,{key:8,label:"\u64CD\u4F5C",width:"60",fixed:"right"},{default:u(({$index:t})=>[e(U,{content:"\u7F16\u8F91",placement:"top"},{default:u(()=>[e(q,{link:"",type:"primary",onClick:h=>N(t),icon:i(Pe)("edits")},null,8,["onClick","icon"])]),_:2},1024)]),_:1})):f("v-if",!0)]),_:1},8,["data"]),e(Je,{ref_key:"PurchaseModalRef",ref:I,isComon:o.isComon,companyNo:o.companyNo,supplierNo:o.supplierNo,onPushOrder:w[1]||(w[1]=t=>E("push",t))},null,8,["isComon","companyNo","supplierNo"]),e(lu,{ref_key:"editModalRef",ref:T,onSave:M},null,512),e(Xe,{visible:c.visible,"onUpdate:visible":w[2]||(w[2]=t=>c.visible=t),index:c.index,data:c.data,onSave:O},null,8,["visible","index","data"])])}}});var me=Y(cu,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/cpns/purchase-table.vue"]]);const pu={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"}},fu={class:"w-full"},mu={key:0,class:"w-full flex justify-end"},vu={key:0,flex:"","gap-10":""},hu={key:0,class:"flex w-full justify-end"},yu=G({__name:"index",props:{id:{type:String,required:!1},edit:{type:Boolean,required:!0},cover:{type:Boolean,required:!1},isPurch:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},isPurchPay:{type:Boolean,required:!1},platformType:{type:String,required:!1},showTicketColumn:{type:Boolean,required:!1},isChoosePurchaseOrder:{type:Boolean,required:!1}},emits:["create","choose","getRecord","openInv","clear"],setup(o,{expose:$,emit:E}){const p=o,v=z(null),{currentCompany:k}=Ne(),I=z([]),T=X("0.00"),d=X("0.00"),c=X(0),S=z("0"),D=z({companyNo:"",supplierNo:"",companyItem:{},cids:[]}),j=z(null),N=z([]),{run:M,data:O,loading:s}=ie({initalData:{},success:function(C){p.cover&&(N.value=[],D.value.cids=[]),E("getRecord",C),g(C[p.edit?"qrdlist":"cgdlist"].map(({wpay_fee:t,...h},V)=>({...h,goodPrice:Number(xe(h.totalPrice,h.goodNum)).toFixed(8),cgdNo:C.cgdlist[V].name,num:h.winv_num,inv_fee_ing:h.inv_fee,inv_fee:h.winv_fee,isSelection:!1,totalOpenAmount:"0.00",currentTotal:t}))),T.value="0.00",c.value=0}});function g(C){if(!!C)for(let t=0;t<C.length;t++){const h=C[t];D.value.cids.includes(h.id)||(N.value.push(h),D.value.cids.push(h.id))}}function _(C){N.value.splice(C,1),D.value.cids.splice(C,1)}function r(C){D.value.companyItem=C}async function w(){try{await j.value.validate(),E("create",i(D))}catch{}}const b=()=>M(p.edit?Te({payNo:p.id}):qe({payNo:p.id})),q=C=>{const{code:t,name:h,type:V}=C,x=V==="3"||V==="\u4E1A\u52A1\u516C\u53F8"?"(\u5DF2\u5347\u7EA7\u4E3A\u4E1A\u52A1\u516C\u53F8)":"";return t+" / "+h+x},a=C=>{const{companyNo:t,company_name:h}=C;return t+" / "+h},m=(C,t)=>{const{inv_fee:h,num:V,totalOpenAmount:l,currentTotal:x}=C;N.value[t].inv_fee=h,N.value[t].num=V,N.value[t].totalOpenAmount=l,N.value[t].currentTotal=x;const L=N.value.reduce((R,K)=>J(R,K.isSelection?K.inv_fee:0),0),ee=N.value.reduce((R,K)=>J(R,K.isSelection?K.currentTotal:0),0);c.value=N.value.reduce((R,K)=>J(R,K.isSelection?1:0),0),d.value=Number(ee).toFixed(2),T.value=Number(L).toFixed(2)};function U(C,t=!0){N.value.forEach(l=>{t?C.includes(l.id)&&(l.isSelection=!0):C.includes(l.id)&&(l.isSelection=!1)});const h=N.value.reduce((l,x)=>J(l,x.isSelection?x.inv_fee:0),0),V=N.value.reduce((l,x)=>J(l,x.isSelection?x.currentTotal:0),0);c.value=N.value.reduce((l,x)=>J(l,x.isSelection?1:0),0),d.value=Number(V).toFixed(2),T.value=Number(h).toFixed(2)}return Z(()=>p.id,C=>C&&b(),{immediate:!0}),Z(()=>S.value,()=>{N.value=[],D.value.cids=[]}),Z(()=>k.value,({companyNo:C})=>{D.value[p.isPurch?"companyNo":"supplierNo"]=C},{immediate:!0}),Z(()=>p.platformType,()=>{O.value={},N.value=[],D.value.cids=[],E("clear")}),$({detail:O,refresh:()=>b(),getOpenInvInfo:()=>({orderArr:N.value.filter(({isSelection:C})=>C).map(({num:C,inv_fee:t,currentTotal:h,sequenceNo:V})=>({num:C,currentTotal:h,inv_fee:t,sequenceNo:V})),totalCommonPayPrice:d.value,totalCommonPrice:T.value,totalCommonCount:c.value,data:O.value})}),(C,t)=>{const h=B("ElButton"),V=B("ElInput"),l=B("ElFormItem"),x=B("ElOption"),L=B("ElSelect"),ee=se("loading");return te((n(),A("div",fu,[o.isPurchPay?(n(),A("div",mu,[e(h,{text:"",type:"primary",onClick:t[0]||(t[0]=()=>E("choose"))},{default:u(()=>[F("\u9009\u62E9")]),_:1})])):f("v-if",!0),o.readonly?(n(),y(Oe,{key:1,showTicketColumn:o.showTicketColumn,isPurchPay:o.isPurchPay,data:i(O)},null,8,["showTicketColumn","isPurchPay","data"])):f("v-if",!0),o.isPurchPay?f("v-if",!0):te((n(),y(i(Ae),{key:2,class:"w-full",ref_key:"formRef",ref:j,model:D.value,rules:i(pu)},{default:u(()=>[o.readonly?f("v-if",!0):(n(),A("div",vu,[e(l,{label:"\u4E70\u65B9\u516C\u53F8",prop:"companyNo"},{default:u(()=>[o.isPurch?(n(),y(V,{key:1,style:{width:"300px"},value:i(k).companyName,disabled:""},null,8,["value"])):(n(),y(i(ce),{key:0,value:D.value.companyNo,"onUpdate:value":t[1]||(t[1]=R=>D.value.companyNo=R),style:{width:"386px"},api:i(Se),placeholder:"\u8BF7\u9009\u62E9\u4E70\u65B9\u516C\u53F8","request-prop":"company_name","response-label-prop":"company_name","response-val-prop":"companyNo","disabled-value":i(k).companyNo,getLabel:a,onItemChange:r},null,8,["value","api","disabled-value"]))]),_:1}),e(l,{label:"\u5356\u65B9\u516C\u53F8",prop:"supplierNo"},{default:u(()=>[o.isPurch?(n(),y(i(ce),{key:1,value:D.value.supplierNo,"onUpdate:value":t[2]||(t[2]=R=>D.value.supplierNo=R),style:{width:"386px"},api:i(ke),placeholder:"\u8BF7\u9009\u62E9\u5356\u65B9\u516C\u53F8","request-prop":"name","response-label-prop":"name","response-val-prop":"code","disabled-value":i(k).companyNo,getLabel:q},null,8,["value","api","disabled-value"])):(n(),y(V,{key:0,style:{width:"300px"},value:i(k).companyName,disabled:""},null,8,["value"]))]),_:1}),e(l,{label:"\u4E1A\u52A1\u7C7B\u578B",required:!0},{default:u(()=>[e(L,{modelValue:S.value,"onUpdate:modelValue":t[3]||(t[3]=R=>S.value=R)},{default:u(()=>[e(x,{label:"\u91C7\u8D2D\u8BA2\u5355",value:"0"}),e(x,{label:"\u6E90\u5934\u8BA2\u5355",value:"2"})]),_:1},8,["modelValue"])]),_:1})])),e(l,{label:o.readonly?"":"\u91C7\u8D2D\u5355\u4FE1\u606F",prop:o.readonly?"":"cids"},{default:u(()=>[e(me,pe({class:"w-full mt-1",ref_key:"purchaseTableRef",ref:v},D.value,{readonly:o.readonly,edit:o.edit,totalCommonPrice:i(T),totalCommonCount:i(c),purchaseOrders:N.value,isChoosePurchaseOrder:o.isChoosePurchaseOrder,isComon:S.value,totalCommonPayPrice:i(d),onDelete:_,onPush:g,onEdit:m,onSelectionChange:t[4]||(t[4]=R=>I.value=R),onBatchSelection:U,onBatchCancelSelection:t[5]||(t[5]=R=>U(R,!1))}),null,16,["readonly","edit","totalCommonPrice","totalCommonCount","purchaseOrders","isChoosePurchaseOrder","isComon","totalCommonPayPrice"])]),_:1},8,["label","prop"]),e(l,null,{default:u(()=>[o.readonly?f("v-if",!0):(n(),A("div",hu,[e(h,{type:"primary",onClick:w,loading:o.loading},{default:u(()=>[F("\u4FDD\u5B58")]),_:1},8,["loading"])]))]),_:1})]),_:1},8,["model","rules"])),[[ee,o.loading]]),o.isPurchPay?(n(),y(me,pe({key:3,ref_key:"purchaseTableRef",ref:v,class:"w-full mt-1"},D.value,{edit:o.edit,totalCommonPrice:i(T),totalCommonCount:i(c),readonly:o.readonly,isPurchPay:o.isPurchPay,isComon:S.value,totalCommonPayPrice:i(d),purchaseOrders:N.value,onDelete:_,onPush:g,onEdit:m,onSelectionChange:t[6]||(t[6]=R=>I.value=R),onBatchSelection:U,isChoosePurchaseOrder:o.isChoosePurchaseOrder,onBatchCancelSelection:t[7]||(t[7]=R=>U(R,!1))}),null,16,["edit","totalCommonPrice","totalCommonCount","readonly","isPurchPay","isComon","totalCommonPayPrice","purchaseOrders","isChoosePurchaseOrder"])):f("v-if",!0)])),[[ee,i(s)||o.loading]])}}});var Du=Y(yu,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/ReconciliationForm/src/index.vue"]]);export{Du as R};