快乐的昕的电脑
2025-09-25 bd45dcf1a3c3c45522de26ab1e016ca694d66164
1.调拨出库:列表选择改为存储过程、添加组织隔离、添加库位列表
已修改2个文件
99 ■■■■■ 文件已修改
H5/Dbck.aspx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Dbck.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Dbck.aspx
@@ -8,6 +8,11 @@
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
                <van-notice-bar
    :scrollable="false"
    :text="'当前组织:' + (Cookies.get('orgName') || '暂无组织信息')"
    class="org-info"
/></van-notice-bar>
        <van-nav-bar
          title="调拨出库"
          left-text="返回"
@@ -82,7 +87,9 @@
            <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-row v-for="(itm,index) in ItemBlDetail" :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>
@@ -95,6 +102,25 @@
        </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="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>
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
@@ -102,7 +128,7 @@
            <van-col span="3">需领数</van-col>
            <van-col span="5">已领数</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index">
        <van-row v-for="(itm,index) in ItemYsDetail" :key="index">
            <van-col span="8" class="text-left padding-left">
                <div class="blue-text">{{itm.itemNo}}</div>
                <div>{{itm.itemName}}</div>
@@ -123,5 +149,5 @@
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="Js/Dbck.js?<%=123111114 %>"></script>
 <script src="Js/Dbck.js?<%=1231111111 %>"></script>
</asp:Content>
H5/Js/Dbck.js
@@ -12,7 +12,13 @@
            fum: "",
            billNo: "",
            barcode:"",
            ItemBlDetail:[],
            ItemBlDetail: [], // 待扫
            ItemYsDetail: [], // 已扫
            ItemDetail: [],
            ItemBarKw: [],
            currentIndex: -1,
            modeInfo: [],
            active: 0,
            show: false,
@@ -29,6 +35,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: 'DBCK',//调拨出库
                    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;
@@ -71,6 +127,8 @@
            this.show = false;
            this.billNo = item.name;
            // 清空库位列表
            this.ItemBarKw = [];
            this.GetMesItemBlDetailByBillNo();
            //this.$toast(item.name);
@@ -84,7 +142,10 @@
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemDetail = json.data.tbBillList;
                        //that.ItemDetail = json.data.tbBillList;
                        var tbBillList = json.data.tbBillList || {};
                        that.ItemBlDetail = tbBillList.blDetails || []; // 待扫
                        that.ItemYsDetail = tbBillList.ysDetails || []; // 已扫
                        that.$refs.barcode.focus();
                        that.barcode = "";
                    }
@@ -144,7 +205,7 @@
                        ////that.fum = json.data.form.fum;
                        //that.ItemBlDetail = json.data.items
                        that.$notify({ type: 'success', message: '扫码成功' });
                        that.$toast.success("扫描成功");
                        that.$refs.barcode.focus();
                        that.barcode = "";
                        //that.GetMesItemBlDetailByBillNo();