inventory.jsp
3.3 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
<%@ include file="/common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
<fmt:message key="menu.component.inventory"/>
</h3>
<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"></i><fmt:message key="menu.component.inventory"/>
</div>
<%--<div class="actions">--%>
<%--<a href="${ctx}/component/alarmInventory.html?aid=${aid}" class="btn btn-default btn-sm">--%>
<%--<i class="fa fa-bell-o"></i> <fmt:message key="查看预警信息"/> </a>--%>
<%--</div>--%>
</div>
<div class="portlet-body">
<div class="col-md-6">
<div class="btn-group">
<button class="btn yellow" id="checkoutBtn" style="display: none;">
<i class="fa fa-sign-out"></i><fmt:message key="button.addto.checkout"/></button>
</div>
</div>
<table class="table table-striped table-bordered table-hover" id="sample_1">
<thead>
<tr>
<th><fmt:message key="component.partNumber"/></th>
<th><fmt:message key="inventory.lockTitle"/></th>
<th><fmt:message key="checkOut.operate"/> </th>
</tr>
</thead>
<tbody>
<c:forEach items="${inventory}" var="chartData">
<td>${chartData.partNumber}</td>
<%--<td>${chartData.stockCount}</td>--%>
<td>${chartData.lockReel}/${chartData.stockReel}</td>
<td><button class="btn yellow" id="btn${chartData.partNumber}"
onclick="checkoutStorage('${chartData.partNumber}')">
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<fmt:message key="inventory.find" var="find_label"/>
<c:set var="scripts" scope="request">
<script>
checkoutStorage = function(partnumber) {
$.post("${ctx}/service/store/checkout.html", {pn: partnumber}, function (data) {
alert(data);
});
}
var table = $('#sample_1');
// begin first table
table.dataTable({
"bDestroy": true,
"sScrollXInner": "100%",
"bLengthChange": false, //关闭每页显示多少条数据
"bProcessing": true, //显示是否加载
"sScrollX": "100%",
"scrollY": "300px",
"info":false,
"scrollCollapse": true,
"columnDefs": [
{
"searchable": false,
"targets": [1,2]
}],
"order": [
[2, "desc"]
],
paging: false,
"language": {
"search": "${find_label}: "
}
});
</script>
</c:set>