From 26c02abc28c75c185b4b3b9d5ff31433df1f3530 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 9 Oct 2025 17:46:48 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E8=B7=AF=E7=BB=B4=E5=85=89=E7=94=B5(?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryArchiveEditAdjLogRecord.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js index 390d4f43..394ad979 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js @@ -131,7 +131,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { }); }; handleChangeAdjustAfter = (record, v) => { - const { salaryArchiveItemDetail } = this.state, { salaryFileStore: { adjForm } } = this.props; + const { salaryArchiveItemDetail } = this.state; const { list } = salaryArchiveItemDetail; this.setState({ salaryArchiveItemDetail: { @@ -145,13 +145,14 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { return { ...o }; }) } - }, () => { - const { salaryArchiveItemDetail } = this.state; - adjForm.updateFields({ - sumVal: _.reduce(salaryArchiveItemDetail.list, (pre, cur) => { - return pre + parseFloat(cur.adjustAfter || 0); - }, 0).toString() - }); + }, () => this.updateSumVal()); + }; + updateSumVal = () => { + const { salaryArchiveItemDetail } = this.state, { salaryFileStore: { adjForm } } = this.props; + adjForm.updateFields({ + sumVal: _.reduce(salaryArchiveItemDetail.list, (pre, cur) => { + return pre + parseFloat(cur.adjustAfter || 0); + }, 0).toString() }); }; save = () => { @@ -256,7 +257,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { salaryArchiveItemDetail: { ...salaryArchiveItemDetail, list: _.map(o, it => ({ ...it, dataType: "" })) } - })} columns={_.map(adjColumns, o => { + }, () => this.updateSumVal())} columns={_.map(adjColumns, o => { if (o.dataIndex === "adjustAfter") { return { ...o, render: (__, record) => { @@ -286,4 +287,4 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { } } -export default SalaryArchiveEditAdjLogRecordDialog; +export default SalaryArchiveEditAdjLogRecordDialog; \ No newline at end of file