فهرست منبع

新增首件两检选择质检方案只能选择首件两检类型

695593266@qq.com 6 ماه پیش
والد
کامیت
86bdbac8cb

+ 13 - 14
src/views/material/BOMmanage/qualityTesting/inspectionTemplate.vue

@@ -24,6 +24,7 @@
               placeholder="请选择"
               style="width: 100%"
               clearable
+              :disabled="isQualityInspection"
             >
               <el-option
                 :label="item.label"
@@ -107,6 +108,14 @@
 
   export default {
     components: {},
+
+    props: {
+      isQualityInspection: {
+        type: Boolean,
+        default: false
+      }
+    },
+
     data() {
       const defaultWhere = {
         qualitySchemeTemplateCode: '',
@@ -188,7 +197,6 @@
 
     methods: {
       datasource({ page, where, limit }) {
-        console.log(1111);
         return getTemplateList({
           qualitySchemeTemplateCode: this.where.qualitySchemeTemplateCode,
           qualitySchemeTemplateName: this.where.qualitySchemeTemplateName,
@@ -205,21 +213,8 @@
         }
 
         return '';
-
-        // if (row.type) {
-        //   let label = '';
-        //   this.typeList.forEach((item) => {
-        //     if (item.value == row.type) {
-        //       label = item.label;
-        //     }
-        //     console.log(label, 'label');
-        //     return label;
-        //   });
-        // }
-        // return '123';
       },
 
-      // 多选
       selectionChangeHandle(val) {
         this.selection = val;
       },
@@ -264,6 +259,10 @@
             return { value: key, label: item[key] };
           });
           this.typeList = list;
+
+          this.where.type = this.typeList.find(
+            (item) => item.label == '首件两检'
+          )?.value;
         }
       }
     }

+ 3 - 1
src/views/material/BOMmanage/qualityTesting/term.vue

@@ -128,6 +128,7 @@
 
     <inspectionTemplatePop
       ref="inspectionTemplateRef"
+      :isQualityInspection="isQualityInspection"
       @changeSel="changeSel"
     ></inspectionTemplatePop>
   </div>
@@ -239,7 +240,8 @@
             fixed: 'right'
           }
         ],
-        tableHeight: 'calc(100vh - 500px)'
+        tableHeight: 'calc(100vh - 500px)',
+        isQualityInspection: true
       };
     },