add.html
12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
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
273
274
275
276
277
278
<!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-receiptPreference-add">
<div class="form-group">
<label class="col-sm-3 control-label">仓库:</label>
<div class="col-sm-8">
<select name="warehouseCode" id="warehouse" class="form-control" th:with="warehouseList=${@WarehouseService.getWarehouse()}">
<option th:each="warehouse : ${warehouseList}" th:text="${warehouse['name']}" th:value="${warehouse['code']}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">首选项代码:</label>
<div class="col-sm-8">
<input id="code" name="code" 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="name" name="name" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库流程:</label>
<div class="col-sm-8">
<select id="receiptFlow" name="receivingflow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('receivingFlow')}">
<option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">自动生成托盘号:</label>
<div class="col-sm-8">
<select id="autoAssignLPN" name="autoAssignLPN" class="form-control">
<option value="0">自动生成</option>
<option value="1">不自动生成</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">允许超收:</label>
<div class="col-sm-8">
<select id="allowOverReceiving" name="allowOverReceiving" class="form-control">
<option value="1">允许</option>
<option value="0">不允许</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">允许超收范围:</label>
<div class="col-sm-8">
<input id="allowOverReceivingQty" name="allowOverReceivingQty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">自动定位:</label>
<div class="col-sm-8">
<select id="autoLocate" name="autoLocate" class="form-control">
<option value="0">是</option>
<option value="1">否</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RF显示未收数量:</label>
<div class="col-sm-8">
<select id="showOpenQty" name="showOpenQty" class="form-control">
<option value="0">是</option>
<option value="1">否</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RF组车收货:</label>
<div class="col-sm-8">
<input id="groupPutaway" name="groupPutaway" 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="manuallyBuildLPN" name="manuallyBuildLPN" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">定位规则:</label>
<div class="col-sm-8">
<select id="locationRule" name="locationRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('locationRule')}">
<option value="">请选择</option>
<option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">上架规则:</label>
<div class="col-sm-8">
<select id="listingRules" name="listingRules" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('listingRules')}">
<option value="">请选择</option>
<option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">空库位规则:</label>
<div class="col-sm-8">
<select id="emptyLocRule" name="emptyLocRule" class="form-control"
th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('emptyLocRule')}">
<option value="">请选择</option>
<option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RF逐件收货:</label>
<div class="col-sm-8">
<select name="checkinByPiece" class="form-control" type="text" id="checkinByPiece">
<option value="0">否</option>
<option value="-1">是</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RF自动提交收货:</label>
<div class="col-sm-8">
<select id="pieceConfirm" name="pieceConfirm" class="form-control" type="text">
<option value="0">否</option>
<option value="-1">是</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">abc分类:</label>
<div class="col-sm-8">
<select id="abcClass" name="allowoverreceiving" class="form-control" type="text">
<option value="0">否</option>
<option value="-1">是</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">保质期(天):</label>
<div class="col-sm-8">
<input id="daysToExpire" name="daystoexpire" class="form-control" type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">临期预警:</label>
<div class="col-sm-8">
<select id="expiringDays" name="expiringdays" class="form-control" type="text">
<option value="0">否</option>
<option value="-1">是</option>
</select>
</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="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RF快速上架:</label>
<div class="col-sm-8">
<select id="allowQuickPutaway" name="allowquickputaway" class="form-control">
<option value="0">是</option>
<option value="1">否</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">属性模板:</label>
<div class="col-sm-8">
<input id="attributeTemplateCode" name="attributetemplatecode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">快速入库:</label>
<div class="col-sm-8">
<select id="usequickcheckin" name="useQuickCheckIn" class="form-control">
<option value="0">是</option>
<option value="1">否</option>
</select>
</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">
var prefix = ctx + "config/receiptPreference";
$("#form-receiptPreference-add").validate({
rules:{
code:{
required: true,
},
name:{
required: true,
},
autoAssignLPN:{
required: true,
},
allowOverReceiving:{
required: true,
},
allowOverReceivingQty:{
required: true,
},
autoLocate: {
required: true,
},
showOpenQty: {
required: true,
},
groupPutaway: {
required: true,
},
manuallyBuildLPN: {
required: true,
},
checkinByPiece: {
required: true,
},
pieceConfirm: {
required: true,
},
allowQuickPutaway: {
required: true,
}
},
submitHandler: function(form) {
var tableValue = $.common.getTableValue("#form-receiptPreference-add");
tableValue = formValueReplace(tableValue, "allowOverReceiving", $("#allowOverReceiving option:selected").val());
tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val());
tableValue = formValueReplace(tableValue, "autoAssignLPN", $("#autoAssignLPN option:selected").val());
tableValue = formValueReplace(tableValue, "autoLocate", $("#autoLocate option:selected").val());
tableValue = formValueReplace(tableValue, "showOpenQty", $("#showOpenQty option:selected").val());
tableValue = formValueReplace(tableValue, "locationRule", $("#locationRule option:selected").val());
tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val());
tableValue = formValueReplace(tableValue, "useQuickCheckIn", $("#useQuickCheckIn option:selected").val());
tableValue = formValueReplace(tableValue, "allowQuickPutaway", $("#allowQuickPutaway option:selected").val());
tableValue = formValueReplace(tableValue, "warehousecode", $("#allowQuickPutaway option:selected").val());
$.operate.save(prefix + "/add", tableValue);
}
});
$(function () {
$.ajax({
url: "../getWarehouseByUserCode",
type: 'post',
dataType: "json",
data: {
username: [[${@permission.getPrincipalProperty('id')}]]
},
success: function (value) {
// console.log(value.data);
$("#warehouse").contents().remove();
if (value != null && value.data.length >= 1)
for (var i = 0; i < value.data.length; i++) {
$('<option value=' + value.data[i].id + ' code=' + value.data[i].code + '>' + value.data[i].name + '</option>').appendTo('#warehouse');
}
}
})
});
</script>
</body>
</html>