📄 fin_result_all_result.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="com.vnex.intranet.util.*"%>
<%@ page import="com.vnex.intranet.budget.value.*" %>
<%@ page import="java.text.DecimalFormat" %>
<jsp:useBean id="BudgetListProxy" scope="application" class="com.vnex.intranet.budget.proxy.BudgetListProxyBean" />
<%
String month = request.getParameter("month");
String year = request.getParameter("year");
String choose = request.getParameter("choose");
double oneDivisionBudget = 0.0d;
double oneDivisionActual = 0.0d;
int useOneDivisionId = -1;
DecimalFormat dFormat = new DecimalFormat("##.##");
%>
<HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
<script language="JavaScript1.2" src="/vnex/menu/dockmenu_finance.js"></script><script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
<DIV align=center>
<form name="form1" method="post" action="">
<TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
<jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
<TR>
<TD colSpan=3 align="center" class="iframestyle" valign="top">
<br>
<table width="600" border="1" cellspacing="1" bordercolor="#666666" class="iframestyle">
<tr valign="top">
<td >
<table width="600" border="0" cellspacing="0" cellpadding="2">
<tr>
<td bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/finance/main"><font color="#FFFFFF">财务</font></a>>><a href="/mainctrl/financial/finIndex"><font color="#FFFFFF">统计查看</font></a>>><a href="/mainctrl/financial/resultAll"><font color="#FFFFFF">全部部门</font></a>>>统计结果</font></td>
</tr>
</table>
<table class=title width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#fafafa">
<td >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%"><font class="strong"> 下面是全部部门<%=year%>-<%=month%>预算统计表(
<%
if(choose.equals("1"))
{
out.println("类别:预算");
}
else if(choose.equals("2"))
{
out.println("类别:实际");
}
else if(choose.equals("3"))
{
out.println("类别:预算和实际");
}
%>
):</font>
</td>
<td width="20%">
<div align="right"><font class="strong">单位:元 </font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--列表显示开始-->
<%
String parameterMonth = year+"-"+month;
int col = 0;
int column = 0;
int blue =0;
int twice = 0;
String rowColor="";
//Collection collAll = BudgetListProxy.showAllDivision("2001-01");
Collection collAll = BudgetListProxy.showAllDivision(parameterMonth);
int allDiv = collAll.size();
if(allDiv==0)
{
response.sendRedirect("/mainctrl/financial/resultAllResultFail");
}
else if(allDiv<18)
{
out.println("<div id=\"Layer1\" style=\"width:600px; height:"+(allDiv*20+128)+"px; z-index:1; overflow:auto\" >");
}
else
{
out.println("<div id=\"Layer1\" style=\"width:600px; height:365px; z-index:1; overflow:auto\" >");
}
Iterator iterAll = collAll.iterator();
if((choose.compareTo("3")) == 0)
{
while(iterAll.hasNext())
{
column++;
Collection coll = (Collection)iterAll.next();
int theWidth = coll.size()*100+250;
theWidth = (theWidth<=600)?600:theWidth;
//out.println(theWidth);
Iterator iter = coll.iterator();
if (twice == 0)
{
out.println("<table class=title width="+theWidth+" border=0 cellpadding=2 cellspacing=1>");
out.println("<tr align=center bgcolor=#b4b4b4><td width=150 height=2 rowspan=2><font class=strong>部门</font></td>");
while(iter.hasNext())
{
col++;
BudgetListValueBean budgetListValueBeanW = (BudgetListValueBean)iter.next();
useOneDivisionId = budgetListValueBeanW.getDivision();
out.println("<td colspan=2 width=100 height=2 > <font class=strong>"+budgetListValueBeanW.getComponentName()+"</font></td>");
}
out.println("<td colspan=2 height=2 width=100 > <font class=strong>总计</font></td></tr>");
out.println("<tr bgcolor=#b4b4b4 align=center>");
for (int i=-1; i<col; i++)
{
out.println("<td width=50 height=2 >预算</td>");
out.println("<td height=2 width=50 >实际</td>");
}
out.println("</tr>");
twice = 1;
}
else
{
rowColor = ((column%2)==0)?"#fafafa":"#e0e0e0";
out.println("<tr align=center bgcolor="+rowColor+">");
while(iter.hasNext())
{
BudgetListValueBean budgetListValueBean = (BudgetListValueBean)iter.next();
if (blue==0)
{
out.println("<td height=5>"+budgetListValueBean.getDivisionName()+"</td>");
blue++;
}
out.println("<td width=50 height=5>"+budgetListValueBean.getBudget()+"</td>");
if(budgetListValueBean.getActual() != -1f)
{
out.println("<td width=50 height=5>"+budgetListValueBean.getActual()+"</td>");
oneDivisionActual += budgetListValueBean.getActual();
}
else
{
out.println("<td width=50 height=5></td>");
}
oneDivisionBudget += budgetListValueBean.getBudget();
}
blue = 0;
out.println("<td width=50 height=5 >"+dFormat.format(oneDivisionBudget)+"</td><td width=50 height=5 >"+dFormat.format(oneDivisionActual)+"</td></tr>");
oneDivisionBudget = 0.0d;
oneDivisionActual = 0.0d;
}
}
}
else if (((choose.compareTo("2")) == 0))
{
while(iterAll.hasNext())
{
column++;
Collection coll = (Collection)iterAll.next();
int theWidth = coll.size()*50+250;
theWidth = (theWidth<=600)?600:theWidth;
Iterator iter = coll.iterator();
if (twice == 0)
{
out.println("<table class=title width="+theWidth+" border=0 cellpadding=2 cellspacing=1>");
out.println("<tr align=center bgcolor=#b4b4b4><td height=2 ><font class=strong>部门</font></td>");
while(iter.hasNext())
{
col++;
BudgetListValueBean budgetListValueBeanW = (BudgetListValueBean)iter.next();
useOneDivisionId = budgetListValueBeanW.getDivision();
out.println("<td height=2 > <font class=strong>"+budgetListValueBeanW.getComponentName()+"</font></td>");
}
out.println("<td height=2 > <font class=strong>总计</font></td></tr>");
twice = 1;
}
else
{
rowColor = ((column%2)==0)?"#fafafa":"#e0e0e0";
out.println("<tr align=center bgcolor="+rowColor+">");
while(iter.hasNext())
{
BudgetListValueBean budgetListValueBean = (BudgetListValueBean)iter.next();
%>
<%
if (blue==0)
{
%>
<td ><%=budgetListValueBean.getDivisionName()%></td>
<%
blue++;
}
if(budgetListValueBean.getActual() != -1f)
{
out.println("<td width=50 height=5>"+budgetListValueBean.getActual()+"</td>");
oneDivisionActual += budgetListValueBean.getActual();
}
else
{
out.println("<td width=50 height=5></td>");
}
}
blue = 0;
out.println("<td>"+dFormat.format(oneDivisionActual)+"</td></tr>");
oneDivisionActual = 0.0d;
}
}
}
else if (((choose.compareTo("1")) == 0))
{
while(iterAll.hasNext())
{
column++;
Collection coll = (Collection)iterAll.next();
int theWidth = coll.size()*50+250;
theWidth = (theWidth<=600)?600:theWidth;
Iterator iter = coll.iterator();
if (twice == 0)
{
out.println("<table class=title width="+theWidth+" border=0 cellpadding=2 cellspacing=1>");
out.println("<tr align=center bgcolor=#b4b4b4><td height=2 ><font class=strong>部门</font></td>");
while(iter.hasNext())
{
col++;
BudgetListValueBean budgetListValueBeanW = (BudgetListValueBean)iter.next();
useOneDivisionId = budgetListValueBeanW.getDivision();
out.println("<td height=2 > <font class=strong>"+budgetListValueBeanW.getComponentName()+"</font></td>");
}
out.println("<td height=2 > <font class=strong>总计</font></td></tr>");
twice = 1;
}
else
{
rowColor = ((column%2)==0)?"#fafafa":"#e0e0e0";
out.println("<tr align=center bgcolor="+rowColor+">");
while(iter.hasNext())
{
BudgetListValueBean budgetListValueBean = (BudgetListValueBean)iter.next();
%>
<%
if (blue==0)
{
%>
<td ><%=budgetListValueBean.getDivisionName()%></td>
<%
blue++;
}
%>
<td ><%=budgetListValueBean.getBudget()%></td>
<%
oneDivisionBudget += budgetListValueBean.getBudget();
}
blue = 0;
out.println("<td>"+dFormat.format(oneDivisionBudget)+"</td></tr>");
oneDivisionBudget = 0.0d;
}
}
}
%>
<!--列表显示结束-->
<!--总计显示开始-->
<%
Collection collTotal = BudgetListProxy.showAllDivisionTotal(parameterMonth, useOneDivisionId);
Iterator iterTotal = collTotal.iterator();
if(rowColor.equals("#fafafa")) rowColor = "#e0e0e0";
else rowColor = "#fafafa";
if((choose.compareTo("3")) == 0)
{
double budgetTotal = 0.0d;
double actualTotal = 0.0d;
out.println("<tr align=center bgcolor="+rowColor+"><td><font class=strong>总计:</font></td>");
while(iterTotal.hasNext())
{
BudgetListValueBean budgetListValueBean = (BudgetListValueBean)iterTotal.next();
budgetTotal += budgetListValueBean.getBudget();
actualTotal += budgetListValueBean.getActual();
out.println("<td width=50>"+budgetListValueBean.getBudget()+"</td><td width=50>"+budgetListValueBean.getActual()+"</td>");
}
out.println("<td width=50>"+dFormat.format(budgetTotal)+"</td><td width=50>"+dFormat.format(actualTotal)+"</td></tr>");
}
else if (((choose.compareTo("2")) == 0))
{
double actualTotal = 0.0d;
out.println("<tr align=center bgcolor="+rowColor+"><td><font class=strong>总计</font></td>");
while(iterTotal.hasNext())
{
BudgetListValueBean budgetListValueBean = (BudgetListValueBean)iterTotal.next();
actualTotal += budgetListValueBean.getActual();
out.println("<td>"+budgetListValueBean.getActual()+"</td>");
}
out.println("<td>"+dFormat.format(actualTotal)+"</td></tr>");
}
else if (((choose.compareTo("1")) == 0))
{
double budgetTotal = 0.0d;
out.println("<tr align=center bgcolor="+rowColor+"><td><font class=strong>总计</font></td>");
while(iterTotal.hasNext())
{
BudgetListValueBean budgetListValueBean = (BudgetListValueBean)iterTotal.next();
budgetTotal += budgetListValueBean.getBudget();
out.println("<td>"+budgetListValueBean.getBudget()+"</td>");
}
out.println("<td>"+dFormat.format(budgetTotal)+"</td></tr>");
}
%>
<!--总计显示结束-->
<%
if(allDiv != 0) out.println("</table></div>");
%>
<table class=title width="100%" border="0" cellspacing="0" cellpadding="0" height="30" >
<tr bgcolor="#fafafa" >
<td align="center" >
<input type="button" name="Button22" value="返回" onclick="location='/mainctrl/financial/resultAll'" class="text">
</td>
</tr>
</table>
</td>
</tr>
</table>
<jsp:include page="/vnex/page/TTOA_HELP.jsp" />
</TD>
</TR>
<jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
</TABLE>
<BR>
<jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
</form>
</DIV>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -