custom/汇通建设

This commit is contained in:
lys 2024-11-22 17:43:56 +08:00
parent a739d27379
commit c3f54312d7
1 changed files with 7 additions and 2 deletions

View File

@ -70,10 +70,10 @@ class Index extends Component {
}, {});
const payload = { ...pageInfo, ...query, ...advanceSearch };
this.setState({ loading: true });
API.getHTCommonListReport(payload).then(async ({ status, data }) => {
API.getHTCommonListReport(payload).then(({ status, data }) => {
if (updateSum) this.getHTCommonListReportSum(payload);
this.setState({ loading: false });
if (status) {
const { data: { sumRow } } = updateSum ? await API.getHTCommonListReportSum(payload) : { data: { sumRow: {} } };
const { columns, pageInfo: result } = data;
const { list: dataSource, pageNum: current, pageSize, total } = result;
this.setState({
@ -90,6 +90,11 @@ class Index extends Component {
}
}).catch(() => this.setState({ loading: false }));
};
getHTCommonListReportSum = (payload) => {
API.getHTCommonListReportSum(payload).then(({ status, data }) => {
if (status) this.setState({ sumRow: data.sumRow });
});
};
handleExport = () => {
WeaLoadingGlobal.start();
const promise = API.exportHtCommonList(this.state.payload);