InvoiceAnalysis-ef4e71f0.js
4.03 KB
var l=(y,p,a)=>new Promise((h,d)=>{var _=o=>{try{i(a.next(o))}catch(t){d(t)}},s=o=>{try{i(a.throw(o))}catch(t){d(t)}},i=o=>o.done?h(o.value):Promise.resolve(o.value).then(_,s);i((a=a.apply(y,p)).next())});import{d as S,k as m,_ as g,a9 as k,aa as x,a0 as F,f as B,u,$ as T,F as C,ac as D,ad as P}from"./vue-5a35c3f5.js";import{b as M,B as V}from"./index-c1c2669a.js";import{i as O}from"./invoice-f64ec395.js";import{B as E}from"./BasicTable-7dbd57c0.js";import"./componentMap-4d1c941b.js";import"./TableImg.vue_vue_type_style_index_0_lang-6e828edc.js";import{u as N}from"./useTable-e28259fb.js";import{al as j,_ as L}from"./index.js";import"./antd-6b087f69.js";import"./useWindowSizeFn-cc2fb57c.js";import"./order-eff5d778.js";import"./message-c4c6f446.js";import"./BasicForm-53100365.js";import"./FormItem-ffc5ecef.js";import"./helper-95474dfc.js";import"./BasicForm.vue_vue_type_style_index_0_lang-3479a052.js";import"./uniqBy-0cd5a663.js";import"./useForm-86d11f60.js";import"./RadioButtonGroup-72b65d2e.js";import"./useFormItem-9ea791b8.js";import"./uuid-31b8b5a4.js";import"./merge-4fa735fa.js";import"./onMountedOrActivated-52afb7a7.js";import"./download-3d468407.js";import"./base64Conver-39fc0d26.js";import"./index-1ca3bd8a.js";import"./IconPicker-6bbd557c.js";import"./index-9a895eb5.js";import"./sortable.esm-4ae27e0b.js";const U={class:"p-4"},z=S({__name:"InvoiceAnalysis",setup(y){const p=[{title:"客户编码",dataIndex:"actualPayedAmount",width:50,customRender:t=>{var e,n;return(n=(e=t==null?void 0:t.record)==null?void 0:e.exportVOS[0])==null?void 0:n.customerCode}},{title:"客户总金额汇总$",dataIndex:"customerTotalPrice",width:50,customRender:t=>{var e;return(e=t==null?void 0:t.record)==null?void 0:e.customerTotalPrice.toFixed(2)}},{title:"客户扣款金额汇总$",dataIndex:"deductAmount",width:50,customRender:t=>{var e;return(e=t==null?void 0:t.record)==null?void 0:e.deductAmount.toFixed(2)}},{title:"实际应收款$",dataIndex:"otherAmount",width:50,customRender:t=>{var e;return(e=t==null?void 0:t.record)==null?void 0:e.otherAmount.toFixed(2)}},{title:"实际收款金额汇总$",dataIndex:"actualReceivableAmount",width:50,customRender:t=>{var e;return(e=t==null?void 0:t.record)==null?void 0:e.actualReceivableAmount.toFixed(2)}},{title:"其他费用金额汇总$",dataIndex:"otherTotalAmount",width:50,customRender:t=>{var e;return(e=t==null?void 0:t.record)==null?void 0:e.otherTotalAmount.toFixed(2)}},{title:"未收金额合计$",dataIndex:"actualPayedAmount",width:50,customRender:t=>{var e;return(e=t==null?void 0:t.record)==null?void 0:e.actualPayedAmount.toFixed(2)}}],a=m();m([]);const[h,{closeModal:d}]=M(t=>l(this,null,function*(){a.value=t.data,setTimeout(()=>{s()},50)})),[_,{reload:s}]=N({api:()=>l(this,null,function*(){const t=m([]),e=yield O({ids:a.value});return t.value.push(e),e}),columns:p,bordered:!0});function i(t){s()}m({});function o(){return l(this,null,function*(){const t=a.value;j.post("/basic-api/order/erp/invoice_bill/export",{ids:t},{responseType:"blob"}).then(e=>{const n=new Blob([e.data],{type:"application/zip"}),v=(()=>{const r=new Date,b=r.getFullYear(),w=String(r.getMonth()+1).padStart(2,"0"),A=String(r.getDate()).padStart(2,"0"),R=String(r.getHours()).padStart(2,"0"),$=String(r.getMinutes()).padStart(2,"0"),I=String(r.getSeconds()).padStart(2,"0");return`${b}-${w}-${A} ${R}:${$}:${I}`})(),c=document.createElement("a");c.href=window.URL.createObjectURL(n),c.download=`收款单分析${v}.xlsx`,document.body.appendChild(c),c.click(),document.body.removeChild(c)}).catch(e=>{console.error(e)}),d()})}return(t,e)=>(g(),k(u(V),P(t.$attrs,{onRegister:u(h),title:"收款单分析",width:"60%",okText:"导出",isDetail:!0,showDetailBack:!1,onOk:o,onVisibleChange:i}),{default:x(()=>[F("div",U,[B(u(E),{onRegister:u(_)},{bodyCell:x(({column:n,record:f})=>[n.key==="action"?(g(),T(C,{key:0},[],64)):D("v-if",!0)]),_:1},8,["onRegister"])])]),_:1},16,["onRegister"]))}});const vt=L(z,[["__scopeId","data-v-c223a173"],["__file","E:/allcode/erp/test7901/order-erp-front/src/views/project/finance/receive/InvoiceAnalysis.vue"]]);export{vt as default};