srmTaskInfo.html
13.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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<!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>
<strong>一、名词解释</strong><br>
<strong>1. 分拣时长:</strong>托盘到达分拣口时开始计时,到托盘请求到新的入库位置后结束计时的时长统计。<br>
<strong>2. 故障时长:</strong>堆垛机为故障状态的时长统计。<br>
<strong>3. 手动时长:</strong>堆垛机操作模式为手动的时长统计。<br>
<strong>4. 维修时长:</strong>堆垛机操作模式为维修的时长统计。<br>
<strong>5. 空闲时长:</strong>堆垛机操作模式为联机、无故障、且待机状态的时长统计。<br>
<strong>6. 工作时长:</strong>堆垛机操作模式为联机且正在执行任务的时长统计。<br><br>
<strong>二、计算公式</strong><br>
<strong>1. 任务总时长 =</strong> 分拣任务时长 + 整盘入库时长 + 整盘出库时长 + 移库时长<br>
<strong>2. 分拣时长占比 =</strong> 分拣时长 / 任务总时长<br>
<strong>3. 分拣任务时长 =</strong> 堆垛机运行时长 + 输送线时长 + 分拣时长<br><br>
<strong>三、其他</strong><br>
任务以发起任务时间进行统计,若任务存在跨天的情况,整个任务时间统一归结到任务发起日。
</div>
</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: 'index',
title: '序号',
formatter: function (value, row, index) {
return index + 1;
}
},
{
field: 'createdTime',
title: '日期'
},
{
field: 'srmCode', // 添加堆垛机名称列
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: 'index',
title: '序号',
formatter: function (value, row, index) {
return index + 1;
}
},
{
field: 'createdTime',
title: '日期'
},
{
field: 'srmCode', // 添加堆垛机名称列
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: 'index',
title: '序号',
formatter: function (value, row, index) {
return index + 1;
}
},
{
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(),
"dataBaseNum": $("#dataBaseNum").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>