From 7470b2a50a3579bff1f7cb4402f9a759190708fe Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期六, 24 五月 2025 08:13:34 +0800
Subject: [PATCH] 1.内箱核对优化 2.

---
 H5/Js/Cpbdsj.js |   58 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 46 insertions(+), 12 deletions(-)

diff --git a/H5/Js/Cpbdsj.js b/H5/Js/Cpbdsj.js
index ed2086c..e6e21c6 100644
--- a/H5/Js/Cpbdsj.js
+++ b/H5/Js/Cpbdsj.js
@@ -15,7 +15,17 @@
             KbBarMxInfo: [],
             GX: "G007:鏍稿閫佹",
             Xvalue:4,
-            XbarInfo: [],
+            XbarInfo: [
+                //{
+                //    iteM_BARCODE: "",      // 鏉$爜
+                //    item_no: "",           // 鐗╂枡缂栧彿
+                //    item_name: "",         // 鐗╂枡鍚嶇О
+                //    item_model: "",        // 瑙勬牸鍨嬪彿
+                //    quantity: 0,           // 鏁伴噺
+                //    is_hedui: "0",          // 鏄惁鏍稿(1:宸叉牳瀵� 0:鏈牳瀵�),
+                //    weight: ""          // 浜у搧閲嶉噺
+                //}
+            ],
             DAA001: [],
         }
     },
@@ -131,8 +141,6 @@
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
                 });
         },
-
-
         productBinding() {
 
             if (this.isLoading) {
@@ -204,15 +212,37 @@
                 if (matchedItem.is_hedui === "1") {
                     that.$toast("宸叉牳瀵�");
                 } else {
-                    that.$set(matchedItem, 'is_hedui', "1");
-                    that.$playSound('success');
-                    that.$notify({ type: 'success', message: "鏍稿鎴愬姛" });
-                    that.LsBar = "";
-                    // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿
-                    const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
-                    if (allChecked && that.XbarInfo.length > 0) {
-                        that.submitAllChecked();
-                    }
+
+                    that.AxiosHttp("post", 'Womdaa/GetWeightByXt', {
+                        LsBar: that.LsBar,
+                        userName: that.userInfo.loginAccount
+                    }, false)
+                        .then(function (res) {
+                            var json = res;
+                            if (json.status == 0) {
+                                var weigth = json.data.tbBillList.weight;
+                                that.$set(matchedItem, 'is_hedui', "1");
+                                that.$set(matchedItem, 'weight', weigth);
+                                that.$playSound('success');
+                                that.$notify({ type: 'success', message: "鏍稿鎴愬姛" });
+                                that.LsBar = "";
+                                // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿
+                                const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
+                                if (allChecked && that.XbarInfo.length > 0 && that.XbarInfo.length === that.Xvalue) {
+                                    that.submitAllChecked();
+                                }
+                            }
+                            else {
+                                that.$playSound('error');
+                                that.$toast.fail(json.message);
+                            }
+                            that.isLoading = false;
+                        })
+                        .catch(function (error) {
+                            that.isLoading = false;
+                            that.$playSound('error');
+                            that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                        });
                 }
             } else {
                 that.$playSound('error');
@@ -222,6 +252,10 @@
             that.LsBar = ""; // 娓呯┖杈撳叆妗�
         },
 
+        GetWeightByXt() {
+            
+        },
+
         // 鏂板鏂规硶锛氭彁浜ゆ墍鏈夊凡鏍稿鐨勬暟鎹�
         submitAllChecked() {
 

--
Gitblit v1.9.3