Dep_index.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <%@ page language="java" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="java.lang.*" %>
  5. <%@ page import="com.vnex.intranet.util.*"%>
  6. <%@ page import="com.vnex.intranet.budget.value.*" %>
  7. <jsp:useBean id="BudgetListProxy" scope="application" class="com.vnex.intranet.budget.proxy.BudgetListProxyBean" />
  8. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  9. <HTML>
  10. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  11. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  12. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  13. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  14. <DIV align=center>
  15. <form name="form1" method="post" action="">
  16.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  17.          <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  18.     <TR> 
  19.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  20.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  21.             <tr valign="top" bgcolor="#fafafa"> 
  22.               <td > 
  23.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  24.                   <tr> 
  25.                     <td bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;部门预算</font></td>
  26.                   </tr>
  27.                 </table>
  28.                       <%
  29. int departmentId = BusinessName.getDeptId();
  30. String createMonth = BudgetListProxy.getCurrentCreateMonth(departmentId);
  31.                  String divisionName = BudgetListProxy.divisionName(departmentId);
  32. %>
  33.                 <table border="0" cellpadding="2" cellspacing="0" width="600">
  34.                   <tr bgcolor="#e0e0e0"> 
  35.                     <td colspan="4"> <font class="strong">&nbsp;&nbsp;部门:<%=divisionName%> 
  36.                       </font> </td>
  37.                   </tr>
  38.                 </table>
  39.                 <table border="0" cellspacing="1" cellpadding="2" width="600" class=title>
  40.                   <tr bgcolor="#fafafa"> 
  41.                     <td colspan="13" height="30"> 
  42.                       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  43.                         <tr>
  44.                           <td width="20%"> &nbsp; 
  45.                             <input type="button" name="Button5" value="新建" onClick="location='/mainctrl/budget/managementCreate?month=<%=createMonth%>&id=<%=departmentId%>'" class="text">&nbsp;&nbsp; <input type="button" name="Button52" value="查看" onClick="location='/mainctrl/budget/resultDep'" class="text">
  46.                           </td>
  47.                           <td width="80%">
  48.                             <div align="right"><img src=/vnex/MacOS/folder.gif border=0 > 
  49.                               查看本月预算额和实际发生额&nbsp;&nbsp;<img src=/vnex/MacOS/list.gif border=0 >录入实际发生额</div>
  50.                           </td>
  51.                         </tr>
  52.                       </table>
  53.                     </td>
  54.                   </tr>
  55.                   <tr bgcolor="#b4b4b4"> 
  56.                     <td bgcolor="#b4b4b4"> </td>
  57.                     <td width="40" align="center"> 1月</td>
  58.                     <td width="40" align="center"> 2月 </td>
  59.                     <td width="40" align="center"> 3月 </td>
  60.                     <td width="40" align="center"> 4月 </td>
  61.                     <td width="40" align="center"> 5月 </td>
  62.                     <td width="40" align="center"> 6月 </td>
  63.                     <td width="40" align="center"> 7月 </td>
  64.                     <td width="40" align="center"> 8月 </td>
  65.                     <td width="40" align="center"> 9月 </td>
  66.                     <td width="40" align="center"> 10月 </td>
  67.                     <td width="40" align="center"> 11月 </td>
  68.                     <td width="40" align="center"> 12月 </td>
  69.                   </tr>
  70.                   <!--预算列表开始-->
  71.    <!-- 开始显示列表 -->
  72. <%
  73. try
  74. {
  75.     Hashtable minMax = BudgetListProxy.getMaxMinMonth(departmentId);
  76. //int divisionId = 2;
  77. String linkYear = "";
  78. String zero = "";
  79. String linkMonth = "";
  80.     int start = 1;
  81. String blank = "  ";
  82. String col = "";
  83. int colorInt = 1;
  84. int flag = 0;
  85.     if ( request.getParameter("start") !=null )
  86. {
  87.         start = Integer.parseInt( request.getParameter("start") );
  88.     }
  89.     int rowPerPage = com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");;
  90.     if(minMax != null)
  91.     {
  92.         Collection coll = BudgetListProxy.oneDivisionAllBudget(departmentId);
  93.         Iterator iter = coll.iterator();
  94.         int size = coll.size(); 
  95.         String action = "/mainctrl/budget/index?a";
  96.         String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
  97.         int minYear = ((Integer)minMax.get("minYear")).intValue();
  98.         int maxYear = ((Integer)minMax.get("maxYear")).intValue();
  99. maxYear = maxYear+1-start;
  100.         while(iter.hasNext() && flag < size && flag <(start+rowPerPage-1))
  101.        {
  102.        flag++;
  103.            Hashtable ht = (Hashtable)iter.next();
  104.    if (flag<start) continue; 
  105.    col = ((colorInt%2)==1)?"#fafafa":"#e0e0e0";
  106. %>
  107.                         <tr bgcolor=<%=col%>> 
  108.                           <td> 
  109.                             <div align="center"><font class="strong"><%=maxYear%>年</font></div>
  110.                           </td>
  111.                           <%
  112.   linkYear = Integer.toString(maxYear);   
  113.   for(int i=1; i<=12; i++)
  114.   {
  115.       if(((Integer)ht.get(new Integer(i).toString())).intValue() == 3)
  116.   {
  117.       zero = (i<10)?"-0":"-";
  118.   linkMonth = Integer.toString(i);
  119.       out.println("<td width=40 align=center><a href=/mainctrl/budget/managementPast?month="+linkYear+zero+linkMonth+"&id="+departmentId+"><img src=/vnex/MacOS/folder.gif border=0 ></a></td>");
  120.   }
  121.   else if(((Integer)ht.get(new Integer(i).toString())).intValue() == 2)
  122.   {
  123.       zero = (i<10)?"-0":"-";
  124.   linkMonth = Integer.toString(i);
  125.       out.println("<td width=40 align=center><a href=/mainctrl/budget/managementInput?month="+linkYear+zero+linkMonth+"&id="+departmentId+"><img src=/vnex/MacOS/list.gif border=0 ></a></td>");
  126.   }
  127.   else
  128.   {
  129.       out.println("<td width=40>"+blank+"</td>");
  130.   }
  131.   }
  132.   %>
  133.                         </tr>
  134.                         <!--结束列表显示-->
  135. <%
  136.             maxYear--;
  137. colorInt++;
  138.         }
  139. %>
  140.                         <tr bgcolor="#e0e0e0"> 
  141.                           <td colspan="13">&nbsp;<%=nav%> 
  142. <%
  143.     }
  144. }
  145. catch(Exception e)
  146. {
  147.     out.println(e);
  148. }
  149. %>
  150.                           </td>
  151.                         </tr>
  152.                   <!--预算列表结束-->
  153.                 </table>
  154.               </td>
  155.             </tr>
  156.           </table>
  157.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  158.        </TD>
  159.     </TR>
  160.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  161.     </TABLE>
  162.     <BR>
  163.     <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  164. </form>
  165.   </DIV>
  166.  </BODY>
  167. </HTML>