feature/2.15.1.2407.01-浮动薪酬

This commit is contained in:
黎永顺 2024-08-12 11:12:10 +08:00
parent 4a5f5b6e7a
commit df2283d0f4
1 changed files with 5 additions and 2 deletions

View File

@ -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 = () => {