南骏 池
2025-08-31 fcbd686eebfe5962d22fe169d1a24e7b30a34ccb
1.销售退货优化——hyx
2.销售出库优化——hyx
3.库位查询——cdk
已修改4个文件
已添加3个文件
477 ■■■■ 文件已修改
H5/Js/Kwcx.js 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Xsck.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Kwcx.aspx 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Kwcx.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scll.aspx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Xsck.aspx 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Xsth.aspx 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Kwcx.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,164 @@
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            modeInfo: { deptSectionCode: "", rkDate: "" }, // å…¥åº“日期默认空
            scanInfo: { barcode: "", itemNo: "", itemName: "", itemModel: "", depotCode: "", depotName: "", sectionCode: "", sectionName: "", oldqty: "", quantity: "" },
            barInfoList: [],
            selectKW: "",
            tbKWInfo: [],
            tbItemInfo: [],
            actions: [],
            show: false,
            zkChecked: false,
            showDatePicker: false,
            tempDate: new Date(), // æ—¥æœŸé€‰æ‹©å™¨é»˜è®¤ä»Šå¤©
            itemNo: { barCode: "", itemNo: "" }, // å…¥åº“日期默认空
        }
    },
    mounted() {
        var that = this;
        this.userInfo = {
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
    },
    watch: {
        showDatePicker(val) {
            if (val) {
                // å¼¹çª—打开时,重置为当天
                this.tempDate = new Date();
            }
        }
    },
    methods: {
        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.modeInfo.rkDate = this.formatDate(date);
            this.showDatePicker = false;
            this.getBarInfoListModel();
        },
        getBarInfoListModel() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesKwcx/GetBarInfoList', {
                deptSectionCode: that.modeInfo.deptSectionCode,
                rkDate: that.modeInfo.rkDate,
                zkChecked: that.zkChecked
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.barInfoList = json.data.tbBarInfoList;
                    } else {
                        that.barInfoList = [];
                    }
                    that.isLoading = false;
                })
                .catch(function () {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                });
        },
        getScan() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesKwcx/GetBarInfo', {
                barcode: that.scanInfo.barcode
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        Object.assign(that.scanInfo, json.data.tbBarInfo);
                    } else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function () {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                });
        },
        getKWInfo() {
            var that = this;
            that.show = true;
            that.actions = [];
            that.isLoading = true;
            that.AxiosHttp("post", 'MesKwcx/GetKWList', {
                selectKW: that.selectKW
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0 && json.data.tbKWList.length > 0) {
                        that.actions = json.data.tbKWList.map(item => ({ name: item.code }));
                    } else {
                        that.$toast.fail("没有可用的数据");
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function () {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                });
        },
        onSelect(item) {
            var that = this;
            that.show = false;
            that.isLoading = true;
            that.selectKW = item.name;
            that.AxiosHttp("post", 'MesKwcx/GetKWInfo', {
                code: item.name
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.tbKWInfo = json.data.tbKWInfo;
                    } else {
                        that.tbKWInfo = [];
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function () {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                });
        },
        getItemInfoListModel() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesKwcx/GetItemInfoList', {
                barCode: that.itemNo.barCode,
                itemNo: that.itemNo.itemNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.tbItemInfo = json.data.tbItemInfo;
                    } else {
                        that.tbItemInfo = [];
                    }
                    that.isLoading = false;
                })
                .catch(function () {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    //that.$playSound('error');
                });
        },
    }
});
H5/Js/Xsck.js
@@ -29,8 +29,8 @@
        };
    },
    methods: {
        //获取发货通知单号
        getInfo() {
            this.show = true;
            var that = this;
            that.isLoading = true
@@ -47,11 +47,11 @@
                            that.actions = json.data.tbBillList.map(item => {
                                return { name: item }
                            });
                        }
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.show = false;
                    }
                    that.isLoading = false;
                })
@@ -67,6 +67,7 @@
        //    this.$notify({ type: 'success', message: '某某物料扫码成功某某物料扫码成功某某物料扫码成功某某物料扫码成功' });
        //},
        //点击事件
        onSelect(item) {
            // é»˜è®¤æƒ…况下点击选项时不会自动收起
            // å¯ä»¥é€šè¿‡ close-on-click-action å±žæ€§å¼€å¯è‡ªåŠ¨æ”¶èµ·
@@ -77,6 +78,7 @@
            //this.$toast(item.name);
        },
        //根据发货通知单号获取明细
        GetMesItemDetailByBillNo() {
            var that = this;
            that.isLoading = true;
@@ -110,6 +112,7 @@
                    that.ItemBlDetail = [];
                });
        },
        //扫码
        getBarcode() {
            //this.barcode = value;
@@ -155,7 +158,6 @@
                        that.barcode = null;
                        that.sms = null;
                        that.num = null;
                        //that.ItemBlDetail = json.data.tbBillList.item2
                        that.$notify({ type: 'success', message: '扫描成功' });
                        that.GetMesItemDetailByBillNo();
                        that.$refs.barcode.focus();
@@ -188,6 +190,7 @@
                    that.splitNum = "";
                });
        },
        //条码拆分
        tmcf() {
            //this.show = true;
H5/Kwcx.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,143 @@
<%@ Page Title="库位查询" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Kwcx.aspx.cs" Inherits="H5_Kwcx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <div class="content-wrapper">
        <van-nav-bar
            title="库位查询"
            left-text="返回"
            left-arrow
            @click-left="GoBack()">
        </van-nav-bar>
        <van-tabs color="#000" title-active-color="#0283EF">
            <!-- åº“位物料 -->
            <van-tab title="库位物料" class="mySolid font">
                <van-cell-group>
                    <van-field
                        v-model="modeInfo.deptSectionCode"
                        label="库位"
                        clearable
                        placeholder="请扫码"
                        @keyup.enter.native="getBarInfoListModel">
                        <template #extra>
                            <span style="margin-right:8px">在库</span>
                            <van-checkbox
                                v-model="zkChecked"
                                shape="round"
                                icon-size="18px"
                                @change="getBarInfoListModel"></van-checkbox>
                        </template>
                    </van-field>
                    <van-field
                        v-model="modeInfo.rkDate"
                        label="入库日期"
                        clearable
                        placeholder="请选择日期"
                        readonly
                        @click="showDatePicker = true">
                    </van-field>
                    <van-popup v-model="showDatePicker" position="bottom">
                        <van-datetime-picker
                            type="date"
                            v-model="tempDate"
                            @confirm="onDateConfirm"
                            @cancel="showDatePicker = false" />
                    </van-popup>
                </van-cell-group>
                <van-row>
                    <van-col span="6" class="text-left padding-left">物料编码</van-col>
                    <van-col span="8" class="text-left padding-left">物料名称</van-col>
                    <van-col span="7">条码</van-col>
                    <van-col span="3">数量</van-col>
                </van-row>
                <van-row v-for="(itm,index) in barInfoList" :key="index">
                    <van-col span="6" class="text-left padding-left">{{itm.itemNo}}</van-col>
                    <van-col span="8" class="text-left padding-left">{{itm.itemName}}</van-col>
                    <van-col span="7" class="blue-text">{{itm.itemBar}}</van-col>
                    <van-col span="3">{{itm.quantity}}</van-col>
                </van-row>
            </van-tab>
            <!-- ç©ºåº“位 -->
            <van-tab title="空库位" class="mySolid font">
                <van-cell-group>
                    <van-field
                        v-model="selectKW"
                        label="仓库查询"
                        clearable
                        placeholder="请选择仓库">
                        <template #button>
                            <van-button size="small" type="info" plain @click="getKWInfo">选择</van-button>
                        </template>
                    </van-field>
                </van-cell-group>
                <van-row>
                    <van-col span="6" class="text-left padding-left">库位编码</van-col>
                    <van-col span="18" class="text-left padding-left">库位名称</van-col>
                </van-row>
                <van-row v-for="(itm,index) in tbKWInfo" :key="index">
                    <van-col span="6" class="text-left padding-left">{{itm.code}}</van-col>
                    <van-col span="18" class="text-left padding-left">{{itm.name}}</van-col>
                </van-row>
            </van-tab>
            <!-- æ¡ç æŸ¥è¯¢ -->
            <van-tab title="条码查询" class="mySolid font">
                <van-cell-group>
                    <van-field v-model="scanInfo.barcode" label="条码" clearable placeholder="请扫码" @keyup.enter.native="getScan"></van-field>
                    <van-field v-model="scanInfo.barcode" label="物料条码" readonly></van-field>
                    <van-field v-model="scanInfo.itemNo" label="物料编码" readonly></van-field>
                    <van-field v-model="scanInfo.itemName" label="物料名称" readonly></van-field>
                    <van-field v-model="scanInfo.itemModel" label="规格" readonly></van-field>
                    <van-field v-model="scanInfo.depotCode" label="仓库编号" readonly></van-field>
                    <van-field v-model="scanInfo.depotName" label="仓库名称" readonly></van-field>
                    <van-field v-model="scanInfo.sectionCode" label="储位编号" readonly></van-field>
                    <van-field v-model="scanInfo.sectionName" label="储位名称" readonly></van-field>
                    <van-field v-model="scanInfo.oldqty" label="初始数量" readonly></van-field>
                    <van-field v-model="scanInfo.quantity" label="库存数量" readonly></van-field>
                </van-cell-group>
            </van-tab>
            <!-- ç¼–码查询 -->
            <van-tab title="编码查询" class="mySolid font">
                <van-cell-group>
                    <van-field
                        v-model="itemNo.barCode"
                        label="物料条码"
                        clearable
                        placeholder="请扫描物料条码"
                        @keyup.enter.native="getItemInfoListModel">
                    </van-field>
                    <van-field
                        v-model="itemNo.itemNo"
                        label="物料编码"
                        clearable
                        placeholder="请输入物料编码"
                        @keyup.enter.native="getItemInfoListModel">
                    </van-field>
                </van-cell-group>
                <van-row>
                    <van-col span="10" class="text-left padding-left">物料编码</van-col>
                    <van-col span="8" class="text-left padding-left">库位</van-col>
                    <van-col span="6" class="text-left padding-left">数量</van-col>
                </van-row>
                <van-row v-for="(itm,index) in tbItemInfo" :key="index">
                    <van-col span="10" class="text-left padding-left">{{itm.itemNo}}</van-col>
                    <van-col span="8" class="text-left padding-left">{{itm.sectionCode}}</van-col>
                    <van-col span="6" class="text-left padding-left">{{itm.quantity}}</van-col>
                </van-row>
            </van-tab>
        </van-tabs>
        <van-action-sheet v-model="show" :actions="actions" @select="onSelect"></van-action-sheet>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <comloading v-if="isLoading"></comloading>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
    <script src="Js/Kwcx.js?<%=12366151 %>"></script>
</asp:Content>
H5/Kwcx.aspx.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class H5_Kwcx : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
H5/Scll.aspx
@@ -8,6 +8,11 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <van-notice-bar
    :scrollable="false"
    :text="'当前组织:' + (Cookies.get('orgName') || '暂无组织信息')"
    style="height: 0.5rem; line-height: 0.5rem; padding: 0 0.16rem"
/></van-notice-bar>
    <div class="content-wrapper">
        <van-nav-bar
            title="生产备料"
@@ -16,6 +21,7 @@
            @click-left="GoBack()">
        </van-nav-bar>
        <div class="mySolid">
            <van-cell-group>
                <van-field
H5/Xsck.aspx
@@ -62,30 +62,49 @@
</van-cell-group>
    </div>
    <div  class="van-tab-left">
              <van-tabs <%--@click="onClick"--%> color="#000" title-active-color="#0283EF" >
  <van-tab title="待发物料" class="mySolid font">
<%--    <van-row v-for="value in ItemBlDetail" class="font">
          <van-col span="12">物料:{{value.itemNo}}</van-col>
          <van-col span="6">申请数{{value.bld007}}</van-col>
          <van-col span="6">已领数{{value.bld008}}</van-col>
    </van-row>--%>
<van-tabs color="#000" title-active-color="#0283EF">
    <van-tab title="待扫物料" class="mySolid font">
        <van-row>
        <van-col span="12" class="text-left padding-left">物料</van-col>
         <van-col span="6">需领</van-col>
        <van-col span="6">已扫</van-col>
</van-row>
<van-row  v-for="value in ItemBlDetail" class="font">
      <van-col span="12"  class="text-left padding-left">
           <div>{{value.itemNo}}</div>
           <div>{{value.itemName}}</div>
      </van-col>
      <van-col span="6">{{value.fQty}}</van-col>
     <van-col span="6">{{value.sQty || 0}}</van-col>
</van-row>
  </van-tab>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <van-col span="3">待扫</van-col>
            <van-col span="5">推荐库位</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemBlDetail.items" :key="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-row>
    </van-tab>
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <van-col span="3">需领数</van-col>
            <van-col span="5">已领数</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemBlDetail.ysitems" :key="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">{{itm.fQty}}</van-col>
            <van-col span="5" class="blue-text">{{itm.sQty}}</van-col>
        </van-row>
    </van-tab>
</van-tabs>
    </div>
    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
H5/Xsth.aspx
@@ -69,46 +69,46 @@
    </div>
 <van-tabs color="#000" title-active-color="#0283EF">
  <van-tab title="待扫物料" class="mySolid font">
    <van-row>
        <van-col span="8" class="text-left padding-left">物料</van-col>
        <van-col span="8" class="text-left padding-left">规格</van-col>
        <van-col span="8">待入库数</van-col>
        <%--<van-col span="4">条码张数</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-col>
        <van-col span="8" class="text-left padding-left">
            <div>{{itm.itemModel}}</div>
        </van-col>
        <van-col span="8" class="blue-text">{{itm.dsQty}}</van-col>
        <%--<van-col span="4">{{itm.recoKw}}</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>
        <van-col span="8" class="text-left padding-left">规格</van-col>
             <%--<van-col span="4">需求数</van-col>--%>
            <van-col span="8">已入库数</van-col>
<van-tabs color="#000" title-active-color="#0283EF">
    <van-tab title="待扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <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-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="4">{{itm.fQty}}</van-col>--%>
           <van-col span="8" class="blue-text">{{itm.sQty}}</van-col>
       </van-row>
   </van-tab>
        <van-row v-for="(itm,index) in ItemTblDetail.items" :key="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-row>
    </van-tab>
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
            <van-col span="3">需领数</van-col>
            <van-col span="5">已领数</van-col>
        </van-row>
        <van-row v-for="(itm,index) in ItemTblDetail.ysitems" :key="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">{{itm.fQty}}</van-col>
            <van-col span="5" class="blue-text">{{itm.sQty}}</van-col>
        </van-row>
    </van-tab>
</van-tabs>
    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>