outInfoSearch.jsp
13.2 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
<%@ include file="/common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<style type="text/css">
.modal-body {
position: relative;
padding: 15px;
height: 360px;
overflow-y: scroll;
}
.td-item{
display: block;
}
</style>
<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
<fmt:message key="需求单"/>
</h3>
<!-- BEGIN PAGE CONTENT-->
<div class="row">
<div class="col-md-12">
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-list-alt"></i>
</div>
</div>
<div class="portlet-body">
<form id="searchCriteria" class="form-horizontal form-bordered" action="${ctx}/qisda/outInfoSearch.html" method="post">
<div class="form-group">
<label class="control-label col-md-1"><fmt:message key="需求单号"/></label>
<div class="col-md-2">
<div style="text-align:left" class="input-group">
<input type="text" name="hSerial" class="form-control" value="${hSerial}"/>
</div>
</div>
<label class="control-label col-md-1"><fmt:message key="工单号"/></label>
<div class="col-md-2">
<div style="text-align:left" class="input-group">
<input type="text" name="so" class="form-control" value="${so}"/>
</div>
</div>
<label class="control-label col-md-1"><fmt:message key="ReelId"/></label>
<div class="col-md-2">
<div style="text-align:left" class="input-group">
<input type="text" name="reelId" class="form-control" value="${reelId}"/>
</div>
</div>
<div class="col-md-2">
<button class="btn purple" type="submit"><i class="fa fa-search"></i>
<fmt:message key="button.search"/>
</button>
</div>
</div>
</form>
<display:table name="searchCriteria.pageList" requestURI=""
sort="external"
defaultsort="1" class="table table-striped table-bordered table-hover" export="true" id="outInfo">
<display:setProperty name="export.csv.filename" value="outInfo.csv" />
<c:set var="endOutInfoClass" value=""/>
<c:if test="${outInfo.endOutInfo}">
<c:set var="endOutInfoClass" value="bg-yellow"/>
</c:if>
<display:column titleKey="需求单号" sortable="true" sortProperty="hSerial" media="html">
<a href="#" onclick="showDetail('${outInfo.hSerial}')">${outInfo.hSerial}</a>
</display:column>
<display:column titleKey="需求单号" property="hSerial" sortable="false" media="csv"/>
<display:column titleKey="动作" property="action" sortable="true" sortProperty="action" class="${endOutInfoClass}"/>
<display:column titleKey="工单" sortable="true" sortProperty="so">
${outInfo.so}<c:if test="${outInfo.soseq != null}">(${outInfo.soseq})</c:if>
</display:column>
<display:column titleKey="线别" property="line" sortable="true" sortProperty="line"/>
<display:column titleKey="备料单号" property="refno" sortable="true" sortProperty="refno"/>
<display:column titleKey="建议出仓时间" sortable="true" sortProperty="sdate">
<fmt:formatDate value="${outInfo.sdate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="必须出仓日期" sortable="true" sortProperty="mdate">
<fmt:formatDate value="${outInfo.mdate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="任务" sortable="true" sortProperty="mdate">
${outInfo.taskFinishNum}/${outInfo.taskNum}
</display:column>
<display:column titleKey="累计任务" sortable="true" sortProperty="totalTaskNum">
${outInfo.totalTaskNum}/${outInfo.totalBindNum}
</display:column>
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate">
<fmt:formatDate value="${outInfo.createDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="开始时间" sortable="true" sortProperty="firstExecuteTime" media="csv">
<fmt:formatDate value="${outInfo.firstExecuteDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="结束时间" sortable="true" sortProperty="taskEndTime">
<fmt:formatDate value="${outInfo.taskEndDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="需求时间" sortable="true" sortProperty="taskNeedOutDate">
<fmt:formatDate value="${outInfo.taskNeedOutDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="状态" sortable="false" sortProperty="taskNeedOutDate">
<c:forEach var="eventItem" items="${outInfo.eventItems}">
<fmt:formatDate value="${eventItem.date}" pattern="yyyy-MM-dd HH:mm"/> ${eventItem.msg}</br>
</c:forEach>
</display:column>
<display:column titleKey="checkOut.operate" media="html" sortProperty="sendStatus" sortable="true">
<c:if test="${!outInfo.executing}">
<c:if test="${(outInfo.urgentAction && outInfo.taskFinishNum != outInfo.taskNum) || (!outInfo.sendEnd && !outInfo.closed)}">
<button class="btn yellow" id="btn${outInfo.hSerial}" onclick="executeOut('${outInfo.hSerial}')">
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/>
</button>
</c:if>
</c:if>
<%--<c:if test="${!outInfo.sendEnd && !outInfo.closed && !outInfo.executing}">--%>
<%--<button class="btn yellow" id="btn${outInfo.hSerial}" onclick="executeOut('${outInfo.hSerial}')">--%>
<%--<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/>--%>
<%--</button>--%>
<%--</c:if>--%>
</display:column>
</display:table>
</div>
</div>
<!-- END EXAMPLE TABLE PORTLET-->
</div>
</div>
<div id="detail" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="margin-top: 10%;width:80%;margin-left:10%;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title" style="margin:10px;">
<span id="detailTitle"> </span>
</h4>
<input type="text" class="form-control filterInput" id="filterStr"/>
</div>
<div class="modal-body">
<table class="table table-striped table-hover" id="itemsTable">
<thead>
<tr>
<th>
<fmt:message key="料站序号"/>
</th>
<th>
<fmt:message key="料站"/>
</th>
<th>
<fmt:message key="barcode.partNumber"/>
</th>
<th>
<fmt:message key="Facility"/>
</th>
<th>
<fmt:message key="reelID"/>
</th>
<th>
<fmt:message key="分盘料"/>
</th>
<th>
<fmt:message key="数量"/>
</th>
<th>
<fmt:message key="已绑定"/>
</th>
<th>
<fmt:message key="已出库"/>
</th>
<th>
<fmt:message key="已发料"/>
</th>
</tr>
</thead>
<tbody class="theItems">
</tbody>
</table>
</div>
<div class="modal-footer">
<%--<button type="button" data-dismiss="modal" class="btn default" id="cancelAuthBtn">取消</button>--%>
</div>
</div>
</div>
</div>
<c:set var="scripts" scope="request">
<script type="text/javascript">
$(document).ready(function(){
showDetail = function(hSerial){
$(".filterInput").val("");
$("#detailTitle").html(hSerial);
$("#theItems").html("");
$.post("${ctx}/service/store/qisda/outDetail", {hSerial: hSerial}, function (outInfo) {
$("#detailTitle").html("需求单: "+ outInfo.hSerial + " 工单: " + outInfo.so + " ["+outInfo.action+"]");
var data = outInfo.outItems;
var table = $('#itemsTable').DataTable();
table.clear();
for(var i in data){
//var index = parseInt(i) + 1;
var isFirstReelAction = data[i].firstReelAction;
var outColor = "bg-red";
if(data[i].outOk){
outColor = "bg-green";
}
var outQty = "<span class='"+outColor+" td-item'>"+data[i].outQty+"</span>";
var sendColor = "bg-red";
if(data[i].itemEnd){
sendColor = "bg-green";
}
var sendQty = "<span class='"+sendColor+" td-item'>"+data[i].sendQty+"</span>";
var realLockColor = "bg-red";
if(data[i].bindOk){
realLockColor = "bg-green";
}
var lockQty = data[i].realLockQty;
if(data[i].reelCutAction){
//分盘料,展示绑定/预绑定
lockQty = lockQty + "/" + data[i].lockQty;
}
var realLockQty = "<span class='"+realLockColor+" td-item'>"+lockQty+"</span>";
table.row.add( [ /*index,*/ data[i].slotlocation, data[i].slotStr, data[i].pn, data[i].facility,data[i].reelID,data[i].reelcut,data[i].qty,realLockQty,outQty,sendQty] );
}
table.order( [ 0, 'asc' ] ).draw();
});
$("#detail").modal("show");
}
$('#itemsTable').dataTable( {
"searching": false,
"info": false,
paging: false,
"order": [[ 3, "asc" ]]
} );
executeOut = function (hSerial){
$("#btn"+hSerial).attr("disabled","true");
$.post("${ctx}/rest/api/qisda/executeOut", {hSerial: hSerial}, function (data) {
alert(data);
});
}
$(".filterInput").on('input propertychange',function(){
var searchStr = $(this).val();
$(".theItems").children().each(function(){
if(!searchStr || $(this).text().indexOf(searchStr) >= 0){
$(this).show();
}else{
$(this).hide();
}
});
});
});
</script>
</c:set>