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, };