Browse Source

变更清单对应计量单元bug修复

laiguoran 5 years atrás
parent
commit
8e70555ef5
1 changed files with 5 additions and 3 deletions
  1. 5 3
      app/public/js/change_set.js

+ 5 - 3
app/public/js/change_set.js

@@ -374,7 +374,11 @@ $(document).ready(() => {
         const isDeal = $(this).data('gcl') !== undefined ? true : false;
         let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="4" class="colspan_1">&nbsp;</td><td class="colspan_2"><input type="checkbox"></td></tr>';
         if (isDeal) {
-            const gcl = gclGatherData[$(this).data('gcl')];
+            // const gcl = gclGatherData[$(this).data('gcl')];
+            const lid = $(this).data('lid');
+            const gcl = _.find(gclGatherData, function (item) {
+                return item.leafXmjs && item.leafXmjs[0].gcl_id === lid;
+            });
             codeHtml = '';
             for (const leaf of gcl.leafXmjs) {
                 const quantity = leaf.quantity !== undefined && leaf.quantity !== null ? leaf.quantity : 0;
@@ -615,8 +619,6 @@ function tableDataRemake(changeListData) {
             //     toastr.warning('台账清单列表已不存在'+ clinfo[0] +',故删除之');
             //     continue;
             // }
-            console.log(listinfo);
-            console.log(clinfo);
             if (listinfo === undefined) {
                 // 针对旧数据获取清单信息
                 listinfo = changeListData[clinfo[8] - 1];