Pārlūkot izejas kodu

修改了来源,还有检验方式改变的数据显示

wsx 11 mēneši atpakaļ
vecāks
revīzija
5596a5a291

+ 8 - 2
src/views/inspectionPlan/components/new-edit.vue

@@ -540,7 +540,8 @@
         isSampleList: true,
         isPackingList: true,
         isSchemeList: true,
-        newSampleList: []
+        newSampleList: [],
+        kkconditionType:''
       };
     },
     computed: {
@@ -903,6 +904,7 @@
         this.activeName = tab.name;
       },
       async open(type, row) {
+        this.kkconditionType=row.conditionType
         this.visible = true;
         this.activeName = '1';
         this.btnType = type;
@@ -2087,6 +2089,7 @@
           //   sampleList: this.sampleList,
           //   planTemplateList: this.schemeList
           // };
+          
           let params = {
             ...this.baseForm,
             qualityInventoryList: qualityListData,
@@ -2131,7 +2134,8 @@
           if (this.baseForm.isUnpack == null || this.baseForm.isUnpack == '') {
             this.baseForm.isUnpack = this.isCheck ? 1 : 2;
           }
-          this.baseForm.conditionType = this.conditionType;
+          this.baseForm.conditionType =
+            this.conditionType ?? this.kkconditionType;
           // let params = {
           //   ...this.baseForm,
           //   qualityInventoryList: this.$refs.table12.getData(),
@@ -2168,6 +2172,8 @@
 
           console.log(params, 'params');
 
+          
+
           if (this.btnType == 'issued' && this.schemeList.length < 1) {
             this.$message.warning('质检方案不能为空!');
             this.loading = false;

+ 15 - 2
src/views/inspectionWork/components/baseInfo.vue

@@ -88,7 +88,7 @@
       </div>
     </div> -->
     <!-- v-if="isExpanded" -->
-    <div >
+    <div>
       <el-row>
         <el-col :span="6">
           <el-form-item label="质检部门" prop="groupId">
@@ -211,6 +211,7 @@
           <el-form-item label="检验方式:" prop="qualityMode">
             <!-- <DictSelection dictName="取样类型" v-model="form.qualityMode" :disabled="qualityType == 1"></DictSelection> -->
             <el-select
+              @change="changeQualityMode"
               style="width: 100%"
               v-model="form.qualityMode"
               placeholder="请选择"
@@ -467,7 +468,7 @@
       };
     },
     created() {
-      this.getDictListIqoCode('iqo_code');
+      this.getDictListIqoCode('measurement_type');
       this.getQualityModeList('quality_method_code');
     },
     methods: {
@@ -510,6 +511,8 @@
             label: item[values[0]]
           };
         });
+
+        console.log(this.inspectionStandardsList, '2222222222222222');
       },
       async getQualityModeList(code) {
         let { data: res } = await getByCode(code);
@@ -621,6 +624,16 @@
         this.form.noQualifiedNumber = noQualifiedNumber;
         this.form.qualificationRate = qualificationRate + '%';
         this.form.noQualificationRate = noQualificationRate + '%';
+      },
+      //解决换检验方式的时候
+      changeQualityMode(val) {
+        console.log(val, 'isInfoChangeModel');
+        if (val) {
+          this.$emit('changeModel', val);
+        } else {
+          console.log('清空table2数据');
+          this.$emit('table2');
+        }
       }
     }
   };

+ 6 - 1
src/views/inspectionWork/index.vue

@@ -34,6 +34,7 @@
         <template v-slot:sourceCode="{ row }">
           <div v-if="row.qualityType == 1">{{ row.qualityPlanCode }}</div>
           <div v-if="row.qualityType == 2">{{ row.workOrderCode }}</div>
+          <div v-if="row.qualityType == 3">{{ row.qualityPlanCode }}</div>
         </template>
 
         <template v-slot:files="scope">
@@ -314,7 +315,11 @@
             align: 'center',
             width: 80,
             formatter: (row, column, cellValue) => {
-              return cellValue == 0 ? '未报工' : cellValue == 1 ? '已报工' : '已关闭';
+              return cellValue == 0
+                ? '未报工'
+                : cellValue == 1
+                ? '已报工'
+                : '已关闭';
             },
             fixed: 'right'
           },