From b1c0e9fea7c074aa823e45fa2dc50455e8f8106c Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期四, 22 五月 2025 09:51:13 +0800
Subject: [PATCH] 1.送货单收货

---
 H5/Js/Scbl.js |   69 +++++++++++++++++++++++++---------
 1 files changed, 51 insertions(+), 18 deletions(-)

diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js
index 23ead55..9f00599 100644
--- a/H5/Js/Scbl.js
+++ b/H5/Js/Scbl.js
@@ -7,7 +7,7 @@
                 "loginGuid": '',
                 "loginAccount": '',
             },
-            sms: "",
+            splitNum: "",
             num: "",
             type: "",
             billNo: "",
@@ -19,6 +19,7 @@
             active: 0,
             show: false,
             actions: [],
+            ItemDetail: [],
         }
     },
     mounted() {
@@ -64,11 +65,6 @@
                     console.log(error);
                 });
         },
-        onClick(index, title) {
-            this.$toast(`${index} ${title}`);
-            this.$notify({ type: 'success', message: '鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛' });
-
-        },
         onSelect(item) {
             // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
             // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
@@ -89,23 +85,36 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.ItemBlDetail = json.data.tbBillList.item2;
-                        that.daa001 = json.data.tbBillList.item1;
+                        that.ItemDetail = json.data.tbBillList;
+                        that.daa001 = json.data.tbBillList.daa001;
+                        that.$refs.barcode.focus();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.billNo.focus();
+                        that.billNo = "";
+                        that.daa001 = "";
+                        that.ItemBlDetail = [];
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    //console.log(error);
+                    tthat.$refs.billNo.focus();
+                    that.billNo = "";
+                    that.daa001 = "";
+                    that.ItemBlDetail = [];
                 });
         },
-        getBarcode(value) {
-
-            this.barcode = value;
+        getBarcode() {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.isLoading) {
+                return;
+            }
+            
+            //this.barcode = value;
 
             var that = this;
             that.isLoading = true;
@@ -152,20 +161,34 @@
                         //that.ItemBlDetail = json.data.tbBillList.item2
                         that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
                         that.GetMesItemBlDetailByBillNo();
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
+                        that.num = "";
+                        that.splitNum = "";
+                        
+
                     } else if (json.status == 2) {
                         that.$refs.splitNum.focus();
-                        that.scanInfo.splitNum = json.data.tbBillList.splitNum;
-                        that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum;
+                        that.splitNum = json.data.cfNum;
+                        that.num = json.data.num;
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
+                        that.num = "";
+                        that.splitNum = "";
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    //console.log(error);
+                    that.$refs.barcode.focus();
+                    that.barcode = "";
+                    that.num = "";
+                    that.splitNum = "";
                 });
         },
         tmcf() {
@@ -198,7 +221,7 @@
                 return;
             }
 
-            if (!that.sms) {
+            if (!that.splitNum) {
                 this.$toast.fail("鍙戣揣鏁伴噺涓嶈兘涓虹┖");
                 that.isLoading = false;
                 return;
@@ -209,7 +232,7 @@
                 barcode: that.barcode,
                 blNo: that.billNo,
                 billNo: that.daa001,
-                num: that.sms,
+                num: that.splitNum,
                 type: selectType
             }, false)
                 .then(function (res) {
@@ -217,16 +240,26 @@
                     if (json.status == 0) {
                         that.ItemBlDetail = json.data.pendingList;
                         that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
+                        that.num = "";
+                        that.splitNum = "";
+                        that.GetMesItemBlDetailByBillNo();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    //console.log(error);
+                    that.$refs.barcode.focus();
+                    that.barcode = "";
+                    that.num = "";
+                    that.splitNum = "";
                 });
         }
     }

--
Gitblit v1.9.3