bklLiudl
2024-03-16 23f167a369f000091dd04019b037ba42f60ff784
出库功能测试
4个文件已修改
203 ■■■■ 已修改文件
HTML/views/SOSetting/ExportAllot.html 182 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportAllotServer.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Wms.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportAllot.html
@@ -13,13 +13,13 @@
    <script>
        // 这里是需要在页面渲染之前执行的代码
        document.addEventListener("DOMContentLoaded", function() {
        document.addEventListener("DOMContentLoaded", function () {
            //获取table默认显示数
            pageCntFirst();
            //判断是否开启table列表列宽调整功能。
            GetIsSetColW();
        });
      </script>
    </script>
    <link rel="stylesheet" href="../../css/public.css" media="all">
</head>
@@ -232,16 +232,17 @@
                                        }}
                                        {{ GetBtn8(d) }}
                                    </script>
                                    <!-- #endregion -->
                                </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="position-relative"><!-- class="position-relative" --><!-- 自定义表头加上 -->
                                    <table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table>
                                    <!-- #region 自定义表头 -->
                                    <div class="headerSetIcon">
                                        <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2">
                                        <button class="layui-btn layui-btn-primary layui-btn-sm"
                                            data-type="customCols2">
                                            <i class="layui-icon">&#xe610;</i>
                                        </button>
                                    </div>
@@ -256,7 +257,7 @@
                                        {{ GetBtn8(d) }}
                                    </script>
                                    <!-- #endregion -->
                                </div>
                                </div>
                            </div>
                        </div>
                    </div>
@@ -308,7 +309,7 @@
                laydate = layui.laydate;
            var $ = layui.$;
            var h1 = GetTableTabHeight();
            // var h1 = GetTableTopHeight();
            // var h2 = GetTableBottomHeight(); 
            // laydate.render({
@@ -326,29 +327,29 @@
            //渲染出库分配table
            //#region 自定义表头
            var TotalColsArr = [[
                        {field: '',title: '序号',type:'numbers',width: 60,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width: 180,"disabled": true},
                        {field: 'WaveNo',title: '波次单号',align: 'center',width: 180},
                        {field: 'PalletNo',title: '托盘号',align: 'center',width: 95,},
                        {field: 'SkuNo',title: '物料编码',align: 'center',minWidth: 120},
                        {field: 'SkuName',title: '物料名称',align: 'center',width: 150},
                        {field: 'LotNo',title: '批次号',align: 'center',width: 125},
                        {field: 'Status',align: 'center',title: '状态',width: 90,templet: '#templetStatus'},
                        {field: 'Qty',title: '出库数量',align: 'center',width: 90,},
                        {field: 'CompleteQty',title: '拣货数量',align: 'center',width: 90},
                        {field: 'UnstackingMode',title: '拆垛方式',align: 'center',width: 90,templet: '#templetUnstackingMode'},
                        {field: 'OutMode',title: '出库口',align: 'center',width: 90,templet: '#outType',},
                        {field: 'LoadingAddre',title: '装车口',align: 'center',width: 90,templet: '#outType',},
                        {field: 'IsAdvance',title: '拣货类型',align: 'center',width: 90,templet: '#templetIsAdvance'},
                        {field: 'SupplierLot',title: '供货批次',align: 'center',width: 110},
                        {field: 'LotText',title: '批次描述',align: 'center',width: 150},
                        {field: 'Standard',title: '物料规格',align: 'center',minWidth: 120,},
                        {field: 'IsBale',title: '是否裹包',align: 'center',templet: '#templetIsBale',width: 90},
                        {field: 'IsBelt',title: '是否打带',align: 'center',templet: '#templetIsBelt',width: 90},
                        {field: 'CreateTime',align: 'center',title: '创建时间',width: 160,templet: '#templetCreateTime'},
                        {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'center',toolbar: '#table-content-list', "disabled": true}
                    ]];
            var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
                { field: '', title: '序号', type: 'numbers', width: 60, align: 'center', fixed: 'left', "disabled": true },
                { field: 'SONo', title: '出库单号', align: 'center', fixed: 'left', width: 180, "disabled": true },
                { field: 'WaveNo', title: '波次单号', align: 'center', width: 180 },
                { field: 'PalletNo', title: '托盘号', align: 'center', width: 95, },
                { field: 'SkuNo', title: '物料编码', align: 'center', minWidth: 120 },
                { field: 'SkuName', title: '物料名称', align: 'center', width: 150 },
                { field: 'LotNo', title: '批次号', align: 'center', width: 125 },
                { field: 'Status', align: 'center', title: '状态', width: 90, templet: '#templetStatus' },
                { field: 'Qty', title: '出库数量', align: 'center', width: 90, },
                { field: 'CompleteQty', title: '拣货数量', align: 'center', width: 90 },
                { field: 'UnstackingMode', title: '拆垛方式', align: 'center', width: 90, templet: '#templetUnstackingMode' },
                { field: 'OutMode', title: '出库口', align: 'center', width: 90, templet: '#outType', },
                { field: 'LoadingAddre', title: '装车口', align: 'center', width: 90, templet: '#outType', },
                { field: 'IsAdvance', title: '拣货类型', align: 'center', width: 90, templet: '#templetIsAdvance' },
                { field: 'SupplierLot', title: '供货批次', align: 'center', width: 110 },
                { field: 'LotText', title: '批次描述', align: 'center', width: 150 },
                { field: 'Standard', title: '物料规格', align: 'center', minWidth: 120, },
                { field: 'IsBale', title: '是否裹包', align: 'center', templet: '#templetIsBale', width: 90 },
                { field: 'IsBelt', title: '是否打带', align: 'center', templet: '#templetIsBelt', width: 90 },
                { field: 'CreateTime', align: 'center', title: '创建时间', width: 160, templet: '#templetCreateTime' },
                { field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', toolbar: '#table-content-list', "disabled": true }
            ]];
            var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
            //#endregion
            function refreshTable() {
                //#region 原始非自定义列
@@ -543,18 +544,18 @@
                //#region 自定义表头
                var colsJson
                var param1={
                    Href:'BllSo/GetExportAllotList'
                var param1 = {
                    Href: 'BllSo/GetExportAllotList'
                };
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
                    if (res.code == 0){
                        if(res.data=='' || res.data==undefined || res.data==null){
                            colsJson=TotalColsArr
                        }else{
                            colsJson= eval(res.data);
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
                    if (res.code == 0) {
                        if (res.data == '' || res.data == undefined || res.data == null) {
                            colsJson = TotalColsArr
                        } else {
                            colsJson = eval(res.data);
                        }
                    }else{
                        colsJson=TotalColsArr
                    } else {
                        colsJson = TotalColsArr
                    }
                    var param = {
                        SoNo: $("#SoNo").val(),
@@ -579,11 +580,11 @@
                        limit: pageCnt,
                        limits: pageLimits,
                        cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                        done: function(){
                        done: function () {
                            initMenu();
                            //自定义列宽
                            SetTableColW('LAY-app-content-list','BllSo/GetExportAllotList',TotalColsSysArr);
                        },
                            SetTableColW('LAY-app-content-list', 'BllSo/GetExportAllotList', TotalColsSysArr);
                        },
                        cols: colsJson
                    });
                });
@@ -593,24 +594,24 @@
            //渲染拣货明细table
            //#region 自定义表头
            var DetailColsArr = [[
                        {field: '',title: '序号',type:'numbers',width: 60,align: 'center',fixed: 'left', "disabled": true},
                        {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width: 180, "disabled": true},
                        {field: 'PalletNo',title: '托盘号',align: 'center',width: 95},
                        {field: 'BoxNo',title: '箱号',align: 'center',width: 220},
                        //{field: 'BoxNo2',title: '盒号',align: 'center',width: 115},
                        //{field: 'BoxNo3',title: '支号',align: 'center',width: 115},
                        {field: 'SkuNo',title: '物料编码',align: 'center',width: 120,},
                        {field: 'SkuName',title: '物料名称',align: 'center'},
                        {field: 'LotNo',title: '批次号',align: 'center',width: 125,},
                        {field: 'CompleteQty',title: '拣货数量',align: 'center',width: 90,},
                        {field: 'NowPalletNo',title: '新托盘',align: 'center',width: 95,},
                        {field: 'LotText',title: '批次描述',align: 'center',width: 150,},
                        {field: 'SupplierLot',title: '供货批次',align: 'center',width: 110,},
                        {field: 'Standard',title: '物料规格',align: 'center',width: 120,},
                        //{field: 'CreateTime',align: 'center',title: '创建时间',width: 165,templet: '#templetCreateTime2'},
                        {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'left',toolbar: '#table-content-list2', "disabled": true}
                    ]];
            var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码
                { field: '', title: '序号', type: 'numbers', width: 60, align: 'center', fixed: 'left', "disabled": true },
                { field: 'SONo', title: '出库单号', align: 'center', fixed: 'left', width: 180, "disabled": true },
                { field: 'PalletNo', title: '托盘号', align: 'center', width: 95 },
                { field: 'BoxNo', title: '箱号', align: 'center', width: 220 },
                //{field: 'BoxNo2',title: '盒号',align: 'center',width: 115},
                //{field: 'BoxNo3',title: '支号',align: 'center',width: 115},
                { field: 'SkuNo', title: '物料编码', align: 'center', width: 120, },
                { field: 'SkuName', title: '物料名称', align: 'center' },
                { field: 'LotNo', title: '批次号', align: 'center', width: 125, },
                { field: 'CompleteQty', title: '拣货数量', align: 'center', width: 90, },
                { field: 'NowPalletNo', title: '新托盘', align: 'center', width: 95, },
                { field: 'LotText', title: '批次描述', align: 'center', width: 150, },
                { field: 'SupplierLot', title: '供货批次', align: 'center', width: 110, },
                { field: 'Standard', title: '物料规格', align: 'center', width: 120, },
                //{field: 'CreateTime',align: 'center',title: '创建时间',width: 165,templet: '#templetCreateTime2'},
                { field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'left', toolbar: '#table-content-list2', "disabled": true }
            ]];
            var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码
            //#endregion
            function refreshTablemx(val) {
                //#region 原始非自定义列
@@ -729,23 +730,23 @@
                //#region 自定义表头
                var colsJson2
                var param1={
                    Href:'BllSo/GetCompleteDetailList'
                var param1 = {
                    Href: 'BllSo/GetCompleteDetailList'
                };
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
                if (res.code == 0){
                    if(res.data=='' || res.data==undefined || res.data==null){
                        colsJson2=DetailColsArr
                    }else{
                        colsJson2= eval(res.data);
                sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
                    if (res.code == 0) {
                        if (res.data == '' || res.data == undefined || res.data == null) {
                            colsJson2 = DetailColsArr
                        } else {
                            colsJson2 = eval(res.data);
                        }
                    } else {
                        colsJson2 = DetailColsArr
                    }
                }else{
                        colsJson2=DetailColsArr
                }
                var param = {
                    Id: parseInt(val)
                };
                table.render({
                    var param = {
                        Id: parseInt(val)
                    };
                    table.render({
                        elem: '#LAY-app-content-list2',
                        url: IP + "/BllSo/GetCompleteDetailList",
                        method: 'POST',
@@ -758,11 +759,11 @@
                        limit: pageCnt,
                        limits: pageLimits,
                        cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                        done: function(){
                        done: function () {
                            initMenu();
                            //自定义列宽
                            SetTableColW('LAY-app-content-list2','BllSo/GetCompleteDetailList',DetailColsSysArr);
                        },
                            SetTableColW('LAY-app-content-list2', 'BllSo/GetCompleteDetailList', DetailColsSysArr);
                        },
                        cols: colsJson2
                    });
                });
@@ -777,17 +778,16 @@
            });
            //权限
            function initMenu() {
                $(function() {
                $(function () {
                    $(".chexiaoClass").hide(); //撤销
                });
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
                sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                    if (res.code == 0) { //成功 
                        for (var k = 0; k < res.data.length; k++) {
                            if(res.data[k].ParentNo == "2400")
                            {
                            if (res.data[k].ParentNo == "2400") {
                                if (res.data[k].MenuName == "撤销") {
                                    console.log(res.data[k].MenuName);
                                    $(function() {
                                    $(function () {
                                        $(".chexiaoClass").show();
                                    });
                                }
@@ -797,7 +797,7 @@
                        layer.msg('获取权限信息失败', {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function() {});
                        }, function () { });
                    }
                });
            }
@@ -824,7 +824,7 @@
                yemianid = 1;
            });
            var doing = true;
            //删除
            //撤销
            table.on('tool(LAY-app-content-list)', function (obj) {
                console.log(obj);
                if (obj.event === 'del') {
@@ -886,21 +886,21 @@
            //#region 自定义表头
            //自定义表头            
            active = {
                customCols: function(){
                customCols: function () {
                    layer.open({
                        type: 2,
                        title: '自定义列',
                        content: '../SystemSettings/HeaderSetting.html?Href=BllSo/GetExportAllotList&ColsSysArr='+TotalColsSysArr,
                        content: '../SystemSettings/HeaderSetting.html?Href=BllSo/GetExportAllotList&ColsSysArr=' + TotalColsSysArr,
                        maxmin: false,
                        resize: false,
                        area: ['970px', '650px']
                    });
                },
                customCols2: function(){
                customCols2: function () {
                    layer.open({
                        type: 2,
                        title: '自定义列',
                        content: '../SystemSettings/HeaderSetting.html?Href=BllSo/GetCompleteDetailList&ColsSysArr='+DetailColsSysArr,
                        content: '../SystemSettings/HeaderSetting.html?Href=BllSo/GetCompleteDetailList&ColsSysArr=' + DetailColsSysArr,
                        maxmin: false,
                        resize: false,
                        area: ['970px', '650px']
@@ -908,7 +908,7 @@
                }
            };
            $('.layui-btn').on('click', function() {
            $('.layui-btn').on('click', function () {
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });
Wms/WMS.BLL/BllSoServer/ExportAllotServer.cs
@@ -132,16 +132,17 @@
                {
                    throw new Exception("未查询到要分配的库存总量信息");
                }
                //验证任务信息是否存在
                if (task == null)
                // 若任务已下发,判断任务状态
                if (task != null)
                {
                    throw new Exception("未查询到当前托盘任务信息");
                    //验证任务状态是否为正在执行
                    if (task.Status == "0" || task.Status == "1" || task.Status == "2")
                    {
                        throw new Exception("当前任务等待执行或正在执行,请取消后删除");
                    }
                }
                //验证任务状态是否为正在执行
                if (task.Status == "0" || task.Status == "1" || task.Status == "2")
                {
                    throw new Exception("当前任务等待执行或正在执行,请取消后删除");
                }
                Db.BeginTran();
                var time = DateTime.Now;
                //修改任务信息
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -3026,7 +3026,7 @@
                    {
                        throw new Exception("操作失败,部分储位库存异常!");
                    }
                    if (st.Qty > (stock.Qty - stock.LockQty - stock.FrozenQty - stock.InspectQty))
                    if (st.Qty > (stock.Qty - stock.LockQty - stock.FrozenQty))     // 输入的数量 -  托盘上可用的数量(托盘上数量-锁定的数量-冻结的数量)
                    {
                        throw new Exception("操作失败,出库数量超出库存数量!");
                    }
Wms/Wms/Wms.csproj
@@ -30,6 +30,8 @@
  <ItemGroup>
    <ProjectReference Include="..\WMS.BLL\WMS.BLL.csproj" />
  </ItemGroup>
  <ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
</Project>