From ab5f49fb3a7984e65e32c31e09bead83875cdb6d Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 07 三月 2025 08:22:15 +0800
Subject: [PATCH] 1.打印测试调整

---
 H5/Js/Qtrk.js |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/H5/Js/Qtrk.js b/H5/Js/Qtrk.js
index e095587..3728adc 100644
--- a/H5/Js/Qtrk.js
+++ b/H5/Js/Qtrk.js
@@ -83,6 +83,8 @@
                     var json = res;
                     if (json.status == 0) {
                         that.ItemBlDetail = json.data.tbBillList;
+                        that.$refs.sectionCode.focus();
+                        that.sectionCode = null;
                     }
                     else {
                         that.$toast.fail(json.message);
@@ -95,12 +97,20 @@
                     console.log(error);
                 });
         },
-        getSectionCode(value) {
+        getSectionCode() {
             var that = this;
-            that.sectionCode = value;
+            //that.sectionCode = value;
 
-            if (!that.barcode) {
-                this.$toast.fail("鏉$爜涓嶈兘涓虹┖");
+            //if (!that.barcode) {
+            //    this.$toast.fail("鏉$爜涓嶈兘涓虹┖");
+            //    that.isLoading = false;
+            //    return;
+            //}
+
+            if (!that.billNo) {
+                this.$toast.fail("鐢宠鍗曞彿涓嶈兘涓虹┖");
+                that.$refs.sectionCode.focus();
+                that.sectionCode = null;
                 that.isLoading = false;
                 return;
             }
@@ -110,6 +120,7 @@
                 that.isLoading = false;
                 return;
             }
+
             that.AxiosHttp("post", 'MesItemQtrk/ScanInDepotsQT', {
                 billNo: that.billNo,
                 sectionCode: that.sectionCode
@@ -118,9 +129,12 @@
                     var json = res;
                     if (json.status == 0) {
                         that.$notify({ type: 'success', message: json.data.tbBillList });
+                        that.$refs.barcode.focus();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.sectionCode.focus();
+                        that.sectionCode = null;
                     }
                     that.isLoading = false;
                 })
@@ -130,9 +144,9 @@
                     console.log(error);
                 });
         },
-        getBarcode(value) {
+        getBarcode() {
 
-            this.barcode = value;
+            //this.barcode = value;
 
             var that = this;
             that.isLoading = true;
@@ -177,10 +191,13 @@
                         that.barcode = null;
                         that.ItemBlDetail = json.data.items;
                         that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+                        that.$refs.barcode.focus();
                         //that.GetMesItemBlDetailByBillNo()
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                        that.barcode = null;
                     }
                     that.isLoading = false;
                 })

--
Gitblit v1.9.3