|
@@ -1053,14 +1053,15 @@ $(document).ready(() => {
|
|
self.loadCurPosData();
|
|
self.loadCurPosData();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ const lastOrder = sortData.length > 0 ? sortData[sortData.length - 1].porder + 1 : 1;
|
|
for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
|
|
for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
|
|
const curRow = info.cellRange.row + iRow;
|
|
const curRow = info.cellRange.row + iRow;
|
|
- const newData = {lid: node.id};
|
|
|
|
|
|
+ const newData = {lid: node.id, porder: lastOrder + curRow - sortData.length};
|
|
for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
|
|
for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
|
|
const curCol = info.cellRange.col + iCol;
|
|
const curCol = info.cellRange.col + iCol;
|
|
const colSetting = info.sheet.zh_setting.cols[curCol];
|
|
const colSetting = info.sheet.zh_setting.cols[curCol];
|
|
newData[colSetting.field] = info.sheet.getText(curRow, curCol);
|
|
newData[colSetting.field] = info.sheet.getText(curRow, curCol);
|
|
- if (col.type === 'Number') {
|
|
|
|
|
|
+ if (colSetting.type === 'Number') {
|
|
const num = _.toNumber(newData[colSetting.field]);
|
|
const num = _.toNumber(newData[colSetting.field]);
|
|
if (num) {
|
|
if (num) {
|
|
newData[colSetting.field] = num;
|
|
newData[colSetting.field] = num;
|
|
@@ -1089,7 +1090,7 @@ $(document).ready(() => {
|
|
const curCol = info.cellRange.col + iCol;
|
|
const curCol = info.cellRange.col + iCol;
|
|
const colSetting = info.sheet.zh_setting.cols[curCol];
|
|
const colSetting = info.sheet.zh_setting.cols[curCol];
|
|
newData[colSetting.field] = info.sheet.getText(curRow, curCol);
|
|
newData[colSetting.field] = info.sheet.getText(curRow, curCol);
|
|
- if (col.type === 'Number') {
|
|
|
|
|
|
+ if (colSetting.type === 'Number') {
|
|
const num = _.toNumber(newData[colSetting.field]);
|
|
const num = _.toNumber(newData[colSetting.field]);
|
|
if (num) {
|
|
if (num) {
|
|
newData[colSetting.field] = num;
|
|
newData[colSetting.field] = num;
|