From 0bb1834b9755eaf7c67d25cd9012be2ca14a7efe Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 11 四月 2025 09:13:16 +0800
Subject: [PATCH] 1.委外退料优化 2.核对送检

---
 H5/Js/Scbl.js |   74 +++++++++++++++++++++++++++++--------
 1 files changed, 58 insertions(+), 16 deletions(-)

diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js
index bea1c7a..f8b69fb 100644
--- a/H5/Js/Scbl.js
+++ b/H5/Js/Scbl.js
@@ -7,11 +7,13 @@
                 "loginGuid": '',
                 "loginAccount": '',
             },
-            sms: "",
-            num:"",
-            billNo:"",
+            splitNum: "",
+            num: "",
+            type: "",
+            billNo: "",
+            selectType: "",
             daa001: "",
-            barcode:"",
+            barcode: "",
             ItemBlDetail:[],
             modeInfo: [],
             active: 0,
@@ -25,6 +27,8 @@
             loginGuid: this.GetLoginInfor().loginGuid,
             loginAccount: this.GetLoginInfor().loginAccount,
         };
+        this.type = this.Request("type");
+        selectType = this.type == "bl" ? selectType = "鐢熶骇琛ユ枡" : selectType = "鐢熶骇瓒呴";
     },
     methods: {
         getInfo() {
@@ -32,8 +36,11 @@
 
             var that = this;
             that.isLoading = true;
+
+
+
             that.AxiosHttp("post", 'MesItemBl/GetSCBLBillNo', {
-                type: "鐢熶骇琛ユ枡",
+                type: selectType,
             }, false)
                 .then(function (res) {
                     var json = res;
@@ -77,28 +84,37 @@
             that.isLoading = true;
             that.AxiosHttp("post", 'MesItemBl/GetMesItemBlDetailByBillNo', {
                 billNo: that.billNo,
-                type: "鐢熶骇琛ユ枡"
+                type: selectType
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
                         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);
+                    tthat.$refs.billNo.focus();
+                    that.billNo = "";
+                    that.daa001 = "";
+                    that.ItemBlDetail = [];
                 });
         },
-        getBarcode(value) {
+        getBarcode() {
 
-            this.barcode = value;
+            //this.barcode = value;
 
             var that = this;
             that.isLoading = true;
@@ -132,7 +148,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,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() {
@@ -190,7 +221,7 @@
                 return;
             }
 
-            if (!that.sms) {
+            if (!that.splitNum) {
                 this.$toast.fail("鍙戣揣鏁伴噺涓嶈兘涓虹┖");
                 that.isLoading = false;
                 return;
@@ -201,23 +232,34 @@
                 barcode: that.barcode,
                 blNo: that.billNo,
                 billNo: that.daa001,
-                num: that.sms
+                num: that.splitNum,
+                type: selectType
             }, false)
                 .then(function (res) {
                     var json = res;
                     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