Blame view

src/main/resources/templates/inventory/inventoryHeader/emptyCheckOut.html 2.91 KB
mahuandong authored
1
<!DOCTYPE HTML>
pengyongcheng authored
2
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
mahuandong authored
3
<meta charset="utf-8">
4
<head>
pengyongcheng authored
5
6
    <th:block th:include="include :: header"/>
    <th:block th:include="include :: select2-css"/>
7
</head>
mahuandong authored
8
9
10
11
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-task-emptyCheckOut">
        <div class="form-group">
pengyongcheng authored
12
            <label class="col-sm-3 control-label">载具编码:</label>
mahuandong authored
13
            <div class="col-sm-8">
pengyongcheng authored
14
15
                <input class="form-control" id="containerCode" name="containerCode" oninput="myFunction()" placeholder="请输入载具编码"
                       type="text">
mahuandong authored
16
17
18
19
20
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">库位编码:</label>
            <div class="col-sm-8">
pengyongcheng authored
21
22
                <input class="form-control" id="sourceLocation" name="sourceLocation" placeholder="请输入库位编码"
                       type="text">
mahuandong authored
23
24
25
            </div>
        </div>
        <div class="form-group">
游杰 authored
26
            <label class="col-sm-3 control-label">出库口:</label>
27
            <div class="col-sm-8">
游杰 authored
28
                <select id="port" name="port" class="form-control"></select>
29
30
31
            </div>
        </div>
        <div class="form-group">
xqs authored
32
            <div class="col-sm-offset-9" style="margin-left:62%">
pengyongcheng authored
33
                <input class="btn-success btn" onclick="selectEmptyOut()" type="button" value="选取空容器"/>
mahuandong authored
34
35
36
37
38
39
                <button type="submit" class="btn btn-primary">提交</button>
                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
            </div>
        </div>
    </form>
</div>
pengyongcheng authored
40
41
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
mahuandong authored
42
43
44
<script type="text/javascript">
    var prefix = ctx + "inventory/inventoryHeader"
    $("#form-task-emptyCheckOut").validate({
pengyongcheng authored
45
46
47
        rules: {
            containerCode: {
                required: true,
mahuandong authored
48
            },
pengyongcheng authored
49
50
            sourceLocation: {
                required: true,
mahuandong authored
51
            },
pengyongcheng authored
52
53
            port: {
                required: true,
54
            },
mahuandong authored
55
        },
pengyongcheng authored
56
        submitHandler: function (form) {
mahuandong authored
57
58
59
60
            $.operate.save(prefix + "/emptyCheckOut", $('#form-task-emptyCheckOut').serialize());
        }
    });
pengyongcheng authored
61
62
63
    function myFunction() {
        let containerCode = document.getElementById("containerCode").value;
        let data = {"containerCode": containerCode, "type": 3};
游杰 authored
64
        $('#port').select2({
pengyongcheng authored
65
            placeholder: "请选择出库口",
66
            ajax: {
pengyongcheng authored
67
                url: ctx + 'config/station/getStationFromType',
68
69
70
71
72
73
74
75
76
                dataType: 'json',
                type: 'post',
                data: data,
            }
        });
    }

    myFunction()
xqs authored
77
    function selectEmptyOut() {
pengyongcheng authored
78
        $.modal.open("空托盘选取", prefix + "/listEmpty", 780);
mahuandong authored
79
    }
80
mahuandong authored
81
82
83
</script>
</body>
</html>