From e40e41d4078e11d734effb76e330e0b7e414b96d Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 20 五月 2025 13:31:29 +0800
Subject: [PATCH] 1.调拨出入库优化

---
 H5/Js/Scbg.js |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/H5/Js/Scbg.js b/H5/Js/Scbg.js
index d308bec..b12a9e1 100644
--- a/H5/Js/Scbg.js
+++ b/H5/Js/Scbg.js
@@ -80,6 +80,7 @@
             if (staf.length > 0) {
                 this.stafName = staf[0].staffName;
                 this.stafId = staf[0].staffNo;
+                this.$refs.barcode.focus();
             } else {
                 this.$toast("鏈壘鍒板尮閰嶇殑 staffName");
             }
@@ -87,12 +88,54 @@
             //this.$toast(item.name);
 
         },
-        getBarcode(value) {
-
-            this.barcode = value;
+        getStaff() {
 
             var that = this;
             that.isLoading = true;
+            that.AxiosHttp("post", 'MesStaff/GetList', {
+                //name: that.userInfo.loginAccount,
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.actions = json.data.tbBillList.map(item => {
+                            return { name: item.staffName }
+                        });
+
+                        that.stafList = json.data.tbBillList;
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    console.log(error);
+                });
+            // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
+            // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
+
+            let staf = that.stafList.filter(it => it.staffNo === that.stafId);
+
+            if (staf.length > 0) {
+                that.stafName = staf[0].staffName;
+                that.stafId = staf[0].staffNo;
+                that.$refs.barcode.focus();
+            } else {
+                that.$toast("鏈壘鍒板尮閰嶇殑 鐢ㄦ埛鍚嶇О");
+            }
+            //this.GetMesItemBlDetailByBillNo();
+            //this.$toast(item.name);
+
+        },
+        getBarcode() {
+
+            //this.barcode = value;
+
+            var that = this;
+            
 
             if (!that.userInfo.loginAccount) {
                 this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�");
@@ -106,9 +149,10 @@
 
             if (!that.stafId) {
                 that.$toast.fail("鍛樺伐涓嶅厑璁镐负绌�");
+                return;
             }
 
-
+            that.isLoading = true;
             that.AxiosHttp("post", 'MesWorkProd/ScanWork', {
                 userNo: that.userInfo.loginAccount,
                 itemBarcode: that.barcode,
@@ -118,7 +162,7 @@
                     var json = res;
                     if (json.status == 0) {
 
-                        let entity = json.data.tbBillList;
+                        let entity = json.data.result;
                         that.taskNo = entity.taskNo; //宸ュ崟鍙�
                         that.itemNo = entity.itemNo; //鐗╂枡缂栧彿
                         that.planQty = entity.planQty; //璁″垝鏁伴噺
@@ -128,9 +172,13 @@
                         that.itemName = entity.itemName; //鐗╂枡鍚嶇О
                         that.itemModel = entity.itemModel; //鐗╂枡鍨嬪彿
                         that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+                        that.$refs.barcode.focus();
+                        that.barcode = null;
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                        that.barcode = null;
                     }
                     that.isLoading = false;
                 })

--
Gitblit v1.9.3