Ver código fonte

feat: 后台清单规则编辑器,excel中“工作内容”列中间有空行,批量复制粘到后台,应能正常把空格也粘过来,不应把后面的数据往上提。

zhangweicheng 6 meses atrás
pai
commit
533e8b40a5
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      web/maintain/bills_lib/scripts/db_controller.js

+ 3 - 1
web/maintain/bills_lib/scripts/db_controller.js

@@ -842,7 +842,7 @@ var tools = {
     for (let i = orgRow; i <= maxRow; i++) {
       let validData = {};
       for (let j = orgCol; j <= maxCol; j++) {
-        let value = sheet.getValue(i, j);
+        let value = sheet.getValue(i, j) || "";
         if (value) {
           /*  setting.cols.forEach(function(col, colIdx){
                           if(colIdx === j){
@@ -872,6 +872,8 @@ var tools = {
           } else {
             validData[setting.cols[j].data.field] = value;
           }
+        } else {
+          validData[setting.cols[j].data.field] = value;
         }
       }
       if (!tools.isEmptyObj(validData)) {