zhaowc
2024-08-30 9176aaed52f030ccb9e00be157f893633153d1ca
PDA平库出库页根据出库单加载托盘所在位置
6个文件已修改
85 ■■■■ 已修改文件
Pda/View/SoSetting/pingKuOut.html 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/ModelDto/PdaDto/PdaSoDto.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.Entity/BllSoEntity/BllExportAllot.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaSoController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/SoSetting/pingKuOut.html
@@ -110,19 +110,23 @@
                <img src="/assets/fengexian.png">
            </div>
            <div class="layout-tbl-paging" id="" style="display: none;">
            <div class="layout-tbl-paging" id="" >
                <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
                    <tr>
                        <th lang>托盘码</th>
                        <th lang>物料号</th>
                        <th lang>物料名称</th>
                        <th lang>批次号</th>
                        <th lang>库位地址</th>
                    </tr>
                    <tr id="boxCell" style="display: none">
                        <!-- <td name="PalletNo">托盘码</td> -->
                        <td name="PalletNo">托盘码</td>
                        <td name="SkuNo">物料号</td>
                        <td name="SkuName">物料名称</td>
                        <td name="LotNo">批次号</td>
                        <td name="LocatNo">库位地址</td>
                        <!-- <td name="del">
                                <div id="" class="tbl-btn-del" lang>
                                    删除
@@ -182,29 +186,39 @@
                //先更新一下出库单
                updateBillList(function (data) {
                    $('select[id="bar"]').next().addClass('layui-form-selected')
                    $('select[id="bar"]').next().find('.layui-select-title input').val(val)
                })
            })
            //初始化渲染 出库单
            function updateBillList() {
            function updateBillList(callback) {
                var input = $('select[id="bar"]').next().find('.layui-select-title input')
                var val = input.val()
                $("#bar").empty()
                $("#bar").append('<option value =>' + '</option>');
                form.render('select');
                var PalletNo =  $("#PalletNo").val();
                if(PalletNo == null && PalletNo == ""){ //下拉框获取平库出库单
                    synData(IP + "/PdaSo/GetSoNoticeList", 'post', function (res) {
                if(PalletNo.length != 8){ //下拉框获取平库出库单
                    var param = {
                        Type: "1",
                    };
                    synData(IP + "/PdaSo/GetRunNoticeList", param,'post', function (res) {
                        console.log(res);
                        if (res.code == 0) { //成功
                            console.log(res.data);
                            for (var i = 0; i < res.data.length; i++) {
                                if (i == 0) {
                                    $("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
                                } else {
                                    $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
                                }
                                $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i]
                                     +
                                    '</option>');
                            }
                            form.render('select');
                            if (!val) {
                                $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
                            } else {
                                var sel = 'dd[lay-value=' + val + ']';
                                $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
                            }
                            callback(res.data)
                        } else { //不成功
                            layer.msg(res.msg, {
@@ -285,16 +299,18 @@
                var arrTrs = new Array()
                let idx = 0
                for (var i in list) {
                    console.log("list[i].LocatN:"+list[i].LocatNo);
                    // list[i].BoxCode
                    var tr = $("#boxCell").eq(0).clone();
                    tr.appendTo("#tableBoxList");
                    // tr.attr('id', list[i].BoxCode)
                    idx++;
                    tr.attr('index', idx)
                    // tr.find("td[name='PalletNo']").html(list[i].PalletNo);
                    tr.find("td[name='PalletNo']").html(list[i].PalletNo);
                    tr.find("td[name='SkuNo']").html(list[i].SkuNo);
                    tr.find("td[name='SkuName']").html(list[i].SkuName);
                    tr.find("td[name='LotNo']").html(list[i].LotNo);
                    tr.find("td[name='LocatNo']").html(list[i].LocatNo);
                    // var code = list[i].BoxCode
                    // //console.log("code is "+code)
Wms/Model/ModelDto/PdaDto/PdaSoDto.cs
@@ -18,9 +18,11 @@
    {
        public string BoxNo { get; set; }                     // 箱码/支码
        public decimal? Qty { get; set; }                       // 箱内数量 
        public string PalletNo { get; set; }
        public string SkuNo { get; set; }                   // 物料编码 
        public string SkuName { get; set; }                 // 物料名称
        public string LotNo { get; set; }                   // 批次 
        public string LocatNo { get; set; }
        public decimal? PickedQty { get; set; }                       // 箱内已拣数量
    }
    public class DetailIdSkuLotNo
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -686,6 +686,7 @@
            }
        }
        public List<BoxInfoDto> GetBoxInfoList(BoxInfoVm model, out int count)
        {
            try
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -86,7 +86,7 @@
        {
            if (type == "1")//平库出库获取单据
            {
                var allotList = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.Status == "1" ).Select(m => m.SONo).Distinct().Where(m => !string.IsNullOrWhiteSpace(m)).ToListAsync();
                var allotList = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && (m.Status == "1" || m.Status =="0")).Select(m => m.SONo).Distinct().Where(m => !string.IsNullOrWhiteSpace(m)).ToListAsync();
                return allotList;
            }
            //获取状态为待拣货或者部分拣货的出库单
@@ -1194,18 +1194,34 @@
        //获取平库托盘信息
        public async Task<List<BoxInfo>> GetPingKuInfoByPallet(string soNo, string palletNo)
        {
            var info = Db.Queryable<BllExportAllot>().Where(m => m.SONo == soNo && m.PalletNo == palletNo && m.IsDel == "0");
            var info = Db.Queryable<BllExportAllot>()
                .LeftJoin<DataStockDetail>((a, b) => a.PalletNo == b.PalletNo)
                .Where(a=>a.IsDel == "0" && (a.Status == "0"||a.Status =="1") && a.SONo == soNo)
                .GroupBy((a,b) => new { a.SkuNo, a.SkuName, a.LotNo, a.PalletNo,b.LocatNo }).Select((a,b) => new BoxInfo()
                {
                    PalletNo = a.PalletNo,
                    SkuNo = a.SkuNo,
                    SkuName = a.SkuName,
                    LotNo = a.LotNo,
                    LocatNo =  b.LocatNo
                }).ToListAsync();
            var data = await info;
            /*var a = info.First().LocatNo;
            if (await info.CountAsync() == 0)
            {
                throw Oops.Bah("未查询到托盘分配下发的信息");
            }
            var data = await info.GroupBy(m => new { m.SkuNo, m.SkuName, m.LotNo }).Select(m => new BoxInfo()
            var data = await info.GroupBy(a => new { a.SkuNo, a.SkuName, a.LotNo,a.PalletNo }).Select(a => new BoxInfo()
            {
                SkuNo = m.SkuNo,
                SkuName = m.SkuName,
                LotNo = m.LotNo
            }).ToListAsync();
                PalletNo = a.PalletNo,
                SkuNo = a.SkuNo,
                SkuName = a.SkuName,
                LotNo = a.LotNo
            }).ToListAsync();*/
            return data;
        }
Wms/WMS.Entity/BllSoEntity/BllExportAllot.cs
@@ -54,6 +54,12 @@
        /// Nullable:True
        /// </summary>           
        public string LotNo {get;set;}
        /// <summary>
        /// Desc:储位地址
        /// Default:
        /// Nullable:True
        /// </summary>
        public string LocatNo { get; set; }
        /// <summary>
        /// Desc:批次描述
Wms/Wms/Controllers/PdaSoController.cs
@@ -59,9 +59,9 @@
        }
        /// <summary>
        /// 获取单据列表
        /// 获取PDA平库出库单据列表
        /// </summary>
        /// <param name=""></param>
        /// <param name="type"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<List<string>> GetRunNoticeList(PdaSoVm model)