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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  3. <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
  4. <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_auto" %>
  5. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  6. <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
  7. <%@ page import="java.util.*"%>
  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="dvb" class="com.vnex.intranet.vehicle.driver.value.DriverValueBean" scope="page" /> 
  11. <jsp:setProperty name="dvb" property="*" />
  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">
  21. function change(select)
  22. {
  23. myform.action="/mainctrl/driver/addDriver";
  24. myform.submit();
  25. }
  26. function addDriver(form)
  27. {
  28.     if(checkIt(form))
  29.     {
  30.     form.action="/mainctrl/driver/addDriverSuccess";
  31.      form.submit();
  32.     }
  33. }
  34. function checkIt(form)
  35. {
  36.     if( form.empId.value == -1 )
  37.     {
  38.         alert("请选择司机");
  39.         form.empId.focus();
  40.         return false;
  41.     }
  42.     if(isEmpty(form.licenceNo.value) || isEmptyStr(form.licenceNo.value))
  43.     {
  44.         alert("请输入司机驾驶证号");
  45.         form.licenceNo.focus();
  46.         return false;
  47.     }
  48.     if(isInvalidateLen(form.licenceNo.value,100))
  49.     {
  50.         alert("司机驾驶证号不能超过25个汉字或100个英文字符");
  51.         form.licenceNo.focus();
  52.         return false;
  53.     }    
  54.     if(isEmpty(form.typePermited.value) || isEmptyStr(form.typePermited.value))
  55.     {
  56.         alert("请输入司机准驾车型");
  57.         form.typePermited.focus();
  58.         return false;
  59.     }
  60.     if(isInvalidateLen(form.typePermited.value,100))
  61.     {
  62.         alert("司机准驾车型不能超过25个汉字或100个英文字符");
  63.         form.typePermited.focus();
  64.         return false;
  65.     }    
  66.     if( form.automobileId.options.length < 1 )
  67.     {
  68.         alert("请选择车辆");
  69.         form.automobileId.focus();
  70.         return false;
  71.     }    
  72.     if(isEmpty(form.addressIssued.value) || isEmptyStr(form.addressIssued.value))
  73.     {
  74.         alert("请输入司机备案地点");
  75.         form.addressIssued.focus();
  76.         return false;
  77.     }
  78.     if(isInvalidateLen(form.addressIssued.value,100))
  79.     {
  80.         alert("司机备案地点不能超过25个汉字或100个英文字符");
  81.         form.addressIssued.focus();
  82.         return false;
  83.     }    
  84.     if(isEmpty(form.timeIssuedS.value) || isEmptyStr(form.timeIssuedS.value))
  85.     {
  86.         alert("请输入司机领证时间");
  87.         form.timeIssuedS.focus();
  88.         return false;
  89.     }
  90.     if( !isEmpty(form.nextTimeS.value) && !isEmptyStr(form.nextTimeS.value) )
  91.     {
  92.         if( form.timeIssuedS.value >= form.nextTimeS.value )
  93.         {
  94.             alert("下次验证时间应晚于领证时间");
  95.             form.timeIssuedS.focus();
  96.             return false;
  97.         }     
  98.     }
  99.     if(isInvalidateLen(form.note.value, 800))
  100.     {
  101.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  102.         form.note.focus();
  103.         return false;
  104.     }    
  105.     return true;
  106. }
  107. </script>
  108. <DIV align=center>
  109. <form name="myform" method="post" action="">
  110.    
  111.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  112.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  113.     <TR> 
  114.         <TD colSpan=3 align="center"><br>
  115.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  116.             <tr bgcolor="#fafafa"> 
  117.               <td> 
  118.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  119.                   <tr bgcolor="#666666">
  120.                     <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;增加司机                    
  121.                     </font></td>
  122.                   </tr>
  123.                   <tr bgcolor="#fafafa"> 
  124.                     <td width="100"> <font  class="strong">&nbsp;姓名</font>: </td>
  125.                     <td width="463"> 
  126.                       <select name="depId" class=choice onChange=change(this)>
  127.                         <org:DivisionList>
  128.                           <vnex:items select='<%= dvb.getDepId()+"" %>' >
  129.                           <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
  130.                             <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
  131.                           </option>
  132.                           </vnex:items>
  133.                         </org:DivisionList>
  134.                       </select>
  135.                       
  136.                       <select name="empId">   
  137.                         <option value=-1>请选择</option>              
  138.                         <hr:EmployeeList divisionId='<%= dvb.getDepId()%>'>             
  139.                     <vnex:items select ='<%= dvb.getEmpId()+""%>'>
  140.                       <option value="<hr:EmployeeAttribute attribute="id" />" <hr:EmployeeAttribute attribute="isSelected"/> >
  141.                         <hr:EmployeeAttribute attribute='<%= null %>' />
  142.                       </option>
  143.                     </vnex:items>            
  144.                  </hr:EmployeeList>
  145.                </select>
  146.                       &nbsp;*&nbsp;( 注:带 * 的为必填内容) </td>
  147.                   </tr>
  148.                   <tr bgcolor="#e0e0e0"> 
  149.                     <td width="100"> <font  class="strong">&nbsp;驾驶证号</font>: 
  150.                     </td>
  151.                     <td width="487">
  152.                       <input type="text" name="licenceNo" class="file" size="24">
  153.                       * </td>
  154.                   </tr>
  155.                   <tr bgcolor="#fafafa"> 
  156.                     <td width="100"><font  class="strong">&nbsp;准驾车型:</font></td>
  157.                     <td width="487">
  158.                       <input type="text" name="typePermited" class="file" size="6">
  159.                       * </td>
  160.                   </tr>
  161.                   <tr bgcolor="#e0e0e0"> 
  162.                     <td width="100"> 
  163.                       <font  class="strong">&nbsp;配备车辆</font>:
  164.                     </td>
  165.                     <td width="487">
  166.                       <select name="automobileId">
  167.                        <option value="-1" SELECTED > 请选择</option>
  168.                         <vnex_auto:autoList> 
  169.                           <vnex:items select='<%= dvb.getAutomobileId()+"" %>' >
  170.                             <option value="<vnex_auto:autoAttribute attribute="automobileId" />" <vnex_auto:autoAttribute attribute="isSelected" /> > 
  171.                               <vnex_auto:autoAttribute attribute="carCertNo" /> 
  172.                             </option>
  173.                           </vnex:items> 
  174.                         </vnex_auto:autoList> 
  175.                       </select>
  176.                     </td>
  177.                   </tr>
  178.                   <tr bgcolor="#fafafa"> 
  179.                     <td width="100"> <font  class="strong">&nbsp;备案地点</font>: 
  180.                     </td>
  181.                     <td width="487">
  182.                       <input type="text" name="addressIssued" class="file" size="72">
  183.                       * </td>
  184.                   </tr>
  185.                   <tr bgcolor="#e0e0e0"> 
  186.                     <td width="100"> <font  class="strong">&nbsp;领证时间</font>: 
  187.                     </td>
  188.                     <td align="left" width="487"> 
  189.                       <input type="text" name="timeIssuedS" readonly size="24" class="text">
  190.                       &nbsp; <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(timeIssuedS);return false;" width="16" height="16"> 
  191.                       * </td>
  192.                   </tr>
  193.                   <tr bgcolor="#fafafa"> 
  194.                     <td width="100"><font  class="strong">&nbsp;下次验证日期:</font></td>
  195.                     <td align="left" width="487"> 
  196.                       <input type="text" name="nextTimeS" readonly size="24" class="text">&nbsp;
  197.                       <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(nextTimeS);return false;" width="16" height="16"> 
  198.                     </td>
  199.                   </tr>
  200.                   <tr bgcolor="#e0e0e0"> 
  201.                     <td width="100"> 
  202.                        <font  class="strong">&nbsp;其他说明:</font></td>
  203.                     <td width="487"> 
  204.                       <textarea name="note" cols="59" rows="4"></textarea>
  205.                     </td>
  206.                   </tr>
  207.                   <tr bgcolor="#fafafa"> 
  208.                     <td colspan="2" height="30"> 
  209.                       <div align="center"> 
  210.                         <input type="button" name="Button" value="保存" class="file"  onClick="addDriver(this.form)">&nbsp;&nbsp;
  211.                         <input type="reset" name="Submit22" value="重置" class="file">&nbsp;&nbsp;
  212.                         <input type="button" name="Submit2" value="放弃" class="file" onClick="location='/mainctrl/driver/listDriver'">
  213.                       </div>
  214.                     </td>
  215.                   </tr>
  216.                 </table>
  217.               </td>
  218.             </tr>
  219.           </table>            
  220.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  221.         </TD>
  222.     </TR>
  223.     <TR> 
  224.       <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  225.    </TABLE>
  226.   <BR>
  227.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  228. </form></DIV>
  229. </BODY></HTML>