快乐的昕的电脑
昨天 b2e686b478559df3a3b7cf9b9960050a7f99b91d
H5/Js/Qtck.js
@@ -20,6 +20,9 @@
            ItemDetail: [],
            splitNum: "",
            zdy: "",
            ItemTblDetail: [],
            ItemBarKw: [],
            currentIndex: -1,
        }
    },
    mounted() {
@@ -30,6 +33,55 @@
        };
    },
    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();
        },
        GetBarKwByItem() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/GetBarKwByItemCK', {
                itemId: that.selItem.itemid,
                userName: that.userInfo.loginAccount,
                type: 'QTCK',
                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;
@@ -74,6 +126,8 @@
            this.show = false;
            this.billNo = item.name;
            // 清空库位列表
            this.ItemBarKw = [];
            this.GetMesItemBlDetailByBillNo();
            //this.$toast(item.name);