Browse Source

feat(): 渠道对账新增下载对账文件

tags/PMS_Frontend_v1.0.6-develop
chenqiang 1 year ago
parent
commit
f8729b5771
  1. 39
      src/pages/FinancialMgm/SettleBill/GeneralBusiness/loadable.jsx
  2. 9
      src/services/ElectInvoice/index.js

39
src/pages/FinancialMgm/SettleBill/GeneralBusiness/loadable.jsx

@ -189,10 +189,30 @@ function GeneralBusiness() {
content={
<div className="popover-content">
<div>
<a onClick={() => {}}>下载我方对账文件</a>
<a
onClick={() => {
downLoadRefund({
type: 1, //12
tenantId: record?.tenantId || "", //id
billDate: record?.billDate || "", //
});
}}
>
下载我方对账文件
</a>
</div>
<div>
<a onClick={() => {}}>下载对方对账文件</a>
<a
onClick={() => {
downLoadRefund({
type: 2, //12
tenantId: record?.tenantId || "", //id
billDate: record?.billDate || "", //
});
}}
>
下载对方对账文件
</a>
</div>
</div>
}
@ -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) => {

9
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,
};
Loading…
Cancel
Save