From a6a7b0bbf6f67fb1a2a1619296202c9e29915325 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期三, 15 十一月 2023 10:24:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/quality/finishedProductInspection/finishedProduct-form.vue | 48 ++++++++++++++++++++++++++++++++---------------- 1 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue index e13c447..90fec3b 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" type="primary" v-if="processInspectVo.id==null">鐢熸垚妫�楠岄」鐩�</el-button> + <el-button @click="addTestProject" v-if="processInspectVo.id==null">鐢熸垚妫�楠岄」鐩�</el-button> </div> </div> <div class="page-main"> @@ -111,9 +111,12 @@ <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-option v-for="item in dataVal" :key="item.value" :label="item.label" :value="item.value"> - </el-option> + </el-option> --> + <el-option v-for="item in dataVal" :key="item.value" :label="(item.value === '1' ? '鏄�' : '鍚�')" :value="item.value"></el-option> + + </el-select> <span v-if="resultVal != null && processInspectVo.id != null" v-text="scope.row.empiricalValueAddss[index]"></span> @@ -134,7 +137,7 @@ </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'"> @@ -224,12 +227,13 @@ export default { data() { return { + // 1 鏄� 0鍚� dataVal: [{ - label: '鏄�', - value: '鏄�' + label: '1', + value: '1' }, { - label: '鍚�', - value: '鍚�' + label: '0', + value: '0' }], resultVal: null, deviceList: [], @@ -375,6 +379,7 @@ material: result.material, userName: Array.from(new Set(userList)).join(","), result: this.resultVal==null ? '' : this.resultVal, + }] }).catch(error=>{ console.log(error) @@ -390,15 +395,26 @@ }) }, 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) @@ -425,7 +441,7 @@ return } let obj = { - equiomentId: row.eId, + deviceId: row.eId, fpid: row.iid, inspectionValue: str, note : row.inote -- Gitblit v1.9.3