From 6c647afb80fb17c75218ff3e328d38df92b8d21d Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期二, 23 四月 2024 13:32:51 +0800 Subject: [PATCH] 完成印章管理功能 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index e45dc8f..7a60570 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -719,7 +719,6 @@ } }) }) - console.log(item); if (item.methodName == '鑷畾涔夋柟娉�' && item.v.ps!=undefined && item.v.ps.value == '缁撹') { if (this.currentSample.insProduct.find(m => m.id == item.i)) { let ask = this.currentSample.insProduct.find(m => m.id == item.i).ask.split('&'); @@ -784,11 +783,19 @@ valueList.forEach(b => { str = str.replace(b.name, b.value) }) - comResult = eval(str) + if(item.v.f.includes('/')>-1){ + if(Object.getOwnPropertyNames(comValue).length==valueList.length){ + comResult = eval(str) + }else{ + comResult = '' + } + }else{ + comResult = eval(str) + } break; } list.forEach(a => { - if (a[0].r == item.r) { + if (a[0].r == item.r && comResult != '') { for (var b in a) { if (a[b].c == item.c) { a[b].v.v = parseFloat(comResult.toFixed(3)) @@ -797,7 +804,7 @@ } } }) - this.changeInput(comResult, `${code.split('-')[0]}-${item.r}-${item.c}-${pId}`) //鏀瑰彉鏈�缁堝�� + this.changeInput(comResult, `${id}-${item.r}-${item.c}-${pId}`) //鏀瑰彉鏈�缁堝�� } } }) @@ -818,9 +825,9 @@ let start = mode.split(':')[0] let end = mode.split(':')[1] c0 = this.comparisonList.find(j => j.label == start.split('')[0]).value - r0 = start.split('')[1] - 1 + r0 = start.replace(/[a-zA-Z]/g, "") - 1 c1 = this.comparisonList.find(j => j.label == end.split('')[0]).value - r1 = end.split('')[1] - 1 + r1 = end.replace(/[a-zA-Z]/g, "") - 1 for (let i = Number(r0); i <= Number(r1); i++) { for (let u = Number(c0); u <= Number(c1); u++) { valueList.push({ @@ -829,13 +836,12 @@ }) } } - item.valueList = valueList; } else { valueList = [] let regex = /[=\+\-\*\%\(\)\/\s]/g let mode = item.v.f.replace(regex, ' ').split(' '); mode.filter(m => m && !Number(m)).forEach(m => { - let r = m.split('')[1] - 1 + let r = m.replace(/[a-zA-Z]/g, "") - 1 let c = this.comparisonList.find(j => j.label == m.split('')[0]).value valueList.push({ c, -- Gitblit v1.9.3