From 2f1f5f0c98b8495127ec7b6823906d525bf19e4b Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期一, 02 六月 2025 16:32:17 +0800
Subject: [PATCH] 1.首检认证信息优化,多选

---
 H5/Js/Wwbl.js |   47 +++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/H5/Js/Wwbl.js b/H5/Js/Wwbl.js
index 92b26bf..78a7923 100644
--- a/H5/Js/Wwbl.js
+++ b/H5/Js/Wwbl.js
@@ -8,7 +8,8 @@
                 "loginAccount": '',
             },
             sms: "",
-            num:"",
+            num: "",
+            type: "",
             billNo:"",
             daa001: "",
             barcode:"",
@@ -25,6 +26,8 @@
             loginGuid: this.GetLoginInfor().loginGuid,
             loginAccount: this.GetLoginInfor().loginAccount,
         };
+        this.type = this.Request("type");
+        selectType = this.type == "bl" ? selectType = "濮斿琛ユ枡" : selectType = "濮斿瓒呴";
     },
     methods: {
         getInfo() {
@@ -33,7 +36,7 @@
             var that = this;
             that.isLoading = true;
             that.AxiosHttp("post", 'MesItemBl/GetSCBLBillNo', {
-                type: "濮斿琛ユ枡",
+                type: selectType,
             }, false)
                 .then(function (res) {
                     var json = res;
@@ -77,7 +80,7 @@
             that.isLoading = true;
             that.AxiosHttp("post", 'MesItemBl/GetMesItemBlDetailByBillNo', {
                 billNo: that.billNo,
-                type: "濮斿琛ユ枡",
+                type: selectType,
             }, false)
                 .then(function (res) {
                     var json = res;
@@ -85,21 +88,30 @@
                         
                         that.ItemBlDetail = json.data.tbBillList.item2;
                         that.daa001 = json.data.tbBillList.item1;
+                        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);
+                    that.$refs.billNo.focus();
+                    that.billNo = "";
+                    that.daa001 = "";
+                    that.ItemBlDetail = [];
                 });
         },
-        getBarcode(value) {
+        getBarcode() {
 
-            this.barcode = value;
+            //this.barcode = value;
 
             var that = this;
             that.isLoading = true;
@@ -133,7 +145,8 @@
                 userName: that.userInfo.loginAccount,
                 barcode: that.barcode,
                 blNo: that.billNo,
-                billNo: that.daa001
+                billNo: that.daa001,
+                type: selectType
             }, false)
                 .then(function (res) {
                     var json = res;
@@ -144,16 +157,34 @@
                         //that.num = json.data.tbBillList.item.num;
                         //that.ItemBlDetail = json.data.tbBillList.pendingList
                         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.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() {

--
Gitblit v1.9.3