Administrator
2024-03-05 b506c4535c62c4c5fd7c5b5c0bd7bb8b03390dbd
Merge branch 'master' into wxw
15个文件已修改
489 ■■■■ 已修改文件
HTML/views/ASNSetting/ArrivalNoticeDetail.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/SelMaterials.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportHandOutList.html 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNotice.html 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/AsnSetting/productEnterQuantity.html 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/ModelDto/DataDto/StockDetailDto.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs 149 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.Entity/DataEntity/DataStockDetail.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaAsnController.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -439,6 +439,7 @@
                active = {
                    add: function () {
                        var typeValue = $("#Type").val();
                        console.log(typeValue)
                        layer.open({
                            type: 2,
                            title: '添加明细',
HTML/views/ASNSetting/SelMaterials.html
@@ -32,6 +32,7 @@
                                    <option value="4">车间余料退回入库</option>
                                    <option value="5">其它入库</option>
                                    <option value="6">代储入库</option>
                                    <option value="7">寄存入库</option>
                                </select>
                            </div>
                        </div>
HTML/views/SOSetting/ExportHandOutList.html
@@ -95,6 +95,134 @@
                var repeatClick = true;
                var tableIns;
                refreshTable();
                //正常显示
                var colsa =
                [[
                    {
                        field: 'LocatNo',
                        title: '储位编码',
                        align: 'center',
                        width: 110,
                        fixed: 'left',
                    },{
                        field: 'PalletNo',
                        title: '托盘条码',
                        align: 'center',
                        width: 100,
                        fixed: 'left',
                    }, {
                        field: 'SkuNo',
                        title: '物品编码',
                        width: 100,
                        align: 'center',
                        fixed: 'left',
                    }, {
                        field: 'SkuName',
                        title: '物品名称',
                        minWidth: 200,
                        align: 'center',
                        fixed: 'left',
                    }, {
                        field: 'LotNo',
                        title: '批次',
                        align: 'center'
                    }, {
                        field: 'LotText',
                        title: '批次描述',
                        align: 'center',
                    }, {
                        field: 'Standard',
                        title: '物品规格',
                        align: 'center',
                        minWidth: 100
                    }, {
                        field: 'RoadwayNo',
                        title: '所属巷道',
                        align: 'center',
                        width: 100
                    }, {
                        field: 'Qty',
                        title: '库存数量',
                        width: 100,
                        fixed: 'right',
                        align: 'center',
                    }, {
                        field: 'ExportQty',
                        title: '出库数量',
                        align: 'center',
                        width: 100,
                        fixed: 'right',
                        edit: 'number',
                        event: 'dataNumber',
                    }
                ]];
                //寄存显示
                var colsb =
                [[
                    {
                        field: 'LocatNo',
                        title: '储位编码',
                        align: 'center',
                        width: 110,
                        fixed: 'left',
                    },{
                        field: 'PalletNo',
                        title: '托盘条码',
                        align: 'center',
                        width: 100,
                        fixed: 'left',
                    }, {
                        field: 'SkuNo',
                        title: '物品编码',
                        width: 100,
                        align: 'center',
                        fixed: 'left',
                    }, {
                        field: 'SkuName',
                        title: '物品名称',
                        minWidth: 200,
                        align: 'center',
                        fixed: 'left',
                    }, {
                        field: 'LotNo',
                        title: '批次',
                        align: 'center'
                    }, {
                        field: 'LotText',
                        title: '批次描述',
                        align: 'center',
                    }, {
                        field: 'Standard',
                        title: '物品规格',
                        align: 'center',
                        minWidth: 100
                    }, {
                        field: 'Demo',
                        title: '备注',
                        align: 'center',
                        width: 100
                    }, {
                        field: 'RoadwayNo',
                        title: '所属巷道',
                        align: 'center',
                        width: 100
                    },{
                        field: 'Qty',
                        title: '库存数量',
                        width: 100,
                        fixed: 'right',
                        align: 'center',
                    }, {
                        field: 'ExportQty',
                        title: '出库数量',
                        align: 'center',
                        width: 100,
                        fixed: 'right',
                        edit: 'number',
                        event: 'dataNumber',
                    }
                ]];
                function refreshTable() {
                    detailId = getQueryString('Id');
                    var param = {
@@ -107,12 +235,21 @@
                    };
                    sendData(IP + "/BllSo/GetHandOutList", param, 'post', function(res) {
                        if (res.code == 0) { //成功
                            var list = res.data;
                            $.extend(infoOptions, {
                                data: list
                            });
                            infoOptions.page = {
                                curr: 1
                            }
                            infoOptions.cols = colsa;
                            //判断单据明细信息是否为寄存明细
                            if(res.data[0].SkuNo == "100088")
                            {
                                infoOptions.cols = colsb;
                                // colsa = colsb;
                                console.log(colsa)
                            }
                            tableIns = table.render(infoOptions);
                        } else { //不成功
@@ -131,6 +268,7 @@
                        }
                    });
                }
                var infoOptions = {
                    elem: '#LAY-app-content-list',
                    height: 'full-160',
@@ -139,67 +277,10 @@
                    limit: pageCnt,
                    limits: pageLimits,
                    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                    cols: [
                        [ //标题栏
                            {
                                field: 'LocatNo',
                                title: '储位编码',
                                align: 'center',
                                width: 110,
                                fixed: 'left',
                            },{
                                field: 'PalletNo',
                                title: '托盘条码',
                                align: 'center',
                                width: 100,
                                fixed: 'left',
                            }, {
                                field: 'SkuNo',
                                title: '物品编码',
                                width: 100,
                                align: 'center',
                                fixed: 'left',
                            }, {
                                field: 'SkuName',
                                title: '物品名称',
                                minWidth: 200,
                                align: 'center',
                                fixed: 'left',
                            }, {
                                field: 'LotNo',
                                title: '批次',
                                align: 'center'
                            }, {
                                field: 'LotText',
                                title: '批次描述',
                                align: 'center',
                            }, {
                                field: 'Standard',
                                title: '物品规格',
                                align: 'center',
                                minWidth: 100
                            }, {
                                field: 'RoadwayNo',
                                title: '所属巷道',
                                align: 'center',
                                width: 100
                            }, {
                                field: 'Qty',
                                title: '库存数量',
                                width: 100,
                                fixed: 'right',
                                align: 'center',
                            }, {
                                field: 'ExportQty',
                                title: '出库数量',
                                align: 'center',
                                width: 100,
                                fixed: 'right',
                                edit: 'number',
                                event: 'dataNumber',
                            }
                        ]
                    ],
                    cols: null,
                         //标题栏
                };
                
                //获取仓库下拉框数据
HTML/views/SOSetting/ExportNotice.html
@@ -336,9 +336,11 @@
                                var html = ''; 
                                if(d.IsWave == '0'){
                                    if(d.Status == '0' || d.Status == '1' ){
                                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs zifenClass" lay-event="auto">
                                                    <i class="layui-icon layui-icon-ok"></i>自动分配
                                                </a>`;
                                        if(d.Type != "8") {
                                            html += `<a class="layui-btn layui-btn-normal layui-btn-xs zifenClass" lay-event="auto">
                                                <i class="layui-icon layui-icon-ok"></i>自动分配
                                            </a>`;
                                        }
                                    }
                                    if(d.Status == '0' && d.Origin == 'WMS'){
                                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs uptClass" lay-event="edit">
Pda/View/AsnSetting/productEnterQuantity.html
@@ -219,7 +219,7 @@
                    </form>
                </div>
                <br>
                <!-- <br> -->
                <div id="" class="cut-line">
                    <img src="/assets/fengexian.png">
@@ -339,6 +339,22 @@
                        </table>
                        <!-- <div id="demodiv" class="layui-form-item layout-input">
                            <label class="layui-form-label" lang>寄存备注:</label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输入内容" id="Demo" name="Demo" class="layui-textarea" ></textarea>
                            </div>
                        </div> -->
                        <!-- 维护备注弹框 -->
                        <div id="demodiv" class="layui-form-item layout-input" style="height: auto;">
                            <label class="layui-form-label">寄存备注:</label>
                            <div class="layui-input-inline" style="width: 365px;height: auto;">
                                <textarea placeholder="请输入内容" id="NoticeDemo" name="NoticeDemo" class="layui-textarea" ></textarea>
                            </div>
                            <br>
                        </div>
                        <table class="layout-tbl-submit" border="" cellspacing="" cellpadding="">
                            <tr>
                                <td style="width: 23%;"></td>
@@ -355,6 +371,11 @@
                </div>
                <br>
                <br>
                <div id="demodiv1">
                    <br><br><br><br><br><br><br>
                </div>
                <div id="" class="cut-line">
                    <img src="/assets/fengexian.png">
@@ -409,7 +430,8 @@
            var form = layui.form
            /* 标签切换代码 */
            $('#demodiv').hide();
            $('#demodiv1').hide();
            var xianshiyemian = 0;
            $('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //选中后颜色
@@ -431,7 +453,8 @@
                    xianshiyemian = 1;
                    $('#content1').hide();
                    $('#option1').attr("style", "background-color: #999;width: 45.77%;float: left;text-align: center;"); //默认颜色
                    $('#content2').show();
                    $('#option2').attr("style", "background-color: aqua;width: 45.77%;float: right;text-align: center;"); //选中后颜色
@@ -652,6 +675,7 @@
            });
            //选中入库单事件-数量
            form.on('select(getbar1)', function (data) {
                updateDemoDiv();
                updateGoodList()
                setOrderGoods();
            });
@@ -758,6 +782,7 @@
                        AsnDetailId: parseInt($("#goodSelect1").val()), //入库单明细ID
                        LotNo: $("#goodSelect1").find("option:selected").text(),  //物料批次
                        SkuQty: parseInt($("#SkuQty").val()), //物料数量
                        Demo: $("#NoticeDemo").val(), //物料数量
                        Origin: "PDA"
                    }
@@ -788,6 +813,35 @@
                return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
            });
            // 根据入库单号 获取备注是否显示及备注信息
            function updateDemoDiv() {
                var param = {
                    AsnNo: $("#bar1").val(),
                };
                synData(IP + "/PdaAsn/GetArrivalNotice", param, 'post', function (res) {
                    console.log(res)
                    if (res.code == 0 && res.data != null) { //成功
                        //判断默认选中是否为寄存物料
                        if(res.data[0].Type == "7")
                        {
                            $("textarea[name='NoticeDemo']").val(res.data[0].Demo); //备注
                            $('#demodiv').show();
                            $('#demodiv1').show();
                        }
                        else
                        {
                            $('#demodiv').hide();
                            $('#demodiv1').hide();
                        }
                    }
                    else{
                        $('#demodiv').hide();
                        $('#demodiv1').hide();
                    }
                });
            }
            // 根据入库明细ID 获取详细信息
            function setOrderGoods() {
@@ -825,6 +879,7 @@
                            $("#Standard1").val(res.data.Standard);
                            $("#ImportFactQuantity1").val(res.data.FactQty + "");
                        }
                        else{}
                    });
                }
@@ -914,6 +969,7 @@
                            asnDetails = res.data;
                            for (var i = 0; i < res.data.length; i++) {
                                if (skuNo != '' && skuNo == res.data[i].SkuNo) {
                                    if (i == 0) {
                                        $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
                                            .SkuName);
@@ -947,6 +1003,7 @@
                                $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
                            }
                        } else {
                        }
                    });
                }
Wms/Model/ModelDto/DataDto/StockDetailDto.cs
@@ -178,5 +178,13 @@
        /// Nullable:True
        /// </summary>           
        public string OwnerName { get; set; }
        /// <summary>
        /// Desc:备注
        /// Default:
        /// Nullable:True
        /// </summary>
        public string Demo { get; set; }
    }
}
Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs
@@ -69,5 +69,10 @@
        /// Desc:批次号
        /// </summary>
        public string LotNo { get; set; }
        /// <summary>
        /// Desc:备注
        /// </summary>
        public string Demo { get; set; }
    }
}
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -177,7 +177,7 @@
                        skuType = "(4)";
                        break;
                    case "7"://寄存入库
                        skuType = "(0,1,2,3,4)";
                        skuType = "(3)";
                        break;
                    default: //其它
                        skuType = "(0,1,2,3,4)";
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -1556,6 +1556,7 @@
                                PackagNo = noticeDetail.PackagNo,
                                IsBale = item.IsBale,
                                IsBelt = item.IsBelt,
                                Demo = item.Demo,
                                OwnerNo = ownerNo,
                                OwnerName = ownerName,
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -42,6 +42,23 @@
            }
        }
        //根据入库单号获取入库总单信息
        public List<BllArrivalNotice> GetArrivalNotice(ArrivalNoticeVm model)
        {
            string sqlString = string.Empty;
            try
            {
                sqlString = $"select * from BllArrivalNotice where ASNNo = '{model.ASNNo}' and isdel='0'  ";
                var modelList = Db.Ado.SqlQuery<BllArrivalNotice>(sqlString);
                return modelList;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        // 根据单据号获取单据明细列表
        public List<ArrivalNoticeDetailDto> GetArrivalNoticeDetails(ArrivalNoticeVm model)
        {
@@ -1286,7 +1303,7 @@
        /// </summary>
        /// <param name="locatNo">储位编码</param>
        /// <returns></returns>
        public string CheckLocatNo(string locatNo)
        public string CheckLocatNo(string locatNo)
        {
            try
            {
@@ -1792,6 +1809,10 @@
                    {
                        model.LotNo = model.LotNo.Substring(indexOfDash + 1);
                    }
                    else
                    {
                        model.LotNo = "";
                    }
                }
                //判断物料数量是否为0 为0判断箱码信息 不为0继续
                if (model.SkuQty == 0)
@@ -1810,6 +1831,52 @@
                    }
                }
                int isDeposit = 0;
                //判断总单单据是否为寄存单据
                if (notice.Type == "7")
                {
                    isDeposit = 1;
                }
                if (isDeposit == 1)
                {
                    //判断总单备注是否为空
                    if (!string.IsNullOrWhiteSpace(notice.Demo))
                    {
                        //分割总单备注及托盘备注
                        var noticeDemo = notice.Demo.Split('、'); //总单备注
                        var palletDemo = model.Demo.Split('、'); //托盘备注
                        //循环托盘备注
                        foreach (var itemPallet in palletDemo)
                        {
                            int isDemo = 0;
                            //循环总单备注
                            foreach (var itemNotice in noticeDemo)
                            {
                                //判断是否有相同备注
                                if (itemPallet == itemNotice)
                                {
                                    isDemo = 1;
                                    break;
                                }
                            }
                            if (isDemo == 0)
                            {
                                throw new Exception("-1:总单备注与托盘备注不符,请核实后重新绑定!");
                            }
                        }
                    }
                    else if (string.IsNullOrWhiteSpace(notice.Demo))
                    {
                        //判断托盘备注是否为空
                        if (!string.IsNullOrWhiteSpace(model.Demo))
                        {
                            throw new Exception("-1:请添加总单备注后输入托盘备注!");
                        }
                    }
                }
                #endregion
                Db.BeginTran();
@@ -1836,40 +1903,46 @@
                var package = Db.Queryable<SysPackag>().Where(m => m.IsDel == "0");
                var sku = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == detail.SkuNo);
                var pack = package.First(m => m.IsDel == "0" && m.PackagNo == sku.PackagNo);
                if (pack == null)
                {
                    throw new Exception("-1:获取物料包装失败,请核实!");
                }
                var pNum = 0;//托盘物品数量 
                var bNum = 0;//箱码物品数量 
                if (pack.L5Num.HasValue)
                //判断是否为寄存物料
                if (isDeposit == 0)
                {
                    pNum = (int)pack.L5Num;
                    bNum = (int)pack.L4Num;
                }
                else if (pack.L4Num.HasValue)
                {
                    pNum = (int)pack.L4Num;
                    bNum = (int)pack.L3Num;
                }
                else if (pack.L3Num.HasValue)
                {
                    pNum = (int)pack.L3Num;
                    bNum = (int)pack.L2Num;
                }
                else if (pack.L2Num.HasValue)
                {
                    pNum = (int)pack.L2Num;
                    bNum = (int)pack.L1Num;
                }
                else if (pack.L1Num.HasValue)
                {
                    pNum = (int)pack.L1Num;
                    bNum = (int)pack.L1Num;
                }
                if (pNum == 0 || bNum == 0)
                {
                    throw new Exception($"绑定失败,{detail.SkuNo}物品包装未找到!");
                    if (pack == null)
                    {
                        throw new Exception("-1:获取物料包装失败,请核实!");
                    }
                    if (pack.L5Num.HasValue)
                    {
                        pNum = (int)pack.L5Num;
                        bNum = (int)pack.L4Num;
                    }
                    else if (pack.L4Num.HasValue)
                    {
                        pNum = (int)pack.L4Num;
                        bNum = (int)pack.L3Num;
                    }
                    else if (pack.L3Num.HasValue)
                    {
                        pNum = (int)pack.L3Num;
                        bNum = (int)pack.L2Num;
                    }
                    else if (pack.L2Num.HasValue)
                    {
                        pNum = (int)pack.L2Num;
                        bNum = (int)pack.L1Num;
                    }
                    else if (pack.L1Num.HasValue)
                    {
                        pNum = (int)pack.L1Num;
                        bNum = (int)pack.L1Num;
                    }
                    if (pNum == 0 || bNum == 0)
                    {
                        throw new Exception($"绑定失败,{detail.SkuNo}物品包装未找到!");
                    }
                }
                #endregion
@@ -1910,9 +1983,11 @@
                        BitPalletMark = "1",
                        IsBale = "0",
                        IsBelt = "0",
                        CreateUser = userId
                        CreateUser = userId,
                        Demo = model.Demo,
                    };
                    if (model.SkuQty > pNum)
                    if (model.SkuQty > pNum && isDeposit == 0)
                    {
                        throw new Exception($"绑定失败,{model.PalletNo}托盘绑定数量大于该物品托盘包装数量!");
                    }
@@ -2002,7 +2077,7 @@
                    // 更新托盘绑定表
                    bind.Qty += factQty;
                }
                if (bind.FullQty < bind.Qty)
                if (bind.FullQty < bind.Qty && isDeposit == 0)
                {
                    throw new Exception("托盘绑定数量已超出该物料包装数量");
                }
@@ -2011,7 +2086,7 @@
                {
                    bind.BitPalletMark = "0";
                }
                if (bind.Qty > pNum)
                if (bind.Qty > pNum && isDeposit == 0)
                {
                    throw new Exception($"绑定失败,{bind.PalletNo}托盘绑定数量大于该物品托盘包装数量!");
                }
@@ -2155,7 +2230,7 @@
                    {
                        // 不贴码物料 无需验证箱码信息
                    }
                    else
                    else
                    {
                        //验证箱码信息是否存在
                        if (boxInfoList.Count <= 0)
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -361,6 +361,9 @@
                    case "6"://代储出库
                        skuType = "(2)";
                        break;
                    case "8"://寄存出库
                        skuType = "(3)";
                        break;
                    default: //其它出库
                        skuType = "(0,1,2,3,4)";
                        break;
@@ -2609,6 +2612,7 @@
                    LocatNo = a.LocatNo,
                    RoadwayNo = a.RoadwayNo,
                    PalletNo = a.PalletNo,
                    Demo = a.Demo,
                }).ToList();
                return list;
Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs
@@ -168,7 +168,12 @@
        /// </summary>           
        public string IsBelt {get;set;}
        /// <summary>
        /// Desc:备注
        /// Default:
        /// Nullable:True
        /// </summary>
        public string Demo { get; set; }
    }
}
Wms/WMS.Entity/DataEntity/DataStockDetail.cs
@@ -235,7 +235,12 @@
        /// </summary>           
        public string IsBelt {get;set;}
        /// <summary>
        /// Desc:备注
        /// Default:
        /// Nullable:True
        /// </summary>
        public string Demo { get; set; }
    }
}
Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
@@ -17,6 +17,9 @@
        // 根据单据号获取单据明细列表
        List<ArrivalNoticeDetailDto> GetArrivalNoticeDetails(ArrivalNoticeVm model);
        //根据入库单号获取入库总单信息
        List<BllArrivalNotice> GetArrivalNotice(ArrivalNoticeVm model);
        // 根据单据明细ID获取明细详情
        ArrivalNoticeDetailDto GetArrivalNoticeDetail(ArrivalNoticeDetailVm model);
Wms/Wms/Controllers/PdaAsnController.cs
@@ -46,6 +46,33 @@
        }
        /// <summary>
        /// 根据入库单获取入库总单信息
        /// </summary>
        /// <param name="model">ASNNo:入库单号</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetArrivalNotice(ArrivalNoticeVm model)
        {
            try
            {
                var models = _PdaAsnSvc.GetArrivalNotice(model);
                if (models == null)
                {
                    return Ok(new { code = 1, msg = "入库单信息", data = models });
                }
                else
                {
                    return Ok(new { code = 0, msg = "入库单信息", data = models });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 判断托盘是否可用
        /// </summary>
        /// <param name="model">PalletNo:托盘条码</param>