import{d as C,O,Y as U,r as F,a as E,o as j,c as s,Z as I,f as v,g as L,h as d,l as t,m as l,i as w,j as i,k as _,w as J,M as P,e as H,_ as $}from"./index.2c7321ca.js";import{C as b}from"./api.7608f319.js";import"./index.2ecac4c1.js";import{_ as Z}from"./_plugin-vue_export-helper.cdc0426e.js";const q={class:"section-main-container layout-padding"},G={class:"section-main-padding layout-padding-auto layout-padding-view"},K={class:"section-user-search mb15"},Q={class:"alerttips"},W={class:"totalNumber"},X={class:"successColor"},ee={class:"successColor"},te={class:"failColor"},ae={class:"failColor"},oe={class:"ProcessingColor"},le={class:"ProcessingColor"},ue=C({name:"targetData"}),ne=C({...ue,setup(re){const h=O(()=>$(()=>import("./dialog.747c5eec.js"),["assets/dialog.747c5eec.js","assets/api.7608f319.js","assets/index.2c7321ca.js","assets/index.319ce9dc.css","assets/_plugin-vue_export-helper.cdc0426e.js"]));U();const B=F(),o=E({tableData:{data:[],total:0,loading:!1,param:{startDateEndArr:[],startDateEndArrRest:[],startDate:"",endDate:"",fundFlowType:"2",accountName:"",pageNumber:1,pageSize:10}}}),p=F({totalCount:0,sumAmount:0,successCount:0,successAmount:0,errorCount:0,errorAmount:0,processingCount:0,processingAmount:0}),g=()=>{o.tableData.loading=!0;let e=JSON.parse(JSON.stringify(o.tableData.param));e.startDateEndArr.length&&(e.startDate=e.startDateEndArr[0],e.endDate=e.startDateEndArr[1]),delete e.startDateEndArr,delete e.startDateEndArrRest,b().reconciliationApi(e).then(a=>{console.log("response\u67E5\u8BE2",a),a.code==200&&(o.tableData.data=a.data.pageInfo.list,o.tableData.total=a.data.pageInfo.total,p.value=a.data)}).catch(a=>{}),setTimeout(()=>{o.tableData.loading=!1},500)},y=()=>{let e={startDateEndArr:o.tableData.param.startDateEndArrRest,startDateEndArrRest:[],startDate:"",endDate:"",fundFlowType:"2",accountName:"",pageNumber:1,pageSize:10};o.tableData.param=E(e),g()},N=e=>{o.tableData.param.pageSize=e,g()},k=e=>{o.tableData.param.pageNumber=e,g()},x=()=>{let e=JSON.parse(JSON.stringify(o.tableData.param));e.startDateEndArr.length&&(e.startDate=e.startDateEndArr[0],e.endDate=e.startDateEndArr[1]),delete e.startDateEndArr,delete e.startDateEndArrRest,delete e.pageNumber,delete e.pageSize,b().exportReconciliationApi(e).then(a=>{const m=a,c=new Blob([m.data]),D="\u5BF9\u8D26\u6570\u636E.xls";if("download"in document.createElement("a")){const u=document.createElement("a");u.download=D,u.style.display="none",u.href=URL.createObjectURL(c),document.body.appendChild(u),u.click(),URL.revokeObjectURL(u.href),document.body.removeChild(u)}else navigator.msSaveBlob(c,D)}).catch(a=>{})},S=(e,a)=>{console.log(a);let c={tradeFlowNo:a.id};b().tradevoucherDownApi(c).then(D=>{console.log(D),D.data&&window.open(D.data)})};return j(()=>{var e=new Date;let a=e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+(e.getDate()<10?"0"+e.getDate():e.getDate());e.setDate(e.getDate()-6);var m=e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+(e.getDate()<10?"0"+e.getDate():e.getDate());console.log("endDate",m),o.tableData.param.startDateEndArr=[""+m,""+a],o.tableData.param.startDateEndArrRest=[""+m,""+a],g()}),(e,a)=>{const m=s("el-alert"),c=s("el-row"),D=s("el-date-picker"),u=s("el-form-item"),A=s("el-option"),R=s("el-select"),z=s("el-input"),f=s("el-button"),M=s("el-form"),n=s("el-table-column"),V=s("el-table"),Y=s("el-pagination"),T=I("loading");return v(),L("div",q,[d("div",G,[d("div",K,[t(c,null,{default:l(()=>[d("div",Q,[t(m,{title:"\u5BF9\u8D26\u6570\u636E\u751F\u6210\uFF1A\u6BCF\u5929\u51CC\u6668\u5B9A\u65F6\u4EA7\u751F\u524D\u4E00\u65E5\u7684\u5BF9\u8D26\u6570\u636E\u3002",type:"warning","show-icon":"",closable:!1})])]),_:1}),t(c,null,{default:l(()=>[t(M,{inline:!0,model:o.tableData.param,class:"demo-form-inline","label-position":"left",size:"default",onSubmit:a[3]||(a[3]=w(()=>{},["prevent"]))},{default:l(()=>[t(u,{label:"\u4EA4\u6613\u65E5\u671F"},{default:l(()=>[t(D,{modelValue:o.tableData.param.startDateEndArr,"onUpdate:modelValue":a[0]||(a[0]=r=>o.tableData.param.startDateEndArr=r),type:"daterange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),t(u,{label:"\u8D44\u91D1\u6D41\u5411"},{default:l(()=>[t(R,{modelValue:o.tableData.param.fundFlowType,"onUpdate:modelValue":a[1]||(a[1]=r=>o.tableData.param.fundFlowType=r),clearable:""},{default:l(()=>[t(A,{value:"1",label:"\u6536\u5165"}),t(A,{value:"2",label:"\u652F\u51FA"})]),_:1},8,["modelValue"])]),_:1}),t(u,{label:"\u5BF9\u65B9\u6237\u540D"},{default:l(()=>[t(z,{modelValue:o.tableData.param.accountName,"onUpdate:modelValue":a[2]||(a[2]=r=>o.tableData.param.accountName=r),clearable:""},null,8,["modelValue"])]),_:1}),t(u,null,{default:l(()=>[t(f,{type:"primary",onClick:g},{default:l(()=>[i("\u67E5\u8BE2")]),_:1}),t(f,{type:"default",onClick:y},{default:l(()=>[i("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(c,null,{default:l(()=>[t(f,{type:"primary",size:"default",onClick:x},{default:l(()=>[i("\u5BFC\u51FA\u4E3Aexcel\u6587\u4EF6")]),_:1})]),_:1})]),t(c,null,{default:l(()=>[d("section",W,[d("span",null,"\u603B\u7B14\u6570\uFF1A"+_(p.value.totalCount)+"\u7B14",1),i(" | "),d("span",null,"\u603B\u91D1\u989D\uFF1A"+_(p.value.sumAmount)+"\u5143",1),i(" | "),d("span",X,"\u6210\u529F\u7B14\u6570\uFF1A"+_(p.value.successCount)+"\u7B14",1),i(" | "),d("span",ee,"\u6210\u529F\u91D1\u989D\uFF1A"+_(p.value.successAmount)+"\u5143",1),i(" | "),d("span",te,"\u5931\u8D25\u7B14\u6570\uFF1A"+_(p.value.errorCount)+"\u7B14",1),i(" | "),d("span",ae,"\u5931\u8D25\u91D1\u989D\uFF1A"+_(p.value.errorAmount)+"\u5143",1),i(" | "),d("span",oe,"\u5904\u7406\u4E2D\u7B14\u6570\uFF1A"+_(p.value.processingCount)+"\u7B14",1),i(" | "),d("span",le,"\u5904\u7406\u4E2D\u91D1\u989D\uFF1A"+_(p.value.processingAmount)+"\u5143",1)])]),_:1}),J((v(),P(V,{data:o.tableData.data,style:{width:"100%"}},{default:l(()=>[t(n,{prop:"tradeSerialNo",label:"\u4EA4\u6613\u6D41\u6C34\u53F7","show-overflow-tooltip":""}),t(n,{prop:"tradeStatus",label:"\u4EA4\u6613\u72B6\u6001","show-overflow-tooltip":""}),t(n,{prop:"tradeStartTime",label:"\u4EA4\u6613\u8BA2\u5355\u521B\u5EFA\u65F6\u95F4",width:"200","show-overflow-tooltip":""}),t(n,{prop:"tradeAmount",label:"\u4EA4\u6613\u91D1\u989D","show-overflow-tooltip":""}),t(n,{prop:"expendAccountName",label:"\u51FA\u8D26\u65B9\u6237\u540D","show-overflow-tooltip":""}),t(n,{prop:"expendAccountNo",label:"\u51FA\u8D26\u65B9\u8D26\u53F7","show-overflow-tooltip":""}),t(n,{prop:"expendBank",label:"\u51FA\u8D26\u65B9\u94F6\u884C\u7B80\u79F0","show-overflow-tooltip":""}),t(n,{prop:"incomeAccountName",label:"\u5165\u8D26\u65B9\u6237\u540D","show-overflow-tooltip":""}),t(n,{prop:"incomeAccountNo",label:"\u5165\u8D26\u65B9\u8D26\u53F7","show-overflow-tooltip":""}),t(n,{prop:"incomeBank",label:"\u5165\u8D26\u65B9\u94F6\u884C\u7B80\u79F0","show-overflow-tooltip":""}),t(n,{prop:"remark",label:"\u4EA4\u6613\u5907\u6CE8","show-overflow-tooltip":""}),t(n,{label:"\u64CD\u4F5C",width:"100",fixed:"right"},{default:l(r=>[t(f,{size:"small",text:"",type:"primary",onClick:w(se=>S("detail",r.row),["prevent"])},{default:l(()=>[i("\u7535\u5B50\u56DE\u5355")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,o.tableData.loading]]),t(Y,{onSizeChange:N,onCurrentChange:k,class:"mt15","pager-count":5,"page-sizes":[10,20,30,100,200,300,1e3],"current-page":o.tableData.param.pageNumber,"onUpdate:current-page":a[4]||(a[4]=r=>o.tableData.param.pageNumber=r),background:"","page-size":o.tableData.param.pageSize,"onUpdate:page-size":a[5]||(a[5]=r=>o.tableData.param.pageSize=r),layout:"total, sizes, prev, pager, next, jumper",total:o.tableData.total},null,8,["current-page","page-size","total"])]),t(H(h),{ref_key:"configDialogRef",ref:B,onRefresh:a[6]||(a[6]=r=>g())},null,512)])}}});const me=Z(ne,[["__scopeId","data-v-16e96dd9"]]);export{me as default};