modify_safe_driving.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="com.vnex.intranet.util.*" %>
  6. <%@ page import="java.math.BigDecimal" %>
  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="svb" class="com.vnex.intranet.vehicle.driver.value.SafetyDrivingValueBean" scope="page" /> 
  11. <%      
  12.     String timeS = request.getParameter("timeS");    
  13.     String id = request.getParameter("id");
  14.     int sdId = Integer.parseInt( id );      
  15.     svb = driverProxy.getSafetyDrivingInfo( sdId );
  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 listSafetyDriving(form)
  27. {
  28.    form.action="/mainctrl/driver/listSafetyDriving";
  29.    form.submit();
  30. }
  31. function deleteSafetyDriving(form)
  32. {
  33.     if(confirm("是否要删除当前记录?"))
  34.     {
  35.         form.action="/mainctrl/driver/deleteSafetyDriving";
  36.         form.submit();
  37.     }
  38. }
  39. function modifySafetyDrivingSucess(form)
  40. {
  41.     if( checkIt(form) )
  42.     {
  43.         form.action="/mainctrl/driver/modifySafetyDrivingSucess";
  44.         form.submit();
  45.     }
  46. }
  47. function checkIt(form)
  48. {
  49.     if(isInvalidateLen(form.safetyExamination.value,100))
  50.     {
  51.         alert("安全考核不能超过10个字符");
  52.         form.safetyExamination.focus();
  53.         return false;
  54.     }    
  55.     if(isInvalidateLen(form.bonus.value,10))
  56.     {
  57.         alert("奖金不能超过10个字符");
  58.         form.bonus.focus();
  59.         return false;
  60.     }
  61.     if ( !(isFloat(form.bonus.value)) || Number(form.bonus.value)<=0)
  62. {
  63. alert("奖金必须是大于0的数字!");
  64. form.bonus.focus();
  65. return false;
  66. }  
  67. if(isInvalidateLen(form.note.value, 800))
  68.     {
  69.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  70.         form.note.focus();
  71.         return false;
  72.     }        
  73.     return true;
  74. }
  75. </script>
  76. <DIV align=center>
  77. <form name="myform" method="post" action="">
  78. <input type="hidden" name="timeS" value="<%= timeS %>">   
  79. <input type="hidden" name="id" value="<%= svb.getId() %>">   
  80.    
  81.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  82.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  83.     <TR> 
  84.         <TD colSpan=3 align="center"><br>  
  85.           <!--个人信息开始 -->
  86.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  87.             <tr bgcolor="#fafafa"> 
  88.               <td> 
  89.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  90.                   <tr> 
  91.                     <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;<a href="/mainctrl/driver/listSafetyDriving"><font color="#FFFFFF">驾驶员安全行驶奖统计</font></a>&gt;&gt;修改安全行驶奖信息                                         
  92.                       </font></td>
  93.                   </tr>
  94.                   <tr bgcolor="#e0e0e0"> 
  95.                     <td width="100"> <font  class="strong">&nbsp;时间</font>: </td>
  96.                     <td align="left" width="487"><%= svb.getYear() %>年<%= svb.getMonth() %>月 </td>
  97.                   </tr>
  98.                   <tr bgcolor="#fafafa"> 
  99.                     <td width="100"> <font  class="strong">&nbsp;驾驶员</font>: </td>
  100.                     <td width="487"> <%= FieldUtil.filterScriptTag(svb.getEmpName()) %></td>
  101.                   </tr>
  102.                   <tr bgcolor="#e0e0e0"> 
  103.                     <td width="100"><font  class="strong">&nbsp;车辆:</font></td>
  104.                     <td width="487"> <%= FieldUtil.filterScriptTag(svb.getAutomobileSerialNo()) %> </td>
  105.                   </tr>
  106.                   <tr bgcolor="#fafafa"> 
  107.                     <td width="100"> <font  class="strong">&nbsp;上月公里表底</font>: 
  108.                     </td>
  109.                     <td width="487"> 
  110.                     <%
  111.                           BigDecimal bidDec = new BigDecimal( svb.getBaseOdometer() );
  112.                           out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) );
  113.                     %> 公里</td>
  114.                   </tr>
  115.                   <tr bgcolor="#e0e0e0"> 
  116.                     <td width="100"> <font  class="strong">&nbsp;本月底公里表</font>: 
  117.                     </td>
  118.                     <td align="left" width="487"> 
  119.                     <%
  120.                       bidDec = new BigDecimal( svb.getOdometer() );
  121.                       out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) );
  122.                       %> 公里</td>
  123.                   </tr>
  124.                   <tr bgcolor="#fafafa"> 
  125.                     <td width="100"> <font  class="strong">&nbsp;总计行走公里</font>: 
  126.                     </td>
  127.                     <td width="487"><%
  128.                      bidDec = new BigDecimal(  svb.getOdometer() - svb.getBaseOdometer() );
  129.                      out.println( bidDec.setScale(4, BigDecimal.ROUND_UP ) );
  130.                      %>公里</td>
  131.                   </tr>
  132.                   <tr bgcolor="#e0e0e0"> 
  133.                     <td width="100" height="14"> <font  class="strong">&nbsp;耗油:</font> 
  134.                     </td>
  135.                     <td align="left" width="487" height="14"> <%= svb.getOil() %>升</td>
  136.                   </tr>
  137.                   <tr bgcolor="#fafafa"> 
  138.                     <td width="100" bgcolor="#fafafa"><font  class="strong">&nbsp;元/公里:</font></td>
  139.                     <td align="left" width="487"> 
  140.                     <%
  141.                       if ( ( svb.getOdometer() - svb.getBaseOdometer() ) == 0 )
  142.                           bidDec = new BigDecimal( 0.0 );
  143.                       else 
  144.                          bidDec = new BigDecimal( svb.getOilFee()/( svb.getOdometer() - svb.getBaseOdometer() ) );
  145.                       out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );
  146.                     %> 元/公里</td>
  147.                   </tr>
  148.                   <tr bgcolor="#e0e0e0"> 
  149.                     <td width="100"> <font  class="strong">&nbsp;安全考核</font>: 
  150.                     </td>
  151.                     <td align="left" width="487"> 
  152.                       <input type="text" name="safetyExamination" class="file" size="24" value=<%= FieldUtil.filterQuotTag(svb.getSafetyExamination()) %>>
  153.                      </td>
  154.                   </tr>
  155.                   <tr bgcolor="#fafafa"> 
  156.                     <td width="100"><font  class="strong">&nbsp;奖金:</font></td>
  157.                     <td align="left" width="487"> 
  158.                       <input type="text" name="bonus" class="file" size="6" value="<%bidDec = new BigDecimal(  svb.getBonus() );out.println( bidDec.setScale(3, BigDecimal.ROUND_UP ) );%>">元
  159.                     </td>
  160.                   </tr>
  161.                   <tr bgcolor="#e0e0e0"> 
  162.                     <td width="100"> <font  class="strong">&nbsp;备注:</font></td>
  163.                     <td width="487"> 
  164.                       <textarea name="note" cols="59" rows="4"><%= FieldUtil.filterQuotTag(svb.getNote()) %></textarea>
  165.                     </td>
  166.                   </tr>
  167.                   <tr bgcolor="#FFFFFF"> 
  168.                     <td colspan="2" height="30"> 
  169.                       <div align="center">
  170.                         <input type="button" name="Button" value="保存" class="file"  onClick="modifySafetyDrivingSucess(this.form)">&nbsp;&nbsp;
  171.                         <input type="button" name="Button" value="删除" class="file"  onClick="deleteSafetyDriving(this.form)">&nbsp;&nbsp;
  172.                         <input type="reset" name="Button2" value="重置" class="file">&nbsp;&nbsp;
  173.                         <input type="button" name="Submit2" value="放弃" class="file" onClick="listSafetyDriving(this.form)">
  174.                       </div>
  175.                     </td>
  176.                   </tr>
  177.                 </table>
  178.               </td>
  179.             </tr>
  180.           </table>          
  181.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  182.        </TD>
  183.     </TR>
  184.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  185.     </TABLE>
  186.   <BR>
  187.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  188. </form></DIV>
  189. </BODY></HTML>