forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorageCheck.jsp
More file actions
140 lines (138 loc) · 5.88 KB
/
storageCheck.jsp
File metadata and controls
140 lines (138 loc) · 5.88 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
<%@page contentType="text/html; charset=gb2312" language="java"%>
<%@page import="com.actionForm.GoodsForm"%>
<%@page import="com.actionForm.StorageForm"%>
<%@page import="com.dao.OutStorageDAO"%>
<%@page import="java.util.*"%>
<%
//获取全部物资信息
List listgoods = null;
OutStorageDAO outStorageDAO = new OutStorageDAO();
listgoods = outStorageDAO.storage_query(); //查询库存物资
java.util.Date date=new java.util.Date();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<link rel="stylesheet" href="Css/style.css">
<title></title>
<style>
@media print{
div{display:none}
.bgnoprint{
background:display:none;
}
.noprint{
display:none
}
}
</style>
</head>
<body onLoad="clockon(bgclock)" class="bgnoprint">
<table width="757" height="174" border="0" align="center"cellpadding="0" cellspacing="0">
<tr class="noprint">
<td height="133" align="center" valign="top"><%@include file="top.jsp"%>
</td>
</tr>
<tr>
<td><table width="100%" height="26" border="0" cellpadding="0" cellspacing="0" background="images/area_bg.jpg" class="noprint">
<tr>
<td width="26%" align="center" class='word_white'>当前登录用户:<%=session.getAttribute("username")%></td>
<td width="4%"> </td>
<td width="70%" valign="bottom"> 当前位置:物资处理
> 库存盘点
>>> </td>
</tr>
</table>
<table width="100%" height="385" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="5" valign="top" background="images/left.gif" class="bgnoprint"> </td>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50" class="noprint" > </td>
<td valign="top"><table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="27" align="center" style=" font-size:14px;"><b>库存盘点表</b></td>
</tr>
<tr>
<td height="13" align="right">打印日期:<%=new java.sql.Date(date.getTime())%></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="90%" border="1" cellpadding="0" cellspacing="0" bgcolor="#000000" id="pay" bordercolor="#00000" bordercolordark="#000000" bordercolorlight="#FFFFFF" >
<thead style="display:table-header-group;">
<tr>
<td width="7%" align="center" bgcolor="#FFFFFF">编号</td>
<td width="21%" align="center" bgcolor="#FFFFFF">物资名称</td>
<td width="16%" align="center" bgcolor="#FFFFFF">规格</td>
<td width="23%" align="center" bgcolor="#FFFFFF">生产厂家</td>
<td width="9%" align="center" bgcolor="#FFFFFF">单价(元)</td>
<td width="15%" align="center" bgcolor="#FFFFFF">库存数量(单位)</td>
<td width="9%" align="center" bgcolor="#FFFFFF">盘点数量</td>
</tr>
</thead>
<%
if (listgoods.size() <= 0) {%>
<tr>
<td colspan="7" align="center" bgcolor="#FFFFFF"> 暂无库存信息!</td>
</tr>
<% }else {
String Producer=""; //生产厂家
String Unit=""; //单位
float Price=0.0f; //单价
float amount=0.0f;
int storagenumber=0; //库存数量
String goodsname=""; //物资名称
int goodsId=0; //物资ID
String spec=""; //规格
for(int i=0;i<listgoods.size();i++){
Object obj[]=(Object[])listgoods.get(i);
GoodsForm goodsF=(GoodsForm)obj[0];
StorageForm storageF=(StorageForm)obj[1];
goodsId=goodsF.getId();
goodsname=goodsF.getName();
spec=goodsF.getSpec();
Producer=goodsF.getProducer();
Unit=goodsF.getUnit();
Price=goodsF.getPrice();
storagenumber=storageF.getNumber();
amount=amount+Price*storagenumber;
%>
<tr<%if((i+1)%18==0){%> style="page-break-after:always;"<%}%>>
<td align="center" bgcolor="#FFFFFF"> <%=i+1%></td>
<td bgcolor="#FFFFFF"> <%=goodsname%></td>
<td bgcolor="#FFFFFF"> <%=spec%></td>
<td bgcolor="#FFFFFF"> <%=Producer%></td>
<td bgcolor="#FFFFFF"> <%=Price%></td>
<td bgcolor="#FFFFFF"> <%=storagenumber%>(<%=Unit%>)</td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<%}%>
<tfoot style="display:table-footer-group;"><tr><td class="tableBorder_B1"></td></tr></tfoot>
</table>
<table width="90%" height="43" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="25" align="right"><div>库存总金额:<%=amount%> <a href="#" onClick="window.print();">打印盘点报表</a></div></td>
</tr>
<%}%>
</table></td>
<td width="40"> </td>
</tr>
</table>
</td>
<td width="10" valign="top" background="images/right.jpg"> </td>
</tr>
</table></td>
</tr>
<tr class="noprint">
<td height="55" valign="top" background="images/bottom.jpg"><%@include file="copyright.jsp"%>
</td>
</tr>
</table>
</body>
</html>