H5/Js/Sttl.js
@@ -14,11 +14,16 @@
            selectType: "",
            daa001: "",
            barcode: "",
            ItemBlDetail:[],
            modeInfo: [],
            active: 0,
            show: false,
            actions: [],
            ItemBlDetail: [], // 待扫
            ItemYsDetail: [], // 已扫
            ItemTblDetail: [],
            ItemDetail: [],
            ItemBarKw: [],
            currentIndex: -1,
        }
    },
    mounted() {
@@ -29,6 +34,56 @@
        };
    },
    methods: {
        handleRowClick(item, index) {
            if (this.isLoading) {
                return;
            }
            // 重置所有行的选中状态
            this.currentIndex = -1;
            // 设置当前选中行
            this.currentIndex = index;
            this.selItem = {
                itemid: item.itemId,
                index: index
            };
            console.log('当前选中项:', this.selItem); // 调试用
            this.GetBarKwByItem();
            //this.active = 1;            //自动切换到库位列表tab
        },
        GetBarKwByItem() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/GetBarKwByItemCK', {
                itemId: that.selItem.itemid,
                userName: that.userInfo.loginAccount,
                type: 'STCK',//受托退料/受托出库
                billNo: that.billNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBarKw = json.data.tbBillList;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.ItemBarKw = [];
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                    that.ItemBarKw = [];
                });
        },
        getInfo() {
            
            this.show = true;
@@ -65,7 +120,7 @@
        //onClick(index, title) {
        //    this.$toast(`${index} ${title}`);
        //    this.$notify({ type: 'success', message: '某某物料扫码成功某某物料扫码成功某某物料扫码成功某某物料扫码成功' });
        //that.$playSound('success');
        //},
        onSelect(item) {
            // 默认情况下点击选项时不会自动收起
@@ -73,6 +128,8 @@
            this.show = false;
            this.billNo = item.name;
            // 清空库位列表
            this.ItemBarKw = [];
            this.GetMesItemDetailByBillNo();
            //this.$toast(item.name);
@@ -87,8 +144,10 @@
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.tbBillList;
                        //that.daa001 = json.data.tbBillList.item1;
                        //that.ItemBlDetail = json.data.tbBillList;
                        var tbBillList = json.data.tbBillList || {};
                        that.ItemBlDetail = tbBillList.blDetails || []; // 待扫
                        that.ItemYsDetail = tbBillList.ysDetails || []; // 已扫
                        that.$refs.barcode.focus();
                    }
                    else {
@@ -146,6 +205,7 @@
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                daa001: that.billNo,
                billNo: that.billNo,
                //type: selectType
            }, false)
                .then(function (res) {
@@ -157,17 +217,27 @@
                        that.num = null;
                        //that.ItemBlDetail = json.data.tbBillList.item2
                        that.$notify({ type: 'success', message: '扫描成功' });
                        that.$playSound('success');
                        that.GetMesItemDetailByBillNo();
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        that.num = "";
                        that.splitNum = "";
                        that.GetBarKwByItem();                        // 退料后刷新库位
                        
                    } else if (json.status == 2) {
                        //使用tbBillList
                        //that.$refs.splitNum.focus();
                        //that.splitNum = json.data.cfNum;
                        //that.num = json.data.num;
                        that.$refs.splitNum.focus();
                        that.splitNum = json.data.cfNum;
                        that.num = json.data.num;
                        that.splitNum = json.data.tbBillList.splitNum; // 拆分数量
                        that.num = json.data.tbBillList.barcodeNum;    // 条码数量
                        that.daa001 = json.data.tbBillList.daa001;     // 工单号
                        if (json.data.tbBillList.billNo) {
                            that.billNo = json.data.tbBillList.billNo;
                        }     // 发货通知单号,只在有值时赋值
                    }
                    else {
                        that.$toast.fail(json.message);
@@ -212,11 +282,11 @@
                return;
            }
            if (!that.daa001) {
                this.$toast.fail("工单号不能为空");
                that.isLoading = false;
                return;
            }
            //if (!that.daa001) {
            //    this.$toast.fail("工单号不能为空");
            //    that.isLoading = false;
            //    return;
            //}
            if (!that.splitNum) {
                this.$toast.fail("发货数量不能为空");
@@ -227,7 +297,8 @@
            that.AxiosHttp("post", 'MesSttl/SplitBarcode', {
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                daa001: that.billNo,
                daa001: that.daa001,
                billNo: that.billNo,
                num: that.splitNum,
                //type: selectType
            }, false)
@@ -236,11 +307,14 @@
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.pendingList;
                        that.$notify({ type: 'success', message: '扫描成功' });
                        that.$playSound('success');
                        that.sendPrintMessage(json.data.tbBillList);//打印
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        that.num = "";
                        that.splitNum = "";
                        that.GetMesItemDetailByBillNo();
                        that.GetBarKwByItem();// 退料后刷新库位
                    }
                    else {
                        that.$toast.fail(json.message);