薪资账套中薪资项目添加 新项时排序的问题处理

This commit is contained in:
黎永顺 2023-02-07 10:03:29 +08:00
parent 95e8d0d8c5
commit 3eec4e4726
1 changed files with 2 additions and 2 deletions

View File

@ -83,13 +83,13 @@ export default class LedgerSalaryItemAddModal extends React.Component {
const { dataSource, selectedRowKeys } = this.state;
const { onAddSalaryItems, id, onCancel } = this.props;
let selectItems = [];
dataSource.map((item, index) => {
dataSource.map((item) => {
item = { ...item };
selectedRowKeys.map(key => {
if (item.id === key) {
item.salaryItemId = item.id;
item.key = item.id;
item.sortedIndex = index;
item.sortedIndex = dataSource.length + 1;
selectItems.push(item);
}
});