reconciliation.87b67a.js 32 KB

12345678
  1. import{aT as J,ac as ye,_ as M,d as L,ag as re,o as d,G as v,l as i,w as A,b0 as ie,Z as Ce,x as we,r as F,aC as se,c as U,j as e,C as u,F as G,D as ae,h as X,M as b,H as ee,L as q,a as E,aV as ve,aN as Y,z as W,aM as ge,aU as ue,b2 as be,aq as Ee,bI as De,al as Fe,bJ as _e,bK as ne,W as Be,bw as pe,bL as Ne,bM as Se,br as ce,b1 as ke}from"./index.js";import{d as Ae,u as Pe}from"./types.ebfbff8f.js";import{B as he}from"./basic-descriptions.64fbdf9d.js";import{o as me}from"./orderRecord.fc407fbf.js";import"./porder.e713a9fe.js";import{s as le,c as oe,b as te,d as de}from"./status.151ccddb.js";import{d as xe,a as Q}from"./calc.850c7422.js";const{VITE_PROXY_DOMAIN_REAL:yu,VITE_PROXY_USER_REAL:qe}=ye(),Z=qe+"/admin/",Ve=l=>J.request("post",`${Z}payinfo`,{data:l}),Te=l=>J.request("post",`${Z}ComonOrder/payInfo`,{data:l}),Cu=l=>J.request("post",`${Z}payinfo`,{data:l}),Oe=(l={})=>J.request("post",`${Z}cgdlist`,{data:l}),Re=l=>J.request("post",`${Z}cgdquery`,{data:l}),ze=L({__name:"purchase-descriptions",props:{data:{type:Object,required:!0},showTicketColumn:{type:Boolean,required:!1},isPurchPay:{type:Boolean,required:!1}},setup(l){const V=l,D=["inv_tag_fee","inv_status","ainv_fee","winv_fee","inv_fee","remark"],h=re(()=>!V.isPurchPay||V.showTicketColumn?me:me.filter(w=>!D.includes(w.field)));return(w,N)=>(d(),v(i(he),{data:l.data,columns:i(h)},null,8,["data","columns"]))}});var Ie=M(ze,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/cpns/purchase-descriptions.vue"]]);const Ue={"w-full":"",flex:"","justify-between":""},$e={flex:"","mt-2":"","justify-between":""},je=L({__name:"single-mode",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},isComon:{type:String,required:!1}},emits:["selection"],setup(l,{emit:V}){const D=l,h=A(null),w=A([]),{data:N,loading:T,run:S}=ie({isList:!0,success:x=>y.total=x.count}),m=A({timer:[],sequenceNo:"",goodNo:"",goodName:"",cgder:"",cxCode:"",sendstatus:"",cgdsource:"",cgdtype:"",code:"",qrdCode:"",total:"2"}),y=Ce({pageSize:15,currentPage:1,total:0});async function C(){T.value=!0;const{companyNo:x,supplierNo:n}=D,{currentPage:p,pageSize:c}=y,{timer:g,...f}=m.value,s={...f,start:g[0],end:g[1],is_comon:D.isComon,status:"0",supplierNo:n,companyNo:x,page:p,size:c};S(Oe(s))}function P(){y.currentPage=1,m.value={timer:[],sequenceNo:"",goodNo:"",goodName:"",cgder:"",cxCode:"",sendstatus:"",cgdsource:"",cgdtype:"",code:"",qrdCode:"",total:"2"},C()}function _(x){w.value=x}function $(){if(w.value.filter(({cgd_status:p})=>String(p)==="0").length!==0){Y.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 n=w.value.filter(({totalPrice:p})=>Number(p)===0);if(n.length!==0){Y.warning(`\u91C7\u8D2D\u5355${n.map(({sequenceNo:p})=>p).join("\u3001")}\u6DFB\u52A0\u5931\u8D25,\u603B\u8D27\u6B3E\u4E0D\u80FD\u4E3A0\u5143`);return}V("selection",i(w))}const O=()=>{y.currentPage=1,C()};return we(()=>{C()}),(x,n)=>{const p=F("ElDatePicker"),c=F("ElCol"),g=F("ElInput"),f=F("ElRow"),s=F("ElOption"),I=F("ElSelect"),j=F("ElButton"),r=F("ElTableColumn"),o=F("ElTag"),a=F("ElPagination"),k=se("loading");return d(),U(G,null,[e(f,{gutter:5,"mb-1":""},{default:u(()=>[e(c,{span:6},{default:u(()=>[e(p,{size:"small",type:"daterange",modelValue:m.value.timer,"onUpdate:modelValue":n[0]||(n[0]=t=>m.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(c,{span:6},{default:u(()=>[e(g,{size:"small",placeholder:"\u91C7\u8D2D\u5355\u7F16\u7801",modelValue:m.value.sequenceNo,"onUpdate:modelValue":n[1]||(n[1]=t=>m.value.sequenceNo=t)},null,8,["modelValue"])]),_:1}),e(c,{span:6},{default:u(()=>[e(g,{size:"small",placeholder:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801",modelValue:m.value.cxCode,"onUpdate:modelValue":n[2]||(n[2]=t=>m.value.cxCode=t)},null,8,["modelValue"])]),_:1}),e(c,{span:6},{default:u(()=>[e(g,{size:"small",placeholder:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",modelValue:m.value.qrdCode,"onUpdate:modelValue":n[3]||(n[3]=t=>m.value.qrdCode=t)},null,8,["modelValue"])]),_:1})]),_:1}),e(f,{gutter:5,"mb-2":""},{default:u(()=>[e(c,{span:6},{default:u(()=>[e(g,{size:"small",placeholder:"\u5546\u54C1\u7F16\u7801",modelValue:m.value.goodNo,"onUpdate:modelValue":n[4]||(n[4]=t=>m.value.goodNo=t)},null,8,["modelValue"])]),_:1}),e(c,{span:6},{default:u(()=>[e(g,{size:"small",placeholder:"\u5546\u54C1\u540D\u79F0",modelValue:m.value.goodName,"onUpdate:modelValue":n[5]||(n[5]=t=>m.value.goodName=t)},null,8,["modelValue"])]),_:1}),e(c,{span:6},{default:u(()=>[e(g,{size:"small",placeholder:"\u91C7\u8D2D\u5458\u540D\u79F0",modelValue:m.value.cgder,"onUpdate:modelValue":n[6]||(n[6]=t=>m.value.cgder=t)},null,8,["modelValue"])]),_:1}),e(c,{span:6},{default:u(()=>[e(I,{placeholder:"\u53D1\u8D27\u72B6\u6001",modelValue:m.value.sendstatus,"onUpdate:modelValue":n[7]||(n[7]=t=>m.value.sendstatus=t),size:"small",clearable:"","w-full":""},{default:u(()=>[(d(!0),U(G,null,ae(i(le),t=>(d(),v(s,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{"mb-2":""},{default:u(()=>[X("div",Ue,[e(c,{span:16,style:{display:"flex",gap:"10px"}},{default:u(()=>[e(I,{modelValue:m.value.cgdsource,"onUpdate:modelValue":n[8]||(n[8]=t=>m.value.cgdsource=t),size:"small",placeholder:"\u8BA2\u5355\u6765\u6E90",clearable:"","w-full":""},{default:u(()=>[(d(!0),U(G,null,ae(i(oe),t=>(d(),v(s,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e(I,{modelValue:m.value.cgdtype,"onUpdate:modelValue":n[9]||(n[9]=t=>m.value.cgdtype=t),size:"small","w-full":"",placeholder:"\u5546\u54C1\u6765\u6E90",clearable:""},{default:u(()=>[(d(!0),U(G,null,ae(i(te),t=>(d(),v(s,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e(I,{style:{width:"100%"},size:"small",placeholder:"\u603B\u8D27\u6B3E\u662F\u5426\u4E3A\u96F6",modelValue:m.value.total,"onUpdate:modelValue":n[10]||(n[10]=t=>m.value.total=t),disabled:""},{default:u(()=>[e(s,{value:"2",label:"\u603B\u8D27\u6B3E\u4E0D\u4E3A\u96F6"}),e(s,{value:"1",label:"\u603B\u8D27\u6B3E\u4E3A\u96F6"})]),_:1},8,["modelValue"])]),_:1}),e(c,{span:3},{default:u(()=>[e(j,{size:"small",onClick:C,type:"primary"},{default:u(()=>[b("\u641C\u7D22")]),_:1}),e(j,{size:"small",onClick:P},{default:u(()=>[b("\u91CD\u7F6E")]),_:1})]),_:1})])]),_:1}),ee((d(),v(i(ve),{ref_key:"tableRef",ref:h,size:"small",data:i(N),onSelectionChange:_,"max-height":"580px"},{default:u(()=>[e(r,{type:"selection",fixed:"left",align:"center",width:"40"}),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",prop:"cxCode","show-overflow-tooltip":"",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":""}),x.edit?E("v-if",!0):(d(),v(r,{key:0,label:"\u91C7\u8D2D\u5355\u72B6\u6001",prop:"cgd_status","min-width":"140","show-overflow-tooltip":""},{default:u(({row:t})=>[e(o,null,{default:u(()=>{var B;return[b(q(((B=i(de).find(R=>R.value===String(t.cgd_status)))==null?void 0:B.label)||"--"),1)]}),_:2},1024)]),_:1})),e(r,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:t})=>[e(o,{size:"small"},{default:u(()=>{var B;return[b(q((B=i(le).find(R=>R.value===String(t.sendStatus)))==null?void 0:B.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:t})=>[e(o,{size:"small"},{default:u(()=>{var B;return[b(q((B=i(oe).find(R=>R.value===String(t.cgdSource)))==null?void 0:B.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:t})=>[e(o,{size:"small"},{default:u(()=>{var B;return[b(q((B=i(te).find(R=>R.value===String(t.cgdType)))==null?void 0:B.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"])),[[k,i(T)]]),E(" \u5206\u9875\u5668 "),X("div",$e,[e(a,{"current-page":y.currentPage,"onUpdate:currentPage":n[11]||(n[11]=t=>y.currentPage=t),"page-size":y.pageSize,"onUpdate:pageSize":n[12]||(n[12]=t=>y.pageSize=t),total:y.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:C,onSizeChange:n[13]||(n[13]=()=>O())},null,8,["current-page","page-size","total"]),e(j,{type:"primary",onClick:$},{default:u(()=>[b("\u4FDD\u5B58")]),_:1})])],64)}}});var Me=M(je,[["__scopeId","data-v-c8e26204"],["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/cpns/single-mode.vue"]]);const Le={flex:"","w-full":"","justify-end":"","mt-2":""},He=L({__name:"batch-mode",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},type:{type:String,required:!0},isComon:{type:String,required:!0}},emits:["selection"],setup(l,{emit:V}){const D=l,h=A(""),w=A(D.type),N=A(x(w.value)),T=A(null),{run:S,loading:m,data:y}=ie({success:n=>{}}),C=" ",P=`
  2. `;function _(n=""){if(!n)return"";let p=n;const c=p.includes(C),g=p.includes(P);return c&&(p=p.split(C).join("")),g&&(p=p.split(P).join("")),p}function $(){const n=_(h.value),p=n.replace(/[,。;、; .]/g,",").replace(/(^,*)|(,*$)/g,""),c=p.split(",");if(p.length===0||c.length===0){Y.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),h.value=n;return}S(Re(w.value=="2"?{size:100,cgdNoArr:c,companyNo:D.companyNo,supplierNo:D.supplierNo,is_comon:D.isComon}:{size:100,qrdNoArr:c,companyNo:D.companyNo,supplierNo:D.supplierNo,is_comon:D.isComon})),h.value=""}function O(){if(y.value.filter(({cgd_status:c})=>String(c)==="0").length!==0){Y.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 p=y.value.filter(({totalPrice:c})=>Number(c)===0);if(p.length!==0){Y.warning(`\u91C7\u8D2D\u5355${p.map(({sequenceNo:c})=>c).join("\u3001")}\u6DFB\u52A0\u5931\u8D25,\u603B\u8D27\u6B3E\u4E0D\u80FD\u4E3A0\u5143`);return}V("selection",i(y))}function x(n){return`\u8F93\u5165${n==="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 W(()=>D.type,n=>{w.value=n,N.value=x(n),h.value="",m.value=!1,y.value=[]},{immediate:!0}),(n,p)=>{const c=F("ElInput"),g=F("el-table-column"),f=F("ElTableColumn"),s=F("ElTag"),I=F("ElButton"),j=se("loading");return d(),U(G,null,[e(c,{rows:4,modelValue:h.value,"onUpdate:modelValue":p[0]||(p[0]=r=>h.value=r),style:{"margin-bottom":"10px"},placeholder:N.value,type:"textarea",onKeydown:ge($,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),ee((d(),v(i(ve),{ref_key:"tableRef",ref:T,size:"small",data:i(y),"max-height":"580px"},{default:u(()=>[e(g,{type:"index",width:"50","show-overflow-tooltip":"",label:"\u5E8F\u53F7"}),e(f,{label:"\u91C7\u8D2D\u5355\u7F16\u7801",prop:"sequenceNo","show-overflow-tooltip":"",width:"150"}),e(f,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801",prop:"qrdCode","show-overflow-tooltip":"",width:"150"}),e(f,{label:"\u91C7\u8D2D\u4E3B\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"cxCode",width:"150"}),e(f,{label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[e(f,{label:"\u4F9B\u8D27\u5546",prop:"supplierName",width:"160","show-overflow-tooltip":""}),e(f,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type",width:"85","show-overflow-tooltip":""}),n.edit?E("v-if",!0):(d(),v(f,{key:0,label:"\u91C7\u8D2D\u5355\u72B6\u6001",prop:"cgd_status","min-width":"140","show-overflow-tooltip":""},{default:u(({row:r})=>[e(s,null,{default:u(()=>{var o;return[b(q(((o=i(de).find(a=>a.value===String(r.cgd_status)))==null?void 0:o.label)||"--"),1)]}),_:2},1024)]),_:1})),e(f,{label:"\u53D1\u8D27\u72B6\u6001",prop:"sendStatus",width:"90","show-overflow-tooltip":""},{default:u(({row:r})=>[e(s,{size:"small"},{default:u(()=>{var o;return[b(q((o=i(le).find(a=>a.value===String(r.sendStatus)))==null?void 0:o.label),1)]}),_:2},1024)]),_:1}),e(f,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",width:"180","show-overflow-tooltip":""}),e(f,{label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:r})=>[e(s,{size:"small"},{default:u(()=>{var o;return[b(q((o=i(oe).find(a=>a.value===String(r.cgdSource)))==null?void 0:o.label),1)]}),_:2},1024)]),_:1}),e(f,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""})]),_:1}),e(f,{label:"\u5546\u54C1\u4FE1\u606F"},{default:u(()=>[e(f,{label:"\u5546\u54C1\u7F16\u7801",prop:"goodNo",width:"150","show-overflow-tooltip":""}),e(f,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",width:"180","show-overflow-tooltip":""}),e(f,{label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:r})=>[e(s,{size:"small"},{default:u(()=>{var o;return[b(q((o=i(te).find(a=>a.value===String(r.cgdType)))==null?void 0:o.label),1)]}),_:2},1024)]),_:1}),e(f,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""})]),_:1}),e(f,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"70","show-overflow-tooltip":""})]),_:1},8,["data"])),[[j,i(m)]]),X("div",Le,[e(I,{type:"primary",onClick:O},{default:u(()=>[b("\u4FDD\u5B58")]),_:1})])],64)}}});var Ye=M(He,[["__scopeId","data-v-6a6f6fd0"],["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/cpns/batch-mode.vue"]]);const Ge=L({__name:"purchase-modal",props:{supplierNo:{type:String,required:!1},companyNo:{type:String,required:!1},isComon:{type:String,required:!1}},emits:["pushOrder"],setup(l,{expose:V,emit:D}){const h=A(!1),w=A("1");function N(T){h.value=!1,D("pushOrder",T)}return V({onDisplay:()=>h.value=!0}),(T,S)=>{const m=F("el-radio"),y=F("el-radio-group"),C=F("ElDialog");return d(),v(C,{"close-on-click-modal":!1,top:"5vh",modelValue:h.value,"onUpdate:modelValue":S[1]||(S[1]=P=>h.value=P),title:"\u9009\u62E9\u91C7\u8D2D\u5355",center:"","destroy-on-close":"",width:"1040px"},{default:u(()=>[e(y,{modelValue:w.value,"onUpdate:modelValue":S[0]||(S[0]=P=>w.value=P)},{default:u(()=>[e(m,{label:"1"},{default:u(()=>[b("\u52FE\u9009\u67E5\u627E")]),_:1}),e(m,{label:"2"},{default:u(()=>[b("\u6279\u91CF\u67E5\u627E(\u91C7\u8D2D\u5355\u53F7)")]),_:1}),e(m,{label:"3"},{default:u(()=>[b("\u6279\u91CF\u67E5\u627E(\u9500\u552E\u5355\u53F7)")]),_:1})]),_:1},8,["modelValue"]),w.value==="1"?(d(),v(Me,{key:0,"company-no":l.companyNo,"supplier-no":l.supplierNo,isComon:l.isComon,onSelection:N},null,8,["company-no","supplier-no","isComon"])):(d(),v(Ye,{key:1,"company-no":l.companyNo,"supplier-no":l.supplierNo,type:w.value,isComon:l.isComon,onSelection:N},null,8,["company-no","supplier-no","type","isComon"]))]),_:1},8,["modelValue"])}}});var Ke=M(Ge,[["__scopeId","data-v-ed8ff04a"],["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/cpns/purchase-modal.vue"]]);const We={class:"flex justify-end w-full"},Xe=L({__name:"edit-modal",emits:["save"],setup(l,{expose:V,emit:D}){const h=ue(!1),w=A({}),N=[{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 w.value.num}},{label:"\u672C\u6B21\u5F00\u7968\u91D1\u989D",span:8,render(){return Fe(_e,{precision:2,min:0,modelValue:w.value.inv_fee,onChange:S})}}];function T(y,C){var P=y.toString(),_=C.toString(),$,O,x=arguments[2];return $=(_.split(".")[1]?_.split(".")[1].length:0)-(P.split(".")[1]?P.split(".")[1].length:0),O=Number(P.replace(".",""))/Number(_.replace(".",""))*Math.pow(10,$),Number(typeof x!="number"?O:O.toFixed(parseInt(x)))}function S(y){w.value.inv_fee=y,w.value.num=Number(T(w.value.inv_fee,w.value.goodPrice)).toFixed(8)}function m(){D("save",w.value),h.value=!1}return V({onDisplay:y=>{h.value=!0,w.value={...y,num:y.num,inv_fee:y.inv_fee,totalOpenAmount:y.totalOpenAmount}}}),(y,C)=>(d(),v(i(De),{width:"1024px",modelValue:i(h),"onUpdate:modelValue":C[0]||(C[0]=P=>Ee(h)?h.value=P:null),title:"\u7F16\u8F91",center:""},{default:u(()=>[e(i(he),{data:w.value,columns:N},null,8,["data"]),X("div",We,[e(i(be),{type:"primary",onClick:m},{default:u(()=>[b(" \u4FDD\u5B58 ")]),_:1})])]),_:1},8,["modelValue"]))}});var Je=M(Xe,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/cpns/edit-modal.vue"]]);const Ze={flex:"","justify-between":"","w-full":"","mb-1":""},Qe={key:0,class:"mb-2"},eu=L({__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},edit:{type:Boolean,required:!1}},emits:["push","delete","choose","edit","selectionChange","batchSelection","batchCancelSelection"],setup(l,{expose:V,emit:D}){const h=l,w=A(null),N=A([]),T=A(null),S=A(null),m=ue(-1);function y(p,c){var g,f,s;try{g=p.toString().split(".")[1].length}catch{g=0}try{f=c.toString().split(".")[1].length}catch{f=0}return s=Math.pow(10,Math.max(g,f)),(p*s+c*s)/s}const C=re(()=>h.purchaseOrders.length),P=re(()=>{const{purchaseOrders:p}=h,c=p.reduce((g,{totalPrice:f})=>y(g,f||0),0);return Number(c).toFixed(2)}),_=p=>{var c;m.value=p,(c=S.value)==null||c.onDisplay(h.purchaseOrders[p])},$=p=>{D("edit",p,m.value),m.value=-1},O=p=>{N.value=p};function x(){const{supplierNo:p,companyNo:c}=h;if(!p||!c)return Y.warning("\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546\u548C\u4E1A\u52A1\u516C\u53F8");T.value.onDisplay()}function n(p=!0){if(N.value.length===0){Y.warning("\u8BF7\u9009\u62E9\u901A\u7528\u8BA2\u5355");return}const c=N.value.map(({id:g})=>g);D(p?"batchSelection":"batchCancelSelection",c),w.value.clearSelection()}return V({getOpenInvInfo:()=>N.value.map(({num:p,inv_fee:c,sequenceNo:g})=>({num:p,inv_fee:c,sequenceNo:g}))}),(p,c)=>{const g=F("ElTag"),f=F("ElButton"),s=F("ElTableColumn"),I=F("IconifyIconOffline"),j=F("ElTable");return d(),U("div",null,[X("div",Ze,[l.edit?E("v-if",!0):(d(),v(g,{key:0,type:"warning"},{default:u(()=>[b(" \u5171\u8BA1:"+q(i(C))+"\u4E2A\u8BA2\u5355,\u5171\u8BA1 "+q(i(P))+" \u5143 ",1)]),_:1})),E(` <ElButton \r
  3. v-if="purchaseOrders.length !== 0 && edit" \r
  4. type="primary"\r
  5. size="small"\r
  6. @click="onOpenInv"\r
  7. >\u5F00\u7968\u7533\u8BF7\r
  8. </ElButton> `),!l.readonly&&!l.isPurchPay?(d(),v(f,{key:1,type:"primary",onClick:x},{default:u(()=>[b("\u6DFB\u52A0\u91C7\u8D2D\u5355 ")]),_:1})):E("v-if",!0)]),l.edit&&l.purchaseOrders.length!==0?(d(),U("div",Qe,[e(g,{class:"mr-[10px]"},{default:u(()=>[b(q(l.totalCommonCount)+"/150 ",1)]),_:1}),e(g,{class:"mr-[10px]"},{default:u(()=>[b(q(l.totalCommonPrice)+"\u5143",1)]),_:1}),e(f,{onClick:n},{default:u(()=>[b("\u6279\u91CF\u9009\u4E2D\u8BA2\u5355")]),_:1}),e(f,{onClick:c[0]||(c[0]=r=>n(!1))},{default:u(()=>[b("\u6279\u91CF\u53D6\u6D88\u9009\u4E2D\u8BA2\u5355")]),_:1})])):E("v-if",!0),e(j,{ref_key:"tableRef",ref:w,"row-key":"id",size:"small",data:l.purchaseOrders,"max-height":"400",onSelectionChange:O},{default:u(()=>[l.edit?(d(),v(s,{key:0,fixed:"left",type:"selection"})):E("v-if",!0),l.edit?(d(),v(s,{key:1,fixed:"left",label:"\u5E8F\u53F7",type:"index"})):E("v-if",!0),l.edit?(d(),v(s,{key:2,fixed:"left",width:"65px",label:"\u662F\u5426\u9009\u4E2D"},{default:u(({row:r})=>[r.isSelection?(d(),v(I,{key:0,icon:"success",style:{color:"#67C23A"}})):E("v-if",!0)]),_:1})):E("v-if",!0),l.edit?E("v-if",!0):(d(),v(s,{key:3,label:"\u91C7\u8D2D\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"sequenceNo",width:"150"})),e(s,{label:"\u9500\u552E\u8BA2\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:l.edit?"sequenceNo":"qrdCode",width:"150"},null,8,["prop"]),e(s,{label:l.edit?"\u9500\u552E\u4E3B\u5355\u53F7":"\u91C7\u8D2D\u4E3B\u5355\u53F7","show-overflow-tooltip":"",prop:"cxCode",width:"150"},null,8,["label"]),l.edit?(d(),v(s,{key:4,label:"\u91C7\u8D2D\u5355\u7F16\u7801","show-overflow-tooltip":"",prop:"cgdNo",width:"165"})):E("v-if",!0),l.edit?E("v-if",!0):(d(),v(s,{key:5,label:"\u91C7\u8D2D\u5355\u4FE1\u606F"},{default:u(()=>[l.edit?E("v-if",!0):(d(),v(s,{key:0,label:"\u4F9B\u8D27\u5546",prop:"supplierName","min-width":"160","show-overflow-tooltip":""})),l.readonly?E("v-if",!0):(d(),v(s,{key:1,label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","min-width":"160","show-overflow-tooltip":""})),l.edit?E("v-if",!0):(d(),v(s,{key:2,label:"\u91C7\u8D2D\u5355\u72B6\u6001",prop:"cgd_status","min-width":"140","show-overflow-tooltip":""},{default:u(({row:r})=>[e(g,null,{default:u(()=>{var o;return[b(q(((o=i(de).find(a=>a.value===String(r.cgd_status)))==null?void 0:o.label)||"--"),1)]}),_:2},1024)]),_:1})),l.edit?E("v-if",!0):(d(),v(s,{key:3,label:"\u9500\u552E\u5355\u53D1\u8D27\u72B6\u6001",prop:"qrdSend",width:"110","show-overflow-tooltip":""},{default:u(({row:r})=>[e(g,null,{default:u(()=>{var o;return[b(q(((o=i(le).find(a=>a.value===String(r.qrdSend)))==null?void 0:o.label)||"--"),1)]}),_:2},1024)]),_:1})),i(ne)?E("v-if",!0):(d(),v(s,{key:4,label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName","min-width":"180","show-overflow-tooltip":""})),i(ne)?E("v-if",!0):(d(),v(s,{key:5,label:"\u8BA2\u5355\u6765\u6E90",prop:"cgdSource",width:"100","show-overflow-tooltip":""},{default:u(({row:r})=>[e(g,null,{default:u(()=>{var o;return[b(q((o=i(oe).find(a=>a.value===r.cgdSource))==null?void 0:o.label),1)]}),_:2},1024)]),_:1})),e(s,{label:"\u603B\u8D27\u6B3E",prop:"totalPrice",width:"80","show-overflow-tooltip":""}),e(s,{label:"\u5F00\u7968\u91D1\u989D",prop:"inv_fee",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\u5355\u4EF7",prop:"goodPrice","show-overflow-tooltip":""}),i(ne)?E("v-if",!0):(d(),v(s,{key:0,label:"\u5546\u54C1\u6765\u6E90",prop:"cgdType",width:"90","show-overflow-tooltip":""},{default:u(({row:r})=>[e(g,null,{default:u(()=>{var o;return[b(q((o=i(te).find(a=>a.value===String(r.cgdType)))==null?void 0:o.label),1)]}),_:2},1024)]),_:1})),e(s,{label:"\u5546\u54C1\u6570\u91CF",prop:"goodNum",width:"90","show-overflow-tooltip":""}),e(s,{label:"\u91C7\u8D2D\u5458",prop:"ownerName",width:"75","show-overflow-tooltip":""}),e(s,{label:"\u7A0E\u7387",prop:"tax","show-overflow-tooltip":""},{default:u(({row:r})=>[b(q(r.tax)+"% ",1)]),_:1})]),_:1}),l.edit?(d(),U(G,{key:6},[e(s,{label:"\u672A\u5F00\u7968\u91D1\u989D",prop:"winv_fee",width:"90","show-overflow-tooltip":""}),e(s,{label:"\u672C\u6B21\u5F00\u7968\u91D1\u989D",prop:"inv_fee",width:"110","show-overflow-tooltip":""}),e(s,{label:"\u672A\u5F00\u7968\u6570\u91CF",prop:"winv_num",width:"90","show-overflow-tooltip":""}),e(s,{label:"\u672C\u6B21\u5F00\u7968\u6570\u91CF",prop:"num",width:"110","show-overflow-tooltip":""})],64)):E("v-if",!0),!l.readonly&&!l.edit?(d(),v(s,{key:7,label:"\u64CD\u4F5C",fixed:"right"},{default:u(({$index:r})=>[e(f,{link:"",type:"primary",onClick:()=>D("delete",r)},{default:u(()=>[b(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})):E("v-if",!0),l.edit?(d(),v(s,{key:8,label:"\u64CD\u4F5C",width:"65",fixed:"right"},{default:u(({$index:r})=>[e(f,{link:"",type:"primary",onClick:o=>_(r)},{default:u(()=>[b("\u7F16\u8F91")]),_:2},1032,["onClick"])]),_:1})):E("v-if",!0)]),_:1},8,["data"]),e(Ke,{ref_key:"PurchaseModalRef",ref:T,isComon:l.isComon,companyNo:l.companyNo,supplierNo:l.supplierNo,onPushOrder:c[1]||(c[1]=r=>D("push",r))},null,8,["isComon","companyNo","supplierNo"]),e(Je,{ref_key:"editModalRef",ref:S,onSave:$},null,512)])}}});var fe=M(eu,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/cpns/purchase-table.vue"]]);const uu={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"}},lu={class:"w-full"},ou={key:0,class:"w-full flex justify-end"},tu={key:0,flex:"","gap-10":""},au={key:0,class:"flex w-full justify-end"},nu=L({__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},edit:{type:Boolean,required:!0},cover:{type:Boolean,required:!1},platformType:{type:String,required:!1}},emits:["create","choose","getRecord","openInv","clear"],setup(l,{expose:V,emit:D}){const h=l,w=A(null),{currentCompany:N}=Be(),T=A([]),S=ue("0.00"),m=ue(0),y=A("0"),C=A({companyNo:"",supplierNo:"",companyItem:{},cids:[]}),P=A(null),_=A([]),{run:$,data:O,loading:x}=ie({initalData:{},success:function(o){h.cover&&(_.value=[],C.value.cids=[]),D("getRecord",o),n(o[h.edit?"qrdlist":"cgdlist"].map((a,k)=>({...a,goodPrice:Number(xe(a.totalPrice,a.goodNum)).toFixed(8),cgdNo:o.cgdlist[k].name,num:a.winv_num,inv_fee:a.winv_fee,isSelection:!1,totalOpenAmount:"0.00"}))),S.value="0.00",m.value=0}});function n(o){if(!!o)for(let a=0;a<o.length;a++){const k=o[a];C.value.cids.includes(k.id)||(_.value.push(k),C.value.cids.push(k.id))}}function p(o){_.value.splice(o,1),C.value.cids.splice(o,1)}function c(o){C.value.companyItem=o}async function g(){try{await P.value.validate(),D("create",i(C))}catch{}}const f=()=>$(h.edit?Te({payNo:h.id}):Ve({payNo:h.id})),s=o=>{const{code:a,name:k,type:t}=o,R=t==="3"||t==="\u4E1A\u52A1\u516C\u53F8"?"(\u5DF2\u5347\u7EA7\u4E3A\u4E1A\u52A1\u516C\u53F8)":"";return a+" / "+k+R},I=o=>{const{companyNo:a,company_name:k}=o;return a+" / "+k},j=(o,a)=>{const{inv_fee:k,num:t,totalOpenAmount:B}=o;_.value[a].inv_fee=k,_.value[a].num=t,_.value[a].totalOpenAmount=B;const R=_.value.reduce((K,H)=>Q(K,H.isSelection?H.inv_fee:0),0);m.value=_.value.reduce((K,H)=>Q(K,H.isSelection?1:0),0),S.value=Number(R).toFixed(2)};function r(o,a=!0){_.value.forEach(t=>t.isSelection=a?o.includes(t.id):!o.includes(t.id));const k=_.value.reduce((t,B)=>Q(t,B.isSelection?B.inv_fee:0),0);m.value=_.value.reduce((t,B)=>Q(t,B.isSelection?1:0),0),S.value=Number(k).toFixed(2)}return W(()=>h.id,o=>o&&f(),{immediate:!0}),W(()=>y.value,()=>{_.value=[],C.value.cids=[]}),W(()=>N.value,({companyNo:o})=>{C.value[h.isPurch?"companyNo":"supplierNo"]=o},{immediate:!0}),W(()=>h.platformType,()=>{O.value={},_.value=[],C.value.cids=[],D("clear")}),V({detail:O,refresh:()=>f(),getOpenInvInfo:()=>({orderArr:_.value.filter(({isSelection:o})=>o).map(({num:o,inv_fee:a,sequenceNo:k})=>({num:o,inv_fee:a,sequenceNo:k})),totalCommonPrice:S.value,totalCommonCount:m.value,data:O.value})}),(o,a)=>{const k=F("ElButton"),t=F("ElInput"),B=F("ElFormItem"),R=F("ElOption"),K=F("ElSelect"),H=se("loading");return ee((d(),U("div",lu,[l.isPurchPay?(d(),U("div",ou,[e(k,{text:"",type:"primary",onClick:a[0]||(a[0]=()=>D("choose"))},{default:u(()=>[b(" \u9009\u62E9")]),_:1})])):E("v-if",!0),l.readonly?(d(),v(Ie,{key:1,showTicketColumn:l.showTicketColumn,isPurchPay:l.isPurchPay,data:i(O)},null,8,["showTicketColumn","isPurchPay","data"])):E("v-if",!0),l.isPurchPay?E("v-if",!0):ee((d(),v(i(ke),{key:2,class:"w-full",ref_key:"formRef",ref:P,model:C.value,rules:i(uu)},{default:u(()=>[l.readonly?E("v-if",!0):(d(),U("div",tu,[e(B,{label:"\u4E70\u65B9\u516C\u53F8",prop:"companyNo"},{default:u(()=>[l.isPurch?(d(),v(t,{key:1,style:{width:"300px"},value:i(N).companyName,disabled:""},null,8,["value"])):(d(),v(i(pe),{key:0,value:C.value.companyNo,"onUpdate:value":a[1]||(a[1]=z=>C.value.companyNo=z),style:{width:"386px"},api:i(Ne),placeholder:"\u8BF7\u9009\u62E9\u4E70\u65B9\u516C\u53F8","request-prop":"company_name","response-label-prop":"company_name","response-val-prop":"companyNo","disabled-value":i(N).companyNo,getLabel:I,onItemChange:c},null,8,["value","api","disabled-value"]))]),_:1}),e(B,{label:"\u5356\u65B9\u516C\u53F8",prop:"supplierNo"},{default:u(()=>[l.isPurch?(d(),v(i(pe),{key:1,value:C.value.supplierNo,"onUpdate:value":a[2]||(a[2]=z=>C.value.supplierNo=z),style:{width:"386px"},api:i(Se),placeholder:"\u8BF7\u9009\u62E9\u5356\u65B9\u516C\u53F8","request-prop":"name","response-label-prop":"name","response-val-prop":"code","disabled-value":i(N).companyNo,getLabel:s},null,8,["value","api","disabled-value"])):(d(),v(t,{key:0,style:{width:"300px"},value:i(N).companyName,disabled:""},null,8,["value"]))]),_:1}),e(B,{label:"\u4E1A\u52A1\u7C7B\u578B",required:!0},{default:u(()=>[e(K,{modelValue:y.value,"onUpdate:modelValue":a[3]||(a[3]=z=>y.value=z)},{default:u(()=>[e(R,{label:"\u91C7\u8D2D\u8BA2\u5355",value:"0"}),e(R,{label:"\u6E90\u5934\u8BA2\u5355",value:"2"})]),_:1},8,["modelValue"])]),_:1})])),e(B,{label:l.readonly?"":"\u91C7\u8D2D\u5355\u4FE1\u606F",prop:l.readonly?"":"cids"},{default:u(()=>[e(fe,ce({class:"w-full mt-1",ref_key:"purchaseTableRef",ref:w},C.value,{readonly:l.readonly,edit:l.edit,totalCommonPrice:i(S),totalCommonCount:i(m),purchaseOrders:_.value,isComon:y.value,onDelete:p,onPush:n,onEdit:j,onSelectionChange:a[4]||(a[4]=z=>T.value=z),onBatchSelection:r,onBatchCancelSelection:a[5]||(a[5]=z=>r(z,!1))}),null,16,["readonly","edit","totalCommonPrice","totalCommonCount","purchaseOrders","isComon"])]),_:1},8,["label","prop"]),e(B,null,{default:u(()=>[l.readonly?E("v-if",!0):(d(),U("div",au,[e(k,{type:"primary",onClick:g,loading:l.loading},{default:u(()=>[b("\u4FDD\u5B58")]),_:1},8,["loading"])]))]),_:1})]),_:1},8,["model","rules"])),[[H,l.loading]]),l.isPurchPay?(d(),v(fe,ce({key:3,ref_key:"purchaseTableRef",ref:w,class:"w-full mt-1"},C.value,{edit:l.edit,totalCommonPrice:i(S),totalCommonCount:i(m),readonly:l.readonly,isPurchPay:l.isPurchPay,isComon:y.value,purchaseOrders:_.value,onDelete:p,onPush:n,onEdit:j,onSelectionChange:a[6]||(a[6]=z=>T.value=z),onBatchSelection:r,onBatchCancelSelection:a[7]||(a[7]=z=>r(z,!1))}),null,16,["edit","totalCommonPrice","totalCommonCount","readonly","isPurchPay","isComon","purchaseOrders"])):E("v-if",!0)])),[[H,i(x)||l.loading]])}}});var ru=M(nu,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/ReconciliationForm/src/index.vue"]]);const iu=L({__name:"reconciliation",props:Ae,emits:["map-offset-top"],setup(l){const V=l,{defaultRef:D}=Pe({...V,noRequeset:!0});return(h,w)=>(d(),v(i(ru),{id:h.value,ref_key:"defaultRef",ref:D,readonly:""},null,8,["id"]))}});var su=M(iu,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/search/standBook/details/reconciliation.vue"]]),wu=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"}));export{su as R,Cu as h,wu as r};