From 4660b68d3c3cd49c5dec355067cdf45b0abdd2e9 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期五, 12 四月 2024 13:30:48 +0800 Subject: [PATCH] 修改工艺路线 --- src/views/quality/finishedProductInspection/finishedProduct-form.vue | 63 ++++++++++++++++++++++++------- 1 files changed, 48 insertions(+), 15 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue index 02135a1..ca7bb5f 100644 --- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue +++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue @@ -104,6 +104,9 @@ <el-tab-pane label="妫�楠岄」鐩�"> <el-row> <el-col v-if="resultVal==null" :span="24" class="inspectionProject_span" style="text-align: right;"> + <el-button size="small" + type="primary" + @click="saveTable()">淇濆瓨</el-button> <el-button size="mini" @click="clickAddInspectionColumn()">娣诲姞妫�娴嬪�煎垪</el-button> <el-button size="mini" @click="clickDeleteInspectionColumn()">鍒犻櫎妫�娴嬪�煎垪</el-button> </el-col> @@ -335,6 +338,7 @@ queryById, updateDeviceById, updateFinishedInsProduct, + updateFinishedInsProduct2, updateFinishedInspectById, selectDeviceAPI, updateLocationIdById, @@ -427,6 +431,34 @@ this.init() }, methods: { + saveTable(){ + let finishedInsProducts = []; + if(this.inspectionItems.length>0){ + this.inspectionItems.forEach(item=>{ + if(item.children!=null&&item.children.length>0){ + item.children.forEach(item2=>{ + let obj = {}; + obj.id = item2.iid; + obj.note = item2.inote; + obj.required = item2.required; + obj.inspectionValue = item2.empiricalValueAddss.join(','); + obj.deviceId = item2.eId; + finishedInsProducts.push(obj); + }) + } + }) + } + if(finishedInsProducts.length>0){ + updateFinishedInsProduct2(finishedInsProducts).then(res=>{ + if(res.data.code == 0){ + this.$message.success("鏇存柊鎴愬姛") + }else{ + this.$message.error("鏇存柊澶辫触") + } + this.init() + }) + } + }, delProcessConfigFile(row) { this.$confirm('鏄惁鍒犻櫎璇ラ檮浠�', '鎻愮ず', { confirmButtonText: '纭畾', @@ -677,20 +709,20 @@ if (str === undefined || str === '' || str === null ) { return } - let obj = { - deviceId: row.eId, - fpid: row.iid, - inspectionValue: str, - note : row.inote - } - updateFinishedInsProduct(obj).then(res=>{ - if(res.data.code == 0){ - this.$message.success("鏇存柊鎴愬姛") - }else{ - this.$message.error("鏇存柊澶辫触") - } - this.init() - }) + // let obj = { + // deviceId: row.eId, + // fpid: row.iid, + // inspectionValue: str, + // note : row.inote + // } + // updateFinishedInsProduct(obj).then(res=>{ + // if(res.data.code == 0){ + // this.$message.success("鏇存柊鎴愬姛") + // }else{ + // this.$message.error("鏇存柊澶辫触") + // } + // this.init() + // }) } }, addTestProject() { @@ -784,7 +816,8 @@ } else { if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { this.empiricalValueAdd = this.empiricalValueAdd - 1; - this.changeRowResult() + // this.changeRowResult() + this.saveTable() this.inspectionItems.forEach(i => { i.empiricalValueAddss.splice(this.empiricalValueAdd, 1); }); -- Gitblit v1.9.3