From 12dceacf931f4f29b1613eb06da8fd46d6375ebb Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 08 八月 2024 21:32:47 +0800 Subject: [PATCH] 认领修改+松套管修改+不判定结论 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 128 ++++++++++++++++++++++++++++-------------- 1 files changed, 85 insertions(+), 43 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 2f55a89..40e0ae3 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -384,6 +384,7 @@ <template v-if="PROJECT=='妫�娴嬩腑蹇�'||PROJECT=='瑁呭鐢电紗'&&getInspectionValueType(n.i) != 2 "> <span v-if="n.v.v===1" :style="`font-family:${n.v.ff} !important;color: green;`">鍚堟牸</span> <span v-else-if="n.v.v===0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span> + <span v-else-if="n.v.v===3" :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">涓嶅垽瀹�</span> <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span> </template> </template> @@ -612,6 +613,7 @@ <template slot-scope="scope"> <span v-if="scope.row.arr[index].insResult===1" style="color: green;">鍚堟牸</span> <span v-else-if="scope.row.arr[index].insResult===0" style="color: red;">涓嶅悎鏍�</span> + <span v-else-if="scope.row.arr[index].insResult===3" style="color: #3A7BFA;">涓嶅垽瀹�</span> <span v-else>寰呭畾</span> </template> </el-table-column> @@ -691,6 +693,7 @@ <template v-else> <span v-if="item.insResult===1" style="color: green;">鍚堟牸</span> <span v-else-if="item.insResult===0" style="color: red;">涓嶅悎鏍�</span> + <span v-else-if="item.insResult===3" style="color: #3A7BFA;">涓嶅垽瀹�</span> <span v-else>寰呭畾</span> </template> </td> @@ -943,6 +946,7 @@ requiredUp: [] }, upIndex: 0, + changeType:null, getReportModelLoading:false, insOrder: {}, sampleProduct: [], @@ -1051,7 +1055,8 @@ } ], getDataIndex:[], - getDataIndexLoading:false + getDataIndexLoading:false, + changeType:null, } }, computed: { @@ -1109,15 +1114,18 @@ } let list = await this.getCurrentProduct(this.currentSample.id,0) this.currentSample.insProduct = this.HaveJson(list) - // console.log(this.currentSample) + this.param = {} + this.changeType = 0; this.currentSample.insProduct.forEach(a => { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null + if(this.handleCasing(a.inspectionItem)){ + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null + } } }) this.determineWhetherToCollectData() @@ -1143,19 +1151,30 @@ }, currentTable(val1, val0) { if (val0 != null && val1 != val0) { + if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�')){ + if(this.casing.length>0){ + this.handleChange(this.casing[0].id,3) + } + return + } + if(this.changeType&&this.changeType>0){ + return + } this.tableLists.forEach(async (m, i) => { if (m.templateId == val1) { let list = await this.getCurrentProduct(this.currentSample.id,0) this.currentSample.insProduct = this.HaveJson(list) - // console.log(this.currentSample) + this.param = {} this.currentSample.insProduct.forEach(a => { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null + if(this.handleCasing(a.inspectionItem)){ + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null + } } }) this.getReportModel(this.currentSample.id) @@ -1184,12 +1203,6 @@ } } }) - this.handleCasing() - if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�')){ - if(this.casing.length>0){ - this.handleChange(this.casing[0].id,3) - } - } } }, equipForm:{ @@ -1351,7 +1364,6 @@ maxNum = num } } - console.log('data[i][j].equipName',data[i][j].equipName,'data[i][j].equipValue',data[i][j].equipValue,'m.v',m.v,'m.v.ps',m.v.ps,'m.v.ps.value',m.v.ps.value,'str0',str0,'str',str,'m.v.v',m.v.v) if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='璁惧缂栫爜'&&str0==str){ if(!m.v.v){ this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName) @@ -2049,15 +2061,18 @@ this.currentSample = this.HaveJson(row) let list = await this.getCurrentProduct(row.id,0) this.currentSample.insProduct = this.HaveJson(list) - this.handleCasing() + this.param = {} + this.changeType = 0; this.currentSample.insProduct.forEach(a => { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null + if(this.handleCasing(a.inspectionItem)){ + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null + } } }) this.getReportModel(row.id) @@ -2076,9 +2091,15 @@ currentTable:this.currentTable })); }, - handleCasing(){ - if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName!='鎴愬搧缂嗘楠屽師濮嬭褰�')){ - this.currentSample.insProduct = this.currentSample.insProduct.filter(m=>!m.inspectionItem.includes('鏉惧绠�')) + handleCasing(inspectionItem){ + if(this.changeType!=3){ + if(inspectionItem.includes('鏉惧绠�')){ + return false + }else{ + return true + } + }else{ + return true } }, getReportModel(id){ @@ -2094,9 +2115,11 @@ }) }, async handleChange(m,type){ + this.changeType = type if(m){ let list = await this.getCurrentProduct(m,type) if(list.length>0){ + this.param = {} list.forEach(a => { this.param[a.id] = { insValue: [], @@ -2646,6 +2669,23 @@ // return // } // } + let str = code.split('-') + let pId = str[3] + for(let i =0;i<this.currentSample.insProduct.length;i++){ + if(this.currentSample.insProduct[i].id==pId&&(this.currentSample.insProduct[i].ask=='-'||this.currentSample.insProduct[i].ask=='/')){ + this.tableList[0].arr.forEach(item=>{ + item.forEach(m=>{ + if(m.i==pId&&m.v.ps&&m.v.ps.value=='缁撹'){ + this.$set(m.v,'v',3) + } + }) + }) + if(this.param[pId].insResult&&this.param[pId].insResult.v){ + } + this.saveInsContext() + return + } + } if (n) { // if (this.PROJECT === '瑁呭鐢电紗') { // let num2 = new this.$Big(n.v.v) @@ -3216,16 +3256,18 @@ this.currentSample = this.HaveJson(this.sampleProduct[index - 1]) let list = await this.getCurrentProduct(this.currentSample.id,0) this.currentSample.insProduct = this.HaveJson(list) - this.handleCasing() this.param = {} + this.changeType = 0; this.currentSample.insProduct.forEach(a => { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null + if(this.handleCasing(a.inspectionItem)){ + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null + } } }) this.getTableLists() -- Gitblit v1.9.3