From 7c4bfc9776a56752324d2fbdbddd7f7f22236e8d Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 06 八月 2024 19:01:31 +0800
Subject: [PATCH] 修改

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 77c724f..efdf353 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -295,8 +295,8 @@
           </el-radio-group>
         </div>
         <div style="display: flex;align-items: center;">
-          <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'">&nbsp;&nbsp;濂楃锛�</span>
-          <el-select v-model="currentTab" placeholder="璇烽�夋嫨" @change="m=>handleChange(m,3)" v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�'" size="small">
+          <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�'">&nbsp;&nbsp;濂楃锛�</span>
+          <el-select v-model="currentTab" placeholder="璇烽�夋嫨" @change="m=>handleChange(m,3)" v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)">
             <el-option
               v-for="item in casing"
               :key="item.id"
@@ -307,7 +307,7 @@
             </el-option>
           </el-select>
           <span v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'">&nbsp;&nbsp;鍏夌氦甯︼細</span>
-          <el-select v-model="currentTab" placeholder="璇烽�夋嫨" @change="m=>handleChange(m,1)" v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'" size="small">
+          <el-select v-model="currentTab" placeholder="璇烽�夋嫨" @change="m=>handleChange(m,1)" v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)">
             <el-option
               v-for="item in fibers"
               :key="item.value"
@@ -318,7 +318,7 @@
             </el-option>
           </el-select>
           <span v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'">&nbsp;&nbsp;鍏夌氦锛�</span>
-          <el-select v-model="currentTab" placeholder="璇烽�夋嫨" @change="m=>handleChange(m,2)" v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'" size="small">
+          <el-select v-model="currentTab" placeholder="璇烽�夋嫨" @change="m=>handleChange(m,2)" v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)">
             <el-option
               v-for="item in fiber"
               :label="item.bushColor+'-'+item.color"
@@ -941,6 +941,7 @@
           requiredUp: []
         },
         upIndex: 0,
+        getReportModelLoading:false,
         insOrder: {},
         sampleProduct: [],
         typeList: [],
@@ -1181,6 +1182,7 @@
               }
             }
           })
+          this.handleCasing()
           if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�')){
             if(this.casing.length>0){
               this.handleChange(this.casing[0].id,3)
@@ -2045,6 +2047,7 @@
         this.currentSample = this.HaveJson(row)
         let list = await this.getCurrentProduct(row.id,0)
         this.currentSample.insProduct = this.HaveJson(list)
+        this.handleCasing()
         this.currentSample.insProduct.forEach(a => {
           this.param[a.id] = {
             insValue: [],
@@ -2071,15 +2074,21 @@
           currentTable:this.currentTable
         }));
       },
+      handleCasing(){
+        if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName!='鎴愬搧缂嗘楠屽師濮嬭褰�')){
+          this.currentSample.insProduct = this.currentSample.insProduct.filter(m=>!m.inspectionItem.includes('鏉惧绠�'))
+        }
+      },
       getReportModel(id){
         if(this.PROJECT!='妫�娴嬩腑蹇�'){
           return
         }
+        this.getReportModelLoading = true
         this.$axios.post(this.$api.insOrderPlan.getReportModel+'?sampleId='+id, {}).then(res => {
+          this.getReportModelLoading = false
           this.fibers = res.data['鍏夌氦甯�']
           this.fiber = res.data['鍏夌氦']
           this.casing = res.data['濂楃']
-          console.log(this.casing)
         })
       },
       async handleChange(m,type){
@@ -2102,7 +2111,8 @@
               type: 'saveData',
               tableList:this.tableList,
               param:this.param,
-              currentTable:this.currentTable
+              currentTable:this.currentTable,
+              bushing:m
             }));
           }else{
             this.tableLists = []
@@ -3204,6 +3214,7 @@
         this.currentSample = this.HaveJson(this.sampleProduct[index - 1])
         let list = await this.getCurrentProduct(this.currentSample.id,0)
         this.currentSample.insProduct = this.HaveJson(list)
+        this.handleCasing()
         this.param = {}
         this.currentSample.insProduct.forEach(a => {
           this.param[a.id] = {

--
Gitblit v1.9.3