yuyou_x
2024-02-21 1c2113e154faacedebfb1f00a29bb26127ed1b73
增加平库图例页面,后台代码编写,修改bug
3个文件已修改
1个文件已删除
1个文件已添加
2565 ■■■■■ 已修改文件
HTML/views/WareHouseSetting/FlatLibraryLegend.html 971 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/AsnSetting/productEnterQuantity .html 1485 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/SysServer/StorageLocatServer.cs 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/SysController.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/WareHouseSetting/FlatLibraryLegend.html
New file
@@ -0,0 +1,971 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>储位图例</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        html,
        body {
            height: 100%;
            width: 100%;
        }
        .layouts {
            display: flex;
        }
        /* ******************************************** */
        #tab {
            border-collapse: separate;
            border-spacing: 2;
            padding: 3px;
        }
        table td {
            border: 3px solid white;
        }
        .btncls {
            width: 30px;
            height: 40px;
            line-height: 20px;
        }
        .divcls {
            box-shadow: 2px 2px 1px #888888;
            border-radius: 2px;
        }
        .textSty {
            color: black;
            text-align: center;
            word-break: break-all;
            word-wrap: break-word;
        }
        .zero {
            background-color: #5470c6;
            Opacity: .8;
        }
        .one {
            background-color: #91cc75;
            Opacity: .8;
        }
        .two {
            background-color: #ffdc60;
        }
        .three {
            background-color: #ee6666;
            Opacity: .8;
        }
        .four {
            background-color: #ffff7f;
            Opacity: .8;
        }
        .five {
            background-color: #ee23ee;
            Opacity: .8;
        }
        .filg {
            background-color: #808080;
            Opacity: .8;
        }
        .divOneS {
            width: 25%;
            height: 100%;
        }
        .divThreeS {
            width: 33.3%;
            height: 100%;
        }
        .divOneX {
            width: 33.3%;
            height: 100%;
        }
        .divThreeX {
            width: 50%;
            height: 100%;
        }
        .btnShow {
            width: auto;
            height: auto;
            cursor: pointer;
        }
        .btnShow1 {
            width: 20px;
            height: 15px;
        }
        .container {
            position: relative; /* 相对定位 */
            top: 50%; /* 向上移动自身高度的一半 */
            left: 50%; /* 向左移动自身宽度的一半 */
            transform: translate(-50%, -50%); /* 通过translate函数进行微调,使其完全居中 */
        }
    </style>
</head>
<body>
    <div class="layui-fluid" style="height: 96%;width: 99%;">
        <div class="layui-row layui-col-space15" style="width: auto;height: 100%;">
            <!-- 上 -->
            <div class="layui-col-md" style="width: auto;height: 10%;">
                <div class="layui-card" style="width: auto;height: 100%;">
                    <div class="layui-card-body">
                        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 60px;">所属仓库</label>
                                    <div class="layui-input-inline">
                                        <select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search>
                                            <!-- <option value=""></option> -->
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">排</label>
                                    <div class="layui-input-inline">
                                        <select name="Row" id="Row" lay-filter="SelectRow">
                                            <option value="1" selected>一楼</option>
                                            <option value="3">三楼</option>
                                        </select>
                                    </div>
                                </div>
                                <!-- <div class="layui-inline">
                                    <label class="layui-form-label">深度</label>
                                    <div class="layui-input-inline">
                                        <select name="Depth" id="Depth" lay-filter="SelectDepth">
                                            <option value="01" selected>深度1</option>
                                            <option value="02" id="shendu2">深度2</option>
                                        </select>
                                    </div>
                                </div> -->
                                <div class="layui-inline">
                                    <!-- 储位图例 -->
                                    <table style="margin:0 auto;">
                                        <tr>
                                            <td><button class="btnShow1 three" disabled></button></td>
                                            <td>出库中</td>
                                            <td><button class="btnShow1 two" disabled></button></td>
                                            <td>入库中</td>
                                            <td><button class="btnShow1 one" disabled></button></td>
                                            <td>有物品</td>
                                            <td><button class="btnShow1 zero" disabled></button></td>
                                            <td>空库位</td>
                                            <td><button class="btnShow1 filg" disabled></button></td>
                                            <td>损坏\屏蔽</td>
                                        </tr>
                                    </table>
                                </div>
                                <!-- //定时自刷新库位图例 -->
                                <!-- <div class="layui-inline" style="float: right;">
                                    <label class="layui-form-label" style="margin-top: 10px;">自动刷新</label>
                                    <div class="layui-input-inline" style="width: auto;">
                                        <input type="checkbox" checked="" id="autoRefresh" lay-skin="switch" lay-filter="switchTest" lay-text="开|关">
                                    </div>
                                </div> -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 上 -->
            <div class="layui-col-md" style="width: auto;height: 44%;">
                <div class="layui-row layui-col-space15" style="width: auto;height: 100%;">
                    <!-- 一、三楼上左B01、B11 -->
                    <div class="layui-col-md6 divOneS" id="divOne">
                        <div class="layui-card" style="height: 100%;">
                            <p id="a"></p>
                            <table class="container" id="tabOne" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                    <!-- 一楼上中左B02 三楼上中B12 -->
                    <div class="layui-col-md6 divOneS" id="divTwo">
                        <div class="layui-card" style="height: 100%;">
                            <p id="b"></p>
                            <table class="container" id="tabTwe" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                    <!-- 一楼上中右B03 -->
                    <div class="layui-col-md6 divOneS" id="divThree">
                        <div class="layui-card" style="height: 100%;">
                            <p id="c"></p>
                            <table class="container" id="tabThree" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                    <!-- 一、三楼上右B04、B13 -->
                    <div class="layui-col-md6 divOneS" id="divFour">
                        <div class="layui-card" style="height: 100%;">
                            <p id="d"></p>
                            <table class="container" id="tabfour" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 下 -->
            <div class="layui-col-md" style="width: auto;height: 44%;">
                <div class="layui-row layui-col-space15" style="width: auto;height: 100%;">
                    <!-- 一、三楼下左B05、B14 -->
                    <div class="layui-col-md6 divOneX" id="divFive">
                        <div class="layui-card" style="height: 100%;">
                            <p id="e"></p>
                            <table class="container" id="tabfive" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                    <!-- 一楼下中B06 -->
                    <div class="layui-col-md6 divOneX" id="divSix">
                        <div class="layui-card" style="height: 100%;">
                            <p id="f"></p>
                            <table class="container" id="tabSix" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                    <!-- 一、三下右B07、B15 -->
                    <div class="layui-col-md6 divOneX" id="divSeven">
                        <div class="layui-card" style="height: 100%;">
                            <p id="j"></p>
                            <table class="container" id="tabSeven" style="width: 100%;height: 90%;"></table>
                        </div>
                    </div>
                </div>
            </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 src="../../js/echarts.min.js"></script>
    <script>
        var uid = $.cookie('userId');
        if (uid == null) {
            alert('请登录后操作');
            window.parent.location.href = '../Login.html'
        }
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'laypage', 'layer'], function () {
            var table = layui.table,
                form = layui.form,
                laypage = layui.laypage,
                layer = layui.layer,
                $ = layui.$;
            var cengShu = "1";
            var dom = $('#LAY_app_tabsheader', parent.document).children();//.find(s=>s.s.nodeType == 1 && className == "layui-this")
            var xianga = "";
            var xiangb = "";
            var ones = 'layui-col-md6 divOneS';
            var onex = 'layui-col-md6 divOneX';
            var threes = 'layui-col-md6 divThreeS';
            var threex = 'layui-col-md6 divThreeX';
            var divOne=document.getElementById('divOne');
            var divTwo=document.getElementById('divTwo');
            var divThree=document.getElementById('divThree');
            var divFour=document.getElementById('divFour');
            var divFive=document.getElementById('divFive');
            var divSix=document.getElementById('divSix');
            var divSeven=document.getElementById('divSeven');
            divOne.className=ones;
            divTwo.className=ones;
            divThree.className=ones;
            divFour.className=ones;
            divFive.className=onex;
            divSix.className=onex;
            divSeven.className=onex;
            //获取仓库下拉框信息
            synData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) {
                if (res.code == 0) { //成功
                    for (var i = 0; i < res.data.length; i++) {
                        // 只加载平库
                        // console.log(res.data);
                        if (res.data[i].Type != "2") {
                            continue;
                        }
                        $("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' +
                            res.data[i].WareHouseName + '</option>');
                    }
                    $("#WareHouseNo option[value='" + res.data[0].WareHouseNo + "']").attr("selected", "selected")
                    form.render('select');
                } else { //不成功
                    layer.msg(res.msg, {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { });
                }
            });
            GetSlotVm($("#WareHouseNo").val(), $("#Row").val());
            // 仓库查询事件
            form.on('select(getWareHouseNo)', function (data) {
                GetSlotVm($("#WareHouseNo").val(), $("#Row").val());
            });
            // 楼层查询事件
            form.on('select(SelectRow)', function (data) {
                //判断一楼或三楼
                if($("#Row").val() == "1")
                {
                    divOne.className=ones;
                    divTwo.className=ones;
                    divFour.className=ones;
                    divFive.className=onex;
                    divSeven.className=onex;
                    $("#divThree").show();
                    $("#divSix").show();
                }
                else if($("#Row").val() == "3")
                {
                    // 三楼
                    $("#divThree").hide();
                    $("#divSix").hide();
                    divOne.className=threes;
                    divTwo.className=threes;
                    divFour.className=threes;
                    divFive.className=threex;
                    divSeven.className=threex;
                }
                GetSlotVm($("#WareHouseNo").val(), $("#Row").val());
            });
            // // 深度查询事件
            // form.on('select(SelectDepth)', function (data) {
            //     GetSlotVm($("#WareHouseNo").val(), $("#RoadwayNo").val(), $("#Row").val(), $("#Depth").val());
            // });
            //获取数据渲染库位图
            function GetSlotVm(houseNo, row,depth) {
                var param = {
                    WareHouseNo: houseNo,
                    Row: row,
                    Depth: depth
                }
                sendData(IP + "/Sys/GetFlatLibraryLegend", param, 'get', function (res) {
                    console.log(res)
                    if (res.code == 0) {
                        $("#a").html("");
                        $("#b").html("");
                        $("#c").html("");
                        $("#d").html("");
                        $("#e").html("");
                        $("#f").html("");
                        $("#j").html("");
                        $("#tabOne").html("");
                        $("#tabTwe").html("");
                        $("#tabThree").html("");
                        $("#tabfour").html("");
                        $("#tabfive").html("");
                        $("#tabSix").html("");
                        $("#tabSeven").html("");
                        var html1 = '<tr>';
                        var html2 = '<tr>';
                        var html3 = '<tr>';
                        var html4 = '<tr>';
                        var html5 = '<tr>';
                        var html6 = '<tr>';
                        var html7 = '<tr>';
                        // //判断一楼或三楼
                        if($("#Row").val() == "1")
                        {
                            /*
                            B01 1楼收货接驳区
                            B02 1楼发货接驳区
                            B03 1楼退货缓存区
                            B04 1楼抽样缓存区
                            B05 1楼换托贴标区
                            B06 1楼包材暂存间
                            B07 1楼车间供料区
                            B11 3楼托盘组缓存区
                            B12 3楼原辅料缓存区
                            B13 3楼空托盘收集区
                            B14 3楼称重复验区
                            B15 3楼拣货拼托区
                            */
                            // 一楼
                            $("#a").append("B01 1楼收货接驳区");
                            $("#b").append("B02 1楼发货接驳区");
                            $("#c").append("B03 1楼退货缓存区");
                            $("#d").append("B04 1楼抽样缓存区");
                            $("#e").append("B05 1楼换托贴标区");
                            $("#f").append("B06 1楼包材暂存间");
                            $("#j").append("B07 1楼车间供料区");
                        }
                        else if($("#Row").val() == "3")
                        {
                            $("#a").append("B14 3楼称重复验区");
                            $("#b").append("B13 3楼空托盘收集区");
                            $("#d").append("B15 3楼拣货拼托区");
                            $("#e").append("B11 3楼托盘组缓存区");
                            $("#j").append("B12 3楼原辅料缓存区");
                        }
                        var list = res.data;
                        var B06 = 0;
                        var B07 = 0;
                        var B11 = 0;
                        var B12 = 0;
                        //按区域进行循环
                        list.forEach(item => {
                            //判断一楼或三楼
                            if($("#Row").val() == "1")
                            {
                                // 一楼
                                /*
                                    B01 tabOne html1
                                    B02 tabTwe html2
                                    B03 tabThree html3
                                    B04 tabfour html4
                                    B05 tabfive    html5
                                    B06 tabSix    html6
                                    B07 tabSeven html7
                                */
                                //判断各个区域
                                if(item.AreaNo == "B01")
                                {
                                    //4排4列
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html1 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html1 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html1 += '<td><button value=' + item.LocatNo + '  class="btnShow one" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html1 += '<td><button value=' + item.LocatNo + '  class="btnShow two" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html1 += '<td><button value=' + item.LocatNo + '  class="btnShow three" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html1 += '<td></td>'
                                    }
                                    if (item.Depth == 4) {
                                        html1 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B02")
                                {
                                    //4排4列
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html2 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html2 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html2 += '<td><button value=' + item.LocatNo + '  class="btnShow one" style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html2 += '<td><button value=' + item.LocatNo + '  class="btnShow two" style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html2 += '<td><button value=' + item.LocatNo + '  class="btnShow three" style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html2 += '<td></td>'
                                    }
                                    if (item.Depth == 4) {
                                        html2 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B03")
                                {
                                    //4排4列
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html3 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html3 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html3 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html3 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html3 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html3 += '<td></td>'
                                    }
                                    if (item.Depth == 4) {
                                        html3 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B04")
                                {
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html4 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html4 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html4 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html4 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html4 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html4 += '<td></td>'
                                    }
                                    if (item.Depth == 2) {
                                        html4 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B05")
                                {
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html5 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html5 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html5 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html5 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html5 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html5 += '<td></td>'
                                    }
                                    console.log(item)
                                    if (item.Row == 2) {
                                        html5 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B06")
                                {
                                    if (item != undefined) {
                                        B06+=1;
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html6 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html6 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html6 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html6 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html6 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html6 += '<td></td>'
                                    }
                                    if (B06 %10 == 0)
                                    {
                                        html6 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B07")
                                {
                                    if (item != undefined) {
                                        B07 += 1;
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html7 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html7 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html7 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html7 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html7 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html7 += '<td></td>'
                                    }
                                    if (B07 %13 == 0)
                                    {
                                        html7 += '<tr></tr>'
                                    }
                                }
                            }
                            else if($("#Row").val() == "3")
                            {
                                // 三楼
                                /*
                                    B11 tabOne html5
                                    B12 tabTwe html7
                                    B13 tabfour html2
                                    B14 tabfive    html1
                                    B15    tabSeven html4
                                */
                                //判断各个区域
                                if(item.AreaNo == "B11")
                                {
                                    if (item != undefined) {
                                        B11 += 1;
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html5 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html5 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html5 += '<td><button value=' + item.LocatNo + '  class="btnShow one" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html5 += '<td><button value=' + item.LocatNo + '  class="btnShow two" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html5 += '<td><button value=' + item.LocatNo + '  class="btnShow three" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html5 += '<td></td>'
                                    }
                                    if (B11 % 10 == 0) {
                                        html5 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B12")
                                {
                                    if (item != undefined) {
                                        B12 += 1;
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html7 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html7 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html7 += '<td><button value=' + item.LocatNo + '  class="btnShow one" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html7 += '<td><button value=' + item.LocatNo + '  class="btnShow two" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html7 += '<td><button value=' + item.LocatNo + '  class="btnShow three" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html7 += '<td></td>'
                                    }
                                    if (B12 % 10 == 0) {
                                        html7 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B13")
                                {
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html2 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html2 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html2 += '<td><button value=' + item.LocatNo + '  class="btnShow one" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html2 += '<td><button value=' + item.LocatNo + '  class="btnShow two" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html2 += '<td><button value=' + item.LocatNo + '  class="btnShow three" style="width: 100%;height: 100%;" ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html2 += '<td></td>'
                                    }
                                    if (item.Row == 2) {
                                        html4 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B14")
                                {
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html1 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html1 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html1 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html1 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html1 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html1 += '<td></td>'
                                    }
                                    if (item.Depth == 2) {
                                        html1 += '<tr></tr>'
                                    }
                                }
                                else if(item.AreaNo == "B15")
                                {
                                    if (item != undefined) {
                                        //判断储位标识是否为0
                                        if(item.Flag != '0')
                                        {
                                            html4 += '<td><button value=' + item.LocatNo + ' class="btnShow filg"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //空储位 0
                                        else if (item.Status == 0) {
                                            html4 += '<td><button value=' + item.LocatNo + ' class="btnShow zero"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //有物品 1
                                        else if (item.Status == 1) {
                                            html4 += '<td><button value=' + item.LocatNo + '  class="btnShow one"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //入库中 2
                                        else if (item.Status == 2) {
                                            html4 += '<td><button value=' + item.LocatNo + '  class="btnShow two"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                        //出库中 3
                                        else if (item.Status == 3) {
                                            html4 += '<td><button value=' + item.LocatNo + '  class="btnShow three"  style="width: 100%;height: 100%;"  ></button></td>'
                                        }
                                    } else {
                                        // console.log(i, a);
                                        html4 += '<td></td>'
                                    }
                                }
                            }
                        });
                        html1 += '</tr>';
                        html2 += '</tr>';
                        html3 += '</tr>';
                        html4 += '</tr>';
                        html5 += '</tr>';
                        html6 += '</tr>';
                        html7 += '</tr>';
                        $("#tabOne").append(html1);
                        $("#tabTwe").append(html2);
                        $("#tabThree").append(html3);
                        $("#tabfour").append(html4);
                        $("#tabfive").append(html5);
                        $("#tabSix").append(html6);
                        $("#tabSeven").append(html7);
                    } else {
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000
                        }, function () { })
                    }
                });
            }
            //#region 点击储位btn按钮查看储位上信息
            var tipsVal;
            // 1.找到触发的事件对象(绑定全局)  2.事件处理程序
            $('body').on('click','.btnShow', function () {
                var html;
                var that=this;
                var locatNo = $(that)[0].value;
                var className=$(that)[0].className;
                if(className=='btnShow zero'){
                    html = "<p style='word-wrap:break-word;width: 100%;height:100%;line-height:24px;font-size:18px'>储位编码:" + locatNo + "<br/>储位状态:空储位</p>";
                    tipsVal=layer.tips(html,that,{tips:[1,"rgb(58, 61, 73)"],area: ['220px'],time: 0});
                }else{
                    var param={
                        locatNo:locatNo
                    }
                    sendData(IP + "/Sys/GetLocateInfo", param, 'get', function (res) {
                        console.log(res)
                        if (res.code == 0) {
                            html = "<p style='word-wrap:break-word;width: 100%;height:100%;line-height:24px;font-size:18px;'>";
                            html += "储位编码:" + locatNo;
                            html += "<br/>储位状态:"+res.data.Status;
                            if (res.data.GoodsInfoList != null)
                            {
                                html += "<br/>托盘号:&nbsp;&nbsp;&nbsp;&nbsp;"+res.data.PalletNo;
                                for(var i=0;i<res.data.GoodsInfoList.length;i++){
                                    html += "<br/><br/>物料编码:"+res.data.GoodsInfoList[i].SkuNo;
                                    html += "<br/>物料名称:"+res.data.GoodsInfoList[i].SkuName;
                                    html += "<br/>批次号:&nbsp;&nbsp;&nbsp;&nbsp;"+res.data.GoodsInfoList[i].LotNo;
                                    html += "<br/>数量:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+res.data.GoodsInfoList[i].Qty;
                                }
                                html += "</p>"
                            }
                            tipsVal=layer.tips(html,that,{tips:[1,"rgb(58, 61, 73)"],area: ['260px'],time: 0});
                        } else {
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000
                            }, function () { })
                        }
                    });
                }
            });
            //鼠标移出
            $('body').on('mouseout','.btnShow', function () {
                layer.close(tipsVal);
            });
            //#endregion
            // #region 定时刷新库位图例
            //获取是否自动刷新
            var autoRefresh=$('#autoRefresh').prop('checked');
            //绑定自动刷新change事件监听器
            form.on('switch(switchTest)', function (data) {
                autoRefresh=$('#autoRefresh').prop('checked');
            });
            //定时器
            setInterval(function(){
                if(autoRefresh){
                    GetSlotVm($("#WareHouseNo").val(), $("#RoadwayNo").val(), $("#Row").val(), $("#Depth").val());
                    //var currentDate = new Date();
                    //console.log('自动刷新了,'+currentDate)
                }
            },10000)//10秒自动刷新一次
            // #endregion
        });
    </script>
</body>
</html>
Pda/View/AsnSetting/productEnterQuantity .html
File was deleted
Wms/WMS.BLL/SysServer/StorageLocatServer.cs
@@ -755,5 +755,64 @@
                throw new Exception(e.Message);
            }
        }
        #region 平库图例
        /// <summary>
        /// 获取储位信息(平库图例)
        /// </summary>
        /// <param name="wareHouseNo">仓库</param>
        /// <param name="row">排</param>
        /// <returns></returns>
        public List<SysStorageLocat> GetFlatLibraryLegend(string wareHouseNo, string row)
        {
            try
            {
                //一楼区域
                //List<string> row1 = new List<string>()
                //{
                //    "B01",
                //    "B02",
                //    "B03",
                //    "B04",
                //    "B05",
                //    "B06",
                //    "B07",
                //};
                ////二楼区域
                //List<string> row3 = new List<string>()
                //{
                //    "B11",
                //    "B12",
                //    "B13",
                //    "B14",
                //    "B15",
                //};
                string row1 = "'B01','B02','B03','B04','B05','B06','B07'";
                string row3 = "'B11','B12','B13','B14','B15'";
                string str = $"select * from SysStorageLocat where IsDel = '0' and WareHouseNo = '{wareHouseNo}' and ";
                if (row == "1")
                {
                    str += $" AreaNo in ({row1})";
                }
                else if (row == "3")
                {
                    str += $" AreaNo in ({row3})";
                }
                var list = Db.Ado.SqlQuery<SysStorageLocat>(str);
                //var list = Db.Queryable<SysStorageLocat>().Where(m => m.IsDel == "0" && m.WareHouseNo == wareHouseNo && row == "1" ? row1.Contains(m.AreaNo) : row3.Contains(m.AreaNo)).ToList();
                return list;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        #endregion
    }
}
Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs
@@ -152,5 +152,19 @@
        /// <param name="locatNo"></param>
        /// <returns></returns>
        LocateInfoVm GetLocateInfo(string locatNo);
        #region 平库
        /// <summary>
        /// 获取储位信息(平库图例)
        /// </summary>
        /// <param name="wareHouseNo">仓库</param>
        /// <param name="row">排</param>
        /// <returns></returns>
        List<SysStorageLocat> GetFlatLibraryLegend(string wareHouseNo, string row);
        #endregion
    }
}
Wms/Wms/Controllers/SysController.cs
@@ -1536,6 +1536,7 @@
        #region 储位图例
        #region 立库
        /// <summary>
        /// 根据仓库 排
        /// </summary>
@@ -1652,6 +1653,41 @@
            });
        }
        #endregion
        #region 平库
        /// <summary>
        /// 根据仓库 排
        /// </summary>
        /// <param name="wareHouseNo">仓库</param>
        /// <param name="row">排</param>
        /// <param name="depth">深度</param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetFlatLibraryLegend(string wareHouseNo, string row)
        {
            //获取储位信息
            List<SysStorageLocat> storagelist = _locatSvc.GetFlatLibraryLegend(wareHouseNo, row);
            //Dictionary<string, int> dic = new Dictionary<string, int>()
            //{
            //    "B01"
            //};
            return Ok(new
            {
                data = storagelist,
                //dic,
                code = 0,
                msg = ""
            });
        }
        #endregion
        /// <summary>
        /// 根据储位地址获取储位上的托盘和物品信息
        /// </summary>