10个文件已修改
1480 ■■■■ 已修改文件
HTML/views/SOSetting/ExportNotice.html 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNoticeAddFrom.html 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNoticeEditFrom.html 1115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/SoSetting/ExNoticeOut.html 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/SoSetting/productOut.html 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Utility/Tools/HttpHelper.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Utility/XML/ExInfoXml.xml 130 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNotice.html
@@ -1127,6 +1127,7 @@
                }
            });
            var isNeedUnpack = '0'//是否需要拆箱,0:否  1:是
            var xmlFileName="";
            //监听数据操作
            table.on('tool(LAY-app-content-list)', function (obj) {
                var data = obj.data;
@@ -1301,6 +1302,14 @@
                            };
                            sendData(IP + "/BllSo/AddExXmlStr", param, 'post', function (res) {
                                console.log(res);
                                if(data.Type=="0"){
                                    xmlFileName="SalesWareHouseOut_"+data.OrderCode+"_linklink";
                                }else if(data.Type=="2"){
                                    xmlFileName="CheckWareHouseOut_"+data.OrderCode+"_linklink";
                                }else{
                                    xmlFileName=data.OrderCode+"_linklink";
                                }
                                if (res.code == 0) { //成功 
                                    createFile(res.data);
                                    layer.msg("操作成功!", {
@@ -1598,7 +1607,7 @@
            function createFile(val) {
                var content = val;   // 文件内容
                var blob = new Blob([content], { type: "text/plain;charset=utf-8" });
                var fileName = "ExInfo.xml"; // 文件名
                var fileName = xmlFileName+".xml"; // 文件名
                saveAs(blob, fileName);
            }
            //下载文件函数
HTML/views/SOSetting/ExportNoticeAddFrom.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加出库单</title>
@@ -9,14 +10,16 @@
        content="width=device-width, initial-scale=1.0, minExum-scale=1.0, maxExum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <style>
            .isShow{
        .isShow {
            display: block;
        }
            .isNoShow{
        .isNoShow {
            display: none;
        }
    </style>
</head>
<body>
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" style="padding: 20px 0 0 0;">
        <div class="layui-form-item" style="margin-bottom: 0px;">
@@ -378,9 +381,10 @@
                    }
                    // 转换为浮点数并处理精度
                    const precision = 10000;
                    const exqty = Math.round(parseFloat(exqtyStr) * precision) / precision;
                    //const precision = 10000;
                    //const exqty = Math.round(parseFloat(exqtyStr) * precision) / precision;
                    const exqty = parseFloat(exqtyStr);
                    // 验证是否大于0
                    if (exqty < 0) {
                        layer.msg("出库数量必须大于0!", { icon: 2, time: 2000 });
HTML/views/SOSetting/ExportNoticeEditFrom.html
@@ -1,591 +1,588 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>编辑出库单</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport"
            content="width=device-width, initial-scale=1.0, minExum-scale=1.0, maxExum-scale=1.0, user-scalable=0">
        <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    </head>
    <body>
        <div class="layui-form" style="padding: 20px 0 0 0;">
            <div class="layui-form-item" style="margin-bottom: 0px;">
                <div class="layui-inline">
                    <label class="layui-form-label">单据类型</label>
                    <div class="layui-input-inline">
                        <select name="Type" id="Type" lay-filter="Type" lay-verify="required" disabled lay-search>
                            <option value=""></option>
                            <!--JC26-->
                            <option value="0">成品出库</option>
                            <option value="1">领料出库</option>
                            <option value="2">抽检出库</option>
                            <option value="4">不合格品出库</option>
                            <option value="7">其他出库</option>
                            <option value="9">生产领料出库</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">出库仓库</label>
                    <div class="layui-input-inline">
                        <select name="WarehouseId" id="WarehouseId" lay-filter="WarehouseId" lay-verify="required" disabled lay-search>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" id="CustomerNamep">客户名称</label>
                    <div class="layui-input-inline">
                        <select name="CustomerNo" id="CustomerNo" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline isNoShow" id="chengyunshang">
                    <label class="layui-form-label">承运商</label>
                    <div class="layui-input-inline">
                        <select name="LogisticsId" id="LogisticsId" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div style="padding-bottom: 2px;margin-left: 15px;">
                        <button class="layui-btn layui-btn-sm layuiadmin-btn-list" data-type="add">添加明细</button>
                        <button type="submit" class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit=""
                        lay-filter="form1">立即提交</button>
                    </div>
<head>
    <meta charset="utf-8">
    <title>编辑出库单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minExum-scale=1.0, maxExum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
</head>
<body>
    <div class="layui-form" style="padding: 20px 0 0 0;">
        <div class="layui-form-item" style="margin-bottom: 0px;">
            <div class="layui-inline">
                <label class="layui-form-label">单据类型</label>
                <div class="layui-input-inline">
                    <select name="Type" id="Type" lay-filter="Type" lay-verify="required" disabled lay-search>
                        <option value=""></option>
                        <!--JC26-->
                        <option value="0">成品出库</option>
                        <option value="1">领料出库</option>
                        <option value="2">抽检出库</option>
                        <option value="4">不合格品出库</option>
                        <option value="7">其他出库</option>
                        <option value="9">生产领料出库</option>
                    </select>
                </div>
            </div>
            <div class="layui-card">
                <div class="layui-card-body">
                    <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list">
                    </table>
                    <script type="text/html" id="switchTpl">
            <div class="layui-inline">
                <label class="layui-form-label">出库仓库</label>
                <div class="layui-input-inline">
                    <select name="WarehouseId" id="WarehouseId" lay-filter="WarehouseId" lay-verify="required" disabled
                        lay-search>
                        <option value=""></option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" id="CustomerNamep">客户名称</label>
                <div class="layui-input-inline">
                    <select name="CustomerNo" id="CustomerNo" lay-search>
                        <option value=""></option>
                    </select>
                </div>
            </div>
            <div class="layui-inline isNoShow" id="chengyunshang">
                <label class="layui-form-label">承运商</label>
                <div class="layui-input-inline">
                    <select name="LogisticsId" id="LogisticsId" lay-search>
                        <option value=""></option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <div style="padding-bottom: 2px;margin-left: 15px;">
                    <button class="layui-btn layui-btn-sm layuiadmin-btn-list" data-type="add">添加明细</button>
                    <button type="submit" class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit=""
                        lay-filter="form1">立即提交</button>
                </div>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-body">
                <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list">
                </table>
                <script type="text/html" id="switchTpl">
                        <input type="checkbox" name="IsBale" value="{{d.LAY_TABLE_INDEX}}" lay-skin="switch" lay-text="是|否" lay-filter="IsBaleDemo" {{ d.IsBale == "1" ? 'checked' : '' }}>
                    </script>
                    <script type="text/html" id="checkboxTpl">
                <script type="text/html" id="checkboxTpl">
                        <input type="checkbox" name="IsBelt" value="{{d.LAY_TABLE_INDEX}}" lay-skin="switch" lay-text="是|否" lay-filter="IsBeltDemo" {{ d.IsBelt == "1" ? 'checked' : '' }}> 
                    </script>
                    <script type="text/html" id="table-content-list">
                    </script>
                <script type="text/html" id="table-content-list">
                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"> <i
                                class="layui-icon layui-icon-delete"></i>删除</a>
                    </script>
                </div>
            </div>
        </div>
        <script src="../../layuiadmin/layui/layui.js"></script>
        <script src="../../js/public.js"></script>
        <script src="../../js/jquery-3.5.1.min.js"></script>
        <script src="../../js/jquery.cookie.js"></script>
        <script>
            layui.config({
                base: '../../layuiadmin/' //静态资源所在路径
            }).extend({
                index: 'lib/index' //主入口模块
            }).use(['index', 'form', 'layer', 'laydate', 'table','jquery'], function() {
                var $ = layui.$,
                    form = layui.form,
                    table = layui.table,
                    layer = layui.layer;
                var soNo = getQueryString("No");
                var id = getQueryString("id");
                console.log(soNo);
                console.log(id);
                getData();//获取入库单类型
                var arr = [];
                window.success = function(data) {
                    refreshTable(data);
                };
                function refreshTable(data) {
                    //table.clear();
                    for (var i in data) {
                        var isHave = false;
                        // if (data[i].IsBale== undefined) {
                        //     data[i].IsBale="0"
                        // }
                        // if (data[i].IsBelt== undefined) {
                        //     data[i].IsBelt="0"
                        // }
                        if (data[i].ExQty== undefined) {
                            data[i].ExQty=0
                        }
                        for(var j in arr){
                            if(arr[j].SkuNo == data[i].SkuNo && arr[j].LotNo == data[i].LotNo){
                                isHave = true;
                                break;
                            }
                        }
                        if(isHave){
                            continue;
                        }
                        arr.push(data[i]); //属性
    </div>
    <script src="../../layuiadmin/layui/layui.js"></script>
    <script src="../../js/public.js"></script>
    <script src="../../js/jquery-3.5.1.min.js"></script>
    <script src="../../js/jquery.cookie.js"></script>
    <script>
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'layer', 'laydate', 'table', 'jquery'], function () {
            var $ = layui.$,
                form = layui.form,
                table = layui.table,
                layer = layui.layer;
            var soNo = getQueryString("No");
            var id = getQueryString("id");
            console.log(soNo);
            console.log(id);
            getData();//获取入库单类型
            var arr = [];
            window.success = function (data) {
                refreshTable(data);
            };
            function refreshTable(data) {
                //table.clear();
                for (var i in data) {
                    var isHave = false;
                    // if (data[i].IsBale== undefined) {
                    //     data[i].IsBale="0"
                    // }
                    // if (data[i].IsBelt== undefined) {
                    //     data[i].IsBelt="0"
                    // }
                    if (data[i].ExQty == undefined) {
                        data[i].ExQty = 0
                    }
                    console.log(arr);
                    $.extend(infoOptions, {
                        data: arr
                    });
                    infoOptions.page = {
                        curr: 1
                    for (var j in arr) {
                        if (arr[j].SkuNo == data[i].SkuNo && arr[j].LotNo == data[i].LotNo) {
                            isHave = true;
                            break;
                        }
                    }
                    table.render(infoOptions);
                    if (isHave) {
                        continue;
                    }
                    arr.push(data[i]); //属性
                }
                var infoOptions = {
                    elem: '#LAY-app-content-list',
                    height: 'full-160',
                    id: 'LAY-app-content-list',
                    page: true,
                    limit: pageCnt,
                    limits: pageLimits,
                    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                    cols: [
                        [{
                            field: 'SkuNo',
                            title: '物品编码',
                            align: 'center',
                            fixed: 'left',
                            width:140,
                        }, {
                            field: 'SkuName',
                            title: '物品名称',
                            align: 'center',
                            fixed: 'left',
                        }, {
                            field: 'LotNo',
                            title: '批次',
                            align: 'center',
                            minWidth:140,
                        }, {
                            field: 'Standard',
                            title: '物品规格',
                            align: 'center',
                        }, {
                            field: 'Qty',
                            title: '库存数量',
                            align: 'center',
                            width:100,
                        }, {
                            field: 'ExQty',
                            title: '出库数量',
                            align: 'center',
                            width:100,
                            edit: 'number',
                            event: 'dataNumber',
                        },
                        // {
                        //     field:'IsBale',
                        //     title:'是否裹包',
                        //     width:90,
                        //     templet: '#switchTpl',
                        //     unresize: true //是否禁用拖拽列宽
                        // }, {
                        //     field:'IsBelt',
                        //     title:'是否打带',
                        //     width:90,
                        //     templet: '#checkboxTpl',
                        //     unresize: true //是否禁用拖拽列宽
                        // },
                        {
                            title: '操作',
                            align: 'center',
                            width:90,
                            templet: '#table-content-list',
                            fixed: 'right',
                        }]
                    ],
                };
                // //监听裹包操作
                // form.on('switch(IsBaleDemo)', function(obj){
                //     if (obj.elem.checked) {
                //         for (var k in arr) {
                //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
                //                 arr[k].IsBale = "1";
                //             }
                //         }
                //     }else{
                //         for (var k in arr) {
                //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
                //                 arr[k].IsBale = "0";
                //             }
                //         }
                //     }
                // });
                // //监听打带操作
                // form.on('switch(IsBeltDemo)', function(obj){
                //     if (obj.elem.checked) {
                //         for (var k in arr) {
                //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
                //                 arr[k].IsBelt = "1";
                //             }
                //         }
                //     }else{
                //         for (var k in arr) {
                //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
                //                 arr[k].IsBelt = "0";
                //             }
                //         }
                //     }
                // });
                console.log(arr);
                $.extend(infoOptions, {
                    data: arr
                });
                infoOptions.page = {
                    curr: 1
                }
                table.render(infoOptions);
            }
            var infoOptions = {
                elem: '#LAY-app-content-list',
                height: 'full-160',
                id: 'LAY-app-content-list',
                page: true,
                limit: pageCnt,
                limits: pageLimits,
                cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
                cols: [
                    [{
                        field: 'SkuNo',
                        title: '物品编码',
                        align: 'center',
                        fixed: 'left',
                        width: 140,
                    }, {
                        field: 'SkuName',
                        title: '物品名称',
                        align: 'center',
                        fixed: 'left',
                    }, {
                        field: 'LotNo',
                        title: '批次',
                        align: 'center',
                        minWidth: 140,
                    }, {
                        field: 'Standard',
                        title: '物品规格',
                        align: 'center',
                    }, {
                        field: 'Qty',
                        title: '库存数量',
                        align: 'center',
                        width: 100,
                    }, {
                        field: 'ExQty',
                        title: '出库数量',
                        align: 'center',
                        width: 100,
                        edit: 'number',
                        event: 'dataNumber',
                    },
                    // {
                    //     field:'IsBale',
                    //     title:'是否裹包',
                    //     width:90,
                    //     templet: '#switchTpl',
                    //     unresize: true //是否禁用拖拽列宽
                    // }, {
                    //     field:'IsBelt',
                    //     title:'是否打带',
                    //     width:90,
                    //     templet: '#checkboxTpl',
                    //     unresize: true //是否禁用拖拽列宽
                    // },
                    {
                        title: '操作',
                        align: 'center',
                        width: 90,
                        templet: '#table-content-list',
                        fixed: 'right',
                    }]
                ],
            };
                //添加明细
                var    active = {
                    add: function() {
                        if ($("#Type").val()== "") {
                            layer.msg("请选择单据类型!", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            },function() {});
                            return;
                        }
                        layer.open({
                            type: 2,
                            title: '选择物品信息',
                            content: 'ExportSelectSkuFrom.html?houseId='+$("#WarehouseId").val()+'&Type='+$("#Type").val(),
                            maxmin: true,
                            area: ['950px', '90%'],
                            fixed: false,
                        });
                    }
                };
                $('.layui-btn.layuiadmin-btn-list').on('click', function() {
                    var type = $(this).data('type');
                    active[type] ? active[type].call(this) : '';
                });
                //删除
                table.on('tool(LAY-app-content-list)', function(obj) {
                    var data = obj.data;
                    if (obj.event === 'del') {
                        var ii = -1;
                        for (var j in arr) {
                            if (obj.data.SkuNo == arr[j].SkuNo && arr[j].LotNo == obj.data.LotNo) {
                                ii = j;
                                break;
                            }
                        }
                        if (ii > -1) {
                            arr.splice(ii, 1);
                            obj.del();
                        }
                    } else if (obj.event === 'dataNumber') {
                        $(".layui-input.layui-table-edit").attr("type", "number");
                    }
                });
            // //监听裹包操作
            // form.on('switch(IsBaleDemo)', function(obj){
            //     if (obj.elem.checked) {
            //         for (var k in arr) {
            //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
            //                 arr[k].IsBale = "1";
            //             }
            //         }
                form.verify({
                    emptyNo: function(value) {
                        if (value == '') {
                            return '';
                        } else {
                            var ver = /^[0-9]+$/;
                            if (!ver.test(value)) {
                                return '只能输入正整数';
                            }
                        }
                    }
                });
                var isrun = 0;
                form.on('submit(form1)', function(data) {
                    if(isrun == 1){
                        return;
                    }
                    isrun = 1;
                    if (infoOptions.data == 0) {
                        layer.msg("请添加明细!", {
            //     }else{
            //         for (var k in arr) {
            //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
            //                 arr[k].IsBale = "0";
            //             }
            //         }
            //     }
            // });
            // //监听打带操作
            // form.on('switch(IsBeltDemo)', function(obj){
            //     if (obj.elem.checked) {
            //         for (var k in arr) {
            //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
            //                 arr[k].IsBelt = "1";
            //             }
            //         }
            //     }else{
            //         for (var k in arr) {
            //             if (arr[k].LAY_TABLE_INDEX == obj.value) {
            //                 arr[k].IsBelt = "0";
            //             }
            //         }
            //     }
            // });
            //添加明细
            var active = {
                add: function () {
                    if ($("#Type").val() == "") {
                        layer.msg("请选择单据类型!", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function() {
                        }, function () { });
                        return;
                    }
                    layer.open({
                        type: 2,
                        title: '选择物品信息',
                        content: 'ExportSelectSkuFrom.html?houseId=' + $("#WarehouseId").val() + '&Type=' + $("#Type").val(),
                        maxmin: true,
                        area: ['950px', '90%'],
                        fixed: false,
                    });
                }
            };
            $('.layui-btn.layuiadmin-btn-list').on('click', function () {
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });
            //删除
            table.on('tool(LAY-app-content-list)', function (obj) {
                var data = obj.data;
                if (obj.event === 'del') {
                    var ii = -1;
                    for (var j in arr) {
                        if (obj.data.SkuNo == arr[j].SkuNo && arr[j].LotNo == obj.data.LotNo) {
                            ii = j;
                            break;
                        }
                    }
                    if (ii > -1) {
                        arr.splice(ii, 1);
                        obj.del();
                    }
                } else if (obj.event === 'dataNumber') {
                    $(".layui-input.layui-table-edit").attr("type", "number");
                }
            });
                        });
            form.verify({
                emptyNo: function (value) {
                    if (value == '') {
                        return '';
                    } else {
                        var ver = /^[0-9]+$/;
                        if (!ver.test(value)) {
                            return '只能输入正整数';
                        }
                    }
                }
            });
            var isrun = 0;
            form.on('submit(form1)', function (data) {
                if (isrun == 1) {
                    return;
                }
                isrun = 1;
                if (infoOptions.data == 0) {
                    layer.msg("请添加明细!", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () {
                    });
                    isrun = 0;
                    return;
                }
                var DataList = [];
                console.log(infoOptions.data);
                for (var i in infoOptions.data) {
                    var exQty = infoOptions.data[i].ExQty + "";
                    console.log("出库数量:" + exQty);
                    if (exQty == "") {
                        layer.msg("请输入出库数量!", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                        isrun = 0;
                        return;
                    }
                    var DataList = [];
                    console.log(infoOptions.data);
                    for (var i in infoOptions.data) {
                        var exQty = infoOptions.data[i].ExQty+"";
                        console.log(exQty);
                        if (exQty== "" ) {
                            layer.msg("请输入出库数量!", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                            return;
                        }
                        if(exQty.indexOf('.')>=0){
                            layer.msg("出库数量必须是大于0的整数", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                            return;
                        }
                        if(exQty.indexOf('-')>=0){
                            layer.msg("出库数量必须是大于0的整数", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                            return;
                        }
                        if(exQty.charAt(0)=='0'){
                            layer.msg("出库数量必须是大于0的整数", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                            return;
                        }
                        if (exQty <= 0) {
                            layer.msg("出库数量必须大于0!", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                            return;
                        }
                        if (exQty > infoOptions.data[i].Qty) {
                            layer.msg("出库数量不能大于库存数量!", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                            return;
                        }
                        var item = {
                            SkuNo: infoOptions.data[i].SkuNo,
                            LotNo: infoOptions.data[i].LotNo,
                            Qty: parseInt(exQty),
                            IsBale:infoOptions.data[i].IsBale,
                            IsBelt:infoOptions.data[i].IsBelt,
                        };
                        DataList.push(item); //属性
                    // if(exQty.indexOf('.')>=0){
                    //     layer.msg("出库数量必须是大于0的整数", {
                    //         icon: 2,
                    //         time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    //     }, function() {});
                    //     isrun = 0;
                    //     return;
                    // }
                    if (exQty.indexOf('-') >= 0) {
                        layer.msg("出库数量必须是大于0的整数", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                        isrun = 0;
                        return;
                    }
                    var param = {
                        Type: data.field.Type,
                        CustomerNo: data.field.CustomerNo,
                        LogisticsId: parseInt(data.field.LogisticsId),
                        Detail: DataList,
                        Id:parseInt(id),
                    // if (exQty.charAt(0) == '0') {
                    //     layer.msg("出库数量必须是大于0的整数,charAt(0)", {
                    //         icon: 2,
                    //         time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    //     }, function () { });
                    //     isrun = 0;
                    //     return;
                    // }
                    if (exQty <= 0) {
                        layer.msg("出库数量必须大于0!", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                        isrun = 0;
                        return;
                    }
                    sendData(IP + "/BllSo/EditExportNotice", param, 'post', function(res) {
                        console.log(res);
                        if (res.code == 0) { //成功
                            layer.msg(res.msg, {
                                icon: 1,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {
                                parent.location.reload();
                                parent.layer.close(layer.index);
                            });
                            isrun = 0;
                        } else if(res.code == 1) { //不成功
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                            isrun = 0;
                        }
                    });
                    return false;
                });
                function getData(){
                    console.log(soNo);
                    var param = {
                        soNo: soNo
                    if (exQty > infoOptions.data[i].Qty) {
                        layer.msg("出库数量不能大于库存数量!", {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                        isrun = 0;
                        return;
                    }
                    var item = {
                        SkuNo: infoOptions.data[i].SkuNo,
                        LotNo: infoOptions.data[i].LotNo,
                        Qty: parseInt(exQty),
                        IsBale: infoOptions.data[i].IsBale,
                        IsBelt: infoOptions.data[i].IsBelt,
                    };
                    sendData(IP + "/BllSo/GetEditExportNotice", param, 'get', function(res) {
                        if(res.code == 0){
                            console.log(res.data);
                            $("#Type option[value='"+ res.data.Type+"']").attr("selected", "selected")
                            form.render('select');
                            refreshTable(res.data.Detail);
                            //仓库
                            getWareHouseList(res.data.WareHouseNo)
                            //获取客户/货主
                            getCustomerList(res.data.CustomerNo);
                            //获取供应商
                            getLogisticsInfoList(res.data.LogisticsId);
                        }
                        else{
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                        }
                    });
                    DataList.push(item); //属性
                }
                // //下拉单据类型选中后事件
                // form.on('select(Type)', function(data) {
                //     // console.log(data.value);
                //     if (data.value == "0" || data.value == "1") { //销售出库
                //         $("#chengyunshang").removeClass("isNoShow");
                //         $("#chengyunshang").addClass("isShow");
                //         form.render('select');
                //     }else if(data.value == "2" ||data.value == "3"){//不合格出库
                //         $("#chengyunshang").removeClass("isShow");
                //         $("#chengyunshang").addClass("isNoShow");
                //         form.render('select');
                //     }
                // });
                //获取仓库下拉框信息
                function getWareHouseList(houseNo){
                    sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                            $("#WarehouseId").empty();
                            $("#WarehouseId").append('<option value =""></option>');
                            for (var i = 0; i < res.data.length; i++) {
                                $("#WarehouseId").append('<option value =' + res.data[i].WareHouseNo + '>' +
                                    res.data[i].WareHouseName + '</option>');
                            }
                            $("#WarehouseId option[value='"+ houseNo +"']").attr("selected", "selected")
                            form.render('select');
                        } else { //不成功
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                        }
                    });
                var param = {
                    Type: data.field.Type,
                    CustomerNo: data.field.CustomerNo,
                    LogisticsId: parseInt(data.field.LogisticsId),
                    Detail: DataList,
                    Id: parseInt(id),
                }
                //获取客户下拉框信息
                function getCustomerList(customerNo) {
                    sendData(IP + "/Basis/GetCustomerSelect", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                            var TypeNum = 0;
                            switch($("#Type").val())
                            {
                                case "0": //成品出库
                                    TypeNum = 0;
                                    console.log(TypeNum)
                                    break;
                                case "1": //领料出库
                                case "2": //抽检出库
                                case "3": //物料取样出库
                                case "4": //不合格品出库
                                case "5": //中间品出库
                                case "6": //代储出库
                                case "7": //其他出库
                                case "8": //寄存出库
                                    TypeNum = 2;
                                    console.log('TypeNum:'+ TypeNum)
                                    break;
                            }
                            $("#CustomerNo").empty();
                            $("#CustomerNo").append('<option value =""></option>');
                            for (var i = 0; i < res.data.length; i++) {
                                //判断单据类型
                                if (TypeNum == 0)
                                {
                                    if (res.data[i].Type == 0)
                                    {
                                        $("#CustomerNamep").html("客户");
                                        $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' +
                                        res.data[i].CustomerName + '</option>');
                                    }
                                }
                                else if (TypeNum == 1)
                                {
                                    if (res.data[i].Type == 1)
                                    {
                                        $("#CustomerNamep").html("供应商");
                                        $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' +
                                        res.data[i].CustomerName + '</option>');
                                    }
                                }
                                else if (TypeNum == 2)
                                {
                                    if (res.data[i].Type == 2)
                                    {
                                        $("#CustomerNamep").html("货主");
                                        $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' +
                                        res.data[i].CustomerName + '</option>');
                                    }
                                }
                            }
                            $("#CustomerNo option[value='"+ customerNo +"']").attr("selected", "selected")
                            form.render('select');
                        } else { //不成功
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                        }
                    });
                }
                //获取物流承运商下拉框信息
                function getLogisticsInfoList(logisticsId) {
                    sendData(IP + "/Basis/GetLogisticsInfoSelect", {}, 'get', function(res) {
                        if (res.code == 0) { //成功
                            $("#LogisticsId").empty();
                            $("#LogisticsId").append('<option value =""></option>');
                            for (var i = 0; i < res.data.length; i++) {
                                $("#LogisticsId").append('<option value =' + res.data[i].Id + '>' +
                                    res.data[i].CarrierName + '</option>');
                            }
                            $("#LogisticsId option[value='"+logisticsId +"']").attr("selected", "selected")
                            form.render('select');
                        } else { //不成功
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {});
                        }
                    });
                }
                //获取浏览器参数
                function getQueryString(name) {
                    var query = window.location.search.substring(1);
                    var vars = query.split("&");
                    for (var i=0;i<vars.length;i++) {
                        var pair = vars[i].split("=");
                        if(pair[0] == name){
                            return pair[1];
                        }
                sendData(IP + "/BllSo/EditExportNotice", param, 'post', function (res) {
                    console.log(res);
                    if (res.code == 0) { //成功
                        layer.msg(res.msg, {
                            icon: 1,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () {
                            parent.location.reload();
                            parent.layer.close(layer.index);
                        });
                        isrun = 0;
                    } else if (res.code == 1) { //不成功
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                        isrun = 0;
                    }
                    return(false);
                    // var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                    // var r = window.location.search.substr(1).match(reg);
                    // if (r != null) return unescape(r[2]);
                    // return null;
                });
                return false;
            });
            function getData() {
                console.log(soNo);
                var param = {
                    soNo: soNo
                };
                sendData(IP + "/BllSo/GetEditExportNotice", param, 'get', function (res) {
                    if (res.code == 0) {
                        console.log(res.data);
                        $("#Type option[value='" + res.data.Type + "']").attr("selected", "selected")
                        form.render('select');
                        refreshTable(res.data.Detail);
                        //仓库
                        getWareHouseList(res.data.WareHouseNo)
                        //获取客户/货主
                        getCustomerList(res.data.CustomerNo);
                        //获取供应商
                        getLogisticsInfoList(res.data.LogisticsId);
                    }
                    else {
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                    }
                });
            }
            // //下拉单据类型选中后事件
            // form.on('select(Type)', function(data) {
            //     // console.log(data.value);
            //     if (data.value == "0" || data.value == "1") { //销售出库
            //         $("#chengyunshang").removeClass("isNoShow");
            //         $("#chengyunshang").addClass("isShow");
            //         form.render('select');
            //     }else if(data.value == "2" ||data.value == "3"){//不合格出库
            //         $("#chengyunshang").removeClass("isShow");
            //         $("#chengyunshang").addClass("isNoShow");
            //         form.render('select');
            //     }
            // });
            //获取仓库下拉框信息
            function getWareHouseList(houseNo) {
                sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                        $("#WarehouseId").empty();
                        $("#WarehouseId").append('<option value =""></option>');
                        for (var i = 0; i < res.data.length; i++) {
                            $("#WarehouseId").append('<option value =' + res.data[i].WareHouseNo + '>' +
                                res.data[i].WareHouseName + '</option>');
                        }
                        $("#WarehouseId option[value='" + houseNo + "']").attr("selected", "selected")
                        form.render('select');
                    } else { //不成功
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                    }
                });
            }
            //获取客户下拉框信息
            function getCustomerList(customerNo) {
                sendData(IP + "/Basis/GetCustomerSelect", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                        var TypeNum = 0;
                        switch ($("#Type").val()) {
                            case "0": //成品出库
                                TypeNum = 0;
                                console.log(TypeNum)
                                break;
                            case "1": //领料出库
                            case "2": //抽检出库
                            case "3": //物料取样出库
                            case "4": //不合格品出库
                            case "5": //中间品出库
                            case "6": //代储出库
                            case "7": //其他出库
                            case "8": //寄存出库
                                TypeNum = 2;
                                console.log('TypeNum:' + TypeNum)
                                break;
                        }
                        $("#CustomerNo").empty();
                        $("#CustomerNo").append('<option value =""></option>');
                        for (var i = 0; i < res.data.length; i++) {
                            //判断单据类型
                            if (TypeNum == 0) {
                                if (res.data[i].Type == 0) {
                                    $("#CustomerNamep").html("客户");
                                    $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' +
                                        res.data[i].CustomerName + '</option>');
                                }
                            }
                            else if (TypeNum == 1) {
                                if (res.data[i].Type == 1) {
                                    $("#CustomerNamep").html("供应商");
                                    $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' +
                                        res.data[i].CustomerName + '</option>');
                                }
                            }
                            else if (TypeNum == 2) {
                                if (res.data[i].Type == 2) {
                                    $("#CustomerNamep").html("货主");
                                    $("#CustomerNo").append('<option value =' + res.data[i].CustomerNo + '>' +
                                        res.data[i].CustomerName + '</option>');
                                }
                            }
                        }
                        $("#CustomerNo option[value='" + customerNo + "']").attr("selected", "selected")
                        form.render('select');
                    } else { //不成功
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                    }
                });
            }
            //获取物流承运商下拉框信息
            function getLogisticsInfoList(logisticsId) {
                sendData(IP + "/Basis/GetLogisticsInfoSelect", {}, 'get', function (res) {
                    if (res.code == 0) { //成功
                        $("#LogisticsId").empty();
                        $("#LogisticsId").append('<option value =""></option>');
                        for (var i = 0; i < res.data.length; i++) {
                            $("#LogisticsId").append('<option value =' + res.data[i].Id + '>' +
                                res.data[i].CarrierName + '</option>');
                        }
                        $("#LogisticsId option[value='" + logisticsId + "']").attr("selected", "selected")
                        form.render('select');
                    } else { //不成功
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () { });
                    }
                });
            }
            //获取浏览器参数
            function getQueryString(name) {
                var query = window.location.search.substring(1);
                var vars = query.split("&");
                for (var i = 0; i < vars.length; i++) {
                    var pair = vars[i].split("=");
                    if (pair[0] == name) {
                        return pair[1];
                    }
                }
            })
        </script>
    </body>
</html>
                return (false);
                // var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                // var r = window.location.search.substr(1).match(reg);
                // if (r != null) return unescape(r[2]);
                // return null;
            }
        })
    </script>
</body>
</html>
Pda/View/SoSetting/ExNoticeOut.html
@@ -103,17 +103,21 @@
                        </div>
                    </div>
                    <div id="" class="layui-form-item layout-dropdownlist">
                        <label class="layui-form-label" lang>出库地址:</label>
                        <label class="layui-form-label" lang>出库楼层:</label>
                        <div class="layui-input-block">
                            <select id="endFloor" lay-filter="endFloor" lay-search>
                                <option value=""></option>
                                <option value="1">一楼</option>
                                <option value="2">二楼</option>
                            </select>
                            <img src="/assets/down_arraw.png">
                        </div>
                    </div>
                    <div id="" class="layui-form-item layout-dropdownlist">
                        <label class="layui-form-label" lang>出库地址:</label>
                        <div class="layui-input-block" id="endSelectDiv">
                            <select id="endSelect" lay-filter="endSelect" lay-search>    
                                <option value=""></option>
                                <option value="B020101">一楼-1</option>
                                <option value="B020102">一楼-2</option>
                                <option value="B020103">一楼-3</option>
                                <option value="B020104">一楼-4</option>
                                <option value="B050101">二楼-1</option>
                                <option value="B050102">二楼-2</option>
                                <option value="B050103">二楼-3</option>
                            </select>
                            <img src="/assets/down_arraw.png">
                        </div>
@@ -282,6 +286,44 @@
                });
                
            }
            //选中单据明细事件
            form.on('select(endFloor)', function (data) {
                $("#endSelect").empty()
                $("#endSelect").append('<option value =>' + '</option>');
                if($("#endFloor").val() == "1"){
                    $("#endSelect").append('<option value ="B020101">一楼-B020101</option> <option value ="B020102">一楼-B020102</option> <option value ="B020103">一楼-B020103</option> '
                    +'<option value ="B020104">一楼-B020104</option> <option value ="B020201">一楼-B020201</option> <option value ="B020202">一楼-B020202</option>'
                    +' <option value ="B020301">一楼-B020301</option> <option value ="B020302">一楼-B020302</option> <option value ="B020303">一楼-B020303</option>'
                    +' <option value ="B020304">一楼-B020304</option>');
                }else if($("#endFloor").val() == "2"){
                    $("#endSelect").append('<option value ="B050101">二楼-B050101</option> <option value ="B050102">二楼-B050102</option> <option value ="B050103">二楼-B050103</option> '
                    +' <option value ="B050104">二楼-B050104</option> <option value ="B050105">二楼-B050105</option> <option value ="B050106">二楼-B050106</option>'
                    +' <option value ="B050107">二楼-B050107</option> <option value ="B050108">二楼-B050108</option> <option value ="B050109">二楼-B050109</option>'
                    +' <option value ="B050110">二楼-B050110</option> <option value ="B050111">二楼-B050111</option> <option value ="B050112">二楼-B050112</option>'
                    +' <option value ="B050113">二楼-B050113</option>');
                }else{
                    layer.msg("选择出库楼层错误", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { });
                    return;
                }
                form.render('select');
            });
            //点击出库地址下拉框事件
            $("#endSelectDiv").click(function () {
                if ($("#endFloor").val() == null || $("#endFloor").val() == "" || $("#endFloor").val() == undefined) {
                    layer.msg("请先选择出库楼层", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { });
                    return;
                }
            })
 
            function updatePalletNoList(callback) {
                var input = $('select[id="PalletNo"]').next().find('.layui-select-title input')
Pda/View/SoSetting/productOut.html
@@ -1320,6 +1320,28 @@
                });
            }
            //下拉物料批次选中后事件
            form.on('select(getSkuLotNo2)', function (data) {
                if ($('#palletNo2').val() == "") {
                    layer.msg("请输入托盘条码", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () {
                        clear21();
                        clear23();
                    });
                    return
                }
                if ($('#skuLotNo2').val() == "") {
                    clear21();
                    clear23();
                    return
                }
                updateQtyList2();
                getBar2();
                //GetBoxInfo();
            });
            //初始化渲单据的计划数量和完成数量
            function updateQtyList2() {
                clear23();
@@ -1355,7 +1377,7 @@
                        $('#outModel2').val(res.data.OutModel);
                        $('#standard2').val(res.data.Standard);
                        $('#pickQty2').val(res.data.PickQty - res.data.PickedQty);
                        $('#pickQty2').val(res.data.PickQty);
                        $('#pickedQty2').val(res.data.PickedQty);
                    } else { //不成功
                        if ($("#planQty").val() == $("#finishQty").val() || $('#pickQty').val() == $('#pickedQty').val()) {
Wms/Utility/Tools/HttpHelper.cs
@@ -195,12 +195,12 @@
        /// <param name="method"></param>
        /// <param name="xmlName"></param>
        /// <returns></returns>
        public static XmlDocument EncodeParsToFuMa(List<string> Pars, string method, string xmlName)
        public static XmlDocument EncodeParsToFuMa(List<string> Pars, string method, string xmlName,string fileName)
        {
            try
            {
                XmlDocument xml = null;
                var str = $"Utility.XML.{xmlName}.xml";
                var str = $"Utility.XML.{fileName}.xml";
                //从资源文件得到文件流
                Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(str);
                if (stream == null)
@@ -212,12 +212,20 @@
                xml.Load(stream);
                XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable);
                nsmgr.AddNamespace("xsi", @"http://www.w3.org/2001/XMLSchema-instance");
                nsmgr.AddNamespace("xsi", @"http://www.w3.org/2001/XMLSchema-instance");
                // 修改Event节点的Name属性值
                string eventNodePath = "Document/Events/Event";
                XmlNode eventNode = xml.SelectSingleNode(eventNodePath, nsmgr);
                if (eventNode != null && eventNode.Attributes["Name"] != null)
                {
                    eventNode.Attributes["Name"].Value = xmlName; // 修改为传入的xmlName参数
                }
                //修改参数的值
                foreach (var de in Pars)
                {
                    string subNode = "DataList/Events/Event/Relation/Batch";// + de.Key.ToString();
                    string subNode = "Document/Events/Event/DataField";// + de.Key.ToString();
                    
                    XmlNode node = xml.SelectSingleNode(subNode, nsmgr);
                    if (de != null)
@@ -235,17 +243,11 @@
                        attr = xml.CreateAttribute("ActDate");     //操作时间
                        attr.Value = de.Split(",")[3];
                        createNode.Attributes.Append(attr);
                        attr = xml.CreateAttribute("DisCorpID");  //运输企业
                        attr.Value = "";
                        createNode.Attributes.Append(attr);
                        attr = xml.CreateAttribute("AssCorpID");   //委托企业
                        attr.Value = "";
                        attr = xml.CreateAttribute("WrongCode");  //是否错误码
                        attr.Value = "False";
                        createNode.Attributes.Append(attr);
                        attr = xml.CreateAttribute("ToCorpID");  // 下游收货企业编号
                        attr.Value = "";
                        createNode.Attributes.Append(attr);
                        attr = xml.CreateAttribute("FromPerson");//发货人
                        attr.Value = "";   //de.Split(",")[2]
                        createNode.Attributes.Append(attr);
                        node.AppendChild(createNode);
                    }
Wms/Utility/XML/ExInfoXml.xml
@@ -1,100 +1,34 @@

<DataList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="关联关系XML Schema-3.0.xsd" License="">
    <Events version="3.0">
        <Event name="RelationCreate">
            <Relation productCode="9227834" subTypeNo="9227834001" cascade="1:8:80" packageSpec="盒1支" comment="">
                <Batch batchNo="4202506237" madeDate="2025-06-05" validateDate="2028-06-04" workshop="1002车间" lineName="自动线" lineManager="赵">
                    <!--<Code curCode="87069080001788999534" packLayer="3" parentCode="" flag="0"/>
                        <Code curCode="87069090015932071630" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148372924155" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148372684374" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148372441040" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148370761719" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148371009170" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148371243667" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148371481519" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148371726602" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148371962746" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="83057920148372200959" packLayer="1" parentCode="87069090015932071630" flag="0"/>
                        <Code curCode="87069090015932115065" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148368842018" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148369084666" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148369326241" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148369562000" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148369801304" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148370045482" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148370284324" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148370528448" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148368600956" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="83057920148368363066" packLayer="1" parentCode="87069090015932115065" flag="0"/>
                        <Code curCode="87069090015932154162" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148368124892" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148367880401" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148365962203" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148366207259" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148366440713" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148366684405" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148366920612" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148367161006" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148367402706" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="83057920148367647629" packLayer="1" parentCode="87069090015932154162" flag="0"/>
                        <Code curCode="87069090015932238090" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148363561861" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148363808974" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148364044168" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148364281458" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148364520482" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148364767590" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148365004077" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148365245110" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148365489268" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="83057920148365726586" packLayer="1" parentCode="87069090015932238090" flag="0"/>
                        <Code curCode="87069090015932033782" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148373401736" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148373648671" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148373882492" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148374121088" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148374369286" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148374604933" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148373169131" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148374848657" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148375329523" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="83057920148375081870" packLayer="1" parentCode="87069090015932033782" flag="0"/>
                        <Code curCode="87069090015931913483" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148382283339" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148382525896" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148382049580" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148381808684" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148381323782" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148380365101" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148380600446" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148380845965" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148381089410" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="83057920148381561273" packLayer="1" parentCode="87069090015931913483" flag="0"/>
                        <Code curCode="87069090015931956131" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148377962860" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148378204570" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148378443550" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148378686893" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148378920964" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148379164311" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148379406311" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148379643309" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148379883846" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="83057920148380125281" packLayer="1" parentCode="87069090015931956131" flag="0"/>
                        <Code curCode="87069090015931993545" packLayer="2" parentCode="87069080001788999534" flag="0"/>
                        <Code curCode="83057920148375560130" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148375806129" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148376048063" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148376281992" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148376529495" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148376765510" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148377000472" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148377245836" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148377489066" packLayer="1" parentCode="87069090015931993545" flag="0"/>
                        <Code curCode="83057920148377721035" packLayer="1" parentCode="87069090015931993545" flag="0"/>-->
                </Batch>
            </Relation>
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="终端接口XML Schema-3.0.xsd" Version="3.0">
    <Events>
        <Event Name="SalesWareHouseOut" MainAction="WareHouseOut">
            <ActionMaping>
                <Action Name="WareHouseOut">
                    <ActionData>CorpOrderID</ActionData>
                    <ActionData>Actor</ActionData>
                    <ActionData>ActDate</ActionData>
                    <ActionData>ToCorpID</ActionData>
                    <ActionData>Code</ActionData>
                </Action>
            </ActionMaping>
            <DataMaping>
                <MetaData Name="CorpOrderID" Type="String"/>
                <MetaData Name="Actor" Type="String"/>
                <MetaData Name="ActDate" Type="Date"/>
                <MetaData Name="ToCorpID" Type="String"/>
                <MetaData Name="Code" Type="String"/>
            </DataMaping>
            <DataDesc>
                <MetaDataDesc MetaName="Actor" IsParent="true">
                    <MetaDataDesc MetaName="Code" IsParent="false"/>
                </MetaDataDesc>
                <MetaDataDesc MetaName="CorpOrderID" IsParent="true">
                    <MetaDataDesc MetaName="Code" IsParent="false"/>
                </MetaDataDesc>
            </DataDesc>
            <DataField>
            </DataField>
        </Event>
    </Events>
</DataList>
</Document>
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -273,6 +273,7 @@
            */
            var TypeLot = "1, 5, 6, 7";         //批次可为空单据类型
            int codeStrNum = 0;
            try
            {
                if (model.Origin == "录入" || model.Origin == "导入")
@@ -378,13 +379,16 @@
                                && m.CreateTime.ToString("yyyyMM") == DateTime.Now.ToString("yyyyMM")).Max(m => m.BoxCodeStr);
                            if(string.IsNullOrWhiteSpace(maxBoxCodeStr))
                            {
                                maxBoxCodeStr = "BK" + toDayTime.Substring(2, 4) + "0001";
                                string codeEndStr = (1 + codeStrNum).ToString().PadLeft(4, '0');
                                maxBoxCodeStr = "BK" + toDayTime.Substring(2, 4) + codeEndStr;
                            }
                            else
                            {
                                maxBoxCodeStr = "BK" + (int.Parse(maxBoxCodeStr.Replace("BK", "")) + 1).ToString();
                                maxBoxCodeStr = "BK" + (int.Parse(maxBoxCodeStr.Replace("BK", "")) + 1 + codeStrNum).ToString();
                            }
                            detailModel.BoxCodeStr = maxBoxCodeStr;
                            codeStrNum++;
                        }
                        // 判断是否已存在当前明细
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -1161,6 +1161,10 @@
                {
                    throw Oops.Bah("目标储位信息不存在,请检查!");
                }
                if ((storageLocatEnd.AreaNo == "B01" || storageLocatEnd.AreaNo == "B02" || storageLocatEnd.AreaNo == "B05") && storageLocatEnd.Status != "0")
                {
                    throw Oops.Bah("目标储位不是空闲状态,请检查!");
                }
                //添加出库任务
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -1231,7 +1231,7 @@
                    //添加出库单
                    foreach (var d in model.Detail)
                    {
                        if (d.Qty < 1)
                        if (d.Qty <= 0)
                        {
                            throw new Exception("出库数量必须大于0");
                        }
@@ -1509,7 +1509,7 @@
                        //更新出库单
                        foreach (var d in model.Detail)
                        {
                            if (d.Qty < 1)
                            if (d.Qty <= 0)
                            {
                                throw new Exception("出库数据必须大于0");
                            }
@@ -2013,6 +2013,13 @@
            }
        }
        /// <summary>
        /// 导出xml文件
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public XmlNode AddExXmlStr(int id, int userId)
        {
            try
@@ -2022,27 +2029,80 @@
                {
                    throw new Exception("未查询到出库单据信息");
                }
                var noticeDetial = Db.Queryable<BllExportNoticeDetail>().Where(w => w.IsDel == "0" && w.SONo == notice.SONo).First();
                if (noticeDetial == null)
                {
                    throw new Exception("未查询到出库单据明细信息");
                }
                var statusLis = new List<string>() { "4", "5", "6" };
                if (!statusLis.Contains(notice.Status))
                {
                    throw new Exception("参数异常,请检查状态是否为执行完成或订单关闭/已上传");
                }
                string xmlName = string.Empty;
                switch (notice.Type)
                {
                    case "0"://成品出库/销售出库
                        xmlName = "SalesWareHouseOut";
                        break;
                    case "2"://抽检出库
                        xmlName = "CheckWareHouseOut";
                        break;
                    default:
                        throw new Exception("单据类型异常");
                }
                var materiDetial = Db.Queryable<SysMaterials>().First(w => w.IsDel == "0" && w.SkuNo == noticeDetial.SkuNo);
                var packType = Db.Queryable<SysPackag>().First(w => w.IsDel == "0" && w.PackagNo == materiDetial.PackagNo);
                int level = 0;
                if (!string.IsNullOrEmpty(packType.L2Name))
                {
                    level = 1;
                }
                if (!string.IsNullOrEmpty(packType.L3Name))
                {
                    level = 2;
                }
                if (!string.IsNullOrEmpty(packType.L4Name))
                {
                    level = 3;
                }
                //出库单明细
                var comDetail = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.SONo == notice.SONo).Select(m => m.BoxNo3).ToList();
                var comDetail = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.SONo == notice.SONo).ToList();
                var userinfo = Db.Queryable<SysUserInfor>().Where(m => m.Id == comDetail.First().CreateUser).First().RealName;
                Db.BeginTran();//开启事务
                try
                {
                    //Hashtable pars = new Hashtable();       //用来存放参数
                    var pars = new List<string>();
                    //for (int i = 0; i < 10; i++)
                    //{
                    //    pars.Add("202203240009000479940290");
                    //}
                    string[] strr = new string[comDetail.Count];
                    var dom = HttpHelper.EncodeParsToFuMa(comDetail, "ceshi", "ExInfoXml");
                    for (int i = 0; i < comDetail.Count(); i++)
                    {
                        switch (level)
                        {
                            case 1:
                                strr[i] = comDetail[i].BoxNo + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime);
                                break;
                            case 2:
                                strr[i] = comDetail[i].BoxNo3 + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime);
                                break;
                            case 3:
                                strr[i] = comDetail[i].BoxNo2 + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime);
                                break;
                            default:
                                break;
                        }
                        pars.Add(strr[i]);
                    }
                    //string fileName = $"{xmlName}_{notice.OrderCode}_linklink";
                    var dom = HttpHelper.EncodeParsToFuMa(pars, "", xmlName, "ExInfoXml");
                    ////添加操作日志记录
                    //var k = new OperationSOServer().AddLogOperationSo("出库作业", "出库单据", notice.SONo, "关单", $"关闭了单据号为{notice.SONo}的单据信息", userId);
                    var k = new OperationSOServer().AddLogOperationSo("出库作业", "出库单据", notice.SONo, "上传", $"上传了单据号为{notice.SONo}的单据信息", userId);
                    Db.CommitTran();
                    return dom;
@@ -2395,7 +2455,7 @@
                var allot = new AllotLocation();
                #region 集合 
                Db.BeginTran();
                try
                {
@@ -2836,7 +2896,7 @@
                            {
                                s.Status = "1";
                            }
                            var sd = Db.Updateable(s).UpdateColumns(it => new { it.LockQty, it.Status }).ExecuteCommand();
                        }
@@ -2913,7 +2973,7 @@
                            notice.Status = "3";//正在执行
                        }
                    }
                    notice.UpdateUser = userId;
                    notice.UpdateTime = DateTime.Now;
                    var zd = Db.Updateable(notice).ExecuteCommand();
@@ -4370,7 +4430,7 @@
                                }
                            }
                        }
                        if(string.IsNullOrEmpty(newAddress))
                        if (string.IsNullOrEmpty(newAddress))
                        {
                            //已有物品的巷道
                            var roadwayHave = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.WareHouseNo == "W01").GroupBy(g => g.RoadwayNo).Select(s => s.RoadwayNo).ToList();
@@ -4401,7 +4461,7 @@
                                }
                            }
                        }
                    }
                }
@@ -4582,7 +4642,7 @@
                else
                {
                    // 取最上面一排
                    location = slotModel[0].LocatNo;
                    location = slotModel[0].LocatNo;
                }
                bl = true;