From 47d35088a4314f0f3afa284973874b9da9e1cb4d Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期三, 22 十一月 2023 10:13:20 +0800
Subject: [PATCH] modified: src/views/quality/teststandard/standard-form.vue
---
src/views/quality/finishedProductInspection/finishedProduct-form.vue | 54 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
index 5012f74..a09ed00 100644
--- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue
+++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -125,24 +125,26 @@
<template slot-scope="scope">
<span v-if="resultVal!=null && processInspectVo.id!=null" v-text="scope.row.ename"></span>
<div v-else>
- <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"
+ <!-- <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>
- <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index"
+ <el-table-column prop="inspectionValue" :key="index"
label="妫�楠屾弿杩�" width="240" style="text-align: center;">
<template slot-scope="scope">
<el-col v-if="scope.row.itype === '1'">
<el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null"
class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" placement="top-start">
+
<el-input :disabled="scope.row.eId == null"
v-model="scope.row.inote"
@blur="changeState(scope.row, index)" placeholder="璇疯緭鍏ユ楠屾弿杩�"></el-input>
+
<span v-if="resultVal != null && processInspectVo.id != null"
v-text="scope.row.inote"></span>
</el-tooltip>
@@ -150,14 +152,14 @@
<el-col v-else>
<el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null"
class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" placement="top-start">
- <!-- <el-input :disabled="scope.row.eId == null"
- v-model="scope.row.empiricalValueAddss[index]"
- @blur="changeState(scope.row, index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input> -->
- <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.inote" placeholder="璇烽�夋嫨">
+ <el-input :disabled="scope.row.eId == null"
+ v-model="scope.row.inote"
+ @blur="changeState(scope.row, index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input>
+ <!-- <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.inote" placeholder="璇烽�夋嫨">
<el-option v-for="item in dataVal" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
- </el-select>
+ </el-select> -->
<span v-if="resultVal != null && processInspectVo.id != null"
v-text="scope.row.inote"></span>
</el-tooltip>
@@ -216,6 +218,7 @@
updateDeviceById,
updateFinishedInsProduct,
updateFinishedInspectById,
+ selectDeviceAPI,
} from '@/api/quality/finishedProduct'
import { selectDevice } from '@/api/quality/rawMaterial'
export default {
@@ -273,7 +276,7 @@
this.init()
},
methods: {
-
+
submitSave(){
let pro = 0
this.inspectionItems.forEach(item => {
@@ -379,21 +382,34 @@
}
},
getDeviceList(){
- selectDevice(null).then(res=>{
+ selectDeviceAPI(null).then(res=>{
// this.deviceList = res.data.data
console.log(res);
+ this.deviceList = res.data.data
+
})
},
updateDevice(row,index){
- updateDeviceById({equiomentId:row.eId,fpid:row.iId}).then(res=>{
+ let rowId=JSON.stringify(row.iid)
+ console.log(row);
+ updateDeviceById({deviceId: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 = []
- obj.children[index-1].inote=''
+ obj.children.forEach(c=>{
+ if(c.iid==rowId){
+ c.inspectionValue = null
+ c.iresult = null
+ c.empiricalValueAddss = []
+ c.inote=''
+ }
+ })
- }
+ // if(obj.children){
+ // obj.children[index-1].inspectionValue = ''
+ // obj.children[index-1].iresult = null
+ // obj.children[index-1].empiricalValueAddss = []
+ // obj.children[index-1].inote=''
+
+ // }
})
}).catch(error=>{
console.log(error)
@@ -420,7 +436,7 @@
return
}
let obj = {
- equiomentId: row.eId,
+ deviceId: row.eId,
fpid: row.iid,
inspectionValue: str,
note : row.inote
--
Gitblit v1.9.3