Explorar o código

修复展示bug

laiguoran %!s(int64=2) %!d(string=hai) anos
pai
achega
682247ac36
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      app/public/js/material_checklist.js

+ 12 - 0
app/public/js/material_checklist.js

@@ -1179,6 +1179,7 @@ $(document).ready(() => {
                 if (needPushTree.length === 0) {
                     throw '不存在需要导入的工料清单含量';
                 }
+                console.log(needPushTree);
                 // 先上传需要生成的清单及工料
                 if (pushChecklist.length > 0 || pushBillsData.length > 0) {
                     postData(window.location.pathname + '/save', { type:'exportCB', addChecklist: pushChecklist, addBillsList: pushBillsData }, async function (result) {
@@ -1296,6 +1297,13 @@ $(document).ready(() => {
                         mbList.push({ id: mbInfo.id, quantity: mb.quantity ? mb.quantity : 0 });
                     }
                 }
+                if (mbList.length === 0 && i+1 === tree.length) {
+                    stopProgress($('#list-progress'));
+                    toastr.success('导入成功');
+                    setTimeout(function () { $('#okedit').modal('hide') }, 2000);
+                    showSjsData();
+                    return;
+                }
                 if (mbList.length === 0) {
                     continue;
                 }
@@ -1367,6 +1375,10 @@ $(document).ready(() => {
                 }
             }
         }
+        console.log('hello');
+        stopProgress($('#list-progress'));
+        setTimeout(function () { $('#okedit').modal('hide') }, 2000);
+        showSjsData();
     }
 
     function transExcel(results) {