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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_auto" %>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <%@ page import="java.util.*"%>
  5. <%@ page import="java.math.BigDecimal" %>
  6. <%@ page import="com.vnex.intranet.util.*" %>
  7. <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
  8. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  9. <jsp:useBean id="driverProxy" scope="application" class="com.vnex.intranet.vehicle.driver.proxy.DriverProxyBean" />
  10. <jsp:useBean id="dvb" class="com.vnex.intranet.vehicle.driver.value.DrivingFeeValueBean" scope="page" /> 
  11. <%      
  12.     String timeS = request.getParameter("timeS");    
  13.     String id = request.getParameter("id");
  14.     int dfId = Integer.parseInt( id );      
  15.     dvb = driverProxy.getDrivingFeeInfo( dfId );
  16. %>
  17. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  18. <HTML>
  19. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  20. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  21. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  22. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  23. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  24. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  25. <script language=JavaScript>
  26. function listDrivingFee(form)
  27. {
  28.    form.action="/mainctrl/driver/listDrivingFee";
  29.    form.submit();
  30. }
  31. function modifyDrivingFeeSucess(form)
  32. {
  33.     if( checkIt(form) )
  34.     {
  35.         form.action="/mainctrl/driver/modifyDrivingFeeSucess";
  36.         form.submit();
  37.     }
  38. }
  39. function checkIt(form)
  40. {
  41.     if(isInvalidateLen(form.odometer.value,10))
  42.     {
  43.         alert("里程表不能超过10个字符");
  44.         form.odometer.focus();
  45.         return false;
  46.     }
  47.     if ( !(isFloat(form.odometer.value)) || Number(form.odometer.value)<=0)
  48. {
  49. alert("里程表必须是大于0的数字!");
  50. form.odometer.focus();
  51. return false;
  52. }
  53. if(isInvalidateLen(form.oil.value,10))
  54.     {
  55.         alert("月用油不能超过10个字符");
  56.         form.oil.focus();
  57.         return false;
  58.     }       
  59. if ( !(isFloat(form.oil.value)) || Number(form.oil.value)<=0)
  60. {
  61. alert("月用油必须是大于0的数字!");
  62. form.oil.focus();
  63. return false;
  64. }
  65. if(isInvalidateLen(form.oilFee.value,10))
  66.     {
  67.         alert("金额不能超过10个字符");
  68.         form.oilFee.focus();
  69.         return false;
  70.     }
  71. if ( !(isFloat(form.oilFee.value)) || Number(form.oilFee.value)<=0)
  72. {
  73. alert("金额必须是大于0的数字!");
  74. form.oilFee.focus();
  75. return false;
  76. }
  77. if(isInvalidateLen(form.drivingFee.value,10))
  78.     {
  79.         alert("行驶费用不能超过10个字符");
  80.         form.drivingFee.focus();
  81.         return false;
  82.     }
  83. if ( !(isFloat(form.drivingFee.value)) || Number(form.drivingFee.value)<=0)
  84. {
  85. alert("行驶费用必须是大于0的数字!");
  86. form.drivingFee.focus();
  87. return false;
  88. }
  89. if(isInvalidateLen(form.maintainFee.value,10))
  90.     {
  91.         alert("月维修费不能超过10个字符");
  92.         form.maintainFee.focus();
  93.         return false;
  94.     }
  95. if ( !(isFloat(form.maintainFee.value)) || Number(form.maintainFee.value)<=0)
  96. {
  97. alert("月维修费必须是大于0的数字!");
  98. form.maintainFee.focus();
  99. return false;
  100. }
  101. if(isInvalidateLen(form.note.value, 800))
  102.     {
  103.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  104.         form.note.focus();
  105.         return false;
  106.     }    
  107.     return true;
  108. }
  109. </script>
  110. <DIV align=center>
  111. <form name="myform" method="post" action="">
  112. <input type="hidden" name="id" value="<%= dvb.getId() %>">   
  113. <input type="hidden" name="empId" value="<%= dvb.getEmpId() %>">   
  114. <input type="hidden" name="automobileId" value="<%= dvb.getAutomobileId() %>">   
  115. <input type="hidden" name="year" value="<%= dvb.getYear() %>">   
  116. <input type="hidden" name="month" value="<%= dvb.getMonth() %>">   
  117. <input type="hidden" name="timeS" value="<%= timeS %>">   
  118.    
  119.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  120.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  121.     <TR> 
  122.         <TD colSpan=3 align="center"><br>  
  123.           <!--个人信息开始 -->
  124.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  125.             <tr bgcolor="#fafafa"> 
  126.               <td> 
  127.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  128.                   <tr>
  129.                     <td colspan="2" height="15" bgcolor="#666666"><font class="strongw">&nbsp;<a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href="/mainctrl/driver/listDrivingFee"><font color="#FFFFFF">车辆行驶费用</font></a>&gt;&gt;修改车辆月行驶费用                     
  130.                       </font></td>
  131.                   </tr>
  132.                   <tr bgcolor="#fafafa"> 
  133.                     <td width="100"> <font  class="strong">&nbsp;时间</font>: </td>
  134.                     <td align="left" width="487"><%= dvb.getYear() %>年<%= dvb.getMonth() %>月 </td>
  135.                   </tr>
  136.                   <tr bgcolor="#e0e0e0"> 
  137.                     <td width="100"> <font  class="strong">&nbsp;驾驶员</font>: </td>
  138.                     <td width="487"> <%= FieldUtil.filterScriptTag(dvb.getEmpName()) %></td>
  139.                   </tr>
  140.                   <tr bgcolor="#fafafa"> 
  141.                     <td width="100"><font  class="strong">&nbsp;车辆:</font></td>
  142.                     <td width="487" bgcolor="#fafafa"> <%= FieldUtil.filterScriptTag(dvb.getAutomobileSerialNo()) %></td>
  143.                   </tr>
  144.                   <tr bgcolor="#e0e0e0"> 
  145.                     <td width="100"> <font  class="strong">&nbsp;里程底表</font>: 
  146.                     </td>
  147.                     <td width="487"> <%= dvb.getBaseOdometer() %>公里</td>
  148.                   </tr>
  149.                   <tr bgcolor="#fafafa"> 
  150.                     <td width="100"> <font  class="strong">&nbsp;里程表</font>: </td>
  151.                     <td align="left" width="487"> 
  152.                       <input type="text" name="odometer" class="file" size="24" value="<%BigDecimal bidDec = new BigDecimal( dvb.getOdometer());out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) ); %>">公里
  153.                     </td>
  154.                   </tr>                  
  155.                   <tr bgcolor="#e0e0e0"> 
  156.                     <td width="100"><font  class="strong">&nbsp;月用油:</font></td>
  157.                     <td align="left" width="487"> 
  158.                       <input type="text" name="oil" class="file" size="6" value="<%= dvb.getOil() %>">升
  159.                     </td>
  160.                   </tr>
  161.                   <tr bgcolor="#fafafa"> 
  162.                     <td width="100"> <font  class="strong">&nbsp;金额</font>: </td>
  163.                     <td align="left" width="487"> 
  164.                       <input type="text" name="oilFee" class="file" size="6" value="<% bidDec = new BigDecimal(dvb.getOilFee()); out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );%>">元
  165.                     </td>
  166.                   </tr>
  167.                   <tr bgcolor="#e0e0e0"> 
  168.                     <td width="100"><font  class="strong">&nbsp;行驶费用:</font></td>
  169.                     <td align="left" width="487"> 
  170.                       <input type="text" name="drivingFee" class="file" size="6" value="<%bidDec = new BigDecimal(dvb.getDrivingFee()); out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );%>">元
  171.                     </td>
  172.                   </tr>
  173.                   <tr bgcolor="#fafafa"> 
  174.                     <td width="100"> <font  class="strong">&nbsp;月维修费</font>: 
  175.                     </td>
  176.                     <td align="left" width="487"> 
  177.                       <input type="text" name="maintainFee" class="file" size="6" value="<%bidDec = new BigDecimal(dvb.getMaintainFee());out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) ); %>">元
  178.                     </td>
  179.                   </tr>                  
  180.                   <tr bgcolor="#e0e0e0"> 
  181.                     <td width="100"> <font  class="strong">&nbsp;备注:</font></td>
  182.                     <td width="487"> 
  183.                       <textarea name="note" cols="59" rows="4"><%= FieldUtil.filterQuotTag(dvb.getNote()) %></textarea>
  184.                     </td>
  185.                   </tr>
  186.                   <tr bgcolor="#fafafa" align="center"> 
  187.                     <td colspan="2" height="30"> 
  188.                       <input type="button" name="Button" value="保存" class="file"  onClick="modifyDrivingFeeSucess(this.form)">&nbsp;&nbsp; 
  189.                       <input type="reset" name="Submit2" value="重置" class="file">&nbsp;&nbsp;
  190.                       <input type="button" name="Submit22" value="放弃" class="file" onClick="listDrivingFee(this.form)">
  191.                     </td>
  192.                   </tr>
  193.                 </table>
  194.               </td>
  195.             </tr>
  196.           </table>          
  197.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  198.        </TD>
  199.     </TR>
  200.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  201.      </TABLE>
  202.   <BR>
  203.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  204. </form></DIV>
  205. </BODY></HTML>