Blame view

src/main/resources/templates/monitor/locationstatus/locationstatus.html 26.6 KB
tangying authored
1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<style type="text/css">
    #img_list li{
        font-size: 10px;
        /*width: 50px;*/
        text-align: left;
12
        margin: 5px 20px 5px 5px;
tangying authored
13
14
15
16
17
18
    }
    #img_list li img{
        height: 35px;
        width: 35px;
    }
    #info_list{
19
        width: 100%;
tangying authored
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
        display:inline-block;
    }
    #info_list li{
        margin:8px 3px 0 5px;
    }
    #info_list li span{
        font-size: 12px;
        display: inline-block;
        /*width: 65px;*/
        text-align: center;
    }
    .grid{
        display: inline-block;
        width: 50px;
        height: 50px;
        /*margin: 12px 6px;*/
        margin-bottom: 6px;
        background-size:cover;
        background-image: url("../img/icon/空柜空闲.png");
    }
    #location span{
        display: inline-block;
        text-align: right;
        width: 50px;
        margin-right: 10px;
    }
</style>
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-info">
            <form id="container-form">
                <div class="select-list">
                    <ul id="select_info">
                        <li>
54
                            <select id="zoneCode" name="zoneCode" style="width: 100px">
周峰 authored
55
                                <option selected th:each="item:${@zone.getZoneCodeList()}" th:value="${item['code']}" th:text="${item['name']}"></option>
tangying authored
56
57
58
59
60
61
62
63
64
65
66
67
68
69
                            </select>
                        </li>
                        <li>

                            <select id="editable-num" name="num" style="width: 70px">
                            </select>
                        </li>
                        <li>
                            <select id="editable-select" name="col" style="width: 70px">
                                <option value="row" selected></option>
                                <option value="line"></option>
                                <option value="layer"></option>
                            </select>
                        </li>
70
71
72
<!--                        <li>货主编码:-->
<!--                            <input type="text" name="receiptCompanyCode" id="receiptCompanyCode">-->
<!--                        </li>-->
tangying authored
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="Search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-info">
            <form id="receiptHeader-form">
                <div class="select-list">
                    <ul id="img_list" style="">
                        <li>
                            空柜空闲:<img src="../img/icon/空柜空闲.png">
                        </li>
                        <li>
                            空盘空闲:<img src="../img/icon/空盘空闲.png">
                        </li>
                        <li>
                            半盘空闲:<img src="../img/icon/半盘空闲.png">
                        </li>
                        <li>
                            整盘空闲:<img src="../img/icon/整盘空闲.png">
                        </li>
                        <li>
                            空柜锁定:<img src="../img/icon/空柜锁定.png">
                        </li>
                        <li>
                            空盘锁定:<img src="../img/icon/空盘锁定.png">
                        </li>
                        <li>
                            半盘锁定:<img src="../img/icon/半盘锁定.png">
                        </li>
                        <li>
                            整盘锁定:<img src="../img/icon/整盘锁定.png">
                        </li>
                        <li>
                            空柜禁用:<img src="../img/icon/空柜禁用.png">
                        </li>
                        <li>
                            空盘禁用:<img src="../img/icon/空盘禁用.png">
                        </li>
                        <li>
                            半盘禁用:<img src="../img/icon/半盘禁用.png">
                        </li>
                        <li>
                            整盘禁用:<img src="../img/icon/整盘禁用.png">
                        </li>
120
121
122
                        <li><span style="font-size: 12px">库位统计情况:</span>
                            <input style="width: 400px;  font-size: 12px"  type="text" id="zone" disabled/>
                        </li>
tangying authored
123
124
125
126
127
128
129
130
                    </ul><br><br>
                    <ul id="info_list">
                        <li><span>库位:</span><input type="text" id="code" disabled/></li>
                        <li><span>容器编码:</span><input type="text" id="containerCode" disabled/></li>
                        <li><span>物料信息:<select id="material" style="width: auto"><option></option></select></span></li>
                        <li>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="checkLocationCode()" shiro:hasPermission="inventory:inventory:seeOut"><i class="fa fa-eye"></i>&nbsp;出库查看</a>
                        </li>
131
                    </ul>
132
133
134
135
<!--                    <ul>-->
<!--                        <li style="float:left;margin-left: 40px"><button type="button" class="btn btn-sm btn-success" onclick="searchLocation()">查看库位</button></li>-->
<!--                        <li style="float:left;margin-left: 20px"><button type="button" class="btn btn-sm btn-success" onclick="searchInventory()">查看库存</button></li>-->
<!--                    </ul>-->
tangying authored
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-info">
            <!--style="width: 100%;overflow-x: scroll;white-space:nowrap"-->
            <div id="borderCol" style="overflow-y: scroll;white-space:nowrap">
                <div class="location" id="location">
                    <!--<div class="grid"></div>-->
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
mahuandong authored
151
    var prefix = ctx + "config/location";
tangying authored
152
    var grid_row;
周峰 authored
153
    var grid_row_first;
tangying authored
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
    var grid_line;
    var grid_layer;
    var list_info;
    var grid_rest="../img/icon/空柜空闲.png";
    var grid_empty="../img/icon/空盘空闲.png";
    var grid_half="../img/icon/半盘空闲.png";
    var grid_all="../img/icon/整盘空闲.png";
    var grid_emp_waing="../img/icon/空柜禁用.png";
    var grid_empty_waring="../img/icon/空盘禁用.png";
    var grid_half_waring="../img/icon/半盘禁用.png";
    var grid_all_waring="../img/icon/整盘禁用.png";
    var grid_emp_lock="../img/icon/空柜锁定.png";
    var grid_empty_lock="../img/icon/空盘锁定.png";
    var grid_half_lock="../img/icon/半盘锁定.png";
    var grid_all_lock="../img/icon/整盘锁定.png";
    var rel_empty="../img/icon/空.png";
游杰 authored
170
171
172
173
174
175
176
177
178
179
180
181
    var grid_num_1=0;
    var grid_num_2=0;
    var grid_num_3=0;
    var grid_num_4=0;
    var grid_num_5=0;
    var grid_num_6=0;
    var grid_num_7=0;
    var grid_num_8=0;
    var grid_num_9=0;
    var grid_num_10=0;
    var grid_num_11=0;
    var grid_num_12=0;
lector authored
182
    var currentContainerCode;
183
184
    var currentLocationCode=0;
    var currentMaterialCode=0;
tangying authored
185
    $(function() {
186
        resetAjax("LK");
tangying authored
187
188
189
190
191
192

        //库位类型和行列层选择
        $("#editable-select").change(function () {
            let num=$("#editable-select").val();
            $("#editable-num").children().remove();
            if (num === "row") {
周峰 authored
193
                for (let i = grid_row_first; i <= grid_row; i++) {
tangying authored
194
195
196
197
198
199
200
201
202
203
204
205
206
207
                    $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
                }
            }
            else if (num === "line") {
                for (let i = 1; i <= grid_line; i++) {
                    $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
                }
            }
            else if (num === "layer") {
                for (let i = 1; i <= grid_layer; i++) {
                    $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
                }
            }
        });
mahuandong authored
208
209
210
        $("#zoneCode").change(function () {
           let type=$("#zoneCode").val();
tangying authored
211
212
213
214
215
216
217
218
219
220
221
222
223
            resetAjax(type);
        });

        //页面初始化请求
        function resetAjax(type){
            $.ajax({
                url:prefix+"/getAllLocation",
                type:"post",
                data:{
                    type:type
                },
                success:function (res) {
                    grid_row=res.data.maxRow;
周峰 authored
224
                    grid_row_first = res.data.minRow;
tangying authored
225
226
227
228
229
230
231
232
233
234
235
                    grid_line=res.data.maxLine;
                    grid_layer=res.data.maxLayer;
                    //初始格子
                    $("#location").children().remove();
                    for (let i = 1; i <= grid_layer; i++) {
                        // var index=i+1;<span style='margin-top:30px'>第"+ index +"行</span>
                        $(".location").append("<br>");
                        for (let j = 1; j <= grid_line; j++) {
                            $(".location").append("<img data-i='1' data-j="+j+" data-k="+ i +" class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>");
                        }
                    }
游杰 authored
236
237
238
                    let num=$("#editable-select").val();
                    $("#editable-num").children().remove();
                    if (num === "row") {
周峰 authored
239
                        for (let i = grid_row_first; i <= grid_row; i++) {
游杰 authored
240
241
242
243
244
245
246
247
248
249
250
251
                            $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
                        }
                    }
                    else if (num === "line") {
                        for (let i = 1; i <= grid_line; i++) {
                            $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
                        }
                    }
                    else if (num === "layer") {
                        for (let i = 1; i <= grid_layer; i++) {
                            $("#editable-num").append("<option value='"+i+"'>"+i+"</option>")
                        }
tangying authored
252
253
                    }
                    changeMargin();
游杰 authored
254
                    Search();
tangying authored
255
256
257
258
                }
            });
        }
游杰 authored
259
tangying authored
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
        //监听浏览器宽度的改变
        window.onresize = function(){
            changeMargin();
            border()
        };
        changeMargin();
        border()
    });

    //边框高度
    function border() {
        let box_height=$("#borderCol").offset().top;
        let window_height=$(window).height()-20;
        $("#borderCol").css({"height":window_height-box_height});
    }

    //格子宽度
    function changeMargin() {
        let box_width=document.getElementById("location").offsetWidth;
        box_width=box_width-80;
        let num=$("#editable-select").val();
        let grid_width;
        if (num === "layer" || num === "row") {
            grid_width=box_width/grid_line;
        }
        else if (num === "line") {
            grid_width=box_width/grid_row;
        }
        if (grid_width >= 50) {
            $(".grid").css({"width":"50px","height":"50px"});
        }
        else if (grid_width <= 20) {
            $(".grid").css({"width":"20px","height":"20px"});
        }
        else {
            $(".grid").css({"width":grid_width,"height":grid_width});
        }
    }

    //tips信息
    function lays(x) {
        let $j=$(x);
        let row=$j.attr("data-i");
        let line=$j.attr("data-j");
        let layers=$j.attr("data-k");
        row=parseInt(row);
        line=parseInt(line);
        layers=parseInt(layers);
        if (list_info) {
            for (let i = 0; i < list_info.length; i++) {
mahuandong authored
310
                if (list_info[i].iRow === row && list_info[i].iColumn === line && list_info[i].iLayer === layers) {
tangying authored
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
                    let str_info='';
                    let container_code='';
                    if (list_info[i].containerCode) {
                        container_code="<br>容器编码:"+ list_info[i].containerCode+"";
                        if (list_info[i].materialName) {
                            for (let j = 0; j < list_info[i].materialName.length; j++) {
                                let list_batch=list_info[i].batch[j]===null?"无":list_info[i].batch[j]===""?"无":list_info[i].batch[j];
                                str_info=str_info + "<br>批次:"+ list_batch +",物料名称:"+ list_info[i].materialName[j] +",物料编码:"+ list_info[i].materialCode[j] +
                                    ",数量:"+ list_info[i].qty[j] +""
                            }
                        }
                    }
                    let code=list_info[i].code===null?"无":list_info[i].code;
                    layer.tips("第"+row+"行,第"+line+"列,第"+ layers +"层<br>库位:"+ code + container_code + str_info + ""
                        ,$j,{tips:[1,"rgb(28,132,198)"],time:0,area:'auto',maxWidth: '1000'});
                }
            }
        }else {return ""}
    }

    //关闭tips
    function Mclose(x) {
        let index = layer.tips();
        layer.close(index);
    }

    //搜索平面库位
    function Search() {
        let index=$("#editable-select").val();
        let num=$("#editable-num").val();
341
        let zoneCode=$("#zoneCode").val();
tangying authored
342
343
344
345
346
        $("#code").val("");
        $("#containerCode").val("");
        $("#material").children().remove();
        $("#material").append("<option>无</option>");
        let data;
347
        seachZone();
tangying authored
348
        if (index === "row") {
349
            data={type:zoneCode, row:num};
tangying authored
350
351
352
353
354
355
356
357
358
359
360
            $("#location").children().remove();
            for (let i = 1; i <= grid_layer; i++) {
                $(".location").append("<br><span>第"+ i+"层</span>");
                for (let j = 1; j <= grid_line; j++) {
                    $(".location").append("<img data-i="+num+" data-j="+j+" data-k="+i+" class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>");
                }
            }
            changeMargin();
            ajaxGrid(index,data);
        }
        else if (index === "line") {
361
            data={type:zoneCode, line:num};
tangying authored
362
363
364
365
366
367
368
369
370
371
372
            $("#location").children().remove();
            for (let k = 1; k <= grid_layer; k++) {
                $(".location").append("<br><span>第"+ k+"层</span>");
                for (let l = 1; l <= grid_row; l++) {
                    $(".location").append("<img data-i="+l+" data-j="+num+" data-k="+k+" class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>");
                }
            }
            changeMargin();
            ajaxGrid(index,data);
        }
        else if (index === "layer") {
373
            data={type:zoneCode, layer:num};
tangying authored
374
375
376
377
378
379
380
381
382
383
384
            $("#location").children().remove();
            for (let m = 1; m <= grid_row; m++) {
                $(".location").append("<br><span>第"+ m+"行</span>");
                for (let n = 1; n <= grid_line; n++) {
                    $(".location").append("<img data-i="+m+" data-j="+n+" data-k="+num+" class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>");
                }
            }
            changeMargin();
            ajaxGrid(index,data);
        }
    }
lector authored
385
tangying authored
386
387
388
389
390
391
392
393
394
    //库位信息请求和状态显示
    function ajaxGrid(x, info) {
        let load=layer.msg('加载中', {icon: 16,shade: 0.4,time: false});
        $.ajax({
            url:prefix+"/getLocationInfo",
            type:"post",
            data:info,
            success:function (res) {
                if (res.code===200||res.data||res.msg==="成功") {
游杰 authored
395
396
397
398
399
400
401
402
403
404
405
406
                    grid_num_1 = 0;
                    grid_num_2 = 0;
                    grid_num_3 = 0;
                    grid_num_4 = 0;
                    grid_num_5 = 0;
                    grid_num_6 = 0;
                    grid_num_7 = 0;
                    grid_num_8 = 0;
                    grid_num_9 = 0;
                    grid_num_10 = 0;
                    grid_num_11 = 0;
                    grid_num_12 = 0;
tangying authored
407
408
                    if (x === "row") {
                        for (let i = 0; i < res.data.length; i++) {
mahuandong authored
409
                            let index=res.data[i].iColumn+((res.data[i].iLayer-1)*grid_line);
tangying authored
410
411
412
413
414
415
416
417
                            index=index-1;
                            resShow(res,index,i);
                        }
                        clearLocation(grid_line,grid_layer);
                        layer.close(load);
                    }
                    else if (x === "line") {
                        for (let i = 0; i < res.data.length; i++) {
游杰 authored
418
                            let index=res.data[i].iRow+((res.data[i].iLayer-1)*grid_row);
tangying authored
419
420
421
422
423
424
425
426
                            index=index-1;
                            resShow(res,index,i);
                        }
                        clearLocation(grid_row,grid_layer);
                        layer.close(load);
                    }
                    else if (x === "layer") {
                        for (let i = 0; i < res.data.length; i++) {
游杰 authored
427
                            let index=res.data[i].iColumn+((res.data[i].iRow-1)*grid_line);
tangying authored
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
                            index=index-1;
                            resShow(res,index,i);
                        }
                        clearLocation(grid_line,grid_row);
                        layer.close(load);
                    }
                }
                else if (res.msg !== "成功"||res.code!==200) {
                    layer.close(load);
                    layer.open({
                        title: '错误',
                        content: res.msg
                    });
                }
                list_info=res.data;
            },
            error:function (req, msg) {
                console.log(msg);
            }
        })
    }

    //库位请求的结果显示
    function resShow(res, index ,i) {
                if (res.data[i].deleted === false) {
                    if (res.data[i].userDef3 === "1") {
                        $(".grid").eq(index).attr({"src": grid_rest, "isTrue": 1});
游杰 authored
455
                        grid_num_1 = grid_num_1 + 1;
tangying authored
456
457
                    } else if (res.data[i].userDef3 === "2") {
                        $(".grid").eq(index).attr({"src": grid_empty, "isTrue": 1});
游杰 authored
458
                        grid_num_2 = grid_num_2 + 1;
tangying authored
459
460
                    } else if (res.data[i].userDef3 === "3") {
                        $(".grid").eq(index).attr({"src": grid_half, "isTrue": 1});
游杰 authored
461
                        grid_num_3 = grid_num_3 + 1;
tangying authored
462
463
                    } else if (res.data[i].userDef3 === "4") {
                        $(".grid").eq(index).attr({"src": grid_all, "isTrue": 1});
游杰 authored
464
                        grid_num_4 = grid_num_4 + 1;
tangying authored
465
466
                    } else if (res.data[i].userDef3 === "5") {
                        $(".grid").eq(index).attr({"src": grid_emp_lock, "isTrue": 1});
游杰 authored
467
                        grid_num_5 = grid_num_5 + 1;
tangying authored
468
469
                    } else if (res.data[i].userDef3 === "6") {
                        $(".grid").eq(index).attr({"src": grid_empty_lock, "isTrue": 1});
游杰 authored
470
                        grid_num_6 = grid_num_6 + 1;
tangying authored
471
472
                    } else if (res.data[i].userDef3 === "7") {
                        $(".grid").eq(index).attr({"src": grid_half_lock, "isTrue": 1});
游杰 authored
473
                        grid_num_7 = grid_num_7 + 1;
tangying authored
474
475
                    } else if (res.data[i].userDef3 === "8") {
                        $(".grid").eq(index).attr({"src": grid_all_lock, "isTrue": 1});
游杰 authored
476
                        grid_num_8 = grid_num_8 + 1;
tangying authored
477
478
                    } else if (res.data[i].userDef3 === "9") {
                        $(".grid").eq(index).attr({"src": grid_emp_waing, "isTrue": 1});
游杰 authored
479
                        grid_num_9 = grid_num_9 + 1;
tangying authored
480
481
                    } else if (res.data[i].userDef3 === "10") {
                        $(".grid").eq(index).attr({"src": grid_empty_waring, "isTrue": 1});
游杰 authored
482
                        grid_num_10 = grid_num_10 + 1;
tangying authored
483
484
                    } else if (res.data[i].userDef3 === "11") {
                        $(".grid").eq(index).attr({"src": grid_half_waring, "isTrue": 1});
游杰 authored
485
                        grid_num_11 = grid_num_11 + 1;
tangying authored
486
487
                    } else if (res.data[i].userDef3 === "12") {
                        $(".grid").eq(index).attr({"src": grid_all_waring, "isTrue": 1});
游杰 authored
488
                        grid_num_12 = grid_num_12 + 1;
tangying authored
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
                    }
                }
                else if (res.data[i].deleted === true) {
                    $(".grid").eq(i).attr({"src": rel_empty, "onmouseover": "", "onclick": ""});
                }
    }

    //清除将数据库中没有的库位
    function clearLocation(x, y) {
        for (let j = 0; j < x * y; j++) {
            let sta=$(".grid").eq(j).attr("isTrue");
            if (sta !== "1") {
                $(".grid").eq(j).attr({"src": rel_empty,"onmouseover": "","onclick": ""});
            }
        }
    }

    //点击显示当前库位信息
    function gridMsg(msg) {
        let $j=$(msg);
        let row=$j.attr("data-i");
        let line=$j.attr("data-j");
        let layers=$j.attr("data-k");
        row=parseInt(row);
        line=parseInt(line);
        layers=parseInt(layers);
        if (list_info) {//缓存查询
            for (let i = 0; i < list_info.length; i++) {
mahuandong authored
517
                if (list_info[i].iRow === row && list_info[i].iColumn === line && list_info[i].iLayer === layers) {
tangying authored
518
519
520
521
522
523
524
                    if (list_info[i].materialName) {
                        $("#material").children().remove();
                        for (let j = 0; j < list_info[i].materialName.length; j++) {
                            let list_batch=list_info[i].batch[j]===null?"无":list_info[i].batch[j]===""?"无":list_info[i].batch[j];
                            let str_info="批次:"+ list_batch +"/ 物料名称:"+ list_info[i].materialName[j] +"/ 物料编码:"+ list_info[i].materialCode[j] +
                                "/ 数量:"+ list_info[i].qty[j] +"";
                            $("#material").append("<option>"+ str_info +"</option>");
lector authored
525
                            currentMaterialCode = list_info[i].materialCode[j]
tangying authored
526
527
528
529
530
531
532
533
                        }
                    }
                    else {
                        $("#material").children().remove();
                        $("#material").append("<option>无</option>");
                    }
                    $("#code").val(list_info[i].code);
                    $("#containerCode").val(list_info[i].containerCode===""?"无":list_info[i].containerCode);
lector authored
534
535
                    currentContainerCode = $("#containerCode").val()
                    currentLocationCode = $("#code").val()
tangying authored
536
537
538
539
                }
            }
        }else {return ""}
        //接口查询
mahuandong authored
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
    //     $.ajax({
    //         url:prefix+"/getLocationInfo",
    //         type:"post",
    //         data:{
    //             type:"L",
    //             row:row,
    //             line:line,
    //             layer:layers,
    //             grid:1
    //         },
    //         success:function (res) {
    //             $("#row_info").val(res.data[0].row);
    //             $("#line_info").val(res.data[0].line);
    //             $("#layer_info").val(res.data[0].layer);
    //             $("#id").val(res.data[0].id);
    //             $("#code").val(res.data[0].code);
    //             $("#warehouseId").val(res.data[0].warehouseId);
    //             $("#warehouseCode").val(res.data[0].warehouseCode);
    //             $("#rowIndex").val(res.data[0].rowIndex);
    //             $("#roadway").val(res.data[0].roadway);
    //             $("#type").val(res.data[0].type);
    //             $("#containerId").val(res.data[0].containerId);
    //             $("#containerCode").val(res.data[0].containerCode);
    //             $("#zoneId").val(res.data[0].zoneId);
    //             $("#zoneCode").val(res.data[0].zoneCode);
    //             $("#status").val(res.data[0].userDef3);
    //             $("#lastCycleCountDate").val(res.data[0].lastCycleCountDate);
    //             $("#created").val(res.data[0].created);
    //             $("#createdBy").val(res.data[0].createdBy);
    //             $("#lastUpdated").val(res.data[0].lastUpdated);
    //             $("#lastUpdatedBy").val(res.data[0].lastUpdatedBy);
    //             $("#enable").val(res.data[0].enable);
    //         }
    //     });
tangying authored
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
    }

    //出库查看
    function checkLocationCode() {
        let data = $("#code").val();
        if (data) {
            $.modal.loading("正在处理中,请稍后...");
            $.ajax({
                url:prefix + "/checkLocationCode",
                type:'post',
                datatype:'json',
                data:{
                    locationCode:data
                },
                success: function (result) {
                    if (result.code == web_status.SUCCESS) {
                        $.modal.msgSuccess(result.msg);
                    } else {
                        $.modal.alertError(result.msg)
                    }
                    $.modal.closeLoading()
                }
            })
        }
        else{
            layer.tips('请选择库位!',$("#code"),{tips:[1,"rgb(28,132,198)"],time:3000,area:'auto',maxWidth: '1000'})
        }
    }
lector authored
602
603

    function searchLocation(){
604
605
606
607
608
609
        if(!currentLocationCode){
            $.modal.alertError("请选择库位")
        }else {
            localStorage.setItem("locationCode",currentLocationCode)
            createMenuItem(ctx +"config/location","库位管理")
        }
lector authored
610
611
612
    }

    function searchInventory() {
613
614
615
616
617
618
        if(!currentLocationCode){
            $.modal.alertError("请选择库位")
            return
        }
        localStorage.setItem("locationCode",currentLocationCode)
        createMenuItem(ctx +"inventory/inventoryHeader","库存查看")
lector authored
619
    }
620
621
622
623
624
625
626
627
628

    function seachZone(){
        $.ajax({
            url:ctx+"config/zone/getStatus",
            data:{
                zoneCode:$("#zoneCode").val()
            },
            success:function (response) {
                if (response.code==200){
629
630
                    $("#zone").val("库位总数:"+response.data.location+", 空闲库位:"+response.data.emptyLocation+
                        ", 空托盘库位:"+response.data.haveContainLocation+", 有货库位:"+response.data.haveInventoryLocation)
631
632
633
634
635
636
637
638
639
                }else {
                    $.modal.alertError(response.msg)
                }
            },
            error:function () {
                $.modal.alertError("未知的错误")
            }
        })
    }
tangying authored
640
641
</script>
</body>
lector authored
642
</html>