From 5f4156362b6e9d8998d984f0df75499f0a99beca Mon Sep 17 00:00:00 2001 From: gaoluyang <gaoluyang@rengu.cc> Date: 星期四, 04 七月 2024 11:08:45 +0800 Subject: [PATCH] 表格输入框分数计算 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 27b091c..3ce4408 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -1678,7 +1678,7 @@ } if(this.getInspectionValueType(item.i)==1){ if (!isNaN(parseFloat(c.v.v))) { - if(c.v.v.includes('^')){ + if(c.v.v.includes('^') || c.v.v.includes('/')){ comValue[(tableCode + (c.r + 1))] = c.v.v }else{ comValue[(tableCode + (c.r + 1))] = parseFloat(c.v.v) @@ -1999,7 +1999,11 @@ return sum }, handleInput (n) { - n.v.v = n.v.v.replace(/[^\d.^]/g, ''); + if (n.v.v > 10000 && this.PROJECT === '瑁呭鐢电紗') { + let num2 = new this.$Big(n.v.v) + n.v.v = num2.toExponential() + } + n.v.v = n.v.v.replace(/[^\d.^e/]/g, ''); }, getInspectionItemType(id) { for (var a in this.currentSample.insProduct) { -- Gitblit v1.9.3