Browse Source

fix: 处理无返回值时清空 BOM 类型和 ID

xieyong 1 week ago
parent
commit
ce0a09170c

+ 7 - 1
src/views/productionPlan/components/homogeneityInspectDialog.vue

@@ -1140,7 +1140,13 @@
           this.planId = data.id;
           this.planId = data.id;
           let params = { categoryId: data.categoryId };
           let params = { categoryId: data.categoryId };
           const res = await listBomType(params);
           const res = await listBomType(params);
-          if (!res || res.length === 0) return;
+          if (!res || res.length === 0) {
+            this.bomListType = [];
+            this.formInline.bomType = '';
+            this.bomListV = [];
+            this.formInline.bomId = '';
+            return;
+          };
           let bomMap = {
           let bomMap = {
             1: 'PBOM',
             1: 'PBOM',
             2: 'MBOM',
             2: 'MBOM',