Blame view

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

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