From 7dba00a80cee072bc9e193d5d2a75c1f7cf72d28 Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期四, 04 七月 2024 10:51:41 +0800
Subject: [PATCH] 表格输入框转换为科学计数法

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 9e6591a..110e6cb 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1991,7 +1991,11 @@
         return sum
       },
       handleInput (n) {
-        n.v.v = n.v.v.replace(/[^\d.^]/g, '');
+        if (n.v.v > 10000) {
+          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