浏览代码

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

TonyKang 5 年之前
父节点
当前提交
6903a259ad
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      app/public/js/material_list.js

+ 6 - 3
app/public/js/material_list.js

@@ -545,9 +545,12 @@ $(document).ready(() => {
                 }
                 }
             }
             }
             for (const gcl of gclGatherData) {
             for (const gcl of gclGatherData) {
-                const gcl_id = gcl.leafXmjs[0].gcl_id;
-                if (hadGclIdList.indexOf(gcl_id) !== -1) {
-                    hadMaterialGclGatherData.push(gcl);
+                for (const index in gcl.leafXmjs) {
+                    const gcl_id = gcl.leafXmjs[index].gcl_id;
+                    if (hadGclIdList.indexOf(gcl_id) !== -1) {
+                        hadMaterialGclGatherData.push(gcl);
+                        break;
+                    }
                 }
                 }
             }
             }
             gclGatherData = hadMaterialGclGatherData;
             gclGatherData = hadMaterialGclGatherData;