?? statisticsgroup.jsp
字號:
<%@ page contentType="text/html;charset=GBK" isELIgnored="false"%>
<%@page import="java.util.*"%>
<%@page import="bean.StatisticsObjBean;"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<base href="<%=basePath%>">
<title>My JSP 'statisticsgroup.jsp' starting page</title>
</head>
<jsp:useBean id="sta" scope="session" class="bean.StatisticsObjBean"></jsp:useBean>
<jsp:useBean id="get" scope="session" class="bean.GetMoneyHistoryBean"/>
<body>
<jsp:scriptlet>
get.getuserGroup();
</jsp:scriptlet>
<form action="GroupSta" method="post">
<table width="60%" align="center" border="1">
<tr>
<td >
組別:<select name="groupname">
<option value="7">
請選擇
</option>
<c:forEach items="${get.getmoneyhistroy}" var="get">
<option value=<c:out value="${get[0]}" />>
<c:out value="${get[1]}"></c:out>
</option>
</c:forEach>
</select>
<input type="submit" value="提交">
</td>
</tr>
</table>
</form>
<%
String group=(String)session.getAttribute("group");
%>
<table width="60%" align="center" border="1">
<tr>
<td align="center">組別</td>
<td align="center">項目名</td>
<td align="center">人數(shù)</td>
<td align="center">單價</td>
<td align="center">總價</td>
</tr>
<%
String a=(String)session.getAttribute("count") ;
int num=Integer.parseInt(a);
Vector v=(Vector)session.getAttribute("staobj");
if(v==null){
out.println("暫無數(shù)據(jù)");
}else{
int rowspan=v.size();
%>
<tr>
<td rowspan=<%=rowspan %> align="center">
<%=session.getAttribute("groupname") %>
</td>
<%
for(int i=0;i<v.size();i++){
StatisticsObjBean sta1=(StatisticsObjBean)v.get(i);
float fee=Float.parseFloat(sta1.getItemFee());
%>
<td align="center">
<%=sta1.getItemName() %>
</td>
<td align="center">
<%=a %>
</td>
<td align="center">
<%=sta1.getItemFee() %>
</td>
<td align="center">
<%=num*fee %>
</td>
</tr>
<%
}}
%>
<tr>
<td colspan="5" align="right">
總計:RMB <%=session.getAttribute("allmoney") %>元
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -