From cb57a0254f0e2efb0e4f4b274d259aa85245946d Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期六, 01 六月 2024 09:48:07 +0800
Subject: [PATCH] 完成光纤配置进行检验

---
 src/components/do/b1-ins-order/add.vue                 |    4 ++++
 src/components/do/b1-inspect-order-plan/Inspection.vue |   18 +++++++++++-------
 src/components/do/b1-ins-order/fiberoptic-config.vue   |    1 -
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 78cbd51..deda55a 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -1358,6 +1358,10 @@
           this.$axios.post(this.$api.insBushing.selectBushingBySampleId,{
             sampleId: this.sampleId
           }).then(res=>{
+            if(res.data.length===0){
+              this.$message.error('璇ユ牱鍝佹病鏈夐厤缃厜绾�')
+              return
+            }
             for(var i in this.sampleList){
               if(this.sampleList[i].id = this.sampleId){
                 this.sampleList[i].bushing = res.data
diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 6dc61c9..538c42c 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -642,7 +642,6 @@
           a.bushing = this.bushing
         })
         this.$message.success('宸蹭繚瀛�')
-        console.log(this.bushing);
       }
     }
   }
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index d26207a..f0d7503 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -325,9 +325,9 @@
         :current-row-key="currentKey" :row-key="record=>record.index" v-if="bushingVisible">
         <el-table-column type="index" align="center" label="搴忓彿" width="70px" :key="Math.random()">
         </el-table-column>
-        <el-table-column prop="color" label="绠¤壊鏍�" min-width="110px" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="num2" label="鏍囬噺" min-width="110px" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="num3" label="娴嬭瘯閲�" min-width="90px" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="color" label="绠¤壊鏍�" min-width="100px" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="standNum" label="鏍囬噺" min-width="100px" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="testNum" label="娴嬭瘯閲�" min-width="100px" show-overflow-tooltip></el-table-column>
       </el-table>
     </el-drawer>
     <el-drawer title="鏍峰搧鍒囨崲" :visible.sync="sampleVisible" :size="500">
@@ -498,7 +498,7 @@
             }
           })
           this.sampleProduct = res.data.sampleProduct
-          this.currentSample = this.sampleProduct[0]
+          this.currentSample = this.HaveJson(this.sampleProduct[0])
           this.currentSample.insProduct.forEach(a => {
             this.param[a.id] = {
               insValue: [],
@@ -510,6 +510,7 @@
             }
           })
           if (this.currentSample.index == undefined) this.currentSample['index'] = 1
+          let bushing = this.currentSample.bushing
           this.loading = false
           // this.handleTableData()
           this.getTableLists();
@@ -523,6 +524,9 @@
           this.currentFiberOptic = null;
           this.bushing = []
           this.currentBushing = null;
+          if(bushing&&bushing.length>0){
+            this.bushing = bushing
+          }
         })
       },
       currentTable(val1, val0) {
@@ -593,7 +597,6 @@
         this.currentKey = row.index
       },
       handleChangeSample(row, column, event) {
-        this.currentSample = row;
         this.param = {}
         // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁
         this.fiberOpticTape = []
@@ -602,7 +605,7 @@
         this.currentFiberOptic = null;
         this.bushing = []
         this.currentBushing = null;
-
+        this.currentSample.insProduct = this.HaveJson(row.insProduct)
         this.currentSample.insProduct.forEach(a => {
           this.param[a.id] = {
             insValue: [],
@@ -613,7 +616,7 @@
             insResult: null
           }
         })
-        let bushing = this.currentSample.insProduct.bushing
+        let bushing = this.currentSample.bushing
         if(bushing&&bushing.length>0){
           this.bushing = bushing
         }
@@ -730,6 +733,7 @@
           this.tableList = null;
           this.tableList = [this.tableLists[0]]
           this.currentTable = this.tableLists[0].templateId;
+          this.currentSample.insProduct = this.HaveJson(obj.productList)
           this.handleTableData()
         }
       },

--
Gitblit v1.9.3