From 9577462831585f6cdb563269058cb3d356935d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 24 May 2024 09:57:35 +0800 Subject: [PATCH] hotfix/2.14.2.2405.02 --- .../components/salaryDetails.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 280a0f46..84882ff0 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -26,7 +26,7 @@ class SalaryDetails extends Component { this.state = { loading: false, dataSource: [], columns: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, - showTotalCell: false + showTotalCell: false, updateSum: true }; } @@ -54,10 +54,13 @@ class SalaryDetails extends Component { } else if (type === "turn") { if (id === "PAGEINFO") { const { pageNum: current, size: pageSize } = params; - this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSalaryList(this.props)); + this.setState({ + pageInfo: { ...pageInfo, current, pageSize }, + updateSum: true + }, () => this.getSalaryList(this.props)); } else if (id === "CHECKBOX") { const { selectedRowKeys: checkBox } = params; - this.setState({ selectedRowKeys: checkBox }); + this.setState({ selectedRowKeys: checkBox, updateSum: false }); } } }; @@ -106,13 +109,13 @@ class SalaryDetails extends Component { }; getColumns = () => { const { attendanceStore: { tableStore } } = this.props; - const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload } = this.state; + const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state; const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : ""; if (!_.isEmpty(columns)) { this.postMessageToChild({ - dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, payload, - sumRowlistUrl, + dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, + sumRowlistUrl, payload: { ...payload, updateSum }, columns: _.map(columns, (it, idx) => ({ ...it, width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,