📄 selinfrpt.jsp
字号:
<%@ page language="java" pageEncoding="gb2312"%>
<jsp:directive.page import="finance.FinanceBean;" />
<html>
<head>
<title>商品销售信息报表</title>
</head>
<body text="#666666">
<div align=center>
<%!float sumamount = 0;%>
<%!float sumpromit = 0;%>
<%
FinanceBean[] fbs = (FinanceBean[]) request.getAttribute("fbs");
if (fbs != null) {
%>
<div align="center">
<h3>
阳光超市商品销售信息报表
</h3>
</div>
<p>
统计日期:
<%=fbs[0].getDealingDate()%>
至:
<%=fbs[fbs.length-1].getDealingDate()%>
<%
sumamount=0;
sumpromit=0;
for (int i = 0; i < fbs.length; i++) {
sumamount = sumamount + fbs[i].getDealingPrice();
sumpromit = sumpromit
+ (fbs[i].getSaleAmount() - fbs[i].getMerchPrice()
* fbs[i].getSaleTotal());
}
%>
总销售额:
<%=sumamount%> 元
总销售利润:
<%=sumpromit%> 元
<%request.removeAttribute("sumamount"); %>
<%request.removeAttribute("sumpromit"); %>
<table align="center" border="1" width="98%" bordercolor="#DADADA" bordercolordark="EBEBEB">
<tr bgcolor="#EBEBEB">
<th width="%10" align="center">
<font size="3"><span style="font-weight: normal;">交易单编号</span>
</font>
<br>
</th>
<th width="%8" align="center">
<font size="3"><span style="font-weight: normal;">交易日期</span>
</font>
<br>
</th>
<th width="%8" align="center">
<font size="3"><span style="font-weight: normal;">商品编号</span>
</font>
<br>
</th>
<th width="%8" align="center">
<font size="3"><span style="font-weight: normal;">商品名称</span>
</font>
<br>
</th>
<th width="%8" align="center">
<font size="3"><span style="font-weight: normal;">销售单价</span>
</font>
<br>
</th>
<th width="%8" align="center">
<font size="3"><span style="font-weight: normal;">销售数量</span>
</font>
<br>
</th>
<th width="%8" align="center">
<font size="3"><span style="font-weight: normal;">交易总额</span>
</font>
<br>
</th>
<th width="%5" align="center">
<font size="3"><span style="font-weight: normal;">利润</span>
</font>
<br>
</th>
<th width="%6" align="center">
<font size="3"><span style="font-weight: normal;">经办人</span>
</font>
<br>
</th>
</tr>
<%
for (int i = 0; i < fbs.length; i++) {
%>
<tr>
<td width="%10" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getDealingID()%>
</span>
<br>
</td>
<td width="%8" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getDealingDate()%>
</span>
<br>
</td>
<td width="%8" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getMerchID()%>
</span>
<br>
</td>
<td width="%8" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getMerchName()%>
</span>
<br>
</td>
<td width="%8" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getCurPrice()%>
</span>
<br>
</td>
<td width="%8" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getSaleNum()%>
</span>
<br>
</td>
<td width="%8" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getDealingPrice()%>
</span>
<br>
</td>
<td width="%5" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getSaleAmount()
- fbs[i].getMerchPrice() * fbs[i].getSaleTotal()%>
</span>
<br>
</td>
<td width="%6" align="center">
<span style="font-weight: normal;"> <%=fbs[i].getUserName()%>
</span>
<br>
</td>
</tr>
<%
}
%>
</table>
<%
}
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -