diff --git a/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js b/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js index f43c149d..585ea8cf 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/huitong/socialSecurityReport/index.js @@ -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);