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

电子政务应用

开发平台:

Java

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