From a6c14c75e5a5f677c2a3571cad426d50cb106e3d Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 09 八月 2024 09:02:59 +0800
Subject: [PATCH] 修改检验任务、下单bug
---
src/components/do/b1-inspect-order-plan/Inspection.vue | 115 ++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 77 insertions(+), 38 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 54643da..3e41e73 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: [],
@@ -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()
@@ -1150,22 +1157,24 @@
}
return
}
- if(this.changeType&&changeType>0){
+ 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:{
@@ -1356,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)
@@ -2054,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)
@@ -2081,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){
@@ -2103,6 +2119,7 @@
if(m){
let list = await this.getCurrentProduct(m,type)
if(list.length>0){
+ this.param = {}
list.forEach(a => {
this.param[a.id] = {
insValue: [],
@@ -2652,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)
@@ -3222,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