From e5486974dcbbfc0549c41eca4f87c7730f0aa981 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 09 十一月 2023 17:56:09 +0800 Subject: [PATCH] modified: src/views/quality/finishedProductInspection/finishedProduct-form.vue modified: src/views/quality/finishedProductInspection/index.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue --- src/views/quality/finishedProductInspection/finishedProduct-form.vue | 45 ++++++++++++++++++++++++--------------------- 1 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue index 5012f74..b7c19e2 100644 --- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue +++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue @@ -8,7 +8,7 @@ <h2 v-else>缂栬緫-浜у搧妫�楠屽崟</h2> </div> <div class="btn-group header-right"> - <el-button @click="addTestProject" v-if="processInspectVo.id==null">鐢熸垚妫�楠岄」鐩�</el-button> + <el-button @click="addTestProject" type="primary" v-if="processInspectVo.id==null">鐢熸垚妫�楠岄」鐩�</el-button> </div> </div> <div class="page-main"> @@ -96,22 +96,21 @@ <el-table-column prop="required" label="鏍囧噯鍊�" width="240" ></el-table-column> <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :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.empiricalValueAddss[index]" - @blur="changeState(scope.row, index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input> + @blur="changeState(scope.row, scope.$index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input> <span v-if="resultVal != null" v-text="scope.row.empiricalValueAddss[index]"></span> </el-tooltip> </el-col> <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-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="璇烽�夋嫨"> - <el-option v-for="item in dataVal" :key="item.value" :label="item.label" + <el-select style="width: 100%;" @change="changeState(scope.row, scope.$index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="璇烽�夋嫨"> + <el-option v-for="(item,i) in dataVal" :key="i" :label="item.label" :value="item.value"> </el-option> </el-select> @@ -125,12 +124,12 @@ <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> @@ -140,9 +139,11 @@ <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> + @blur="changeState(scope.row, scope.$index)" placeholder="璇疯緭鍏ユ楠屾弿杩�"></el-input> + <span v-if="resultVal != null && processInspectVo.id != null" v-text="scope.row.inote"></span> </el-tooltip> @@ -150,14 +151,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, scope.$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 +217,7 @@ updateDeviceById, updateFinishedInsProduct, updateFinishedInspectById, + selectDeviceAPI, } from '@/api/quality/finishedProduct' import { selectDevice } from '@/api/quality/rawMaterial' export default { @@ -273,7 +275,6 @@ this.init() }, methods: { - submitSave(){ let pro = 0 this.inspectionItems.forEach(item => { @@ -347,7 +348,7 @@ let userList = [] result.children.forEach(item=>{ item.iid = Math.random() - if(item.children != undefined){ + if(item.children){ item.children.forEach(obj=>{ let arr = [] if(obj.userName){ @@ -357,9 +358,9 @@ arr = obj.inspectionValue.split(",") } obj.empiricalValueAddss = arr - if(obj.note){ - snote=obj.inote - } + // if(obj.note){ + // snote=obj.inote + // } if(arr.length > this.empiricalValueAdd){ this.empiricalValueAdd = arr.length } @@ -379,13 +380,15 @@ } }, 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=>{ + updateDeviceById({equiomentId:row.eId,fpid:row.iid}).then(res=>{ this.inspectionItems.forEach(obj=>{ if(obj.children){ obj.children[index-1].inspectionValue = '' -- Gitblit v1.9.3