From aec5b686e9745cd296341854d8d457f5bcd3e836 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 02 十一月 2023 13:10:45 +0800
Subject: [PATCH] 	modified:   src/views/quality/finishedProductInspection/finishedProduct-form.vue 	modified:   src/views/quality/processInspect/processInspect-form.vue

---
 src/views/quality/finishedProductInspection/finishedProduct-form.vue |   11 +++++++++--
 src/views/quality/processInspect/processInspect-form.vue             |   12 +++++++++---
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
index a88d37f..34cd401 100644
--- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue
+++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -111,7 +111,7 @@
                                 <span v-if="resultVal!=null && processInspectVo.id!=null" v-text="scope.row.ename"></span>
                                 <div v-else>
                                     <el-select style="width:100%" v-model="scope.row.eId" 
-                                    v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row)">
+                                    v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)">
                                         <el-option v-for="(item,index) in deviceList" 
                                         :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option>
                                     </el-select>
@@ -326,8 +326,15 @@
                 this.deviceList = res.data.data
             })
         },
-        updateDevice(row){
+        updateDevice(row,index){
             updateDeviceById({equiomentId:row.eId,fpid:row.iId}).then(res=>{
+                this.inspectionItems.forEach(obj=>{
+                    if(obj.children){
+                        obj.children[index-1].inspectionValue = ''
+                        obj.children[index-1].iresult = null
+                        obj.children[index-1].empiricalValueAddss = []
+                    }
+                })
             }).catch(error=>{
                 console.log(error)
             })
diff --git a/src/views/quality/processInspect/processInspect-form.vue b/src/views/quality/processInspect/processInspect-form.vue
index 36b4bd3..d486d2d 100644
--- a/src/views/quality/processInspect/processInspect-form.vue
+++ b/src/views/quality/processInspect/processInspect-form.vue
@@ -111,7 +111,7 @@
                                     <span v-if="resultVal != null && scope.row.iname != null" v-text="scope.row.ename"></span>
                                     <div v-else>
                                         <el-select style="width:100%" v-model="scope.row.eId" 
-                                        v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row)">
+                                        v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)">
                                             <el-option v-for="(item,index) in deviceList" 
                                             :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option>
                                         </el-select>
@@ -332,8 +332,15 @@
                     this.deviceList = res.data.data
                 })
             },
-            updateDevice(row){
+            updateDevice(row,index){
                 updateDeviceBypppId({equiomentId:row.eId,ppid:row.iId}).then(res=>{
+                    this.inspectionItems.forEach(obj=>{
+                        if(obj.children){
+                            obj.children[index-1].inspectionValue = ''
+                            obj.children[index-1].iresult = null
+                            obj.children[index-1].empiricalValueAddss = []
+                        }
+                    })
                 }).catch(error=>{
                     console.log(error)
                 })
@@ -398,7 +405,6 @@
                 }).catch(error=>{
                     console.log(error)
                 })
-                this.$router.go(-1)
             },
             selectInfoByOrderId() {
                 chooseMater({

--
Gitblit v1.9.3