Browse Source

修复变更功能bug

ellisran 5 months ago
parent
commit
085af2724b
1 changed files with 11 additions and 7 deletions
  1. 11 7
      app/public/js/change_information.js

+ 11 - 7
app/public/js/change_information.js

@@ -3584,7 +3584,6 @@ $(document).ready(() => {
             } else {
                 cInfo[col.field] = validText;
             }
-            cInfo[col.field] = validText;
             select[col.field] = validText;
             console.log(cInfo);
             delete cInfo.waitingLoading;
@@ -5898,12 +5897,17 @@ $(document).ready(() => {
                 toastr.error('请添加变更清单!');
                 returnFlag = true;
             } else {
-                for (const [i,cl] of changeSpreadSheet.zh_data.entries()) {
-                    if (cl.name === '') {
-                        toastr.error('清单第' + (i+1) + '行未完整填写数据(名称不可为空)');
-                        returnFlag = true;
-                    }
-                }
+                const whiteList = _.filter(changeList, item => item.lid == 0 && (item.name === '' || item.name === null));
+                if (whiteList.length > 0) {
+                    toastr.error('存在空白清单未完整填写数据(名称不可为空)');
+                    returnFlag = true;
+                }
+                // for (const [i,cl] of changeSpreadSheet.zh_data.entries()) {
+                //     if (cl.name === '') {
+                //         toastr.error('清单第' + (i+1) + '行未完整填写数据(名称不可为空)');
+                //         returnFlag = true;
+                //     }
+                // }
             }
             if(!checkAuditorFrom ()) {
                 returnFlag = true;