verify.html
11.8 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12 select-info">
<form id="inventoryMaterialSummary-form">
<div class="select-list">
<ul>
<li>
查询状态:
<select id="sendBack">
<option value="0">匹配所有</option>
<option value="1">只显示异常</option>
</select>
</li>
<div class="form-group">
<label class="col-sm-3 control-label">区域:</label>
<div class="col-sm-8">
<select id="alarmType" name="alarmType" class="form-control" th:with="list=${@zone.getZoneCodeList()}">
<option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['code']}"></option>
</select>
</div>
</div>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="makesearch()"><i
class="fa fa-search"></i> 搜索</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-info">
<ul id="myTab" class="nav nav-tabs">
<li id="tap1" class="active"><a href="#locationStatus" data-toggle="tab">容器校验库位</a></li>
<li id="tap2"><a href="#locationContainer" data-toggle="tab">校验WCS库位和容器</a></li>
<li id="tap3"><a href="#task" data-toggle="tab">校验库存</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="locationStatus">
<table id="bootstrap-table1"
class="table table-bordered table-hover text-nowrap"></table>
</div>
<div class="tab-pane fade" id="locationContainer">
<table id="bootstrap-table2"
data-mobile-responsive="true"
class="table table-bordered table-hover text-nowrap"></table>
</div>
<div class="tab-pane fade" id="task">
<table id="bootstrap-table3"
data-mobile-responsive="true"
class="table table-bordered table-hover"></table>
</div>
</div>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var prefix = ctx + "tool/verify";
//校验库位状态表
$(function () {
let options = {
contentType: "application/x-www-form-urlencoded", // 编码类型
modalName: "校验库位状态",
sortable: true,
iconSize: "outline",
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
showExport: true, //导出
exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
search: false,
pagination: false,
sidePagination: "server",
responseHandler: responseHandler,
columns: [
{
field: 'contrastContain',
title: '容器编号',
visible: true
},
{
field: 'contrastLocation',
title: '容器上的库位',
visible: true
},
{
field: 'contrastStatus',
title: '容器状态',
visible: true
},
{
field: 'localContain',
title: '库位上的容器编号',
visible: true
},
{
field: 'localLocation',
title: '库位编号',
visible: true
},
{
field: 'localLocationStatus',
title: '库位状态',
visible: true
} ,
{
field: 'reason',
title: '异常原因',
visible: true
},
{
field: 'task',
title: '任务',
visible: true
}
,
{
field: 'stock',
title: '库存',
visible: true
}
]
};
$("#bootstrap-table1").bootstrapTable(options);
});
//校验库位上的容器表
$("#bootstrap-table2").bootstrapTable({
sortable: true,
iconSize: "outline",
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
showExport: true, //导出
exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
search: false,
pagination: false,
sidePagination: "server",
modalName: "校验库位上的容器",
contentType: "application/x-www-form-urlencoded",
//页面渲染
responseHandler: responseHandler,
columns: [
{
field: 'locationCode',
title: '本地库位',
visible: true
},
{
field: 'containerCode',
title: '本地容器',
visible: true
},
{
field: 'wcsLocationCode',
title: 'WCS库位',
visible: true
},
{
field: 'wcsContainerCode',
title: 'WCS容器',
visible: true
},
{
field: 'reason',
title: '异常原因',
visible: true
}
]
});
//任务表
$("#bootstrap-table3").bootstrapTable({
iconSize: "outline",
sortable: true,
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
showExport: true, //导出
modalName: "校验任务",
pagination: false,
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
//页面渲染
responseHandler: responseHandler,
columns: [
{
field: 'id',
title: '主表ID',
visible: true
},
{
field: 'locationCode',
title: '主表货位',
visible: true
},
{
field: 'containerCode',
title: '主表容器',
visible: true
},
{
field: 'containerStatus',
title: '主表容器状态',
visible: true
},
{
field: 'totalQty',
title: '总数量',
visible: true
},
{
field: 'localContain',
title: '子库位',
visible: true
},
{
field: 'zQty',
title: '子在库数量',
visible: true
},
{
field: 'taskQty',
title: '子在执行数量',
visible: true
},
{
field: 'reason',
title: '异常原因',
visible: true
},
{
field: 'task',
title: '有没有没完成的任务',
visible: true
}
]
});
function makesearch() {
if ($("#tap1").hasClass("active")){
var params = {}
params.url = prefix+"/locationStatusList?id="+$("#sendBack").val()
params.method = "get"
$("#bootstrap-table1").bootstrapTable('refresh', params);
}else if ($("#tap2").hasClass("active")){
var params = {}
alert($("#alarmType").val());
params.url = prefix+"/locationWithContainerList?id="+$("#sendBack").val()
params.method = "get"
$("#bootstrap-table2").bootstrapTable('refresh', params);
}else if ($("#tap3").hasClass("active")){
var params = {}
params.url = prefix+"/taskStatuslist?id="+$("#sendBack").val()
params.method = "get"
$("#bootstrap-table3").bootstrapTable('refresh', params);
}else {
alert("error")
}
}
/*__________*/
function open(title, url, width, height) {
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
width = 'auto';
height = 'auto';
}
if (title == null) {
title = false;
}
if (url == null) {
url = "404.html";
}
if ($.common.isEmpty(width)) {
width = 800;
// width = ($(window).width() - 100);
}
if ($.common.isEmpty(height)) {
height = ($(window).height() - 50);
}
layer.open({
type: 2,
area: [width + 'px', height + 'px'],
fix: false,
//不固定
maxmin: true,
shade: 0.3,
title: title,
content: url
// shadeClose: true, //点击遮罩关闭层
})
}
function responseHandler(res) {
if (res.code == 200) {
$.modal.msgSuccess(res.msg)
return {rows: res.data, total: res.data.length, code: 0};
} else {
$.modal.alertWarning(res.msg);
return {rows: [], total: 0};
}
}
function queryParams(params) {
var curParams = {
// 传递参数查询参数
// warehouseCode: $('#warehouseCode').val(),
};
return curParams;
}
</script>
</body>
</html>