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

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  3. <%@ page language="java" %>
  4. <%@ page import="java.util.*" %>
  5. <%@ page import="java.lang.*" %>
  6. <%@ page import="com.vnex.intranet.budget.value.BudgetListValueBean" %>
  7. <%@ page import="com.vnex.intranet.util.FieldUtil" %> 
  8. <%@ page import="java.text.DecimalFormat" %>
  9. <jsp:useBean id="BudgetListProxy" scope="application" class="com.vnex.intranet.budget.proxy.BudgetListProxyBean" />
  10.                   <%
  11.         String paraMonth = request.getParameter("month");
  12. int department = (new Integer(request.getParameter("id"))).intValue();
  13. String col ="";
  14. int total=0;
  15.     DecimalFormat dFormat = new DecimalFormat("##.##");
  16.  %>
  17. <script language="JavaScript" >
  18. var whitespace = " tnr";
  19. function isFloat(s)
  20.  {    
  21.     if(isWhitespace(s)) return false;
  22.     if(isNaN(s)) return false;
  23.     return true;
  24.  }
  25. function isWhitespace (s)
  26. {   var i;
  27.     if (isEmpty(s)) return true;
  28.     for (i = 0; i < s.length; i++)
  29.     {
  30.         var c = s.charAt(i);
  31.         if (whitespace.indexOf(c) == -1) return false;
  32.     }
  33.     return true;
  34. }
  35. function isEmpty(s)
  36. {
  37.    return ((s == null) || (s.length == 0) )
  38. }
  39. </script>  
  40. <script language="javaScript">
  41. function over()
  42. {
  43.     if(checkAllSalary())
  44. {
  45.         if(confirm("您确认提交财务部吗,提交后就再不能修改了!"))
  46.     {
  47.         form1.status.value="2";
  48.         form1.action="/mainctrl/budget/managementCreateSuccess";
  49.     form1.submit();
  50.     }
  51.     }
  52. function checkAllSalary()
  53. {
  54.     for (var i=0;i<document.form1.elements.length;i++)
  55.     {
  56.         var e = document.form1.elements[i];
  57.         if ((e.name).substring(0,6)=="budget")
  58.     {
  59.     if ( !isFloat(e.value) )
  60.             {
  61.     alert("请正确的输入数字!");
  62. e.focus();
  63.                 return false;
  64.             }
  65.     if ( e.value<0||e.value>9999999)
  66.             {
  67.     alert("请输入0-9999999的数字!");
  68. e.focus();
  69.                 return false;
  70.             }
  71.     }
  72.     }
  73. return true;
  74. }
  75. function saveSubmit()
  76. {
  77.     if(checkAllSalary())
  78. {
  79.     if(confirm("您还没有做完本月预算,请下回继续从本接口做部门预算!"))
  80. {
  81.     form1.action="/mainctrl/budget/managementCreateSuccess";
  82. form1.submit();
  83. }
  84. }
  85. return false;
  86. }
  87. </script>
  88. <HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  89. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  90. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  91. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  92. <DIV align=center>
  93. <form name="form1" method="get" action="">
  94.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  95.      <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  96.     <TR> 
  97.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  98.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  99.             <tr valign="top"> 
  100.               <td > 
  101.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  102.                   <tr> 
  103.                     <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;<a href="/mainctrl/budget/index"><font color="#FFFFFF">部门预算</font></a>&gt;&gt;新增部门预算</font></td>
  104.                   </tr>
  105.                 </table>
  106.                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
  107.                   <tr bgcolor="#fafafa"> 
  108.                     <td colspan="4">
  109. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  110.                         <tr>
  111.                           <td width="80%"><font class="strong">&nbsp;&nbsp;请建立<%=paraMonth%>月新的预算: </font> 
  112.                           </td>
  113.                           <td width="20%">
  114.                             <div align="right"><font class="strong">单位:元&nbsp;&nbsp;&nbsp;&nbsp;</font></div>
  115.                           </td>
  116.                         </tr>
  117.                       </table> </td>
  118.                   </tr>
  119.                 </table>
  120.                 <table width="600" border="0" cellspacing="1" cellpadding="2" class=title>
  121.                   <tr align="center"> 
  122.                     <td width="100"><font class="strong">项目</font></td>
  123.                     <td width="137"><font class="strong">预算额</font></td>
  124.                     <td width="344"><font class="strong">备注</font></td>
  125.                   </tr>
  126.  <%
  127. BudgetListValueBean valueBean = null;
  128. //Collection coll = BudgetListProxy.showOneBudget("2001-01", 2);
  129. Collection coll = BudgetListProxy.showOneBudget(paraMonth, department);
  130. if (coll.size()==0)
  131.                             response.sendRedirect("/mainctrl/budget/managementCreateFail?month="+paraMonth);
  132. Iterator iter = coll.iterator();
  133. while(iter.hasNext())
  134. {
  135.     valueBean = (BudgetListValueBean)iter.next();
  136. total++;
  137. col = ((total%2)==1)?"#fafafa":"#e0e0e0";
  138. %>
  139.                   <tr align="center" bgcolor=<%=col%>> 
  140.                     <td width="100"><%=valueBean.getComponentName()%>
  141. <input type="hidden" name="componentId<%=total%>" value="<%=valueBean.getComponentId()%>">
  142.                     <input type="hidden" name="division<%=total%>" value="<%=valueBean.getDivision()%>">
  143.                     <input type="hidden" name="month<%=total%>" value="<%=valueBean.getMonth()%>">
  144. </td>
  145.                     <td width="137"> 
  146.                       <input type="text" name="budget<%=total%>"  class="text" size="6" value="<%= valueBean.getBudget() %>" maxlength="7" >
  147.                     </td>
  148.                     <td width="344" > 
  149.                       <input type="text" name="description<%=total%>" class="text" value="<%=FieldUtil.filterQuotTag(valueBean.getDescription())%>" size="50" maxlength="100">
  150.                     </td>
  151.                   </tr>
  152.                   <%
  153.     }
  154.  %>
  155.                   <tr align="center" bgcolor="#fafafa"> 
  156.                     <td colspan="3" height="30"> <input type="hidden" name="status" value="1">
  157.     <input type="hidden" name="total" value="<%=total%>">
  158.                       <input type="button"  value="保存" class="text"  onclick=saveSubmit()>
  159.                       &nbsp; 
  160.                       <input type="reset"  value="重置" class="text">
  161.                       &nbsp;&nbsp; 
  162.                       <input type="button"  onClick="history.back()"  value="放弃" class="text">
  163.                       &nbsp;&nbsp; 
  164.                       <input type="button"  style="width:132px" onClick="over()" value="提交本月预算给财务部" class="text" >
  165.                     </td>
  166.                   </tr>
  167.                 </table>
  168.                 
  169.               </td>
  170.             </tr>
  171.           </table>
  172.                     <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  173.        </TD>
  174.     </TR>
  175.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  176.     </TABLE>
  177.     <BR>
  178.     <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  179. </form>
  180.   </DIV>
  181.  </BODY>
  182. </HTML>