9个文件已修改
991 ■■■■ 已修改文件
HTML/views/SOSetting/ExportNotice.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/HouseDataSetting/stockQuery.html 872 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/InterFaceModel/HttpModel.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/DataServer/StockDetailServer.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaCrController.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportNotice.html
@@ -400,11 +400,12 @@
                        {{# function GetBtn2(d){
                                var html = '';
                                
                                if((d.Status == "0" ||d.Status == "1")){
                                if(d.AllotQty<d.Qty){
                                    html += `<a class="layui-btn layui-btn-normal layui-btn-xs shoufenClass" lay-event="wan">
                                                <i class="layui-icon layui-icon-ok"></i>手动分配
                                            </a>`;
                                } 
                                if(d.Status == "0" && d.Origin == "WMS"){
                                    html +=`<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
                                                <i class="layui-icon layui-icon-delete"></i>删除
Pda/View/HouseDataSetting/stockQuery.html
@@ -1,125 +1,139 @@
<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" />
        <meta charset="UTF-8" />
        <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> -->
        <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> -->
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>Boxline PDA</title>
        <link rel="stylesheet" href="/layui/css/layui.css" />
        <link rel="stylesheet" href="/css/style.css" />
        <script src="/js/adaptive.js"></script>
        <link rel="stylesheet" href="/css/my.css" />
        <style type="text/css">
            .layui-form-label {
                width: 20%;
            }
            .layui-input-block {
                width: 80%;
                margin-left: 20%;
            }
            .div-tbl-title {
                width: 98%;
                margin: auto;
                /* background-color: #4476A7; */
                height: 30px;
                margin-top: 20px;
            }
            .div-tbl-title table {
                width: 100%;
                height: 30px;
            }
            .div-tbl-title td {
                width: 50%;
                height: 30px;
                line-height: 30px;
            }
            .div-tbl-title span {
                float: left;
                width: 60%;
                height: 30px;
                line-height: 30px;
            }
            .div-tbl-title input {
                float: left;
                width: 40%;
                height: 30px;
                line-height: 30px;
                border: none;
            }
            .layout-tbl-paging {
                margin-top: 0;
            }
            .layout-bill-info {
                height: auto;
            }
            .btn-ok {
                border: none;
                color: #FFFFFF;
                background-color: #0a93e3;
                width: 48%;
                height: 36px;
                border-radius: 5px;
                float: left;
                margin: 0 1%;
                margin-left: 25%;
            }
            .btn-ok:active {
                opacity: 0.8;
            }
            td{
                word-break: break-all; word-wrap:break-word;
            }
        </style>
        <link rel="stylesheet" href="/css/adapter.css" />
    </head>
    <body>
        <div id="" class="main-content">
            <div id="" class="layout-title" >
                <table border="" cellspacing="" cellpadding="">
                    <tr>
                        <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg" ></a></td>
                        <td class="title-text">库存查询</td>
                        <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg" ></td>
                    </tr>
                </table>
<head>
    <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta charset="UTF-8" />
    <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> -->
    <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> -->
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Boxline PDA</title>
    <link rel="stylesheet" href="/layui/css/layui.css" />
    <link rel="stylesheet" href="/css/style.css" />
    <script src="/js/adaptive.js"></script>
    <link rel="stylesheet" href="/css/my.css" />
    <style type="text/css">
        .layui-form-label {
            width: 20%;
        }
        .layui-input-block {
            width: 80%;
            margin-left: 20%;
        }
        .div-tbl-title {
            width: 98%;
            margin: auto;
            /* background-color: #4476A7; */
            height: 30px;
            margin-top: 20px;
        }
        .div-tbl-title table {
            width: 100%;
            height: 30px;
        }
        .div-tbl-title td {
            width: 50%;
            height: 30px;
            line-height: 30px;
        }
        .div-tbl-title span {
            float: left;
            width: 60%;
            height: 30px;
            line-height: 30px;
        }
        .div-tbl-title input {
            float: left;
            width: 40%;
            height: 30px;
            line-height: 30px;
            border: none;
        }
        .layout-tbl-paging {
            margin-top: 0;
        }
        .layout-bill-info {
            height: auto;
        }
        .btn-ok {
            border: none;
            color: #FFFFFF;
            background-color: #0a93e3;
            width: 48%;
            height: 36px;
            border-radius: 5px;
            float: left;
            margin: 0 1%;
            margin-left: 25%;
        }
        .btn-ok:active {
            opacity: 0.8;
        }
        td {
            word-break: break-all;
            word-wrap: break-word;
        }
    </style>
    <link rel="stylesheet" href="/css/adapter.css" />
</head>
<body>
    <div id="" class="main-content">
        <div id="" class="layout-title">
            <table border="" cellspacing="" cellpadding="">
                <tr>
                    <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td>
                    <td class="title-text">库存查询</td>
                    <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td>
                </tr>
            </table>
        </div>
        <div id="" class="layout-sub-content">
            <div id="menuList" class="menu">
                <ul class="" style="text-align: center;">
                    <li><a href="../index.html">主页</a></li>
                    <li><a href="../login.html">重新登录</a></li>
                </ul>
            </div>
            <div id="" class="layout-sub-content">
                <div id="menuList" class="menu">
                    <ul class="" style="text-align: center;">
                        <li><a href="../index.html">主页</a></li>
                        <li><a href="../login.html">重新登录</a></li>
                    </ul>
                </div>
                <div id="" class="layout-bill-info">
                    <form class="layui-form" action="" style="height: auto;">
                        <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                            <label class="layui-form-label">储位地址</label>
                            <div class="layui-input-block">
                                <input id="LocatNo" type="text" lay-verify="stock" placeholder="储位地址"
                                    autocomplete="off" class="layui-input">
                            </div>
            <div id="" class="layout-bill-info">
                <form class="layui-form" action="" style="height: auto;">
                    <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                        <label class="layui-form-label">储位地址</label>
                        <div class="layui-input-block">
                            <input id="LocatNo" type="text" lay-verify="stock" placeholder="储位地址" autocomplete="off"
                                class="layui-input">
                        </div>
                        <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                            <label class="layui-form-label">托盘条码</label>
                            <div class="layui-input-block">
                                <input id="PalletNo" type="text" lay-verify="stock" placeholder="托盘条码"
                                    autocomplete="off" class="layui-input">
                            </div>
                    </div>
                    <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                        <label class="layui-form-label">托盘条码</label>
                        <div class="layui-input-block">
                            <input id="PalletNo" type="text" lay-verify="stock" placeholder="托盘条码" autocomplete="off"
                                class="layui-input">
                        </div>
                        <!-- 箱码 -->
                        <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                            <label class="layui-form-label">箱码</label>
                            <div class="layui-input-block">
                                <input id="BoxNo" type="text" lay-verify="stock" placeholder="箱码"
                                    autocomplete="off" class="layui-input">
                            </div>
                    </div>
                    <!-- 箱码 -->
                    <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                        <label class="layui-form-label">箱码</label>
                        <div class="layui-input-block">
                            <input id="BoxNo" type="text" lay-verify="stock" placeholder="箱码" autocomplete="off"
                                class="layui-input">
                        </div>
                        <!-- <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                    </div>
                    <!-- <div id="" class="layui-form-item layout-input" style="margin-top: 5px;">
                            <label class="layui-form-label">物料编码</label>
                            <div class="layui-input-block">
                                <input id="SkuNo" type="text" lay-verify="stock"
@@ -140,13 +154,13 @@
                                    autocomplete="off" class="layui-input" style="border: 0px;" disabled>
                            </div>
                        </div> -->
                        <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;">
                            <button id="btnQuery" class="btn-ok"  type="button">查询</button>
                        </div>
                    </form>
                </div>
                <!-- <div id="" class="div-tbl-title">
                    <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;">
                        <button id="btnQuery" class="btn-ok" type="button">查询</button>
                    </div>
                </form>
            </div>
            <!-- <div id="" class="div-tbl-title">
                    <table border="0" cellspacing="" cellpadding="" style="width: 100%;">
                        <tr>
                            <td>
@@ -166,320 +180,320 @@
                        </tr>
                    </table>
                </div> -->
                <div id="" class="layout-tbl-paging" style="margin-top: 5px;">
                    <!-- <p class="box-list-title">已绑定箱子列表</p> -->
                    <table id="tableBoxList" class="tbl-box-list"  border="1px"    >
                        <tr>
                            <th >物料名称</th>
                            <th >物料编码</th>
                            <th >物品批次</th>
                            <th >库存<br>数量</th>
                            <th >锁定<br>数量</th>
                            <th >冻结<br>数量</th>
                        </tr>
                        <tr id="boxCell" style="display: none;">
                            <td name="SkuName" style="word-wrap: break-word; max-width: 64px;">物料名称</td>
                            <td name="SkuNo" style="word-wrap: break-word; max-width: 48px;">物料编码</td>
                            <td name="LotNo" style="word-wrap: break-word; max-width: 48px;">物料批次</td>
                            <td name="Qty">剩余数量</td>
                            <td name="LockQty">锁定数量</td>
                            <td name="FrozenQty">冻结数量</td>
                        </tr>
                    </table>
                    <!-- 分页 -->
                    <table id="tableBoxPages" class="tbl-box-pages"  cellspacing="" cellpadding="">
                        <tr  >
                            <td class="page-prev">上一页</td>
                            <td class="page-num page-num-select">1</td>
                            <td class="page-num">2</td>
                            <td class="page-num">3</td>
                            <td class="page-num">4</td>
                            <td class="page-num">5</td>
                            <td class="page-next">下一页</td>
                        </tr>
                    </table>
                </div>
            <div id="" class="layout-tbl-paging" style="margin-top: 5px;">
                <!-- <p class="box-list-title">已绑定箱子列表</p> -->
                <table id="tableBoxList" class="tbl-box-list" border="1px">
                    <tr>
                        <th>物料名称</th>
                        <th>物料编码</th>
                        <th>物品批次</th>
                        <th>库存<br>数量</th>
                        <th>锁定<br>数量</th>
                        <th>冻结<br>数量</th>
                    </tr>
                    <tr id="boxCell" style="display: none;">
                        <td name="SkuName" style="word-wrap: break-word; max-width: 64px;">物料名称</td>
                        <td name="SkuNo" style="word-wrap: break-word; max-width: 48px;">物料编码</td>
                        <td name="LotNo" style="word-wrap: break-word; max-width: 48px;">物料批次</td>
                        <td name="Qty">剩余数量</td>
                        <td name="LockQty">锁定数量</td>
                        <td name="FrozenQty">冻结数量</td>
                    </tr>
                </table>
                <!-- 分页 -->
                <table id="tableBoxPages" class="tbl-box-pages" cellspacing="" cellpadding="">
                    <tr>
                        <td class="page-prev">上一页</td>
                        <td class="page-num page-num-select">1</td>
                        <td class="page-num">2</td>
                        <td class="page-num">3</td>
                        <td class="page-num">4</td>
                        <td class="page-num">5</td>
                        <td class="page-next">下一页</td>
                    </tr>
                </table>
            </div>
        </div>
        <script src="/js/jquery-3.5.1.min.js"></script>
        <script src="/layui/layui.js"></script>
        <script src="/js/public.js"></script>
        <script src="/js/jquery.cookie.js"></script>
        <script>
            layui.use(['form', 'jquery'], function() {
                var form = layui.form
                //当前分页
                var curPageIndex = 1
                var tableData = null
                //所选入库单的详细信息
                //console.log($.cookie('userId'));
                // if (!$.cookie('userId')) {
                //     layer.msg('登陆失效,请重新登陆', {
                //         icon: 2,
                //         time: 2000 //2秒关闭(如果不配置,默认是3秒)
                //     }, function() {
                //         location.href = "login.html";
                //         //回调
                //     });
                // }
                $("#menuImg").click(function(e){
                    //console.log("menuImg")
                    e.stopPropagation()
                    if($("#menuList").is(":hidden")){
                        $("#menuList").show()
                    }else{
                        $("#menuList").hide()
                    }
                })
                $('body').click(function(){
                    // //console.log("body")
    </div>
    <script src="/js/jquery-3.5.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/js/public.js"></script>
    <script src="/js/jquery.cookie.js"></script>
    <script>
        layui.use(['form', 'jquery'], function () {
            var form = layui.form
            //当前分页
            var curPageIndex = 1
            var tableData = null
            //所选入库单的详细信息
            //console.log($.cookie('userId'));
            // if (!$.cookie('userId')) {
            //     layer.msg('登陆失效,请重新登陆', {
            //         icon: 2,
            //         time: 2000 //2秒关闭(如果不配置,默认是3秒)
            //     }, function() {
            //         location.href = "login.html";
            //         //回调
            //     });
            // }
            $("#menuImg").click(function (e) {
                //console.log("menuImg")
                e.stopPropagation()
                if ($("#menuList").is(":hidden")) {
                    $("#menuList").show()
                } else {
                    $("#menuList").hide()
                })
                function clear(){
                    $("#LocatNo").val('');
                    $("#PalletNo").val('');
                    //$("#BoxNo").val('');
                    //$("#SkuNo").val("");
                    //$("#SkuName").val("");
                    //$("#Standard").val("");
                }
                $("#btnQuery").click(function(){
                    if($('#LocatNo').val() == '' && $('#PalletNo').val() == '' && $('#BoxNo').val() == '' && $('#SkuName').val() == ''){
                        // layer.msg("请输入查询条件", {
                        //     icon: 2,
                        //     time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        // }, function() {});
                        return
                    }
                    var param = {
                        LocatNo: $('#LocatNo').val(),
                        PalletNo: $('#PalletNo').val(),
                        BoxNo:$('#BoxNo').val(),
                    };
                    sendData(IP + "/PdaCr/GetStockQueryList", param, 'get', function(res) {
                        console.log("库存查询:",res)
                        if (res.code == 0) { //成功
                            clear();
                            $("#LocatNo").val(res.data[0].LocatNo);
                            $("#PalletNo").val(res.data[0].PalletNo);
                            //$("#BoxNo").val(res.data[0].BoxNo);
                            // $("#SkuNo").val(res.data[0].SkuNo);
                            // $("#SkuName").val(res.data[0].SkuName);
                            // $("#Standard").val(res.data[0].Standard);
                            tableData = deepCopy(res.data)
                            refreshTable()
                        } else { //不成功
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function() {
                                clear();
                                let trs = $("#tableBoxList tr")
                                let len = trs.length
                                //console.log("tr 数量 + " + trs.length)
                                for(i=len - 1; i >=2; i--){
                                    trs[i].remove();
                                }
                            });
                        }
                    });
                })
                function refreshTable() {
                    //先清空一下箱子列表
                    let trs = $("#tableBoxList tr")
                    let len = trs.length
                    //console.log("tr 数量 + " + trs.length)
                    for(i=len - 1; i >=2; i--){
                        trs[i].remove();
                    }
                    //设置托盘号
                    // $("#palletCode").val($.cookie('stockCode'))
                    if (tableData.length > 0) { //成功
                        // $("#boxNum").val(tableData.length)
                        var list = tableData
                        var arrTrs = new Array()
                        let idx = 0
                        for(var i in list) {
                            // list[i].BoxCode
                            var tr = $("#boxCell").eq(0).clone();
                            tr.appendTo("#tableBoxList");
                            // tr.attr('id', list[i].BoxCode)
                            idx++;
                            tr.attr('index', idx)
                            tr.find("td[name='SkuName']").html(list[i].SkuName);
                            tr.find("td[name='SkuNo']").html(list[i].SkuNo);
                            tr.find("td[name='LotNo']").html(list[i].LotNo);
                            tr.find("td[name='Qty']").html(list[i].Qty);
                            tr.find("td[name='LockQty']").html(list[i].LockQty);
                            tr.find("td[name='FrozenQty']").html(list[i].FrozenQty);
                            // tr.find("td[name='InspectQty']").html(list[i].InspectQty);
                            // //console.log("boxcode is "+tr.find("td[name='boxcode']").html())
                            tr.show();
                            arrTrs[i] = tr
                        }
                        //设置分页
                        setPages(1, list.length)
            })
            $('body').click(function () {
                // //console.log("body")
                $("#menuList").hide()
            })
            function clear() {
                $("#LocatNo").val('');
                $("#PalletNo").val('');
                //$("#BoxNo").val('');
                //$("#SkuNo").val("");
                //$("#SkuName").val("");
                //$("#Standard").val("");
            }
            $("#btnQuery").click(function () {
                if ($('#LocatNo').val() == '' && $('#PalletNo').val() == '' && $('#BoxNo').val() == '' && $('#SkuName').val() == '') {
                    // layer.msg("请输入查询条件", {
                    //     icon: 2,
                    //     time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    // }, function() {});
                    return
                }
                var param = {
                    LocatNo: $('#LocatNo').val(),
                    PalletNo: $('#PalletNo').val(),
                    BoxNo: $('#BoxNo').val(),
                };
                sendData(IP + "/PdaCr/GetStockQueryList", param, 'get', function (res) {
                    console.log("库存查询:", res)
                    if (res.code == 0) { //成功
                        clear();
                        $("#LocatNo").val(res.data[0].LocatNo);
                        $("#PalletNo").val(res.data[0].PalletNo);
                        //$("#BoxNo").val(res.data[0].BoxNo);
                        // $("#SkuNo").val(res.data[0].SkuNo);
                        // $("#SkuName").val(res.data[0].SkuName);
                        // $("#Standard").val(res.data[0].Standard);
                        tableData = deepCopy(res.data)
                        refreshTable()
                    } else { //不成功
                        // $("#boxNum").val(0)
                        layer.msg("无数据", {
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function() {});
                        setPages(1, 0)
                        }, function () {
                            clear();
                            let trs = $("#tableBoxList tr")
                            let len = trs.length
                            //console.log("tr 数量 + " + trs.length)
                            for (i = len - 1; i >= 2; i--) {
                                trs[i].remove();
                            }
                        });
                    }
                }
                //设置分页
                function setPages(pageIndex, boxNum){
                    if(boxNum <= 0){
                        //列表为空,隐藏分页页码
                        $("#tableBoxPages").hide()
                        return
                    }
                    let pageNum = Math.floor(boxNum / 10);
                    if(boxNum % 10 > 0){
                        pageNum += 1;
                    }
                    //console.log("pageNum is " + pageNum)
                    $("#tableBoxPages").find("tr").remove()
                    let table = $("#tableBoxPages")
                    $("<tr></tr>").appendTo("#tableBoxPages")
                    // let newTr = table.append("<tr></tr>")
                    // newTr.append("<td class='page-prev'>上一页</td>")
                    $("<td id='prevPage' class='page-prev'>上一页</td>").appendTo("#tableBoxPages tr")
                    $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function(){
                        onClickPrevPage()
                    })
                    for(i=1; i < pageNum + 1; i++){
                        // newTr.append("<td class='page-num'>"+ i +"</td>")
                        $("<td class='page-num'>"+ i +"</td>").appendTo("#tableBoxPages tr")
                    }
                    // newTr.append("<td class='page-next'>下一页</td>")
                    $("<td id='nextPage' class='page-next'>下一页</td>").appendTo("#tableBoxPages tr")
                    $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function(){
                        onClickNextPage()
                    })
                    // pages.show()
                    $("#tableBoxPages").show()
                    setCurPage(1)
                }
                //设置当前分页
                function setCurPage(pageIndex){
                    let totalTrNum = $("#tableBoxList tr").length
                    if(totalTrNum <= 2 ){
                        //console.log("tableBoxList 为空 totalTrNum: " + totalTrNum)
                        //curPageIndex = 1
                        return
                    }
                    let pageNum = getBoxPageNum()
                    if(pageIndex > pageNum){
                        //console.log("设置的页码超出页数, pageIndex : " + pageIndex)
                        //curPageIndex = 1
                        return
                    }
                    let startIndex = (pageIndex - 1) * 10 + 1
                    let n = totalTrNum - startIndex
                    let endIndex = 0
                    if(n > 9){
                        endIndex = startIndex + 9
                    }else{
                        endIndex = startIndex + n
                    }
                    //console.log("startIndex is "+startIndex)
                    //console.log("endIndex is "+endIndex)
                    //startIndex =2
                    //endIndex = 2
                    let trs = $("#tableBoxList tr")
                    //console.log("行数 "+trs.length)
                    let d = 0
                    for(let i = 2; i < trs.length; i++){
                        //console.log("行索引 " + trs.eq(i).attr('index'))
                        let t = trs.eq(i)
                        d = t.attr('index')
                        if(d >= startIndex && d <= endIndex){
                            //console.log("需要显示")
                            //显示行
                            t.show()
                        }else{
                            //隐藏行
                            t.hide()
                        }
                    }
                    curPageIndex = pageIndex
                    let ptr = $("#tableBoxPages tr")
                    for(let i = 1; i < pageNum+1; i++){
                        ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
                        if(i == curPageIndex){
                            ptr.eq(0).find("td").eq(i).addClass("page-num-select")
                        }
                    }
                    //console.log("totalTrNum is " + totalTrNum)
                }
                function onClickPrevPage(){
                    //console.log("上一页按钮被点击")
                    if(curPageIndex == 1){
                        return
                    }
                    setCurPage(curPageIndex - 1)
                }
                function onClickNextPage(){
                    //console.log("下一页按钮被点击")
                    let n = getBoxPageNum()
                    if(curPageIndex == n){
                        return
                    }
                    setCurPage(curPageIndex + 1)
                }
                function getBoxPageNum()
                {
                    let num = $("#tableBoxList tr").length
                    if(num <= 2 ){
                        return 0
                    }
                    let pageNum = Math.floor(num / 10);
                    if(num % 10 > 0){
                        pageNum += 1;
                    }
                    return pageNum
                }
                form.verify({
                    stock: [/^[\S]{6}$/, '托盘条码必须为六位字符']
                });
            })
        </script>
    </body>
</html>
            function refreshTable() {
                //先清空一下箱子列表
                let trs = $("#tableBoxList tr")
                let len = trs.length
                //console.log("tr 数量 + " + trs.length)
                for (i = len - 1; i >= 2; i--) {
                    trs[i].remove();
                }
                //设置托盘号
                // $("#palletCode").val($.cookie('stockCode'))
                if (tableData.length > 0) { //成功
                    // $("#boxNum").val(tableData.length)
                    var list = tableData
                    var arrTrs = new Array()
                    let idx = 0
                    for (var i in list) {
                        // list[i].BoxCode
                        var tr = $("#boxCell").eq(0).clone();
                        tr.appendTo("#tableBoxList");
                        // tr.attr('id', list[i].BoxCode)
                        idx++;
                        tr.attr('index', idx)
                        tr.find("td[name='SkuName']").html(list[i].SkuName);
                        tr.find("td[name='SkuNo']").html(list[i].SkuNo);
                        tr.find("td[name='LotNo']").html(list[i].LotNo);
                        tr.find("td[name='Qty']").html(list[i].Qty);
                        tr.find("td[name='LockQty']").html(list[i].LockQty);
                        tr.find("td[name='FrozenQty']").html(list[i].FrozenQty);
                        // tr.find("td[name='InspectQty']").html(list[i].InspectQty);
                        // //console.log("boxcode is "+tr.find("td[name='boxcode']").html())
                        tr.show();
                        arrTrs[i] = tr
                    }
                    //设置分页
                    setPages(1, list.length)
                } else { //不成功
                    // $("#boxNum").val(0)
                    layer.msg("无数据", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { });
                    setPages(1, 0)
                }
            }
            //设置分页
            function setPages(pageIndex, boxNum) {
                if (boxNum <= 0) {
                    //列表为空,隐藏分页页码
                    $("#tableBoxPages").hide()
                    return
                }
                let pageNum = Math.floor(boxNum / 10);
                if (boxNum % 10 > 0) {
                    pageNum += 1;
                }
                //console.log("pageNum is " + pageNum)
                $("#tableBoxPages").find("tr").remove()
                let table = $("#tableBoxPages")
                $("<tr></tr>").appendTo("#tableBoxPages")
                // let newTr = table.append("<tr></tr>")
                // newTr.append("<td class='page-prev'>上一页</td>")
                $("<td id='prevPage' class='page-prev'>上一页</td>").appendTo("#tableBoxPages tr")
                $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () {
                    onClickPrevPage()
                })
                for (i = 1; i < pageNum + 1; i++) {
                    // newTr.append("<td class='page-num'>"+ i +"</td>")
                    $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr")
                }
                // newTr.append("<td class='page-next'>下一页</td>")
                $("<td id='nextPage' class='page-next'>下一页</td>").appendTo("#tableBoxPages tr")
                $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () {
                    onClickNextPage()
                })
                // pages.show()
                $("#tableBoxPages").show()
                setCurPage(1)
            }
            //设置当前分页
            function setCurPage(pageIndex) {
                let totalTrNum = $("#tableBoxList tr").length
                if (totalTrNum <= 2) {
                    //console.log("tableBoxList 为空 totalTrNum: " + totalTrNum)
                    //curPageIndex = 1
                    return
                }
                let pageNum = getBoxPageNum()
                if (pageIndex > pageNum) {
                    //console.log("设置的页码超出页数, pageIndex : " + pageIndex)
                    //curPageIndex = 1
                    return
                }
                let startIndex = (pageIndex - 1) * 10 + 1
                let n = totalTrNum - startIndex
                let endIndex = 0
                if (n > 9) {
                    endIndex = startIndex + 9
                } else {
                    endIndex = startIndex + n
                }
                //console.log("startIndex is "+startIndex)
                //console.log("endIndex is "+endIndex)
                //startIndex =2
                //endIndex = 2
                let trs = $("#tableBoxList tr")
                //console.log("行数 "+trs.length)
                let d = 0
                for (let i = 2; i < trs.length; i++) {
                    //console.log("行索引 " + trs.eq(i).attr('index'))
                    let t = trs.eq(i)
                    d = t.attr('index')
                    if (d >= startIndex && d <= endIndex) {
                        //console.log("需要显示")
                        //显示行
                        t.show()
                    } else {
                        //隐藏行
                        t.hide()
                    }
                }
                curPageIndex = pageIndex
                let ptr = $("#tableBoxPages tr")
                for (let i = 1; i < pageNum + 1; i++) {
                    ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
                    if (i == curPageIndex) {
                        ptr.eq(0).find("td").eq(i).addClass("page-num-select")
                    }
                }
                //console.log("totalTrNum is " + totalTrNum)
            }
            function onClickPrevPage() {
                //console.log("上一页按钮被点击")
                if (curPageIndex == 1) {
                    return
                }
                setCurPage(curPageIndex - 1)
            }
            function onClickNextPage() {
                //console.log("下一页按钮被点击")
                let n = getBoxPageNum()
                if (curPageIndex == n) {
                    return
                }
                setCurPage(curPageIndex + 1)
            }
            function getBoxPageNum() {
                let num = $("#tableBoxList tr").length
                if (num <= 2) {
                    return 0
                }
                let pageNum = Math.floor(num / 10);
                if (num % 10 > 0) {
                    pageNum += 1;
                }
                return pageNum
            }
            form.verify({
                stock: [/^[\S]{6}$/, '托盘条码必须为六位字符']
            });
        })
    </script>
</body>
</html>
Wms/Model/InterFaceModel/HttpModel.cs
@@ -38,6 +38,11 @@
            /// </summary>
            public string Message { get; set; }
        }
        public class SapResultModel
        {
            public bool RESULT { get; set; }
            public string MESSAGE { get; set; }
        }
        public class SendQcNoModel
        {
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -1539,10 +1539,10 @@
                var response = HttpHelper.DoPost(url, jsonData, "入库单完成上传", "SAP");
                var obj = JsonConvert.DeserializeObject<ErpModel>(response);//解析返回数据
                if (obj.Success != 0)
                var obj = JsonConvert.DeserializeObject<SapResultModel>(response);//解析返回数据
                if (obj.RESULT != true)
                {
                    throw new Exception("上传失败" + obj.Message);
                    throw new Exception("上传失败" + obj.MESSAGE);
                }
                #endregion
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -422,7 +422,7 @@
        /// <param name="palletNo">托盘号</param> 
        /// <param name="boxNo">箱码</param> 
        /// <returns></returns>
        public async Task<List<StockDetailWithQtyDto>> GetStockQueryList(string locatNo, string palletNo, string boxNo)
        public List<StockDetailWithQtyDto> GetStockQueryList(string locatNo, string palletNo, string boxNo)
        {
            string dataSql = "", whereStr = "";
@@ -447,7 +447,7 @@
    group by a.SkuName,a.SkuNo,a.LotNo,b.LocatNo,a.PalletNo
    order by a.SkuNo,a.LotNo";
            }
            DataTable dataDt = await Db.Ado.GetDataTableAsync(dataSql);
            DataTable dataDt = Db.Ado.GetDataTable(dataSql);
            var result = dataDt.Rows.Cast<DataRow>().Select(e => new StockDetailWithQtyDto
            {
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -753,12 +753,12 @@
                    //系统对接后放开
                    var jsonData = JsonConvert.SerializeObject(soInfo);
                    var response = HttpHelper.DoPost(url, jsonData, "出库单完成上传", "ERP");
                    var response = HttpHelper.DoPost(url, jsonData, "出库单完成上传", "SAP");
                    var obj = JsonConvert.DeserializeObject<ErpModel>(response);//解析返回数据
                    if (obj.Success != 0)
                    var obj = JsonConvert.DeserializeObject<SapResultModel>(response);//解析返回数据
                    if (obj.RESULT != true)
                    {
                        throw new Exception("上传失败" + obj.Message);
                        throw new Exception("上传失败" + obj.MESSAGE);
                    }
                    #endregion
                }
@@ -1452,7 +1452,8 @@
                {
                    throw new Exception("未查询到出库单据信息");
                }
                if (notice.Origin != "WMS" || notice.Status != "0")
                //if (notice.Origin != "WMS" || notice.Status != "0")
                if (notice.Status != "0")
                {
                    throw new Exception("参数异常,请检查状态是否未等待执行或来源是否是WMS");
                }
Wms/WMS.BLL/DataServer/StockDetailServer.cs
@@ -14,11 +14,11 @@
namespace WMS.BLL.DataServer
{
    public class StockDetailServer:DbHelper<DataStockDetail>,IStockDetailServer
    public class StockDetailServer : DbHelper<DataStockDetail>, IStockDetailServer
    {
        private static readonly SqlSugarScope Db = DataContext.Db;
        public StockDetailServer():base(Db)
        public StockDetailServer() : base(Db)
        {
        }
@@ -38,17 +38,14 @@
        /// <param name="bitBoxMark">零箱标记</param>
        /// <param name="inspectStatus">质量状态</param>
        /// <returns></returns>
        public List<StockDetailDto> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status,
            string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName,
            string startTime, string endTime, string WareHouseNo, string AreaNo)
        public List<StockDetailDto> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName, string startTime, string endTime, string WareHouseNo, string AreaNo)
        {
            string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName,roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName," +
                "area.AreaNo + '-' + area.AreaName as AreaName " +
                "from DataStockDetail detail " +
                "left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo " +
                "left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo " +
                "left join SysStorageArea area on detail.AreaNo = area.AreaNo " +
                "where detail.IsDel = @isdel";
            string str = $@"select detail.*,house.WareHouseNo+'-'+house.WareHouseName as WareHouseName,roadway.RoadwayNo+'-'+roadway.RoadwayName as RoadwayName,area.AreaNo+'-'+area.AreaName as AreaName
from DataStockDetail detail
left join SysStorageRoadway roadway on detail.RoadwayNo=roadway.RoadwayNo
left join SysWareHouse house on detail.WareHouseNo=house.WareHouseNo
left join SysStorageArea area on detail.AreaNo=area.AreaNo
where detail.IsDel=@isdel";
            //判断物料号是否为空
            if (!string.IsNullOrEmpty(skuNo))
            {
@@ -72,7 +69,7 @@
            //判断零托标记是否为空
            if (!string.IsNullOrEmpty(bitPalletMark))
            {
                str += " and detail.BitPalletMark = @bitpalletmark";
                str += " and detail.BitPalletMark=@bitpalletmark";
            }
            //判断货主编码是否为空
            if (!string.IsNullOrEmpty(ownerNo))
@@ -86,29 +83,30 @@
            }
            if (!string.IsNullOrEmpty(startTime))
            {
                str += $" and detail.CompleteTime >= '{startTime}'";
                str += $" and detail.CompleteTime>='{startTime}'";
            }
            if (!string.IsNullOrEmpty(endTime))
            {
                endTime = Convert.ToDateTime(endTime).AddDays(1).ToString();
                str += $" and detail.CompleteTime < '{endTime}'";
                str += $" and detail.CompleteTime<'{endTime}'";
            }
            if (!string.IsNullOrEmpty(WareHouseNo))
            {
                str += $" and detail.WareHouseNo = '{WareHouseNo}'";
            }
            //重复条件
            //if (!string.IsNullOrEmpty(WareHouseNo))
            //{
            //    str += $" and detail.WareHouseNo = '{WareHouseNo}'";
            //}
            if (!string.IsNullOrEmpty(WareHouseNo))
            {
                str += $" and detail.WareHouseNo = '{WareHouseNo}'";
                str += $" and detail.WareHouseNo='{WareHouseNo}'";
            }
            if (!string.IsNullOrEmpty(AreaNo))
            {
                str += $" and detail.AreaNo = '{AreaNo}'";
                str += $" and detail.AreaNo='{AreaNo}'";
            }
            int i = 0;
            //在箱码明细中获取相应数据
            string boxstr = "select StockDetailId from DataBoxInfo Where IsDel = @isdel";
            string boxstr = "select StockDetailId from DataBoxInfo Where IsDel=@isdel";
            //判断箱码是否为空
            if (!string.IsNullOrEmpty(boxNo))
            {
@@ -118,27 +116,27 @@
            //判断箱支状态是否为空
            if (!string.IsNullOrEmpty(status))
            {
                boxstr += " and Status = @status";
                boxstr += " and Status=@status";
                i = 1;
            }
            //判断检验标记是否为空
            if (!string.IsNullOrEmpty(inspectMark))
            {
                boxstr += " and InspectMark = @inspectmark";
                str += " and detail.InspectMark = @inspectmark";
                boxstr += " and InspectMark=@inspectmark";
                str += " and detail.InspectMark=@inspectmark";
                i = 1;
            }
            //判断零箱标记是否为空
            if (!string.IsNullOrEmpty(bitBoxMark))
            {
                boxstr += " and BitBoxMark = @bitboxmark";
                boxstr += " and BitBoxMark=@bitboxmark";
                i = 1;
            }
            //判断质量状态是否为空
            if (!string.IsNullOrEmpty(inspectStatus))
            {
                boxstr += " and InspectStatus = @inspectstatus";
                str += " and detail.InspectStatus = @inspectstatus";
                boxstr += " and InspectStatus=@inspectstatus";
                str += " and detail.InspectStatus=@inspectstatus";
                i = 1;
            }
            //将箱码数据进行排序
@@ -174,11 +172,11 @@
                }
                if (!string.IsNullOrEmpty(arr))
                {
                    str += $" and Id in ({arr})";
                    str += $" and detail.Id in ({arr})";
                }
                else
                {
                    str += " and Id = ''";
                    str += " and detail.Id=''";
                }
            }
@@ -251,7 +249,7 @@
        /// <param name="bitBoxMark">零箱标记</param>
        /// <param name="inspectStatus">质量状态</param>
        /// <returns></returns>
        public List<DataStockDetail> GetBindListDaoChu(string skuNo, string skuName, string palletNo, string lotNo, string boxNo,
        public List<DataStockDetail> GetBindListDaoChu(string skuNo, string skuName, string palletNo, string lotNo, string boxNo,
            string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus)
        {
            string str = "select Id,LotNo,LotText,SupplierLot,SkuNo,SkuName,Qty,LockQty,FrozenQty,AreaNo,LocatNo,PalletNo,PalletNo2," +
Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs
@@ -28,7 +28,7 @@
        /// <param name="crNo">单据号</param>
        /// <param name="palletNo">托盘号</param>
        /// <returns></returns>
        Task<List<StockCheckDetailDto>> GetStockCheckDetailList(string crNo,string palletNo);
        Task<List<StockCheckDetailDto>> GetStockCheckDetailList(string crNo, string palletNo);
        /// <summary>
        /// 获取要盘点的箱码信息(盘点记录中数据)
@@ -39,7 +39,7 @@
        /// <param name="boxNo">箱码号</param>
        /// <param name="isContinue">是否数量盘点</param>
        /// <returns></returns>
        Task<List<StockCheckLogDto>> GetStockCheckLogList(string crNo, string crDetail,string palletNo,string boxNo,string isContinue);
        Task<List<StockCheckLogDto>> GetStockCheckLogList(string crNo, string crDetail, string palletNo, string boxNo, string isContinue);
        /// <summary>
        /// 盘点库存
@@ -53,7 +53,7 @@
        /// <param name="qty">数量</param>
        /// <param name="isContinue">是否数量盘点</param>
        /// <param name="userId"></param>
        Task CrSetCheck(string crNo, string crDetail, string palletNo, string boxNo,string boxNo3,string result, decimal? qty,string isContinue, int userId);
        Task CrSetCheck(string crNo, string crDetail, string palletNo, string boxNo, string boxNo3, string result, decimal? qty, string isContinue, int userId);
        #endregion
@@ -65,7 +65,7 @@
        /// <param name="locatNo">储位编号</param>
        /// <param name="palletNo">托盘号</param> 
        /// <returns></returns>
        Task<List<StockDetailWithQtyDto>> GetStockQueryList(string locatNo, string palletNo, string boxno);
        List<StockDetailWithQtyDto> GetStockQueryList(string locatNo, string palletNo, string boxno);
        #endregion
@@ -175,7 +175,7 @@
        #region 箱码拆箱贴标
        //箱码拆箱添加标签信息
        BoxListInfoDto AddLableByDevanning(string boxNo,decimal devanQty, int userId);
        BoxListInfoDto AddLableByDevanning(string boxNo, decimal devanQty, int userId);
        /// <summary>
Wms/Wms/Controllers/PdaCrController.cs
@@ -124,9 +124,17 @@
        /// <returns></returns>
        [HttpGet]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<List<StockDetailWithQtyDto>> GetStockQueryList(string locatNo, string palletNo, string boxno)
        public IActionResult GetStockQueryList(string locatNo, string palletNo, string boxno)
        {
            return await _pdaCrSvc.GetStockQueryList(locatNo, palletNo, boxno);
            try
            {
                var list = _pdaCrSvc.GetStockQueryList(locatNo, palletNo, boxno);
                return Ok(new { data = list, code = 0, msg = "成功" });
            }
            catch (Exception e)
            {
                return Ok(new { data = "", code = 1, msg = $"异常:{e.Message}" });
            }
        }
        #endregion
@@ -346,7 +354,7 @@
                }
                var uId = int.Parse(userId);
                var list = _pdaCrSvc.AddLableByDevanning(model.BoxNo, model.DevanQty,uId);
                var list = _pdaCrSvc.AddLableByDevanning(model.BoxNo, model.DevanQty, uId);
                return Ok(new { data = list, code = 0, msg = "成功" });
            }
@@ -414,7 +422,7 @@
        public IActionResult GetBoxInfo(PdaUpPalletVm model)
        {
            try
            {
            {
                _pdaCrSvc.GetBoxInfo(model.BoxNo, model.PalletNo);
                return Ok(new { data = "", code = 0, msg = "成功" });
@@ -435,7 +443,7 @@
        {
            try
            {
                _pdaCrSvc.UpPalletByBox(model.BoxNo, model.PalletNo,model.PalletNoNew,_userManager.UserId);
                _pdaCrSvc.UpPalletByBox(model.BoxNo, model.PalletNo, model.PalletNoNew, _userManager.UserId);
                return Ok(new { data = "", code = 0, msg = "成功" });
            }
@@ -475,7 +483,7 @@
        {
            try
            {
                _pdaCrSvc.UpPalletByQty(model.PalletNo, model.PalletNoNew, model.DetailId,model.Qty, _userManager.UserId);
                _pdaCrSvc.UpPalletByQty(model.PalletNo, model.PalletNoNew, model.DetailId, model.Qty, _userManager.UserId);
                return Ok(new { data = "", code = 0, msg = "成功" });
            }