薪资账套中薪资项目添加 新项时排序的问题处理
This commit is contained in:
parent
95e8d0d8c5
commit
3eec4e4726
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue