cdk
2025-09-03 3a1e23d5e5945523b15fec6b7fad9d0d3ae231ee
生产补料增加筛选,库位查询增加组织
已修改3个文件
169 ■■■■■ 文件已修改
H5/Js/Scbl.js 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Kwcx.aspx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scbl.aspx 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Scbl.js
@@ -16,10 +16,20 @@
            barcode: "",
            ItemBlDetail:[],
            modeInfo: [],
            queryInfo: { dateTime: "", lineNo: "", lineName: "" },
            active: 0,
            show: false,
            show1:false,
            actions: [],
            actions1: [],
            ItemDetail: [],
            minDate: new Date(new Date().getFullYear() - 1, 0, 1),  // 过去一年
            maxDate: new Date(new Date().getFullYear() + 1, 11, 31), // 未来一年
            showScDatePicker: false,
            tempDate: new Date(),
            showDatePicker: false,
            ItemBarKw: [],
            currentIndex: -1,
        }
    },
    mounted() {
@@ -32,16 +42,72 @@
        selectType = this.type == "bl" ? selectType = "生产补料" : selectType = "生产超领";
    },
    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/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 = [];
                });
        },
        formatDate(date) {
            const d = new Date(date);
            console.log(d);
            return `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`;
        },
        onDateConfirm(date) {
            this.queryInfo.dateTime = this.formatDate(date);
            this.showDatePicker = false;
        },
        getInfo() {
            this.show = true;
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesItemBl/GetSCBLBillNo', {
                type: selectType,
                dateTime: that.queryInfo.dateTime,
                lineNo: that.queryInfo.lineNo
            }, false)
                .then(function (res) {
                    var json = res;
@@ -75,6 +141,11 @@
            //this.$toast(item.name);
        },
        onSelect1(actions1) {
            this.queryInfo.lineNo = actions1.lineNo;
            this.show1 = false;
            this.queryInfo.lineName = actions1.name;
        },
        GetMesItemBlDetailByBillNo() {
            var that = this;
            that.isLoading = true;
@@ -87,7 +158,11 @@
                    if (json.status == 0) {
                        that.ItemDetail = json.data.tbBillList;
                        that.daa001 = json.data.tbBillList.daa001;
                        console.log(json.data.tbBillList.daa001);
                        console.log(json.data.tbBillList.items);
                        that.$refs.barcode.focus();
                        that.currentIndex = -1;
                        that.ItemBarKw = [];
                    }
                    else {
                        that.$toast.fail(json.message);
@@ -108,6 +183,34 @@
                    that.ItemBlDetail = [];
                });
        },
        getLineInfo() {
            var that = this;
            that.show1 = true;
            that.actions = [];
            that.isLoading = true;
            that.AxiosHttp("post", 'MesItemBl/GetLineInfo', {
                selectLine: that.selectLine
            }, false)
                .then(function (res) {
                    var json = res;
                    console.log(json);
                    if (json.status == 0 && json.data.tbLineInfo.length > 0) {
                        that.actions1 = json.data.tbLineInfo.map(item => ({
                            name: item.lineName,
                            lineNo: item.lineNo
                        }));
                    } else {
                        that.$toast.fail("没有可用的数据");
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function () {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                });
        },
        getBarcode() {
            // 添加防抖判断
            if (this.isLoading) {
H5/Kwcx.aspx
@@ -3,6 +3,11 @@
</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>
    <div class="content-wrapper">
        <van-nav-bar
            title="库位查询"
H5/Scbl.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="type=='cl'?'生产超领':'生产补料'"
          left-text="返回"
@@ -16,6 +21,32 @@
        ></van-nav-bar>
        <div class="content-wrapper">
        <van-cell-group>
    <van-field
        v-model="queryInfo.dateTime"
        label="单据日期"
        clearable
        placeholder="请选择日期"
        readonly
        @click="showDatePicker = true">
    </van-field>
    <van-popup v-model="showDatePicker" position="bottom">
        <van-datetime-picker
            type="date"
            v-model="tempDate"
            :min-date="minDate"
            :max-date="maxDate"
            @confirm="onDateConfirm"
            @cancel="showDatePicker = false" />
    </van-popup>
    <van-field
        v-model="queryInfo.lineName"
        label="生产线别"
        clearable
        placeholder="请选择生产线别">
        <template #button>
            <van-button size="small" type="info" plain @click="getLineInfo">选择</van-button>
        </template>
    </van-field>
  <van-field
      ref="billNo"
    value=""
@@ -78,7 +109,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 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>
@@ -90,6 +123,25 @@
            <van-col span="5">{{itm.recoKw}}</van-col>
        </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>
@@ -113,6 +165,7 @@
</van-tabs>
    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
    <van-action-sheet v-model="show1" :actions="actions1" @select="onSelect1"></van-action-sheet>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
@@ -120,5 +173,5 @@
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="Js/Scbl.js?<%=1231811111 %>"></script>
 <script src="Js/Scbl.js?<%=1231887111 %>"></script>
</asp:Content>