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

电子政务应用

开发平台:

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="com.vnex.intranet.util.*" %>
  5. <%@ page import="java.sql.Timestamp" %>
  6. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  7. <jsp:useBean id="driverProxy" scope="application" class="com.vnex.intranet.vehicle.driver.proxy.DriverProxyBean" />
  8. <jsp:useBean id="avb" class="com.vnex.intranet.vehicle.driver.value.AccidentValueBean" scope="page" /> 
  9. <%      
  10.     String id = request.getParameter("id");
  11.     int accidentId = Integer.parseInt( id );      
  12.     avb = driverProxy.getAccidentInfo( accidentId );                                
  13. %>
  14. <%
  15.  // get the currentTime
  16.   Timestamp tCurrent = new Timestamp(System.currentTimeMillis());
  17.   Calendar calCurrent = TimeStamp.convertTimestampToCalendar(tCurrent); 
  18.   String currentDate = "" + TimeStamp.formatCalendar( TimeStamp.YMD, calCurrent   );
  19. %>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  21. <HTML>
  22. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  23. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  24. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  25. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  26. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  27. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  28. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  29. <script language="JavaScript">
  30. var currentDate ="<%=currentDate%>";
  31. function modifyAccidentSuccess(form)
  32. {
  33.     if(checkIt(form))
  34.     {
  35.         form.action="/mainctrl/driver/modifyAccidentSuccess";
  36.         form.submit();
  37.     }
  38. }
  39. function detailAccident(form)
  40. {
  41.     form.action="/mainctrl/driver/detailAccident";
  42.     form.submit();
  43. }
  44. function checkIt(form)
  45. {  
  46.     if(isEmpty(form.timeS.value) || isEmptyStr(form.timeS.value))
  47.     {
  48.         alert("请输入事故日期");
  49.         form.timeS.focus();
  50.         return false;
  51.     }         
  52.     if(!isVNEXDate(form.timeS.value) )
  53.     {
  54.         alert("事故日期非法");
  55.         form.timeS.focus();
  56.         return false;
  57.     }      
  58.     if( currentDate < form.timeS.value )
  59.     {
  60.        alert("事故日期必须是本日或之前");
  61.        form.timeS.focus();
  62.        return false;
  63.     }    
  64.     if(isEmpty(form.site.value) || isEmptyStr(form.site.value))
  65.     {
  66.         alert("请输入事故地点");
  67.         form.site.focus();
  68.         return false;
  69.     }
  70.     if(isInvalidateLen(form.site.value,100))
  71.     {
  72.         alert("事故地点不能超过25个汉字或100个英文字符");
  73.         form.site.focus();
  74.         return false;
  75.     }    
  76.     if(isEmpty(form.severityLevel.value) || isEmptyStr(form.severityLevel.value))
  77.     {
  78.         alert("请输入事故严重程度");
  79.         form.severityLevel.focus();
  80.         return false;
  81.     }
  82.     if(isInvalidateLen(form.severityLevel.value,100))
  83.     {
  84.         alert("事故严重程度不能超过25个汉字或100个英文字符");
  85.         form.severityLevel.focus();
  86.         return false;
  87.     }    
  88.     if(isInvalidateLen(form.reason.value,100))
  89.     {
  90.         alert("事故原因不能超过25个汉字或100个英文字符");
  91.         form.reason.focus();
  92.         return false;
  93.     }       
  94.     if(isEmpty(form.processResult.value) || isEmptyStr(form.processResult.value))
  95.     {
  96.         alert("请输入处理结果");
  97.         form.processResult.focus();
  98.         return false;
  99.     }
  100.     if(isInvalidateLen(form.processResult.value,100))
  101.     {
  102.         alert("处理结果不能超过25个汉字或100个英文字符");
  103.         form.processResult.focus();
  104.         return false;
  105.     }    
  106.     if(isInvalidateLen(form.note.value, 800))
  107.     {
  108.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  109.         return false;
  110.     }    
  111.     return true;
  112. }
  113. </script>
  114. <DIV align=center>
  115. <form name="myform" method="post" action="">
  116. <input type="hidden" name="empId" value="<%=request.getParameter("empId")%>">   
  117. <input type="hidden" name="empName" value="<%= request.getParameter("empName") %>">
  118. <input type="hidden" name="id" value="<%= id %>">
  119.    
  120.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  121.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  122.     <TR> 
  123.         <TD colSpan=3 align="center"><br>
  124.           <!--个人信息开始 -->
  125.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  126.             <tr bgcolor="#fafafa"> 
  127.               <td> 
  128.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  129.                   <tr> 
  130.                     <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/listDriver"><font color="#FFFFFF">司机管理</font></a>&gt;&gt;<a href="/mainctrl/driver/detailDriver?empId=<%= request.getParameter("empId") %>"><font color="#FFFFFF">司机详细信息</font></a>&gt;&gt;修改事故记录                     
  131.                       </font></td>
  132.                   </tr>
  133.                   <tr bgcolor="#e0e0e0"> 
  134.                     <td width="115"><font  class="strong">&nbsp;姓名:</font></td>
  135.                     <td colspan="2" width="477"><%= FieldUtil.filterQuotTag(request.getParameter("empName")) %> </td>
  136.                   </tr>
  137.                   <tr bgcolor="#fafafa"> 
  138.                     <td width="115"> <font  class="strong">&nbsp;事故日期:</font> 
  139.                     </td>
  140.                     <td align="left" width="461"> 
  141.                       <input type="text" name="timeS" readonly size="24" class="text" value="<%= avb.getTimeS() %>">
  142.                       &nbsp; <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(timeS);return false;" width="16" height="16"> 
  143.                       *( 注:带 * 的为必填内容)</td>
  144.                   </tr>
  145.                   <tr bgcolor="#e0e0e0"> 
  146.                     <td width="115"><font  class="strong">&nbsp;事故地点:</font></td>
  147.                     <td colspan="2" width="477"> 
  148.                       <input type="text" name="site" class="file" size="24" value="<%= FieldUtil.filterQuotTag(avb.getSite()) %>">
  149.                       * </td>
  150.                   </tr>
  151.                   <tr bgcolor="#fafafa"> 
  152.                     <td width="115"><font  class="strong">&nbsp;使用车辆:</font></td>
  153.                     <td width="487">
  154.                       <select name="automobileId">
  155.                         <vnex_auto:autoList> 
  156.                           <vnex:items select='<%= ""+avb.getAutomobileId() %>' >
  157.                             <option value="<vnex_auto:autoAttribute attribute="automobileId" />" <vnex_auto:autoAttribute attribute="isSelected" /> > 
  158.                               <vnex_auto:autoAttribute attribute="carCertNo" /> 
  159.                             </option>
  160.                           </vnex:items> 
  161.                         </vnex_auto:autoList> 
  162.                       </select>
  163.                       * </td>
  164.                   </tr>
  165.                   <tr bgcolor="#e0e0e0"> 
  166.                     <td width="115"><font  class="strong">&nbsp;严重程度:</font></td>
  167.                     <td colspan="2" width="477"> 
  168.                       <input type="text" name="severityLevel" class="file" size="6" value="<%= FieldUtil.filterQuotTag(avb.getSeverityLevel()) %>">
  169.                       * </td>
  170.                   </tr>
  171.                   <tr bgcolor="#fafafa"> 
  172.                     <td width="115"> <font  class="strong">&nbsp;事故原因:</font> 
  173.                     </td>
  174.                     <td colspan="2" width="477"> 
  175.                       <input type="text" name="reason" class="file" size="72" value="<%= FieldUtil.filterQuotTag(avb.getReason()) %>">
  176.                     </td>
  177.                   </tr>
  178.                   <tr bgcolor="#e0e0e0"> 
  179.                     <td width="115"><font  class="strong">&nbsp;是主要责任人:</font></td>
  180.                     <td colspan="2" width="477"> 
  181.                       <input type="checkbox" name="isResponsible" <% if( avb.getIsResponsible() ==1 ) out.print("checked"); %> value="1">
  182.                     </td>
  183.                   </tr>
  184.                   <tr bgcolor="#fafafa"> 
  185.                     <td width="115"> <font  class="strong">&nbsp;处理结果: </font> 
  186.                     </td>
  187.                     <td colspan="2" width="477"> 
  188.                       <input type="text" name="processResult" class="file" size="24" value="<%= FieldUtil.filterQuotTag(avb.getProcessResult()) %>">
  189.                       * </td>
  190.                   </tr>
  191.                   <tr bgcolor="#e0e0e0"> 
  192.                     <td width="115"> <font  class="strong">&nbsp;其他说明: 
  193.                       </font> </td>
  194.                     <td colspan="2" width="477"> 
  195.                       <textarea name="note" cols="59" rows="4"><%= FieldUtil.filterQuotTag(avb.getNote()) %></textarea>
  196.                     </td>
  197.                   </tr>
  198.                   <tr bgcolor="#fafafa" align="center"> 
  199.                     <td colspan="3" height="30"> 
  200.                       <input type="button" name="Submit" value="保存" class="file"  onclick="modifyAccidentSuccess(this.form)">&nbsp;&nbsp;
  201.                       <input type="reset" name="Submit2" class="file" value="重置">&nbsp;&nbsp;
  202.                       <input type="button" name="Submit22" class="file" value="放弃" onClick="detailAccident(this.form)">
  203.                     </td>
  204.                   </tr>
  205.                 </table>
  206.               </td>
  207.             </tr>
  208.           </table>          
  209.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  210.         </TD>
  211.       </TR>
  212.       <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  213.     </TABLE>
  214.   <BR>
  215.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  216. </form></DIV>
  217. </BODY></HTML>