Blame view

src/main/resources/templates/config/material/add.html 13.1 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-material-add">
			<div class="form-group">
mahuandong authored
9
				<label class="col-sm-3 control-label">编码:</label>
tangying authored
10
11
12
13
14
				<div class="col-sm-8">
					<input id="code" name="code" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
mahuandong authored
15
16
				<label class="col-sm-3 control-label">货主编码:</label>
				<div class="col-sm-8">
17
					<select id="companyCode" name="companyCode"  class="form-control" th:with="companyList=${@companyService.selectCompanyByCurrentUserId()}">
mahuandong authored
18
19
						<option th:each="company : ${companyList}" th:text="${company['name']}" th:value="${company['code']}"></option>
					</select>
mahuandong authored
20
21
22
				</div>
			</div>
			<div class="form-group">
tangying authored
23
24
25
26
27
				<label class="col-sm-3 control-label">名称:</label>
				<div class="col-sm-8">
					<input id="name" name="name" class="form-control" type="text">
				</div>
			</div>
mahuandong authored
28
			<div class="form-group">
29
30
31
32
33
34
				<label class="col-sm-3 control-label">最大码垛数量:</label>
				<div class="col-sm-8">
					<input id="maxQty" name="maxQty" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">
mahuandong authored
35
36
37
38
39
40
41
42
				<label class="col-sm-3 control-label">规格:</label>
				<div class="col-sm-8">
					<input id="spec" name="spec" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位:</label>
				<div class="col-sm-8">
43
					<input id="unit" name="unit" class="form-control" type="text">
mahuandong authored
44
45
				</div>
			</div>
46
			<div class="form-group">
tangying authored
47
48
				<label class="col-sm-3 control-label">物料类别:</label>
				<div class="col-sm-8">
49
50
					<select id="type" name="type" class="form-control" th:with="materialType=${@materialType.queryType()}">
						<option th:each="item : ${materialType}" th:text="${item['name']}" th:value="${item['code']}"></option>
tangying authored
51
52
53
54
					</select>
				</div>
			</div>
			<div class="form-group">
mahuandong authored
55
				<label class="col-sm-3 control-label">ABC分类:</label>
mahuandong authored
56
57
				<div class="col-sm-8">
					<input id="abcClass" name="abcClass" class="form-control" type="text">
tangying authored
58
59
60
				</div>
			</div>
			<div class="form-group">
mahuandong authored
61
				<label class="col-sm-3 control-label">保质期(天)</label>
tangying authored
62
				<div class="col-sm-8">
mahuandong authored
63
					<input id="daysToExpire" name="daysToExpire" class="form-control" type="text"/>
tangying authored
64
65
				</div>
			</div>
66
			<div class="form-group">
mahuandong authored
67
				<label class="col-sm-3 control-label">定位规则:</label>
tangying authored
68
				<div class="col-sm-8">
69
					<select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('locationRule')}">
70
71
72
						<option value="">请选择</option>
						<option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option>
					</select>
tangying authored
73
74
				</div>
			</div>
75
			<div class="form-group">
mahuandong authored
76
				<label class="col-sm-3 control-label">分配规则:</label>
tangying authored
77
				<div class="col-sm-8">
78
					<select id="allocationRule" name="allocationRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('allocationRule')}">
79
80
81
						<option value="">请选择</option>
						<option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option>
					</select>
tangying authored
82
83
				</div>
			</div>
84
			<div class="form-group">
mahuandong authored
85
				<label class="col-sm-3 control-label">补货规则:</label>
tangying authored
86
				<div class="col-sm-8">
87
					<select id="replenishmentRule" name="replenishmentRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('replenishmentRule')}">
88
89
90
						<option value="">请选择</option>
						<option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option>
					</select>
tangying authored
91
92
				</div>
			</div>
mahuandong authored
93
94
95
			<div class="form-group">
				<label class="col-sm-3 control-label">空货位规则:</label>
				<div class="col-sm-8">
96
					<select id="emptyLocRule" name="emptyLocRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('emptyLocRule')}">
97
98
99
						<option value="">请选择</option>
						<option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option>
					</select>
mahuandong authored
100
101
				</div>
			</div>
102
			<div class="form-group">
103
				<label class="col-sm-3 control-label">入库规则:</label>
tangying authored
104
				<div class="col-sm-8">
105
					<select id="receivingFlow" name="receivingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('receivingFlow')}">
106
107
108
						<option value="">请选择</option>
						<option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option>
					</select>
tangying authored
109
110
				</div>
			</div>
111
			<div class="form-group">
mahuandong authored
112
				<label class="col-sm-3 control-label">出库流程:</label>
tangying authored
113
				<div class="col-sm-8">
114
					<select id="shippingFlow" name="shippingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('shippingFlow')}">
115
116
117
						<option value="">请选择</option>
						<option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option>
					</select>
tangying authored
118
119
				</div>
			</div>
120
			<div class="form-group">
mahuandong authored
121
				<label class="col-sm-3 control-label">属性模板:</label>
tangying authored
122
				<div class="col-sm-8">
mahuandong authored
123
					<input id="attributeTemplateCode" name="attributeTemplateCode" class="form-control" type="text">
tangying authored
124
125
				</div>
			</div>
126
			<div class="form-group">
mahuandong authored
127
				<label class="col-sm-3 control-label">记录序列号:</label>
tangying authored
128
				<div class="col-sm-8">
mahuandong authored
129
					<input id="trackSerialNum" name="trackSerialNum" class="form-control" type="text">
tangying authored
130
131
				</div>
			</div>
132
			<div class="form-group">
mahuandong authored
133
				<label class="col-sm-3 control-label">自动生成序列号:</label>
tangying authored
134
				<div class="col-sm-8">
135
136
137
138
139
					<select id="autoGenSerialNum" name="autoGenSerialNum" class="form-control">
						<option value="">请选择</option>
						<option value="0"></option>
						<option value="1"></option>
					</select>
tangying authored
140
141
				</div>
			</div>
142
			<div class="form-group">
mahuandong authored
143
				<label class="col-sm-3 control-label">自动生成序列号表达式:</label>
tangying authored
144
				<div class="col-sm-8">
mahuandong authored
145
					<input id="autoGenSerialNumFormat" name="autoGenSerialNumFormat" class="form-control" type="text">
tangying authored
146
147
				</div>
			</div>
mahuandong authored
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
			<div class="form-group">
				<label class="col-sm-3 control-label">序列号模板:</label>
				<div class="col-sm-8">
					<input id="snTemplateCode" name="snTemplateCode" 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="expiringDays" name="expiringDays" 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="minShelfLifeDays" name="minShelfLifeDays" 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="version" name="version" class="form-control" type="text">
				</div>
			</div>-->
tangying authored
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">创建时间:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="created" name="created" 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="createdBy" name="createdBy" 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="lastUpdated" name="lastUpdated" 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="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
mahuandong authored
196
197
			<div class="form-group">
mahuandong authored
198
				<label class="col-sm-3 control-label">状态:</label>
tangying authored
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
				<div class="col-sm-8">
					<div class="onoffswitch">
						<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable">
						<label class="onoffswitch-label" for="enable">
							<span class="onoffswitch-inner"></span>
							<span class="onoffswitch-switch"></span>
						</label>
					</div>
				</div>
			</div>
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">是否删除:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="deleted" name="deleted" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef1" name="userDef1" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef2" name="userDef2" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef3" name="userDef3" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段4:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef4" name="userDef4" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段5:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef5" name="userDef5" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段6:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef6" name="userDef6" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段7:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef7" name="userDef7" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">自定义字段8:</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="userDef8" name="userDef8" class="form-control" type="text">-->
				<!--</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">
273
		var prefix = ctx + "config/material";
tangying authored
274
275
276
277
278
279
280
		$("#form-material-add").validate({
			rules:{
                code:{
					required:true,
				},
                name:{
                    required:true,
肖超群 authored
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
                },
				daysToExpire:{
					digits:true
				},
				trackSerialNum:{
					digits:true
				},
				autoGenSerialNum:{
					digits:true
				},
				expiringDays:{
					digits:true
				},
				minShelfLifeDays:{
					digits:true
				}
tangying authored
297
298
299
300
301
302
			},
			submitHandler: function(form) {
				// $.operate.save(prefix + "/add", $('#form-material-add').serialize());
                // var tableValue = $.common.getTableValue("#form-material-add");
                // $.operate.save(prefix + "/add", tableValue);
                var tableValue = $("#form-material-add").serialize();
303
                tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").val());
tangying authored
304
                tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked'));
305
306
307
308
309
310
311
				tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val());
				tableValue = formValueReplace(tableValue, "shippingFlow", $("#shippingFlow option:selected").val());
				tableValue = formValueReplace(tableValue, "locatingRule", $("#locatingRule option:selected").val());
				tableValue = formValueReplace(tableValue, "allocationRule", $("#allocationRule option:selected").val());
				tableValue = formValueReplace(tableValue, "replenishmentRule", $("#replenishmentRule option:selected").val());
				tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val());
				tableValue = formValueReplace(tableValue, "pickingRule", $("#pickingRule option:selected").val());
tangying authored
312
313
314
315
316
317
                $.operate.save(prefix + "/add", tableValue);
			}
		});
	</script>
</body>
</html>