From 48ea71d330920dac9c3ff84585a7ef0c413fce50 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期二, 04 十一月 2025 14:47:03 +0800
Subject: [PATCH] 导体提交磅差精准一位小数,叉车盘重默认为0,去除长度,盘号字段

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

diff --git a/pages/wareHouse/nuclearScale/index.vue b/pages/wareHouse/nuclearScale/index.vue
index b3e7fba..3e595b7 100644
--- a/pages/wareHouse/nuclearScale/index.vue
+++ b/pages/wareHouse/nuclearScale/index.vue
@@ -394,20 +394,21 @@
         });
       }
       // 浣跨敤姝g‘鐨勫瓧娈靛悕suppliedQuantity锛岃�屼笉鏄痸oltage
-      const magnetic =
+      const magnetic =(
         Number(this.modalList.verificationWeight) -
         Number(this.modalList.forkliftWeight) -
-        grossWeightSum;
+        grossWeightSum).toFixed(1);
       this.form.verificationWeight = this.modalList.verificationWeight;
       this.form.forkliftWeight = this.modalList.forkliftWeight;
       switch (this.form.productType) {
         case "DT01":
           if (magnetic >= -3 && magnetic <= 3) {
+            let that = this;
             uni.showModal({
               title: "鎻愮ず",
               content: "纾呭樊:" + magnetic + "锛屾槸鍚︾‘璁ゆ彁浜わ紵",
               success: function (res) {
-                  this.allSubmit();
+                  that.allSubmit();
               },
             });
           } else {
@@ -425,6 +426,7 @@
       }
     },
     allSubmit() {
+      console.log("杩涙潵浜�", this.ScanCodeRecord);
       this.ScanCodeRecord.forEach((item) => {
         item.batchNo = item.outBatchNo;
       });
@@ -482,7 +484,12 @@
         .catch(() => {
           uni.hideLoading();
           this.$refs.saveForm.cancel();
-          this.$u.toast("缃戠粶寮傚父锛岃閲嶈瘯");
+          uni.showModal({
+            title: "鎻愮ず",
+            content: err.message || "缃戠粶寮傚父锛岃閲嶈瘯",
+            showCancel: true,
+            success: function (res) {},
+          });
         });
     },
     // 鎻愪氦鎸夐挳

--
Gitblit v1.9.3