modify_peccancy.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="pvb" class="com.vnex.intranet.vehicle.driver.value.PeccancyValueBean" scope="page" /> 
  9. <%      
  10.     String id = request.getParameter("id");
  11.     int peccancyId = Integer.parseInt( id );      
  12.     pvb = driverProxy.getPeccancyInfo( peccancyId );                                
  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 modifyPeccancySuccess(form)
  32. {
  33.     if(checkIt(form))
  34.     {
  35.         form.action="/mainctrl/driver/modifyPeccancySuccess";
  36.         form.submit();
  37.     }
  38. }
  39. function detailPeccancy(form)
  40. {
  41.     form.action="/mainctrl/driver/detailPeccancy";
  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.                
  53.       if(!isVNEXDate(form.timeS.value) )
  54.       {
  55.         alert("违章日期非法");
  56.         form.timeS.focus();
  57.         return false;
  58.       }      
  59.       if( currentDate < form.timeS.value )
  60.       {
  61.         alert("违章日期必须是本日或之前");
  62.         form.timeS.focus();
  63.         return false;
  64.       }
  65.                
  66.     if(isEmpty(form.site.value) || isEmptyStr(form.site.value))
  67.     {
  68.         alert("请输入违章地点");
  69.         form.site.focus();
  70.         return false;
  71.     }
  72.     if(isInvalidateLen(form.site.value,100))
  73.     {
  74.         alert("违章地点不能超过25个汉字或100个英文字符");
  75.         form.site.focus();
  76.         return false;
  77.     }    
  78.     if(isEmpty(form.severityLevel.value) || isEmptyStr(form.severityLevel.value))
  79.     {
  80.         alert("请输入违章严重程度");
  81.         form.severityLevel.focus();
  82.         return false;
  83.     }
  84.     if(isInvalidateLen(form.severityLevel.value,100))
  85.     {
  86.         alert("违章严重程度不能超过25个汉字或100个英文字符");
  87.         form.severityLevel.focus();
  88.         return false;
  89.     }    
  90.     if(isEmpty(form.punishment.value) || isEmptyStr(form.punishment.value))
  91.     {
  92.         alert("请输入处罚措施");
  93.         form.punishment.focus();
  94.         return false;
  95.     }
  96.     if(isInvalidateLen(form.punishment.value,100))
  97.     {
  98.         alert("处罚措施不能超过25个汉字或100个英文字符");
  99.         form.punishment.focus();
  100.         return false;
  101.     }    
  102.     if(isInvalidateLen(form.note.value, 800))
  103.     {
  104.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  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="empId" value="<%=request.getParameter("empId")%>">   
  113. <input type="hidden" name="empName" value="<%= request.getParameter("empName") %>">
  114. <input type="hidden" name="id" value="<%= id %>">
  115.    
  116.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  117.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  118.     <TR> 
  119.         <TD colSpan=3 align="center"><br>
  120.           <!--个人信息开始 -->
  121.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  122.             <tr bgcolor="#fafafa"> 
  123.               <td> 
  124.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  125.                   <tr bgcolor="#666666"> 
  126.                     <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;修改违章记录                     
  127.                       </font></td>
  128.                   </tr>
  129.                   <tr bgcolor="#fafafa"> 
  130.                     <td width="100"><font  class="strong">&nbsp;姓名:</font></td>
  131.                     <td colspan="2" width="487" bgcolor="#fafafa"><%= FieldUtil.filterQuotTag(request.getParameter("empName")) %> </td>
  132.                   </tr>
  133.                   <tr bgcolor="#e0e0e0"> 
  134.                     <td width="100"> <font  class="strong">&nbsp;违章日期:</font> 
  135.                     </td>
  136.                     <td align="left" width="487"> 
  137.                       <input type="text" name="timeS" readonly size="24" class="text" value="<%= pvb.getTimeS() %>">
  138.                       &nbsp; <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(timeS);return false;" width="16" height="16"> 
  139.                       *( 注:带 * 的为必填内容) </td>
  140.                   </tr>
  141.                   <tr bgcolor="#fafafa"> 
  142.                     <td width="100"><font  class="strong">&nbsp;违章地点:</font></td>
  143.                     <td colspan="2" width="487"> 
  144.                       <input type="site" name="site" class="file" size="24" value="<%= FieldUtil.filterQuotTag(pvb.getSite()) %>">
  145.                       * </td>
  146.                   </tr>
  147.                   <tr bgcolor="#e0e0e0"> 
  148.                     <td width="100"><font  class="strong">&nbsp;使用车辆:</font></td>
  149.                     <td width="487">
  150.                       <select name="automobileId">
  151.                         <vnex_auto:autoList> 
  152.                           <vnex:items select='<%= ""+pvb.getAutomobileId() %>' >
  153.                             <option value="<vnex_auto:autoAttribute attribute="automobileId" />" <vnex_auto:autoAttribute attribute="isSelected" /> > 
  154.                               <vnex_auto:autoAttribute attribute="carCertNo" /> 
  155.                             </option>
  156.                           </vnex:items> 
  157.                         </vnex_auto:autoList> 
  158.                       </select>
  159.                       * </td>
  160.                   </tr>
  161.                   <tr bgcolor="#fafafa"> 
  162.                     <td width="100"><font  class="strong">&nbsp;严重程度:</font></td>
  163.                     <td colspan="2" width="487"> 
  164.                       <input type="text" name="severityLevel" class="file" size="6" value="<%= FieldUtil.filterQuotTag(pvb.getSeverityLevel()) %>">
  165.                       * </td>
  166.                   </tr>
  167.                   <tr bgcolor="#e0e0e0"> 
  168.                     <td width="100"><font  class="strong">&nbsp;违章原因:</font> 
  169.                     </td>
  170.                     <td colspan="2" width="487"> 
  171.                       <input type="text" name="reason" class="file" size="72" value="<%= FieldUtil.filterQuotTag(pvb.getReason()) %>">
  172.                     </td>
  173.                   </tr>
  174.                   <tr bgcolor="#fafafa"> 
  175.                     <td width="100"> <font  class="strong">&nbsp;处罚措施:</font> 
  176.                     </td>
  177.                     <td colspan="2" width="487"> 
  178.                       <input type="text" name="punishment" class="file" size="24" value="<%= FieldUtil.filterQuotTag(pvb.getPunishment()) %>">
  179.                       * </td>
  180.                   </tr>
  181.                   <tr bgcolor="#e0e0e0"> 
  182.                     <td width="100"> <font  class="strong">&nbsp;其他说明: 
  183.                       </font> </td>
  184.                     <td colspan="2" width="487"> 
  185.                       <textarea name="note" cols="59" rows="5"><%= FieldUtil.filterQuotTag(pvb.getNote()) %></textarea>
  186.                     </td>
  187.                   </tr>
  188.                   <tr bgcolor="#fafafa" align="center"> 
  189.                     <td colspan="3" height="30"> 
  190.                       <input type="button" name="Submit" value="保存" class="file"  onclick="modifyPeccancySuccess(this.form)">&nbsp;&nbsp; 
  191.                       <input type="reset" name="Submit22" class="file" value="重置">&nbsp;&nbsp;
  192.                       <input type="button" name="Submit2" class="file" value="放弃" onclick="detailPeccancy(this.form)">
  193.                     </td>
  194.                   </tr>
  195.                 </table>
  196.               </td>
  197.             </tr>
  198.           </table>          
  199.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  200.         </TD>
  201.     </TR>
  202.     <TR> 
  203.       <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  204.     </TR>
  205.     </TABLE>
  206.   <BR>
  207.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  208. </form></DIV>
  209. </BODY></HTML>