From c3f54312d7a23b5f32aab6513f194e4f4dd5d5d7 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 22 Nov 2024 17:43:56 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E6=B1=87=E9=80=9A=E5=BB=BA=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-pages/huitong/socialSecurityReport/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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);