From c09eeede806fb7ebd47434464fa6acbe3d29c3e3 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期一, 06 十一月 2023 13:32:11 +0800 Subject: [PATCH] s --- src/views/quality/finishedProductInspection/finishedProduct-form.vue | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue index ec1d6f6..5ba0a5e 100644 --- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue +++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue @@ -110,11 +110,12 @@ <template slot-scope="scope"> <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)"> + <el-input v-model="scope.row.eId" v-if="scope.row.iname != null" placeholder="璇疯緭鍏ヨ澶囧彿"></el-input> + <!-- <el-select style="width:100%" v-model="scope.row.eId" + 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> + </el-select> --> </div> </template> </el-table-column> @@ -214,7 +215,7 @@ this.processInspectVo.id = this.$route.query.id this.resultVal = this.$route.query.resultVal if(this.resultVal == null){ - let val = sessionStorage.getItem("finished-resultVal"); + let val = sessionStorage.getItem("finished-resultVal-"+this.processInspectVo.id); val == undefined ? this.resultVal=null : this.resultVal = val } this.init() @@ -275,7 +276,7 @@ }) this.resultVal = resultVal this.inspectionResultForm[0].result = resultVal - sessionStorage.setItem("finished-resultVal",resultVal) + sessionStorage.setItem("finished-resultVal-"+this.processInspectVo.id,resultVal) }, init(){ let id = this.processInspectVo.id @@ -323,11 +324,19 @@ }, getDeviceList(){ selectDevice(null).then(res=>{ - this.deviceList = res.data.data + // this.deviceList = res.data.data + console.log(res); }) }, - 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) }) -- Gitblit v1.9.3