Commit 53033218 authored by lxd's avatar lxd

feat: 对账单

parent 4d1040b0
...@@ -39,7 +39,7 @@ export function columns(res) { ...@@ -39,7 +39,7 @@ export function columns(res) {
width: '160px', width: '160px',
}, },
{ {
title: '结算单生成日期', title: '付款单生成日期',
key: 'dateTimeRange', key: 'dateTimeRange',
dataIndex: 'createdAtRange', dataIndex: 'createdAtRange',
valueType: 'dateRange', valueType: 'dateRange',
......
...@@ -36,8 +36,12 @@ const PaymentMange = () => { ...@@ -36,8 +36,12 @@ const PaymentMange = () => {
const exportDetail = async params => { const exportDetail = async params => {
setloading(true); setloading(true);
const data = await selfPaymentexportDetail(params); const data = await selfPaymentexportDetail(params);
const blob = new Blob([data]); if (data) {
saveAs(blob, `账单明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); const blob = new Blob([data]);
saveAs(blob, `账单明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
} else {
notification.error({ message: '下载失败' });
}
setloading(false); setloading(false);
}; };
// 申请结算 // 申请结算
...@@ -94,8 +98,10 @@ const PaymentMange = () => { ...@@ -94,8 +98,10 @@ const PaymentMange = () => {
const params = formRef.current.getFieldsValue(); const params = formRef.current.getFieldsValue();
setloading(true); setloading(true);
const data = await selfPaymentExport(params); const data = await selfPaymentExport(params);
const blob = new Blob([data]); if (data.businessCode === '0000') {
saveAs(blob, `账单明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`); const blob = new Blob([data]);
saveAs(blob, `账单明细-${format(new Date(), 'yyyyMMddHHmmss')}.xlsx`);
}
setloading(false); setloading(false);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment