From df2283d0f42f7ca5f9e4f652b7c449174ca4520d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 12 Aug 2024 11:12:10 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.15.1.2407.01-=E6=B5=AE=E5=8A=A8?= =?UTF-8?q?=E8=96=AA=E9=85=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variableSalary/components/salaryFileDialog/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js index ce530850..8bcb1e80 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js @@ -81,9 +81,12 @@ class Index extends Component { convertPayload = (payload) => { return _.reduce(_.keys(payload), (pre, cur) => { if (!_.isNaN(parseInt(cur))) { - return { ...pre, itemValueList: [{ variableItemId: cur, itemValue: payload[cur] }] }; + const itemValueList = pre.variableItemId || []; + return { + ...pre, itemValueList: [...itemValueList, { variableItemId: cur, itemValue: payload[cur] }] + }; } - return { ...pre, [cur]: payload[cur], itemValueList: [...pre.itemValueList] }; + return { ...pre, [cur]: payload[cur] }; }, {}); }; save = () => {