verify.html
9.91 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
<!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>
仓库:<input id="warehouseCode" type="text" name="warehouseCode"
th:value="${warehouseCode}" readonly="readonly"/>
</li>
<!-- <li>-->
<!-- 货主:-->
<!-- <select id="companyCode" name="companyCode" th:with="list=${@companyService.getCode()}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="item : ${list}" th:text="${item['name']}"-->
<!-- th:value="${item['code']}" th:attr=" code = ${item['code']}"></option>-->
<!-- </select>-->
<!-- </li>-->
<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">校验库位上的容器</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: 'localLocation',
title: '本地库位编号 ',
visible: true
},
{
field: 'localContain',
title: '本地容器编号',
visible: true
},
{
field: 'localLocationStatus',
title: '本地库位状态',
visible: true
},
{
field: 'contrastLocationStatus',
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: 'localLocation',
title: '本地库位编号',
visible: true
},
{
field: 'localContain',
title: '本地容器编号',
visible: true
},
{
field: 'contrastLocation',
title: '对照库位编号',
visible: true
},
{
field: 'contrastContain',
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: 'localId',
title: '本地任务id',
visible: true
},
{
field: 'localContainerCode',
title: '本地容器编号',
visible: true
},
{
field: 'localTaskStatus',
title: '本地任务状态',
visible: true
},
{
field: 'contrastId',
title: '对照任务id',
visible: true
},
{
field: 'contrastTaskStatus',
title: '对照任务状态',
visible: true
}
]
});
function makesearch() {
if ($("#tap1").hasClass("active")){
var params = {}
params.url = prefix+"/locationStatusList"
params.method = "get"
$("#bootstrap-table1").bootstrapTable('refresh', params);
}else if ($("#tap2").hasClass("active")){
var params = {}
params.url = prefix+"/locationWithContainerList"
params.method = "get"
$("#bootstrap-table2").bootstrapTable('refresh', params);
}else if ($("#tap3").hasClass("active")){
var params = {}
params.url = prefix+"/taskStatuslist"
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>