-
Notifications
You must be signed in to change notification settings - Fork 433
/
Copy pathloanBackQuery.jsp
161 lines (160 loc) · 6.16 KB
/
loanBackQuery.jsp
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
<%@page contentType="text/html; charset=gb2312" language="java"%>
<%@page import="com.actionForm.LoanForm"%>
<%@page import="com.actionForm.GoodsForm"%>
<%@page import="com.core.GetTime"%>
<%@page import="java.util.*"%>
<script language="javascript">
function check(myform){
if(myform.flag[0].checked==false && myform.flag[1].checked==false && myform.flag[2].checked==false){
alert("请选择查询方式!");return false;
}
if (myform.flag[1].checked){
if(myform.sdate.value==""){
alert("请输入开始日期");myform.sdate.focus();return false;
}
if(CheckDate(myform.sdate.value)){
alert("您输入的开始日期不正确!\n 请注意日期格式或闰年!");myform.sdate.focus();return false;
}
if(myform.edate.value==""){
alert("请输入结束日期");myform.edate.focus();return false;
}
if(CheckDate(myform.edate.value)){
alert("您输入的结束日期不正确!\n 请注意日期格式或闰年!");myform.edate.focus();return false;
}
}
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>物资管理系统</title>
<link rel="stylesheet" href="Css/style.css">
<script src="JS/function.js"></script>
</head>
<body>
<table width="757" height="174" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<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">
<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"> </td>
<td align="center" valign="top">
<table width="96%" height="487" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<form name="myform" method="post" action="ifDeal.do?action=loanBackQuery">
<table width="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E3F4F7" class="tableBorder">
<tr>
<td rowspan="2" align="center"> <img src="images/search.gif" width="45" height="28"></td>
<td height="14"><div><input name="flag" type="checkbox" class="noborder" value="a" checked>
请选择查询依据:
<select name="f" class="wenbenkuang" id="f">
<option value="lno">借出单号</option>
<option value="borrowperson">借用人</option>
<option value="principal">负责人</option>
<option value="username">操作员</option>
</select>
<input name="key" type="text" id="key" size="50">
<input name="Submit" type="submit" class="btn_grey" value="查询" onClick="return check(myform)"></div></td>
</tr>
<tr>
<td><input name="flag" type="checkbox" class="noborder" id="flag" value="b"><input name="flag" type="checkbox" class="noborder" id="flag" value="c" checked="checked" style="display:none">
借出时间: 从
<input name="sdate" type="text" id="sdate">
到
<input name="edate" type="text" id="edate">
(日期格式为:2011-07-05)<input name="state" type="hidden" id="state" value="1">
</td>
</tr>
</table>
</form>
<%
List list=(List)request.getAttribute("loanBackQuery");
System.out.println("LIST SIZE:"+list.size());
if(list.size()==0){
%>
<table width="98%" height="30" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td height="36" align="center">没有符合条件的借出单信息!</td>
</tr>
</table>
<%
}else{
int id=0;
String lno="";
String goodsname="";
String spec="";
String principal="";
String borrowperson="";
String btel="";
String username="";
String createTime="";
GoodsForm goodsF=null;
%>
<table width="98%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
<tr align="center" bgcolor="#e3F4F7">
<td width="19%">借出单号</td>
<td width="24%">物资名称 [ <span class="word_grey">规格</span> ]</td>
<td width="8%">借用人</td>
<td width="9%">电话</td>
<td width="7%">负责人</td>
<td width="8%">操作员</td>
<td width="20%">借出审核时间</td>
<td width="4%">归还</td>
</tr>
<%
for(int i=0;i<list.size();i++){
LoanForm LoanForm=(LoanForm)list.get(i);
id=LoanForm.getId();
lno=LoanForm.getLno();
goodsF=LoanForm.getGoods();
goodsname=goodsF.getName();
spec=goodsF.getSpec();
principal=LoanForm.getPrincipal();
borrowperson=LoanForm.getBorrowperson();
btel=LoanForm.getBtel();
username=LoanForm.getUsername();
GetTime getTime=new GetTime();
createTime=getTime.formatTime(LoanForm.getApprovetime());
%>
<tr>
<td style="padding:5px;"> <%=lno%></td>
<td style="padding:5px;"><%=goodsname%> [ <span class="word_grey"><%=spec%></span> ]</td>
<td style="padding:5px;"> <%=borrowperson%></td>
<td style="padding:5px;"> <%=btel%></td>
<td style="padding:5px;"> <%=principal%></td>
<td style="padding:5px;"> <%=username%></td>
<td style="padding:5px;"> <%=createTime%></td>
<td align="center" style="padding:5px;"><a href="loan.do?action=backloan&id=<%=id%>"><img src="images/enforce.gif" width="16" height="16" border="0"></a></td>
</tr>
<%} %>
</table>
<%}%>
</td>
</tr>
</table>
</td>
<td width="10" valign="top" background="images/right.jpg"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="55" valign="top" background="images/bottom.jpg"><%@include file="copyright.jsp"%>
</td>
</tr>
</table>
</body>
</html>