Explorar el Código

数据指标,设计、竣工列允许删除数据

MaiXinRong hace 21 horas
padre
commit
2a69208a70
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      app/public/js/sp_data.js

+ 2 - 4
app/public/js/sp_data.js

@@ -44,9 +44,7 @@ $(document).ready(() => {
                 }
                 }
                 if (col.type === 'Number') {
                 if (col.type === 'Number') {
                     const num = _.toNumber(newValue);
                     const num = _.toNumber(newValue);
-                    if (num) {
-                        data[col.field] = num;
-                    }
+                    data[col.field] = num || 0;
                 } else {
                 } else {
                     data[col.field] = newValue;
                     data[col.field] = newValue;
                 }
                 }
@@ -118,7 +116,7 @@ $(document).ready(() => {
 
 
                 for (let iRow = sels[0].row; iRow < sels[0].row + sels[0].rowCount; iRow++) {
                 for (let iRow = sels[0].row; iRow < sels[0].row + sels[0].rowCount; iRow++) {
                     let bDel = false;
                     let bDel = false;
-                    const node = SpreadJsObj.getRowObject(info.sheet, iRow);
+                    const node = SpreadJsObj.getRowObject(sheet, iRow);
                     if (node) {
                     if (node) {
                         const data = { id: node.id };
                         const data = { id: node.id };
                         for (let iCol = sels[0].col; iCol < sels[0].col + sels[0].colCount; iCol++) {
                         for (let iCol = sels[0].col; iCol < sels[0].col + sels[0].colCount; iCol++) {