From cd948d4615d3ae6c571e4ed04275e851632a2dba Mon Sep 17 00:00:00 2001 From: lxp <1928192722@qq.com> Date: 星期五, 09 八月 2024 09:24:20 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before --- src/components/do/b1-inspect-order-plan/Inspection.vue | 134 +++++++++++++++++++++++++++++--------------- 1 files changed, 87 insertions(+), 47 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 7511cec..c454335 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> @@ -1052,7 +1055,8 @@ } ], getDataIndex:[], - getDataIndexLoading:false + getDataIndexLoading:false, + changeType:null, } }, computed: { @@ -1110,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,29 +1150,31 @@ }) }, 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) + 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 } - return - } - if(this.changeType && this.changeType>0){ - 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) @@ -1194,7 +1203,6 @@ } } }) - this.handleCasing() } }, equipForm:{ @@ -2053,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) @@ -2080,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){ @@ -2098,10 +2115,11 @@ }) }, async handleChange(m,type){ - this.changeType = 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: [], @@ -2651,6 +2669,26 @@ // 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.param[pId].insResult.v.v = 3 + } + this.saveInsContext() + return + } + } + // this.currentTable. + // if(!this.param[pId].equipValue||this.param[pId].equipValue.length==0||!this.param[pId].equipValue[0].v.v){} if (n) { // if (this.PROJECT === '瑁呭鐢电紗') { // let num2 = new this.$Big(n.v.v) @@ -3221,16 +3259,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