南骏 池
2025-05-20 e40e41d4078e11d734effb76e330e0b7e414b96d
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;
                })