提交 | 用户 | 时间
|
71e81e
|
1 |
<!DOCTYPE html> |
懒 |
2 |
<html> |
|
3 |
<head> |
|
4 |
<meta charset="utf-8"/> |
|
5 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
|
7 |
<title>${constants.getSystemName()}</title> |
|
8 |
<link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/> |
|
9 |
<link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}"/> |
|
10 |
<link rel="stylesheet" href="${ctxPath}/assets/expand/css/style.css?v=${constants.getReleaseVersion()}" media="all"/> |
|
11 |
|
|
12 |
<style> |
|
13 |
/** 卡片轮播图样式 */ |
|
14 |
.admin-carousel .layui-carousel-ind { |
|
15 |
position: absolute; |
|
16 |
top: -41px; |
|
17 |
text-align: right; |
|
18 |
} |
|
19 |
|
|
20 |
.admin-carousel .layui-carousel-ind ul { |
|
21 |
background: 0 0; |
|
22 |
} |
|
23 |
|
|
24 |
.admin-carousel .layui-carousel-ind li { |
|
25 |
background-color: #e2e2e2; |
|
26 |
} |
|
27 |
|
|
28 |
.admin-carousel .layui-carousel-ind li.layui-this { |
|
29 |
background-color: #999; |
|
30 |
} |
|
31 |
|
|
32 |
/** 广告位轮播图 */ |
|
33 |
.admin-news .layui-carousel-ind { |
|
34 |
height: 45px; |
|
35 |
} |
|
36 |
|
|
37 |
.admin-news a { |
|
38 |
display: block; |
|
39 |
line-height: 60px; |
|
40 |
text-align: center; |
|
41 |
} |
|
42 |
|
|
43 |
</style> |
|
44 |
</head> |
|
45 |
|
|
46 |
<body> |
|
47 |
|
|
48 |
<!-- 加载动画,移除位置在common.js中 --> |
|
49 |
<div class="page-loading"> |
|
50 |
<div class="ball-loader"> |
|
51 |
<span></span><span></span><span></span><span></span> |
|
52 |
</div> |
|
53 |
</div> |
|
54 |
|
|
55 |
<!-- 正文开始 --> |
|
56 |
<div class="layui-fluid"> |
|
57 |
<div class="layui-row layui-col-space15"> |
|
58 |
<div class="layui-col-xs12 layui-col-sm6 layui-col-md3"> |
|
59 |
<div class="layui-card"> |
|
60 |
<div class="layui-card-header"> |
|
61 |
计划数量<span class="layui-badge layui-bg-black pull-right">日</span> |
|
62 |
</div> |
|
63 |
<div class="layui-card-body"> |
|
64 |
<p class="lay-big-font" id="planNum"></p> |
|
65 |
<p>月计划数量<span class="pull-right"><i class="layui-icon layui-icon-flag" id="planQtyWeek"></i></span></p> |
|
66 |
</div> |
|
67 |
</div> |
|
68 |
</div> |
|
69 |
<div class="layui-col-xs12 layui-col-sm6 layui-col-md3"> |
|
70 |
<div class="layui-card"> |
|
71 |
<div class="layui-card-header"> |
|
72 |
实时产量<span class="layui-badge layui-bg-black pull-right">日</span> |
|
73 |
</div> |
|
74 |
<div class="layui-card-body"> |
|
75 |
<p class="lay-big-font" id="realityNum"></p> |
|
76 |
<p>月实时产量<span class="pull-right"><i class="layui-icon layui-icon-diamond" id="actualQtyWeek"></i></span></p> |
|
77 |
</div> |
|
78 |
</div> |
|
79 |
</div> |
|
80 |
<div class="layui-col-xs12 layui-col-sm6 layui-col-md3"> |
|
81 |
<div class="layui-card"> |
|
82 |
<div class="layui-card-header"> |
|
83 |
不良数量<span class="layui-badge layui-bg-black pull-right">日</span> |
|
84 |
</div> |
|
85 |
<div class="layui-card-body"> |
|
86 |
<p class="lay-big-font" id="repairQty"></p> |
|
87 |
<p>月不良数量<span class="pull-right"><i class="layui-icon layui-icon-notice" id="repairQtyWeek"></i></span></p> |
|
88 |
</div> |
|
89 |
</div> |
|
90 |
</div> |
|
91 |
<div class="layui-col-xs12 layui-col-sm6 layui-col-md3"> |
|
92 |
<div class="layui-card"> |
|
93 |
<div class="layui-card-header"> |
|
94 |
报废数量<span class="layui-badge layui-bg-black pull-right">日</span> |
|
95 |
</div> |
|
96 |
<div class="layui-card-body"> |
|
97 |
<p class="lay-big-font" id="scrapQty"></p> |
|
98 |
<p>月报废数量<span class="pull-right"><i class="layui-icon layui-icon-notice" id="scrapQtyWeek"></i></span></p> |
|
99 |
</div> |
|
100 |
</div> |
|
101 |
</div> |
|
102 |
</div> |
|
103 |
<div class="layui-row layui-col-space15"> |
|
104 |
<div class="layui-col-lg15 layui-col-md15"> |
|
105 |
<div class="layui-card"> |
|
106 |
<div class="layui-card-header">设备报警</div> |
|
107 |
<div class="layui-card-body"> |
|
108 |
<table class="layui-table" id="equipmentAlarmTable" lay-filter="equipmentAlarmTable"></table> |
|
109 |
</div> |
|
110 |
</div> |
|
111 |
</div> |
|
112 |
</div> |
|
113 |
|
|
114 |
<div class="layui-row layui-col-space15"> |
|
115 |
<div class="layui-col-lg8 layui-col-md7"> |
|
116 |
<div class="layui-card"> |
|
117 |
<div class="layui-card-header">设备状态</div> |
|
118 |
<div class="layui-card-body"> |
|
119 |
<table class="layui-table" id="equipmentStatusTable" lay-filter="equipmentStatusTable"></table> |
|
120 |
</div> |
|
121 |
</div> |
|
122 |
</div> |
|
123 |
<div class="layui-col-lg4 layui-col-md5"> |
|
124 |
<div class="layui-card"> |
|
125 |
<div class="layui-card-header">日生产计划</div> |
|
126 |
<div class="layui-card-body"> |
|
127 |
<table class="layui-table layui-text"> |
|
128 |
<colgroup> |
|
129 |
<col width="100"> |
|
130 |
<col> |
|
131 |
</colgroup> |
|
132 |
<tbody> |
|
133 |
<tr> |
|
134 |
<td>生产工单号</td> |
|
135 |
<td id="workOrderNo"></td> |
|
136 |
</tr> |
|
137 |
<tr> |
|
138 |
<td>产品编号</td> |
|
139 |
<td id="materialCode"></td> |
|
140 |
</tr> |
|
141 |
<tr> |
|
142 |
<td>产品名称</td> |
|
143 |
<td id="materialName"></td> |
|
144 |
</tr> |
|
145 |
<tr> |
|
146 |
<td>客户编号</td> |
|
147 |
<td id="custom"></td> |
|
148 |
</tr> |
|
149 |
<tr> |
|
150 |
<td>计划数量</td> |
|
151 |
<td id="planQty"></td> |
|
152 |
</tr> |
|
153 |
<tr> |
|
154 |
<td>完成数量</td> |
|
155 |
<td id="actualQty"></td> |
|
156 |
</tr> |
|
157 |
<tr> |
|
158 |
<td>实际上线数量</td> |
|
159 |
<td id="actualOnlineQty"></td> |
|
160 |
</tr> |
|
161 |
<tr> |
|
162 |
<td>创建时间</td> |
|
163 |
<td id="createTime"></td> |
|
164 |
</tr> |
|
165 |
<tr> |
|
166 |
<td>实际开始时间</td> |
|
167 |
<td id="actualStartTime"></td> |
|
168 |
</tr> |
|
169 |
</tbody> |
|
170 |
</table> |
|
171 |
</div> |
|
172 |
</div> |
|
173 |
</div> |
|
174 |
</div> |
|
175 |
</div> |
|
176 |
|
|
177 |
<!-- js部分 --> |
|
178 |
@/* 加入contextPath属性和session超时的配置 */ |
|
179 |
<script type="text/javascript"> |
|
180 |
var Feng = { |
|
181 |
ctxPath: "${ctxPath}", |
|
182 |
version: '${constants.getReleaseVersion()}' |
|
183 |
}; |
|
184 |
</script> |
|
185 |
|
|
186 |
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script> |
|
187 |
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script> |
|
188 |
|
|
189 |
<script> |
|
190 |
layui.use(['table', 'ax','layer', 'carousel'], function () { |
|
191 |
var $ = layui.jquery; |
|
192 |
var layer = layui.layer; |
|
193 |
var carousel = layui.carousel; |
|
194 |
var $ax = layui.ax; |
|
195 |
var table = layui.table; |
|
196 |
var device = layui.device; |
|
197 |
|
|
198 |
// 渲染轮播 |
|
199 |
carousel.render({ |
|
200 |
elem: '.layui-carousel', |
|
201 |
width: '100%', |
|
202 |
height: '60px', |
|
203 |
arrow: 'none', |
|
204 |
autoplay: true, |
|
205 |
trigger: device.ios || device.android ? 'click' : 'hover', |
|
206 |
anim: 'fade' |
|
207 |
}); |
|
208 |
|
|
209 |
var order = new $ax(Feng.ctxPath + "/home/getOrder"); |
|
210 |
var orderAjx = order.start(); |
|
211 |
console.log(orderAjx); |
|
212 |
//头部 |
|
213 |
$("#planNum").html(orderAjx.data.planQty); |
|
214 |
console.log(orderAjx.data.actualQty); |
|
215 |
if(orderAjx.data.actualQty === ""){ |
|
216 |
$("#realityNum").html(0) |
|
217 |
}else { |
|
218 |
$("#realityNum").html(orderAjx.data.actualQty); |
|
219 |
} |
|
220 |
$("#scrapQty").html(orderAjx.data.scrapQty); |
|
221 |
$("#repairQty").html(orderAjx.data.repairQty); |
|
222 |
|
|
223 |
$("#planQtyWeek").html(orderAjx.data.planQtyWeek); |
|
224 |
$("#actualQtyWeek").html(orderAjx.data.actualQtyWeek); |
|
225 |
$("#repairQtyWeek").html(orderAjx.data.repairQtyWeek); |
|
226 |
$("#scrapQtyWeek").html(orderAjx.data.scrapQtyWeek); |
|
227 |
|
|
228 |
|
|
229 |
|
|
230 |
//日生产计划 |
|
231 |
$("#workOrderNo").html(orderAjx.data.workOrderNo); |
|
232 |
$("#materialCode").html(orderAjx.data.materialCode); |
|
233 |
$("#materialName").html(orderAjx.data.materialName); |
|
234 |
$("#custom").html(orderAjx.data.custom); |
|
235 |
$("#planQty").html(orderAjx.data.planQty); |
|
236 |
$("#actualQty").html(orderAjx.data.actualQty); |
|
237 |
$("#actualOnlineQty").html(orderAjx.data.actualOnlineQty); |
|
238 |
$("#createTime").html(orderAjx.data.createTime); |
|
239 |
$("#actualStartTime").html(orderAjx.data.actualStartTime); |
|
240 |
|
|
241 |
/** |
|
242 |
* 设备状态管理 |
|
243 |
*/ |
|
244 |
var EquipmentStatus = { |
|
245 |
tableId: "equipmentStatusTable" |
|
246 |
}; |
|
247 |
|
|
248 |
/** |
|
249 |
* 初始化表格的列 |
|
250 |
*/ |
|
251 |
EquipmentStatus.initColumn = function () { |
|
252 |
return [[ |
|
253 |
{type: 'checkbox'}, |
|
254 |
{field: 'id', hide: true, title: 'ID'}, |
|
255 |
{field: 'equipmentNo', sort: true, title: '设备编号'}, |
|
256 |
{field: 'equipmentName', sort: true, title: '设备名称'}, |
|
257 |
{field: 'workshopCode', sort: true, title: '车间编号'}, |
|
258 |
{field: 'productionLineCode', sort: true, title: '产线编号'}, |
|
259 |
{field: 'locationCode', sort: true, title: '工位编号'}, |
|
260 |
{field: 'status', sort: true, title: '设备状态'},//(1运转2待机3故障) |
|
261 |
{field: 'remarks', sort: true, title: '备注'}, |
|
262 |
{field: 'updateTime', sort: true, title: '更新时间'}, |
|
263 |
]]; |
|
264 |
}; |
|
265 |
|
|
266 |
var tableResult = table.render({ |
|
267 |
elem: '#' + EquipmentStatus.tableId, |
|
268 |
url: Feng.ctxPath + '/equipmentStatus/list', |
|
269 |
toolbar: '#toolbarDemo', |
|
270 |
page: true, |
|
271 |
// height: "full-158", |
|
272 |
cellMinWidth: 100, |
|
273 |
height: 412, |
|
274 |
cols: EquipmentStatus.initColumn() |
|
275 |
}); |
|
276 |
|
|
277 |
/** |
|
278 |
* 设备报警管理 |
|
279 |
*/ |
|
280 |
var EquipmentAlarm = { |
|
281 |
tableId: "equipmentAlarmTable" |
|
282 |
}; |
|
283 |
|
|
284 |
/** |
|
285 |
* 初始化表格的列 |
|
286 |
*/ |
|
287 |
EquipmentAlarm.initColumn = function () { |
|
288 |
return [[ |
|
289 |
{type: 'checkbox'}, |
|
290 |
{field: 'id', hide: true, title: 'ID'}, |
|
291 |
{field: 'equipmentNo', sort: true, title: '设备编号'}, |
|
292 |
{field: 'equipmentName', sort: true, title: '设备名称'}, |
|
293 |
{field: 'workshopCode', sort: true, title: '车间编号'}, |
|
294 |
{field: 'productionLineCode', sort: true, title: '产线编号'}, |
|
295 |
{field: 'locationCode', sort: true, title: '工位编号'}, |
|
296 |
{field: 'errorNo', sort: true, title: '故障代码'}, |
|
297 |
{field: 'errorDesc', sort: true, title: '故障描述'}, |
|
298 |
{field: 'alarmTime', sort: true, title: '报警时间'}, |
|
299 |
]]; |
|
300 |
}; |
|
301 |
|
|
302 |
// 渲染表格 |
|
303 |
var tableResult = table.render({ |
|
304 |
elem: '#' + EquipmentAlarm.tableId, |
|
305 |
url: Feng.ctxPath + '/equipmentAlarm/list', |
|
306 |
toolbar: '#toolbarDemo', |
|
307 |
page: true, |
|
308 |
// height: "full-158", |
|
309 |
cellMinWidth: 100, |
|
310 |
height: 287, |
|
311 |
limit:4, |
|
312 |
cols: EquipmentAlarm.initColumn() |
|
313 |
}); |
|
314 |
|
|
315 |
}); |
|
316 |
</script> |
|
317 |
</body> |
|
318 |
|
|
319 |
</html> |