南骏 池
2025-08-22 f54c3abfad2f9421dcfff04b06e1621752e97631
1.生产领料库位信息查询
已修改2个文件
108 ■■■■■ 文件已修改
H5/Js/Scll.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scll.aspx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Scll.js
@@ -24,6 +24,11 @@
            //    { printerId: 'Printer2', ipAddress: '192.168.1.2' },
            //    { printerId: 'Printer3', ipAddress: '192.168.1.3' }
            //], // 打印机列表
            // 当前选中行的索引
            currentIndex: -1,
            // 存储选中行数据对象
            selItem: {} ,
            ItemBarKw: [],//当天行相关条码库位信息
        }
    },
    mounted() {
@@ -34,6 +39,62 @@
        };
    },
    methods: {
        /**
         * 处理行点击事件(单选逻辑)
         * @param {Object} item 当前行数据
         * @param {Number} index 当前行索引
         */
        handleRowClick(item, index) {
            if (this.isLoading) {
                return;
            }
            // 重置所有行的选中状态
            this.currentIndex = -1;
            // 设置当前选中行
            this.currentIndex = index;
            this.selItem = {
                itemid: item.fMaterialId,
                index: index
            };
            console.log('当前选中项:', this.selItem); // 调试用
            this.GetBarKwByItem();
        },
        GetBarKwByItem() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/GetBarKwByItem', {
                itemId: that.selItem.itemid,
                userName: that.userInfo.loginAccount
            }, 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 = [];
                });
        },
        getModel() {
            var that = this;
            that.isLoading = true;
@@ -47,9 +108,13 @@
                        that.ItemDetail = json.data.tbBillList;
                        that.modeInfo.planNo = json.data.tbBillList.planNo;
                        that.$refs.barcode.focus();
                        // 重置所有行的选中状态
                        that.currentIndex = -1;
                        that.ItemBarKw = [];
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                        that.$refs.daa001.focus();
                        that.modeInfo.daa001 = "";
                        that.modeInfo.planNo = "";
@@ -60,6 +125,7 @@
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                    that.$refs.daa001.focus();
                    that.modeInfo.daa001 = "";
H5/Scll.aspx
@@ -97,16 +97,40 @@
                    <van-col span="3">待扫</van-col>
                    <van-col span="5">推荐库位</van-col>
                </van-row>
                <van-row v-for="(itm,index) in ItemDetail.items" :key="index">
                    <van-col span="8" class="text-left padding-left">
                        <div class="blue-text">{{itm.itemNo}}</div>
                        <div>{{itm.itemName}}</div>
                <van-row
                        v-for="(itm,index) in ItemDetail.items"
                        :key="index"
                        :style="{ background: currentIndex === index ? '#87CEEB' : '' }"
                        @click.native="handleRowClick(itm, index)">
                        <van-col span="8" class="text-left padding-left">
                            <div class="blue-text">{{itm.itemNo}}</div>
                            <div>{{itm.itemName}}</div>
                        </van-col>
                        <van-col span="8" class="text-left padding-left">
                            <div>{{itm.itemModel}}</div>
                        </van-col>
                        <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col>
                        <van-col span="5">{{itm.recoKw}}</van-col>
                    </van-col>
                    <van-col span="8" class="text-left padding-left">
                        <div>{{itm.itemModel}}</div>
                </van-row>
            </van-tab>
            <van-tab title="库位列表" class="mySolid font">
                <van-row>
                    <van-col span="10" class="text-left padding-left">条码编号</van-col>
                    <van-col span="5" class="text-left padding-left">库位</van-col>
                    <van-col span="4">数量</van-col>
                    <van-col span="5">仓库</van-col>
                </van-row>
                <van-row v-for="(itm,index) in ItemBarKw" :key="index">
                    <van-col span="10" class="text-left padding-left">
                        <div class="blue-text">{{itm.iteM_BARCODE}}</div>
                    </van-col>
                    <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col>
                    <van-col span="5">{{itm.recoKw}}</van-col>
                    <van-col span="5" class="text-left padding-left">
                        <div>{{itm.depoT_SECTIONS_CODE}}</div>
                    </van-col>
                    <van-col span="4" class="blue-text">{{itm.quantity}}</van-col>
                    <van-col span="5" >{{itm.depot_name}}</van-col>
                </van-row>
            </van-tab>
@@ -138,5 +162,5 @@
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
    <script src="Js/Scll.js?<%=123336155 %>"></script>
    <script src="Js/Scll.js?<%=123336158 %>"></script>
</asp:Content>