Просмотр исходного кода

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

xieyong 1 неделя назад
Родитель
Сommit
ce0a09170c
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      src/views/productionPlan/components/homogeneityInspectDialog.vue

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

@@ -1140,7 +1140,13 @@
           this.planId = data.id;
           let params = { categoryId: data.categoryId };
           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 = {
             1: 'PBOM',
             2: 'MBOM',