From 12dceacf931f4f29b1613eb06da8fd46d6375ebb Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 08 八月 2024 21:32:47 +0800
Subject: [PATCH] 认领修改+松套管修改+不判定结论
---
static/js/worker.js | 16 ++--
src/components/do/b1-ins-order/add.vue | 69 ++++++++++++++++
src/components/do/b1-inspect-order-plan/Inspection.vue | 128 +++++++++++++++++++++----------
src/components/view/b1-inspect-order-plan.vue | 9 +-
src/view/timer.vue | 2
5 files changed, 165 insertions(+), 59 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 033ba53..dee5543 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -1585,16 +1585,24 @@
}
return true
})
- //鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪
+ /* //鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪
const isTrue = this.checkRequiredValueAndRemark(filterProductList)
if(!isTrue){
this.$message.error('妫�楠岄」鐨勮姹傚�间笌瑕佹眰鎻忚堪涓嶅尮閰嶏紝 璇锋鏌�')
return
+ } */
+ //鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪,浠呭鎵樿姹�
+ if(this.isAskOnlyRead){
+ const isTrue = this.checkRequiredValueAndRemark(filterProductList)
+ if(!isTrue){
+ this.$message.error('妫�楠岄」鐨勮姹傚�间笌瑕佹眰鎻忚堪涓嶅尮閰嶏紝 璇锋鏌�')
+ return
+ }
}
console.log('isHaveBushing===', this.totalArr)
// inspectionItem
- let spcialItem = null//this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�'))
+ let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('鏉惧绠�'))
// console.log('isHaveBushing===', isHaveBushing)
if (productListSelected && select[2] === '鍏夌紗' && isHaveBushing === false) {
this.$message.error('鍏夌紗娓╁害寰幆椤圭洰蹇呴』杩涜鍏夌氦閰嶇疆')
@@ -1635,7 +1643,7 @@
}
}
},
- checkRequiredValueAndRemark(data){
+ /* checkRequiredValueAndRemark(data){
let isTrue = true
try{
data.forEach(ele=>{
@@ -1678,7 +1686,62 @@
isTrue = false
}
return isTrue
+ }, */
+ /**
+聽 聽 聽 聽* 鏍¢獙濮旀墭瑕佹眰鐨勬楠岄」鐨勮姹傛弿杩板拰瑕佹眰鍊�
+聽 聽 聽 聽*
+聽 聽 聽 聽*/
+ checkRequiredValueAndRemark(data){
+ let isTrue = true
+ try{
+ data.forEach(ele=>{
+ //鍒ゆ柇锛堚墹,鈮�,>,<,=锛夎繖鍑犵鎯呭喌
+ //鍒ゆ柇瑕佹眰鍊间腑鐨勬暟瀛楁槸鍚﹀寘鍚湪瑕佹眰鎻忚堪涓�
+ if(['鈮�','鈮�','>','<','='].includes(ele.ask[0])){
+ const askVal = ele.ask.substring(1,ele.ask.length)
+ if(isNaN(askVal) || ele.tell.indexOf(askVal)<0){
+ isTrue = false
+ }
+ }
+ //鍒ゆ柇鑼冨洿(10-25),瑕佹眰鍊煎繀椤绘槸-
+ if(ele.ask.indexOf('-')>0 && ele.ask.length>1){
+ //瑕佹眰鎻忚堪鐨剘鍜岃姹傚�肩殑-锛岀瓑鏁�
+ let tell = ele.tell
+ if(ele.tell.indexOf('~')>0){
+ tell = ele.tell.replace('~','-')
+ }
+ const splits = ele.ask.split('-')
+ //婊¤冻鏍煎紡瑕佹眰锛屽苟涓斾袱涓兘鏄暟瀛�
+ if(splits.length==2 && !isNaN(splits[0]) && !isNaN(splits[1])){
+ let min = Math.min(...splits)
+ let max = Math.max(...splits)
+ //鍒ゆ柇卤鐨勬儏鍐�
+ if(ele.tell.indexOf('卤')<0&&tell.indexOf(ele.ask)<0){
+ isTrue = false
+ }else if(ele.tell.indexOf('卤')>0&&ele.tell!=ele.ask){
+ let splitNums = ele.tell.split('卤')
+ if(splitNums.length<2){
+ isTrue = false
+ }else{
+ let minTell = Number(splitNums[0])-Number(splitNums[1])
+ let maxTell = Number(splitNums[0])+Number(splitNums[1])
+ if(minTell!=min || maxTell!=max){
+ isTrue = false
+ }
+ }
+ }
+ }else{
+ isTrue = false
+ }
+ }
+ })
+ }catch(error){
+ console.log(error);
+ isTrue = false
+ }
+ return isTrue
},
+
save0(){
if(this.editTable.every(m=>m.value)){
let sampleList = this.handleData(this.HaveJson(this.sampleList),this.handleAsk,1)
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()
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index 05c0f51..fb139d8 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -303,14 +303,14 @@
font: '鏁版嵁鏌ョ湅',
type: 'text',
method: 'handleDataLook',
- disabFun: (row, index) => {
+ /* disabFun: (row, index) => {
const user = JSON.parse(localStorage.getItem('user'))
let currentUserName = ''
if(user){
currentUserName = user.name
}
return row.userName!=currentUserName && row.checkName!=currentUserName
- }
+ } */
},{
id: '',
font: '妫�楠�',
@@ -345,7 +345,7 @@
type: 'text',
method: 'claimFun',
disabFun: (row, index) => {
- return row.userName != null||(row.userName&&!row.userName.includes(JSON.parse(localStorage.getItem("user")).name))
+ return row.userName != null || row.checkName!=null
}
}
],
@@ -452,6 +452,7 @@
}
},
changeCheckBox(val) {
+ console.log(111,val)
this.componentData.entity.userId = val?0:null
this.refreshTable()
},
@@ -468,7 +469,7 @@
this.sampleUserForm = {
entrustCode: row.entrustCode,
insSampleId: row.id,
- sonLaboratory: row.sonLaboratory,
+ sonLaboratory: this.componentData.entity.sonLaboratory,
}
this.claimVisible = true
}
diff --git a/src/view/timer.vue b/src/view/timer.vue
index 12a66ce..a34b8f9 100644
--- a/src/view/timer.vue
+++ b/src/view/timer.vue
@@ -35,7 +35,7 @@
const hours = now.getHours();
const minutes = now.getMinutes();
- if (hours === 20 && minutes === 0) {
+ if (hours === 22 && minutes === 0) {
this.performTask();
// 璁剧疆20鍒嗛挓鍚庢彁绀哄叧闂�
this.closeTimeout = setTimeout(() => {
diff --git a/static/js/worker.js b/static/js/worker.js
index c3336df..f8d2e8d 100644
--- a/static/js/worker.js
+++ b/static/js/worker.js
@@ -361,7 +361,7 @@
a[b].v.v = isNaN(val) ? comResult : val
}
// console.log('a[b].v.ct', comResult)
- // console.log('a[b].v.v', a[b].v.v)
+ // console.log('a[b].v.v', a[b])
}catch(error){
a[b].v.v = comResult
console.log('error---', error)
@@ -486,7 +486,7 @@
b.i &&b.v.v&& param[b.i].insValue.push(b)
}
if (b.v.ps != undefined && b.v.ps.value === '璁$畻鍊�') {
- b.i &&b.v.v&& param[b.i].comValue.push(b)
+ b.i &&b.v.v&&b.valueList&&b.valueList.length>0&& param[b.i].comValue.push(b)
}
if (b.v.ps != undefined && b.v.ps.value === '璁惧缂栫爜') {
b.i &&b.v&& param[b.i].equipValue.push(b)
@@ -495,7 +495,7 @@
b.i &&b.v&& param[b.i].equipName.push(b)
}
if (b.v.ps != undefined && b.v.ps.value === '鏈�缁堝��') {
- b.i &&b.v&& (param[b.i].resValue = b)
+ b.i &&b.v&&b.valueList&&b.valueList.length>0&& (param[b.i].resValue = b)
}
if (b.v.ps != undefined && b.v.ps.value === '缁撹') {
if(b.i &&(b.v.v||b.v.v===0||b.v.v==='0')){
@@ -519,7 +519,7 @@
function SUM(...val){
try {
let num = null;
- if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
+ if(val!=null&&val!=undefined&&val!='undefined'&&val!='NaN'&&val.length>0){
val.forEach(item=>{
num+=item;
})
@@ -538,7 +538,7 @@
function MAX(...val){
try {
let max = null;
- if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
+ if(val!=null&&val!=undefined&&val!='undefined'&&val!='NaN'&&val.length>0){
val = val.filter(item=>item!=null&&item!=='')
if(val.length>0){
max = Math.max(...val)
@@ -560,7 +560,7 @@
function MIN(...val){
try {
let min = null;
- if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
+ if(val!=null&&val!=undefined&&val!='undefined'&&val!='NaN'&&val.length>0){
val = val.filter(item=>item!=null&&item!=='')
if(val.length>0){
min = Math.min(...val)
@@ -581,7 +581,7 @@
try {
let num = null;
let arr = [];
- if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
+ if(val!=null&&val!=undefined&&val!='undefined'&&val!='NaN'&&val.length>0){
arr = val.filter(item=>item!==null&&item!==''&&item!=undefined)
arr.forEach(item=>{
num+=item;
@@ -884,7 +884,7 @@
} else if (isPoint) {
return str.replace('ABS', '').replace(/\(|\)/g, '')
}else {
- console.log('str', str,eval(str))
+ console.log('str', str)
return eval(str)
}
} catch (error) {
--
Gitblit v1.9.3