From 39a59f4b31181904497ecc1db26d1f0183b81d77 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期二, 04 十一月 2025 14:54:40 +0800
Subject: [PATCH] 字符串转换回数字进行比较,toFixed()方法返回字符串类型

---
 pages/wareHouse/nuclearScale/index.vue |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pages/wareHouse/nuclearScale/index.vue b/pages/wareHouse/nuclearScale/index.vue
index 3e595b7..373b07e 100644
--- a/pages/wareHouse/nuclearScale/index.vue
+++ b/pages/wareHouse/nuclearScale/index.vue
@@ -402,7 +402,7 @@
       this.form.forkliftWeight = this.modalList.forkliftWeight;
       switch (this.form.productType) {
         case "DT01":
-          if (magnetic >= -3 && magnetic <= 3) {
+          if (Number(magnetic) >= -3 && Number(magnetic) <= 3) {
             let that = this;
             uni.showModal({
               title: "鎻愮ず",
@@ -416,7 +416,7 @@
           }
           break;
         case "DT02":
-          if (magnetic >= -0.5 && magnetic <= 0.5) {
+          if (Number(magnetic) >= -0.5 && Number(magnetic) <= 0.5) {
             // this.ScanCodeRecord.push(this.form);
             this.allSubmit();
           } else {

--
Gitblit v1.9.3