modify.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="java.util.*"%>
  5. <%@ page import="com.vnex.intranet.util.*" %>
  6. <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
  7. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  8. <jsp:useBean id="driverProxy" scope="application" class="com.vnex.intranet.vehicle.driver.proxy.DriverProxyBean" />
  9. <jsp:useBean id="dvb" class="com.vnex.intranet.vehicle.driver.value.DriverViewBean" scope="page" /> 
  10. <%      
  11.     String id = request.getParameter("empId");
  12.     int empId = Integer.parseInt( id );      
  13.     dvb = driverProxy.getDriverInfo( empId );
  14. %>
  15. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  16. <HTML>
  17. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  18. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  19. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  20. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  21. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  22. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  23. <script language=JavaScript>
  24. function detailDriver(form)
  25. {
  26.     form.action="/mainctrl/driver/detailDriver";
  27.     form.submit();
  28. }
  29. function modifyDriverSuccess(form)
  30. {
  31.     if(checkIt(form))
  32.     {
  33.         form.action="/mainctrl/driver/modifyDriverSuccess";
  34.         form.submit();
  35.     }
  36. }
  37. function checkIt(form)
  38. {
  39.     if(isEmpty(form.licenceNo.value) || isEmptyStr(form.licenceNo.value))
  40.     {
  41.         alert("请输入司机驾驶证号");
  42.         form.licenceNo.focus();
  43.         return false;
  44.     }
  45.     if(isInvalidateLen(form.licenceNo.value,100))
  46.     {
  47.         alert("司机驾驶证号不能超过25个汉字或100个英文字符");
  48.         form.licenceNo.focus();
  49.         return false;
  50.     }    
  51.     if(isEmpty(form.typePermited.value) || isEmptyStr(form.typePermited.value))
  52.     {
  53.         alert("请输入司机准驾车型");
  54.         form.typePermited.focus();
  55.         return false;
  56.     }
  57.     if(isInvalidateLen(form.typePermited.value,100))
  58.     {
  59.         alert("司机准驾车型不能超过25个汉字或100个英文字符");
  60.         form.typePermited.focus();
  61.         return false;
  62.     }    
  63.     if( form.automobileId.options.length < 1 )
  64.     {
  65.         alert("请选择车辆");
  66.         form.automobileId.focus();
  67.         return false;
  68.     }    
  69.     if(isEmpty(form.addressIssued.value) || isEmptyStr(form.addressIssued.value))
  70.     {
  71.         alert("请输入司机备案地点");
  72.         form.addressIssued.focus();
  73.         return false;
  74.     }
  75.     if(isInvalidateLen(form.addressIssued.value,100))
  76.     {
  77.         alert("司机备案地点不能超过25个汉字或100个英文字符");
  78.         form.addressIssued.focus();
  79.         return false;
  80.     }    
  81.     if(isEmpty(form.timeIssuedS.value) || isEmptyStr(form.timeIssuedS.value))
  82.     {
  83.         alert("请输入司机领证时间");
  84.         form.timeIssuedS.focus();
  85.         return false;
  86.     }
  87.     if( !isEmpty(form.nextTimeS.value) && !isEmptyStr(form.nextTimeS.value) )
  88.     {
  89.         if( form.timeIssuedS.value >= form.nextTimeS.value )
  90.         {
  91.             alert("下次验证时间应晚于领证时间");
  92.             form.timeIssuedS.focus();
  93.             return false;
  94.         }     
  95.     }
  96.     if(isInvalidateLen(form.note.value, 800))
  97.     {
  98.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  99.         form.note.focus();
  100.         return false;
  101.     }    
  102.     return true;
  103. }
  104. </script>
  105. <DIV align=center>
  106. <form name="form1" method="post" action="">
  107. <input type="hidden" name="empId" value="<%=request.getParameter("empId")%>">   
  108.    
  109.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  110.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  111.     <TR> 
  112.         <TD colSpan=3 align="center"><br>  
  113.           <!--个人信息开始 -->
  114.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  115.             <tr bgcolor="#fafafa"> 
  116.               <td> 
  117.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  118.                   <tr> 
  119.                     <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;修改司机信息                     
  120.                       </font></td>
  121.                   </tr>
  122.                   <tr bgcolor="#fafafa"> 
  123.                     <td width="100"> 
  124.                       <font  class="strong">&nbsp;姓名</font>:
  125.                     </td>
  126.                     <td width="487"> <%= FieldUtil.filterQuotTag(dvb.getName()) %> </td>
  127.                   </tr>
  128.                   <tr bgcolor="#e0e0e0"> 
  129.                     <td width="100"> <font  class="strong">&nbsp;驾驶证号</font>: 
  130.                     </td>
  131.                     <td width="487">
  132.                       <input type="text" name="licenceNo" class="file" value="<%= FieldUtil.filterQuotTag(dvb.getLicenceNo()) %>" size="24">
  133.                       *( 注:带 * 的为必填内容) </td>
  134.                   </tr>
  135.                   <tr bgcolor="#fafafa"> 
  136.                     <td width="100"><font  class="strong">&nbsp;准驾车型:</font></td>
  137.                     <td width="487"> 
  138.                       <input type="text" name="typePermited" class="file" value="<%= FieldUtil.filterQuotTag(dvb.getTypePermited()) %>" size="6">
  139.                       * </td>
  140.                   </tr>
  141.                   <tr bgcolor="#e0e0e0"> 
  142.                     <td width="100"> 
  143.                       <font  class="strong">&nbsp;配备车辆</font>:
  144.                     </td>
  145.                     <td width="487">
  146.                       <select name="automobileId">
  147.                       <option value="-1" SELECTED > 请选择</option>
  148.                         <vnex_auto:autoList> 
  149.                           <vnex:items select='<%= dvb.getAutomobileId()+"" %>' >
  150.                             <option value="<vnex_auto:autoAttribute attribute="automobileId" />" <vnex_auto:autoAttribute attribute="isSelected" /> > 
  151.                               <vnex_auto:autoAttribute attribute="carCertNo" /> 
  152.                             </option>
  153.                           </vnex:items> 
  154.                         </vnex_auto:autoList> 
  155.                       </select>
  156.                     </td>
  157.                   </tr>
  158.                   <tr bgcolor="#fafafa"> 
  159.                     <td width="100"> <font  class="strong">&nbsp;备案地点</font>: 
  160.                     </td>
  161.                     <td width="487">
  162.                       <input type="text" name="addressIssued" class="file" value="<%= FieldUtil.filterQuotTag(dvb.getAddressIssued()) %>" size="72">
  163.                       * </td>
  164.                   </tr>
  165.                   <tr bgcolor="#e0e0e0"> 
  166.                     <td width="100"> <font  class="strong">&nbsp;领证时间</font>: 
  167.                     </td>
  168.                     <td align="left" width="487"> 
  169.                       <input type="text" name="timeIssuedS" readonly size="24" class="text" value="<%= dvb.getTimeIssuedS() %>">
  170.                       &nbsp; <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(timeIssuedS);return false;" width="16" height="16"> 
  171.                       * </td>
  172.                   </tr>
  173.                   <tr bgcolor="#fafafa"> 
  174.                     <td width="100"><font  class="strong">&nbsp;下次验证日期:</font></td>
  175.                     <td align="left" width="487"> 
  176.                       <input type="text" name="nextTimeS" readonly size="24" class="text" value="<%= dvb.getNextTimeS() %>">&nbsp;
  177.                       <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(nextTimeS);return false;" width="16" height="16"> 
  178.                     </td>
  179.                   </tr>
  180.                   <tr bgcolor="#e0e0e0"> 
  181.                     <td width="100"> 
  182.                       <font  class="strong">&nbsp;其他说明:</font></td>
  183.                     <td width="487"> 
  184.                       <textarea name="note" cols="59" rows="4"><%= FieldUtil.filterQuotTag(dvb.getNote()) %></textarea>
  185.                     </td>
  186.                   </tr>
  187.                   <tr bgcolor="#fafafa"> 
  188.                     <td colspan="2" height="30"> 
  189.                       <div align="center"> 
  190.                         <input type="button" name="Button" value="保存" class="file"  onClick="modifyDriverSuccess(this.form)">&nbsp;&nbsp;
  191.                         <input type="reset" name="Submit2" value="重置" class="file">&nbsp;&nbsp;
  192.                         <input type="button" name="Submit22" value="放弃" class="file" onClick="detailDriver(this.form)">
  193.                       </div>
  194.                     </td>
  195.                   </tr>
  196.                 </table>
  197.               </td>
  198.             </tr>
  199.           </table>          
  200.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  201.        </TD>
  202.     </TR>
  203.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  204.      </TABLE>
  205.   <BR>
  206.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  207. </form></DIV>
  208. </BODY></HTML>