CheckSum-20c7ab06.js
3.61 KB
var i=(y,u,o)=>new Promise((p,d)=>{var l=e=>{try{n(o.next(e))}catch(t){d(t)}},a=e=>{try{n(o.throw(e))}catch(t){d(t)}},n=e=>e.done?p(e.value):Promise.resolve(e.value).then(l,a);n((o=o.apply(y,u)).next())});import{d as C,k as _,_ as g,a9 as B,aa as f,a0 as D,f as F,u as m,$ as P,F as $,ac as I,ad as T}from"./vue-5a35c3f5.js";import{b as M,B as V}from"./index-c1c2669a.js";import{t 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=C({__name:"CheckSum",setup(y){const u=[{title:"生产科名称",dataIndex:"productionDepartment",width:150,customRender:t=>t.record.exportVOS[0].productionDepartment},{title:"生产科总价汇总¥",dataIndex:"productionDepartmentTotalPrice",width:150,customRender:t=>t.record.productionDepartmentTotalPrice.toFixed(2)},{title:"生产科扣款金额汇总¥",dataIndex:"deductAmount",width:160,customRender:t=>t.record.deductAmount.toFixed(2)},{title:"生产科实际应付金额¥",dataIndex:"calculateActualPayedAmount",width:160,customRender:t=>t.record.calculateActualPayedAmount.toFixed(2)},{title:"实际付款金额汇总¥",dataIndex:"actualPayedAmount",width:160,customRender:t=>t.record.actualPayedAmount.toFixed(2)},{title:"未付金额¥",dataIndex:"unPayedAmount",width:150,customRender:t=>t.record.unPayedAmount.toFixed(2)}],o=_(),[p,{closeModal:d}]=M(t=>i(this,null,function*(){o.value=t.data,setTimeout(()=>{a()},50)})),[l,{reload:a}]=N({api:()=>i(this,null,function*(){const t=yield O({ids:o.value});return _([]).value.push(t),t}),columns:u,bordered:!0});function n(t){a()}_({});function e(){return i(this,null,function*(){const t=o.value;j.post("/basic-api/order/erp/check_bill/export",{ids:t},{responseType:"blob"}).then(s=>{const h=new Blob([s.data],{type:"application/zip"}),b=(()=>{const r=new Date,k=r.getFullYear(),w=String(r.getMonth()+1).padStart(2,"0"),S=String(r.getDate()).padStart(2,"0"),R=String(r.getHours()).padStart(2,"0"),v=String(r.getMinutes()).padStart(2,"0"),A=String(r.getSeconds()).padStart(2,"0");return`${k}-${w}-${S} ${R}:${v}:${A}`})(),c=document.createElement("a");c.href=window.URL.createObjectURL(h),c.download=`应付款分析${b}.xlsx`,document.body.appendChild(c),c.click(),document.body.removeChild(c)}).catch(s=>{console.error(s)}),a(),d()})}return(t,s)=>(g(),B(m(V),T(t.$attrs,{onRegister:m(p),title:"应收款汇总",width:"60%",okText:"导出",isDetail:!0,showDetailBack:!1,onOk:e,onVisibleChange:n}),{default:f(()=>[D("div",U,[F(m(E),{onRegister:m(l)},{bodyCell:f(({column:h,record:x})=>[h.key==="action"?(g(),P($,{key:0},[],64)):I("v-if",!0)]),_:1},8,["onRegister"])])]),_:1},16,["onRegister"]))}});const bt=L(z,[["__scopeId","data-v-9cacdad0"],["__file","E:/allcode/erp/test7901/order-erp-front/src/views/project/finance/pay/CheckSum.vue"]]);export{bt as default};