浏览代码

预付款、材差期显示问题

Tony Kang 10 月之前
父节点
当前提交
7663761218
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      app/view/report/index.ejs

+ 6 - 6
app/view/report/index.ejs

@@ -858,14 +858,14 @@
             const advance = adList[adIndex];
             const advance = adList[adIndex];
         // adList.forEach((advance, adIndex) => {
         // adList.forEach((advance, adIndex) => {
             let dispStr = '';
             let dispStr = '';
-            current_advance_order = adIndex + 1;
             if (!hasMatch && adIndex === maxIdx || current_advance_id === advance.id) {
             if (!hasMatch && adIndex === maxIdx || current_advance_id === advance.id) {
                 current_advance_id = advance.id;
                 current_advance_id = advance.id;
+                current_advance_order = adIndex + 1;
                 BUSINESS_ID = advance.id;
                 BUSINESS_ID = advance.id;
-                $("#btnCurrentAdvancePay")[0].innerText = `第${current_advance_order}期`;
+                $("#btnCurrentAdvancePay")[0].innerText = `第${adIndex + 1}期`;
                 dispStr = ';display:none';
                 dispStr = ';display:none';
             }
             }
-            const str = `<a class="dropdown-item" style="cursor:pointer${dispStr}" onclick="changeCurrentAdvance(this)" advance_id = "${advance.id}" advance_order="${current_advance_order}">第${current_advance_order}期</a>`;
+            const str = `<a class="dropdown-item" style="cursor:pointer${dispStr}" onclick="changeCurrentAdvance(this)" advance_id = "${advance.id}" advance_order="${adIndex + 1}">第${adIndex + 1}期</a>`;
             $("#optionSelectableAdvancePays").append(str);
             $("#optionSelectableAdvancePays").append(str);
         // });
         // });
         }
         }
@@ -883,14 +883,14 @@
             const materialAdj = MATERIAL_LIST[maIndex];
             const materialAdj = MATERIAL_LIST[maIndex];
         // MATERIAL_LIST.forEach((materialAdj, maIndex) => {
         // MATERIAL_LIST.forEach((materialAdj, maIndex) => {
             let dispStr = '';
             let dispStr = '';
-            current_material_order = maIndex + 1;
             if (current_material_id === -1 && maIndex === maxIdx || current_material_id === materialAdj.id) {
             if (current_material_id === -1 && maIndex === maxIdx || current_material_id === materialAdj.id) {
                 current_material_id = materialAdj.id;
                 current_material_id = materialAdj.id;
+                current_material_order = maIndex + 1;
                 BUSINESS_ID = materialAdj.id;
                 BUSINESS_ID = materialAdj.id;
-                $("#btnCurrentMaterial")[0].innerText = `第${current_material_order}期`;
+                $("#btnCurrentMaterial")[0].innerText = `第${maIndex + 1}期`;
                 dispStr = ';display:none';
                 dispStr = ';display:none';
             }
             }
-            const str = `<a class="dropdown-item" style="cursor:pointer${dispStr}" onclick="changeCurrentMaterial(this)" material_id = "${materialAdj.id}" material_order="${current_material_order}">第${current_material_order}期</a>`;
+            const str = `<a class="dropdown-item" style="cursor:pointer${dispStr}" onclick="changeCurrentMaterial(this)" material_id = "${materialAdj.id}" material_order="${maIndex + 1}">第${maIndex + 1}期</a>`;
             $("#optionSelectableMaterials").append(str);
             $("#optionSelectableMaterials").append(str);
         // });
         // });
         }
         }