srmTaskInfo.html
11.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
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
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<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 select-info">
<form id="inventory-form">
<div class="select-list">
<ul>
<li>
仓库:
<select id="dataBaseNum" name="dataBaseNum">
<option value="1">机加立库</option>
<option value="2">一厂2号立库</option>
<option value="3">二厂立库</option>
</select>
</li>
<li class="time">
<label>创建时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="createdBegin"/>
<span>-</span>
<div id="tips" style="position: absolute;left: 180px;top: 40px;"></div>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" id="btn"><i class="fa fa-search"></i> 搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('inventory-form')"><i
class="fa fa-refresh"></i> 重置</a>
</li>
</ul>
</div>
</form>
</div>
<!-- 任务时长统计 -->
<div class="col-sm-12 select-info">
<div id="toolbar1">任务时长统计</div>
<table id="bootstrap-table" data-mobile-responsive="true"
class="table table-bordered table-hover text-nowrap table-primary"></table>
</div>
<!-- 任务计数统计 -->
<div class="col-sm-12 select-info">
<div id="toolbar2">任务计数统计</div>
<table id="bootstrap-table2" data-mobile-responsive="true"
class="table table-bordered table-hover text-nowrap table-success"></table>
</div>
<!-- 堆垛机状态统计 -->
<div class="col-sm-12 select-info">
<div id="toolbar3">堆垛机状态统计</div>
<table id="bootstrap-table3" data-mobile-responsive="true"
class="table table-bordered table-hover text-nowrap table-danger"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var prefix = ctx + "getSRMTaskInfo";
var inventoryStatus = [[${@dict.getType('inventorySts')}]];
var receiptHeaderStatus = [[${@dict.getType('receiptHeaderStatus')}]];
var shipmentHeaderStatus = [[${@dict.getType('shipmentHeaderStatus')}]];
var receiptContainerHeaderStatus = [[${@dict.getType('receiptContainerHeaderStatus')}]];
var shipmentContainerHeaderStatus = [[${@dict.getType('shipmentContainerHeaderStatus')}]];
var taskStatus = [[${@dict.getType('taskStatus')}]];
$("#bootstrap-table").bootstrapTable({
// url: prefix + "/receiptDetail",
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
clickToSelect: true,
sortName: "id",
sortOrder: "desc",
showExport: true,
exportDataType: "all",
toolbar: '#toolbar1',
toolBarAlign: 'left',
columns: [
{
field: 'createdTime',
title: '日期'
},
{
field: 'taskSumTime',
title: '任务总时长'
},
{
field: 'sortingTime',
title: '分拣任务时长'
},
{
field: 'receiptTime',
title: '整盘入库时长'
},
{
field: 'shipmentTime',
title: '整盘出库时长'
},
{
field: 'transferTime',
title: '移库时长'
},
{
field: 'sortTime',
title: '分拣时长'
},
{
field: 'sortingTimeRatio',
title: '分拣任务时长占比'
},
{
field: 'receiptTimeRatio',
title: '整盘入库时长占比'
},
{
field: 'shipmentTimeRatio',
title: '整盘出库时长占比'
},
{
field: 'transferTimeRatio',
title: '移库时长占比'
},
{
field: 'sortTimeRatio',
title: '分拣时长占比'
},
],
theadClasses: "thead-light"
});
$("#bootstrap-table2").bootstrapTable({
// url: prefix + "/receiptContainerDetail",
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
clickToSelect: true,
sortName: "id",
sortOrder: "desc",
showExport: true,
exportDataType: "all",
toolbar: '#toolbar2',
toolBarAlign: 'left',
columns: [
{
field: 'createdTime',
title: '日期'
},
{
field: 'taskNum',
title: '任务总数量'
},
{
field: 'sortingNum',
title: '分拣任务数量'
},
{
field: 'receiptNum',
title: '整盘入库数量'
},
{
field: 'shipmentNum',
title: '整盘出库数量'
},
{
field: 'transferNum',
title: '移库数量'
},
{
field: 'sortingNumRatio',
title: '分拣任务数量占比'
},
{
field: 'receiptNumRatio',
title: '整盘入库数量占比'
},
{
field: 'shipmentNumRatio',
title: '整盘出库数量占比'
},
{
field: 'transferNumRatio',
title: '移库数量占比'
},
],
theadClasses: "thead-blue"
});
$("#bootstrap-table3").bootstrapTable({
// url: prefix + "/receiptTaskDetail",
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
clickToSelect: true,
sortName: "id",
sortOrder: "desc",
showExport: true,
exportDataType: "all",
toolbar: '#toolbar3',
toolBarAlign: 'left',
columns: [
{
field: 'createdTime',
title: '日期'
},
{
field: 'srmName',
title: '堆垛机名称'
},
{
field: 'Error',
title: '故障时长'
},
{
field: 'Manual',
title: '手动时长'
},
{
field: 'Maintain',
title: '维修时长'
},
{
field: 'Free',
title: '空闲时长'
},
{
field: 'Running',
title: '工作时长'
},
{
field: 'ErrorRatio',
title: '故障时长占比'
},
{
field: 'ManualRatio',
title: '手动时长占比'
},
{
field: 'MaintainRatio',
title: '维修时长占比'
},
{
field: 'FreeRatio',
title: '空闲时长占比'
},
{
field: 'RunningRatio',
title: '工作时长占比'
},
]
});
function sousuo() {
debugger;
if (!$("input[name='createdBegin']").val() || !$("input[name='createdEnd']").val()) {
layer.tips("输入开始日期和结束日期!", "#tips", {tips: [3, "rgb(28,132,198)"], time: 1000, area: 'auto'})
return;
}
$("#bootstrap-table").bootstrapTable('removeAll');
$("#bootstrap-table2").bootstrapTable('removeAll');
$("#bootstrap-table3").bootstrapTable('removeAll');
$.ajax({
url: prefix + "/getData",
type: 'post',
data: {
"createdBegin": $("input[name='createdBegin']").val(),
"createdEnd": $("input[name='createdEnd']").val()
},
success: function (value) {
if(value.taskTimeMapListResult.length==0){
$.modal.msgError("没有查到数据,请重试...");
}
$("#bootstrap-table").bootstrapTable('load', value.taskTimeMapListResult);
$("#bootstrap-table2").bootstrapTable('load', value.taskNumMapListResult);
$("#bootstrap-table3").bootstrapTable('load', value.srmStatusMapList);
lanse();
},
error: function (value) {
$.modal.msg("服务器错误,请重试...");
}
})
}
function hongse() {
//鼠鼻红 合欢红 春梅红 香叶红 艳红 玉红
$(".table-primary th").css({backgroundColor: "rgb(227,180,184)"});
$(".table-success th").css({backgroundColor: "rgb(240,161,168)"});
$(".table-danger th").css({backgroundColor: "rgb(241,147,156)"});
$(".table-info th").css({backgroundColor: "rgb(240,124,130)"});
$(".table-dark th").css({backgroundColor: "rgb(237,90,101)"});
$(".table-warning th").css({backgroundColor: "rgb(192,72,81)"});
$(".th-inner").css({color: "black"});
}
function lanse() {
//秋波蓝 碧青 涧石蓝 鸢尾蓝 釉蓝 潮蓝
// $(".table-primary th").css({backgroundColor: "rgb(138,188,209)"});
// $(".table-success th").css({backgroundColor: "rgb(92,179,204)"});
// $(".table-danger th").css({backgroundColor: "rgb(102,169,201)"});
$(".table-primary th").css({backgroundColor: "rgb(21,139,184)"});
$(".table-success th").css({backgroundColor: "rgb(23,129,181)"});
$(".table-danger th").css({backgroundColor: "rgb(41,131,187)"});
$(".table-info th").css({backgroundColor: "rgb(21,139,184)"});
$(".table-dark th").css({backgroundColor: "rgb(23,129,181)"});
$(".table-warning th").css({backgroundColor: "rgb(41,131,187)"});
$(".th-inner").css({color: "black"});
}
$("#btn").click(function () {
if ($("#btn").hasClass("btn-primary")) {
$("#btn").removeClass("btn-primary").css({backgroundColor: "rgb(128,128,128)"});
sousuo();
setTimeout(function () {
$("#btn").addClass("btn-primary").removeAttr("style");
}, 1000);
}
});
window.onload = hongse;
</script>
</body>
</html>