Browse Source

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuOperation

TonyKang 3 years ago
parent
commit
a8dc359bf5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/ration_repository/models/ration_item.js

+ 2 - 2
modules/ration_repository/models/ration_item.js

@@ -962,9 +962,9 @@ rationItemDAO.prototype.batchAddFromExcel = async function(rationRepId, data) {
         }
         console.log(typeof tmp[0], tmp[0]);
         // 如果第一个字段为null则是工料机数据,放入上一个数据的工料机字段
-        if (tmp[0] === undefined && Object.keys(lastData).length > 0) {
+        if (!tmp[0] && Object.keys(lastData).length > 0) {
             // 如果不存在对应的工料机库数据则跳过
-            if (stdGLJList[tmp[1]] === undefined) {
+            if (!stdGLJList[tmp[1]]) {
                 const failString = '定额' + lastData.code + '下的' + tmp[1];
                 this.failGLJList.push(failString);
                 continue;