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