|
|
@@ -97,6 +97,9 @@ $(document).ready(() => {
|
|
|
this.calculateAll();
|
|
|
this.resortData();
|
|
|
}
|
|
|
+ getMaxOrder() {
|
|
|
+ return this.data.length > 0 ? this.data[this.data.length - 1].order : 0;
|
|
|
+ }
|
|
|
loadUpdateData(updateData) {
|
|
|
if (updateData.add) {
|
|
|
for (const a of updateData.add) {
|
|
|
@@ -282,7 +285,7 @@ $(document).ready(() => {
|
|
|
return;
|
|
|
}
|
|
|
data.add = {};
|
|
|
- data.add.order = info.row + 1;
|
|
|
+ data.add.order = jgclObj.getMaxOrder() + 1;
|
|
|
data.add.name = trimInvalidChar(info.editingText);
|
|
|
}
|
|
|
|
|
|
@@ -329,7 +332,7 @@ $(document).ready(() => {
|
|
|
reduce_qty: {type: 'warning', msg: '输入的 本期扣回-数量 非法,已过滤'},
|
|
|
};
|
|
|
|
|
|
- const uDatas = [], iDatas = [];
|
|
|
+ const uDatas = [], iDatas = [], maxOrder = jgclObj.getMaxOrder();
|
|
|
for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
|
|
|
const curRow = info.cellRange.row + iRow;
|
|
|
const node = sortData[curRow];
|
|
|
@@ -361,7 +364,7 @@ $(document).ready(() => {
|
|
|
data.id = node.id;
|
|
|
uDatas.push(data);
|
|
|
} else {
|
|
|
- data.order = curRow + 1;
|
|
|
+ data.order = maxOrder + 1 + iRow;
|
|
|
iDatas.push(data);
|
|
|
}
|
|
|
}
|