南骏 池
2025-08-06 53e6c4d418f35384b40b090ab03b53768d5c21a1
H5/Js/Scbg.js
@@ -35,6 +35,30 @@
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
        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);
            });
    },
    methods: {
        getInfo() {
@@ -80,6 +104,7 @@
            if (staf.length > 0) {
                this.stafName = staf[0].staffName;
                this.stafId = staf[0].staffNo;
                this.$refs.barcode.focus();
            } else {
                this.$toast("未找到匹配的 staffName");
            }
@@ -87,9 +112,51 @@
            //this.$toast(item.name);
        },
        getBarcode(value) {
        getStaff() {
            this.barcode = value;
            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;
            
@@ -129,10 +196,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;
                })