Fin_Item_Management.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <%@ page language="java" %>
- <%@ page import="java.util.*" %>
- <%@ page import="java.lang.*" %>
- <%@ page import="com.vnex.intranet.budget.value.*" %>
- <%@ page import="com.vnex.intranet.util.FieldUtil" %>
- <jsp:useBean id="BudgetProxy" scope="application" class="com.vnex.intranet.budget.proxy.BudgetProxyBean" />
- <%
- if((session.getAttribute("budgetCreateAll") != null)&&(session.getAttribute("month") != null))
- {
- session.removeAttribute("budgetCreateAll");
- session.removeAttribute("month");
- }
- %>
- <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>
- <%
- Calendar nowTime = Calendar.getInstance();
- int nowYear = nowTime.get( Calendar.YEAR);
- int nowMonth = nowTime.get(Calendar.MONTH)+1;
- %>
- <script language=javaScript>
- function check()
- {
- var sign = 0;
- for (var i=0;i<document.modify.elements.length;i++)
- {
- var e = document.modify.elements[i];
- if ((e.name!="chkall")&&(e.checked==true)&&((e.name).substring(0,6)=="status"))
- sign++;
- }
- if(sign == 0)
- {
- alert("请选择一个以上的项目!");
- return false;
- }
- if(modify.year.value><%=nowYear%>||(modify.year.value==<%=nowYear%>&&modify.month.value><%=nowMonth%>))
- {
- return true;
- }
- else
- {
- alert("请选择比当前日期大的月份!");
- return false;
- }
- }
- function createAllDivision()
- {
- if (check())
- {
- modify.action="itemManagementJudge";
- modify.submit();
- }
- }
- function CheckAll(form)
- {
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.name != 'chkall')
- e.checked = form.chkall.checked;
- }
- }
- </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="modify" method="post" >
- <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">
- <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>>>项目维护</font></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td height="30">
- <%
- if((BudgetProxy.getMaxMonth()).equals("NoRecord"))
- {
- }
- else
- {
- %> 已经生成预算项目的最大月是<%=BudgetProxy.getMaxMonth()%>
- ,<br>
- <%
- }
- %>
- 为全部部门生成
- <%
- String yearOfNow = "";
- String dayOfNow = "";
- yearOfNow = BudgetProxy.getCompareNextMonth().substring(0,4);
- dayOfNow = BudgetProxy.getCompareNextMonth().substring(5,7);
- out.println("<select style="WIDTH: 65px" name="year" class="button">");
- for(int i=2000;i<2050;i++)
- {
- if (String.valueOf(i).equals(yearOfNow))
- {
- out.println("<option value=""+i+"" selected><b>"+i+"</b></option>");
- }
- else
- {
- out.println("<option value=""+i+""><b>"+i+"</b></option>");
- }
- }
- out.println("</select>年");
- out.println("<select style="WIDTH: 50px" name="month">");
- for(int i=1;i<=12;i++)
- {
- if (Integer.parseInt(dayOfNow) == i)
- {
- if(i<10)
- out.println("<option value="0"+i+"" selected><b>"+i+"</b></option>");
- else
- out.println("<option value=""+i+"" selected><b>"+i+"</b></option>");
- }
- else
- {
- if(i<10)
- out.println("<option value="0"+i+""><b>"+i+"</b></option>");
- else
- out.println("<option value=""+i+""><b>"+i+"</b></option>");
- }
- }
- out.println("</select>月 预算项目列表。");
- %>
- <input type="button" name="Button" value="生成" class="text" onClick="createAllDivision()">
- </td>
- </tr>
- </table>
- <table width="600" border="0" cellspacing="1" cellpadding="2" class=title>
- <tr>
- <td colspan="3" height="30" bgcolor="#fafafa">
- <input type="button" name="Button33" onClick="location='itemManagementCreate'" value="新增" class="text">
- </td>
- </tr>
- <tr align="center">
- <td width="7%"><font class="strong">选择</font></td>
- <td width="123"><font class="strong">项目</font></td>
- <td width="381"><font class="strong">备注</font></td>
- </tr>
- <%
- int color = 1;
- String col = "";
- int total=0;
- Collection coll = BudgetProxy.showAllItem();
- Iterator iter = coll.iterator();
- while(iter.hasNext())
- {
- BudgetValueBean valueBean = (BudgetValueBean)iter.next();
- col = ((color%2)==1)?"#e0e0e0":"#fafafa";
- total++;
- color++;
- %>
- <tr align="center" bgcolor=<%=col%>>
- <td width="123">
- <input type="checkbox" name="status<%=total%>" value="checkbox" >
- <input type="hidden" name="id<%=total%>" value="<%=valueBean.getId()%>">
- </td>
- <td width="123"><a href="itemModify?id=<%=valueBean.getId()%>"><%=FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(valueBean.getName()))%></a></td>
- <td width="381"><%=FieldUtil.shortenString(FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(valueBean.getDescription())))%></td>
- </tr>
- <%
- }
- %>
- <tr align="center" bgcolor=#fafafa>
- <td width="123">
- <INPUT onclick=CheckAll(this.form) type=checkbox value=on name="chkall">
- </td>
- <td colspan="2">
- <div align="left"> 全选
- </div>
- </td>
- </tr>
- </table>
- <input type="hidden" name="total" value="<%=total%>">
- </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>