From d98942fd0d8b9097e5a5ed4e4f2b3161a0174661 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期四, 09 十一月 2023 19:01:06 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/quality/finishedProductInspection/finishedProduct-form.vue | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue index aa912dc..e13c447 100644 --- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue +++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue @@ -96,21 +96,22 @@ <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, scope.$index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input> + @blur="changeState(scope.row, 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, scope.$index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="璇烽�夋嫨"> - <el-option v-for="(item,i) in dataVal" :key="item.value" :label="item.label" + <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" :value="item.value"> </el-option> </el-select> @@ -128,12 +129,12 @@ <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="item.id" :value="item.id" :label="item.number +'-'+ item.name"></el-option> + :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option> </el-select> </div> </template> </el-table-column> - <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="item" + <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'"> @@ -142,7 +143,7 @@ <el-input :disabled="scope.row.eId == null" v-model="scope.row.inote" - @blur="changeState(scope.row, scope.$index)" placeholder="璇疯緭鍏ユ楠屾弿杩�"></el-input> + @blur="changeState(scope.row, index)" placeholder="璇疯緭鍏ユ楠屾弿杩�"></el-input> <span v-if="resultVal != null && processInspectVo.id != null" v-text="scope.row.inote"></span> @@ -153,7 +154,7 @@ class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" placement="top-start"> <el-input :disabled="scope.row.eId == null" v-model="scope.row.inote" - @blur="changeState(scope.row, scope.$index)" placeholder="璇疯緭鍏ユ娴嬪��"></el-input> + @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"> @@ -275,6 +276,7 @@ this.init() }, methods: { + submitSave(){ let pro = 0 this.inspectionItems.forEach(item => { @@ -348,7 +350,7 @@ let userList = [] result.children.forEach(item=>{ item.iid = Math.random() - if(item.children){ + if(item.children != undefined){ item.children.forEach(obj=>{ let arr = [] if(obj.userName){ @@ -358,9 +360,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 } @@ -388,7 +390,7 @@ }) }, 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