薪资账套-薪资项目移动

This commit is contained in:
黎永顺 2023-03-08 18:58:22 +08:00
parent 2457f659c4
commit 3d7850431a
1 changed files with 6 additions and 1 deletions

View File

@ -308,9 +308,14 @@ class LedgerSalaryItem extends Component {
this.setState({
itemGroups: _.map(itemGroups, it => {
if (moveToItemId === it.uuid) {
const { id: moveId, ...extraItems } = items;
return {
...it,
items: [...it.items, items]
items: [...it.items, {
...extraItems,
key: moveId,
sortedIndex: !_.isEmpty(it.items) ? it.items[it.items.length - 1].sortedIndex + 1 : 0
}]
};
}
if (deleteItemId === it.uuid) {