Blame view

src/main/resources/templates/config/location/addBatch.html 7.43 KB
tangying authored
1
2
3
4
5
6
7
8
<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-location-add">
			<div class="form-group">
9
10
11
12
13
14
				<label class="col-sm-3 control-label">编码前缀:</label>
				<div class="col-sm-8">
					<input id="prefix" name="prefix" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
15
16
17
18
19
20
				<label class="col-sm-3 control-label">起始行:</label>
				<div class="col-sm-8">
					<input id="firstRow" name="firstRow" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
tangying authored
21
22
				<label class="col-sm-3 control-label">最后行:</label>
				<div class="col-sm-8">
23
24
25
26
27
28
29
					<input id="lastRow" name="lastRow" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">起始列:</label>
				<div class="col-sm-8">
					<input id="firstColumn" name="firstColumn" class="form-control" type="text">
tangying authored
30
31
				</div>
			</div>
32
			<div class="form-group">
tangying authored
33
34
				<label class="col-sm-3 control-label">最后列:</label>
				<div class="col-sm-8">
35
36
37
38
39
40
41
					<input id="lastColumn" name="lastColumn" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">起始层:</label>
				<div class="col-sm-8">
					<input id="firstLayer" name="firstLayer" class="form-control" type="text">
tangying authored
42
43
				</div>
			</div>
44
			<div class="form-group">
tangying authored
45
46
				<label class="col-sm-3 control-label">最后层:</label>
				<div class="col-sm-8">
47
48
49
50
51
52
53
					<input id="lastLayer" name="lastLayer" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">起始格:</label>
				<div class="col-sm-8">
					<input id="firstGrid" name="firstGrid" class="form-control" type="text">
tangying authored
54
55
				</div>
			</div>
56
			<div class="form-group">
tangying authored
57
58
				<label class="col-sm-3 control-label">最后格:</label>
				<div class="col-sm-8">
59
					<input id="lastGrid" name="lastGrid" class="form-control" type="text">
tangying authored
60
61
				</div>
			</div>
62
			<div class="form-group">
63
64
65
66
67
				<label class="col-sm-3 control-label">巷道:</label>
				<div class="col-sm-8">
					<input id="roadway" name="roadway" class="form-control" type="text">
				</div>
			</div>
游杰 authored
68
69
70
71
72
73
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">区域:</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="area" name="area" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
74
			<div class="form-group">
游杰 authored
75
76
77
78
79
80
81
82
				<label class="col-sm-3 control-label">高低位:</label>
				<div class="col-sm-8">
					<select id="high" name="high" class="form-control" th:with="high=${@dict.getType('high')}">
						<option th:each="item : ${high}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
tangying authored
83
84
				<label class="col-sm-3 control-label">库位类型:</label>
				<div class="col-sm-8">
85
86
87
					<select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}">
						<option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option>
					</select>
tangying authored
88
89
90
91
92
93
94
95
96
97
98
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">库区编码:</label>
				<div class="col-sm-8">
                    <select id="zone" name="zone" class="form-control" th:with="zone=${@zone.getZoneCodeList()}">
                        <option th:each="item : ${zone}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option>
                    </select>
				</div>
			</div>
			<div class="form-group">
99
				<label class="col-sm-3 control-label">库位状态:</label>
tangying authored
100
				<div class="col-sm-8">
pengcheng authored
101
102
					<select id="status" name="status" class="form-control" th:with="status=${@dict.getType('locationStatus')}">
						<option th:each="item : ${status}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
103
					</select>
tangying authored
104
105
106
107
108
109
110
111
112
113
114
115
				</div>
			</div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
116
		var prefix = ctx + "config/location"
tangying authored
117
118
		$("#form-location-add").validate({
            rules:{
119
120
121
                prefix:{
                    required:true,
                },
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
				firstRow:{
                    required:true,
                    digits:true
                },
                lastRow:{
                    required:true,
                    digits:true
                },
				firstColumn:{
                    required:true,
                    digits:true
                },
                lastColumn:{
                    required:true,
                    digits:true
                },
				firstLayer:{
tangying authored
139
140
141
                    required:true,
                    digits:true
                },
142
                lastLayer:{
tangying authored
143
144
145
                    required:true,
                    digits:true
                },
146
				firstGrid:{
tangying authored
147
148
149
                    required:true,
                    digits:true
                },
150
                lastGrid:{
tangying authored
151
152
                    required:true,
                    digits:true
153
                },
154
155
156
157
158
159
160
161
                zoneCode:{
                    required:true,
                    digits:true
                },
                roadway:{
                    required:true,
                    digits:true
                },
162
				locationType:{
163
					required:true
164
				},
165
166
167
168
				// status:{
				// 	required:true,
				// 	digits:true
				// }
tangying authored
169
170
171
172
173
174
175
            },
			submitHandler: function(form) {
                $.ajax({
                    cache : true,
                    type : "POST",
                    url : prefix + "/addBatchSave",
                    data : {
176
                        "prefix": $("input[name='prefix']").val(),
177
178
179
180
181
182
183
184
                        "firstRow": $("input[name='firstRow']").val(),
                        "lastRow": $("input[name='lastRow']").val(),
                        "firstColumn": $("input[name='firstColumn']").val(),
                        "lastColumn": $("input[name='lastColumn']").val(),
                        "firstLayer": $("input[name='firstLayer']").val(),
                        "lastLayer": $("input[name='lastLayer']").val(),
                        "firstGrid": $("input[name='firstGrid']").val(),
                        "lastGrid": $("input[name='lastGrid']").val(),
185
						"roadway": $("input[name='roadway']").val(),
186
                        "locationType": $("#locationType option:selected").val(),
tangying authored
187
                        "zoneCode": $("#zone option:selected").attr("code"),
pengcheng authored
188
                        "status" : $("#status option:selected").val(),
游杰 authored
189
						"high" : $("#high option:selected").val(),
tangying authored
190
191
192
193
194
195
196
197
198
199
200
201
202
203
                    },
                    async : false,
                    error : function(request) {
                        $.modal.alertError("请求失败!");
                    },
                    success : function(data) {
                        $.operate.saveSuccess(data);
                    }
                });
			}
		});
	</script>
</body>
</html>