From f8729b5771bb6d7c86a24218c1cdd48fb761a540 Mon Sep 17 00:00:00 2001 From: chenqiang Date: Thu, 23 Nov 2023 16:41:19 +0800 Subject: [PATCH] =?UTF-8?q?feat():=20=E6=B8=A0=E9=81=93=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8B=E8=BD=BD=E5=AF=B9=E8=B4=A6=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleBill/GeneralBusiness/loadable.jsx | 39 ++++++++++++++++++++-- src/services/ElectInvoice/index.js | 9 +++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/pages/FinancialMgm/SettleBill/GeneralBusiness/loadable.jsx b/src/pages/FinancialMgm/SettleBill/GeneralBusiness/loadable.jsx index d165e8a..fcf61df 100644 --- a/src/pages/FinancialMgm/SettleBill/GeneralBusiness/loadable.jsx +++ b/src/pages/FinancialMgm/SettleBill/GeneralBusiness/loadable.jsx @@ -189,10 +189,30 @@ function GeneralBusiness() { content={
- {}}>下载我方对账文件 + { + downLoadRefund({ + type: 1, //1为我方对账文件,2位对方对账文件 + tenantId: record?.tenantId || "", //支付商户id + billDate: record?.billDate || "", //对账日期 + }); + }} + > + 下载我方对账文件 +
- {}}>下载对方对账文件 + { + downLoadRefund({ + type: 2, //1为我方对账文件,2位对方对账文件 + tenantId: record?.tenantId || "", //支付商户id + billDate: record?.billDate || "", //对账日期 + }); + }} + > + 下载对方对账文件 +
} @@ -251,6 +271,21 @@ function GeneralBusiness() { link.click(); document.body.removeChild(link); }; + //下载对账文件 + const downLoadRefund = (data) => { + ajax.ElectInvoice.downLoadRefund({ ...data }).then( + (res) => { + if (parseInt(res?.status) === 20000) { + Daownload(res?.data?.export_url); + } else { + message.error(res?.message); + } + }, + (err) => { + console.log(err); + } + ); + }; //获取页面显示数据 const getData = (data) => { diff --git a/src/services/ElectInvoice/index.js b/src/services/ElectInvoice/index.js index 39b208e..f456218 100644 --- a/src/services/ElectInvoice/index.js +++ b/src/services/ElectInvoice/index.js @@ -135,6 +135,14 @@ const getRepeatDetail = (params) => { data: params, }); }; +//下载 +const downLoadRefund = (params) => { + return ajax({ + url: "/api/fin/bill/export", + type: "post", + data: params, + }); +}; export default { getInvoiceMess, FlushRed, @@ -153,4 +161,5 @@ export default { getPayRepeat, getRepeatDetail, getPayRepeatRefund, + downLoadRefund, };