.
18516761980
2022-03-19 9ff5e64187837a3bbd78370c1cfaadf2329f97f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <style>
        .cool-divider {
            margin: 0 8px;
            display: inline-block;
            height: .9em;
            width: 1px;
            vertical-align: middle;
            position: relative;
            top: -.06em;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            margin-top: 5px !important;
            margin-bottom: 5px !important;
            background: #c8d1dabd;
        }
    </style>
</head>
<body>
<div class="layui-card">
    <div class="layui-card-header">商品 <div class="cool-divider"></div> <span id="matnrMsg"></span></div>
    <div class="layui-card-body">
        <table class="layui-table" lay-skin="line">
            <colgroup>
                <col/>
                <col/>
            </colgroup>
            <thead>
            <tr>
                <td align="center">货位名称</td>
                <td align="center">货位数量</td>
            </tr>
            </thead>
            <tbody id="locChartList">
            </tbody>
        </table>
    </div>
</div>
</body>
<script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../static/js/handlebars/handlebars-v4.5.3.js"></script>
<script type="text/template" id="locChartListTpl">
    {{#each data}}
    <tr>
        <td align="center"><span class="layui-text">{{this.locNo}}</span></td>
        <td align="center"><span style="font-weight: bold">{{this.anfme}}</span></td>
    </tr>
    {{/each}}
</script>
<script>
    $(function () {
        $.ajax({
            url: baseUrl + "/locDetl/chart/auth",
            headers: {'token': localStorage.getItem('token')},
            data: {matnr: top.matnrByLocStatis},
            method: 'POST',
            async: false,
            success: function (res) {
                if (res.code === 200) {
                    $("#matnrMsg").html(res.msg);
                    var tpl = $("#locChartListTpl").html();
                    var template = Handlebars.compile(tpl);
                    var html = template(res);
                    $("#locChartList").html(html);
                    top.matnrByLocStatis = null;
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        })
    });
</script>
</html>