薪资账套已知bug修复
This commit is contained in:
parent
77fa0f50cb
commit
8fe520e842
|
|
@ -136,7 +136,7 @@ class LedgerSalaryItem extends Component {
|
|||
if (item.uuid === id) {
|
||||
return {
|
||||
...item,
|
||||
items: _.filter(item.items, it => !selectedRowKeys.includes(it.id)),
|
||||
items: _.filter(item.items, it => !selectedRowKeys.includes(it.id || it.key)),
|
||||
selectedRowKeys: []
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
if (item.id === key) {
|
||||
item.salaryItemId = item.id;
|
||||
item.key = item.id;
|
||||
item.sortedIndex = arrItems.length + keyIdx + 1;
|
||||
item.sortedIndex = (!_.isEmpty(_.maxBy(arrItems, it => it.sortedIndex)) ? _.maxBy(arrItems, it => it.sortedIndex).sortedIndex : 0) + keyIdx + 1 ;
|
||||
selectItems.push(item);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
rowKey={record => record.id || record.key}
|
||||
rowSelection={rowSelection}
|
||||
dataSource={dataSource}
|
||||
columns={columns}
|
||||
|
|
|
|||
|
|
@ -112,8 +112,19 @@ class LedgerSlide extends Component {
|
|||
const { editId: salarySobId } = this.props;
|
||||
const payload = {
|
||||
empFields,
|
||||
itemGroups: _.filter(itemGroups, it => it.name !== "未分类"),
|
||||
items: _.find(itemGroups, it => it.name === "未分类").items || [],
|
||||
itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, it => {
|
||||
if (it.id && it.id.length > 4) delete it.id;
|
||||
return { ...it };
|
||||
})
|
||||
};
|
||||
}),
|
||||
items: _.map(_.find(itemGroups, it => it.name === "未分类").items, child => {
|
||||
if (child.id && child.id.length > 4) delete child.id;
|
||||
return { ...child };
|
||||
}) || [],
|
||||
salarySobId: salarySobId || saveSalarySobId
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
|
|
|
|||
Loading…
Reference in New Issue