瀏覽代碼

修改提示词

laiguoran 2 年之前
父節點
當前提交
ee28df1563
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      app/public/js/material.js

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

@@ -264,9 +264,11 @@ $(document).ready(() => {
                 const msbList = _.filter(materialStageBillsData, { ms_id });
                 for (const mb of materialBillsData) {
                     mb.ms_id = ms_id;
-                    const msbInfo = _.find(msbList, { mb_id: mb.id });
-                    for (const nu of needUpdateArray) {
-                        mb[nu] = msbInfo[nu];
+                    const msbInfo = _.find(msbList, { mb_id: mb.mb_id ? mb.mb_id : mb.id });
+                    if (msbInfo) {
+                        for (const nu of needUpdateArray) {
+                            mb[nu] = msbInfo[nu];
+                        }
                     }
                 }
             }