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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_vehicle_driver.tld" prefix="vnex_driver" %>
  3. <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_auto" %>
  4. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  5. <%@ page import="com.vnex.intranet.pub.BusinessSession"%>
  6. <%@ page import="java.util.*"%>
  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="condition" scope="page" class="com.vnex.intranet.vehicle.driver.value.DriverQryBean" />
  10. <%          
  11.     condition.setDriverName( "" );        
  12. %>
  13. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  14. <HTML>
  15. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  16. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  17. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  18. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  19. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  20. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  21. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  22. <script language="JavaScript">
  23. function change(select)
  24. {
  25. myform.action="/mainctrl/driver/addDriver";
  26. myform.submit();
  27. }
  28. function addWorkRecordSuccess(form)
  29. {
  30.     if(checkIt(form))
  31.     {
  32.     form.action="/mainctrl/driver/addWorkRecordSuccess";
  33.     form.submit();
  34. }
  35. }
  36. function listWorkRecord(form)
  37. {
  38. form.action="/mainctrl/driver/listWorkRecord";
  39. form.submit();
  40. }
  41. function checkIt(form)
  42. {    
  43.     if(isEmpty(form.dateS.value) || isEmptyStr(form.dateS.value))
  44.     {
  45.         alert("请输入出车日期");
  46.         form.dateS.focus();
  47.         return false;
  48.     }
  49.     if( form.empId.options.length < 1 || form.empId.options.value == -1 )
  50.     {
  51.         alert("请选择司机");
  52.         form.empId.focus();
  53.         return false;
  54.     }
  55.     if( form.automobileId.options.length < 1 || form.automobileId.options.value ==-1)
  56.     {
  57.         alert("请选择车辆");
  58.         form.automobileId.focus();
  59.         return false;
  60.     }
  61.     if(isEmpty(form.boater.value) || isEmptyStr(form.boater.value))
  62.     {
  63.         alert("请输入乘车人");
  64.         form.boater.focus();
  65.         return false;
  66.     }
  67.     if(isInvalidateLen(form.boater.value,100))
  68.     {
  69.         alert("乘车人不能超过25个汉字或100个英文字符");
  70.         form.boater.focus();
  71.         return false;
  72.     }    
  73.     if(isInvalidateLen(form.reason.value,100))
  74.     {
  75.         alert("用车事由不能超过25个汉字或100个英文字符");
  76.         form.reason.focus();
  77.         return false;
  78.     }    
  79.     if(isEmpty(form.site.value) || isEmptyStr(form.site.value))
  80.     {
  81.         alert("请输入行驶地点");
  82.         form.site.focus();
  83.         return false;
  84.     }   
  85.     if(isInvalidateLen(form.site.value,100))
  86.     {
  87.         alert("行驶地点不能超过25个汉字或100个英文字符");
  88.         form.site.focus();
  89.         return false;
  90.     }    
  91.     if( ( form.beginHourS.value + form.beginMinuteS.value ) >= ( form.endHourS.value + form.endMinuteS.value ) )
  92.     {
  93.         alert("收车时间应该大于出车时间");
  94.         form.beginHourS.focus();
  95.         return false;
  96.     }
  97.     if(isInvalidateLen(form.sender.value,100))
  98.     {
  99.         alert("派车人不能超过25个汉字或100个英文字符");
  100.         form.sender.focus();
  101.         return false;
  102.     }    
  103.     if(isInvalidateLen(form.note.value, 800))
  104.     {
  105.         alert("你的说明过长了,它只能容纳200个汉字或800个英文字符");
  106.         return false;
  107.     }    
  108.     return true;
  109. }
  110. </script>
  111. <DIV align=center>
  112. <form name="myform" method="post" action="">
  113.    
  114.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  115.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  116.     <TR> 
  117.         <TD colSpan=3 align="center"><br>  
  118.           <!--个人信息开始 -->
  119.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  120.             <tr bgcolor="#fafafa"> 
  121.               <td> 
  122.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  123.                   <tr>
  124.                     <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/listWorkRecord"><font color="#FFFFFF">车辆出勤登记</font></a>&gt;&gt;增加车辆出勤记录                    
  125.                       </font></td>
  126.                   </tr>
  127.                   <tr bgcolor="#fafafa"> 
  128.                     <td width="100"> <font  class="strong">&nbsp;日期</font>: </td>
  129.                     <td align="left" width="461"> 
  130.                       <input type="text" name="dateS" readonly size="24" class="text">
  131.                       &nbsp; <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(dateS);return false;" width="16" height="16"> 
  132.                        &nbsp;* &nbsp;( 注:带 * 的为必填内容) </td>
  133.                   </tr>
  134.                   <tr bgcolor="#e0e0e0"> 
  135.                     <td width="100"> <font  class="strong">&nbsp;司机</font>: </td>
  136.                     <td width="461">
  137.                       <select name="empId">
  138.                        <option value="-1" SELECTED > 请选择</option>
  139.                         <vnex_driver:driverList condition="<%= condition %>">   
  140.                           <vnex:items>
  141.                             <option value="<vnex_driver:driverAttribute attribute="id" />" > 
  142.                               <vnex_driver:driverAttribute attribute="name" /> 
  143.                             </option>
  144.                           </vnex:items> 
  145.                         </vnex_driver:driverList> 
  146.                       </select>
  147.                       * </td>
  148.                   </tr>
  149.                   <tr bgcolor="#fafafa"> 
  150.                     <td width="100"><font  class="strong">&nbsp;车辆:</font></td>
  151.                     <td width="487">
  152.                       <select name="automobileId">
  153.                      <option value="-1" SELECTED > 请选择</option>
  154.                         <vnex_auto:autoList> 
  155.                           <vnex:items>
  156.                             <option value="<vnex_auto:autoAttribute attribute="automobileId" />" <vnex_auto:autoAttribute attribute="isSelected" /> > 
  157.                               <vnex_auto:autoAttribute attribute="carCertNo" /> 
  158.                             </option>
  159.                           </vnex:items> 
  160.                         </vnex_auto:autoList> 
  161.                       </select>
  162.                       * </td>
  163.                   </tr>
  164.                   <tr bgcolor="#e0e0e0"> 
  165.                     <td width="100"> <font  class="strong">&nbsp;乘车人</font>: </td>
  166.                     <td width="461">
  167.                       <input type="text" name="boater" class="file" size="24">
  168.                       *&nbsp; </td>
  169.                   </tr>
  170.                   <tr bgcolor="#fafafa"> 
  171.                     <td width="100"> <font  class="strong">&nbsp;用车事由</font>: 
  172.                     </td>
  173.                     <td align="left" width="461"> 
  174.                       <input type="text" name="reason" class="file" size="24">
  175.                       </td>
  176.                   </tr>
  177.                   <tr bgcolor="#e0e0e0"> 
  178.                     <td width="100"><font  class="strong">&nbsp;行驶地点:</font></td>
  179.                     <td align="left" width="461"> 
  180.                       <input type="text" name="site" class="file" size="24">
  181.                       * </td>
  182.                   </tr>
  183.                   <tr bgcolor="#fafafa"> 
  184.                     <td width="100"> <font  class="strong">&nbsp;出发时间</font>: 
  185.                     </td>
  186.                     <td align="left" width="461"> 
  187.                       <select name="beginHourS">
  188.                         <vnex:hourTag />
  189.                       </select>时
  190.                       <select name="beginMinuteS">
  191.                         <vnex:minuteTag />
  192.                       </select>
  193.                       分 * </td>
  194.                   </tr>
  195.                   <tr bgcolor="#e0e0e0"> 
  196.                     <td width="100"><font  class="strong">&nbsp;收车时间:</font></td>
  197.                     <td align="left" width="461"> 
  198.                       <select name="endHourS">
  199.                         <vnex:hourTag />
  200.                       </select>时
  201.                       <select name="endMinuteS">
  202.                         <vnex:minuteTag />
  203.                       </select>
  204.                       分 * </td>
  205.                   </tr>
  206.                   <tr bgcolor="#fafafa"> 
  207.                     <td width="100"> <font  class="strong">&nbsp;派车人</font>: </td>
  208.                     <td align="left" width="461">
  209.                       <input type="text" name="sender" class="file" size="24">&nbsp;                      
  210.                     </td>
  211.                   </tr>
  212.                   <tr bgcolor="#e0e0e0"> 
  213.                     <td width="100"> <font  class="strong">&nbsp;备注:</font></td>
  214.                     <td width="461"> 
  215.                       <textarea name="note" cols="59" rows="4"></textarea>
  216.                     </td>
  217.                   </tr>
  218.                   <tr bgcolor="#fafafa" align="center"> 
  219.                     <td colspan="2" height="30"> 
  220.                       <input type="button" name="Button" value="保存" class="file"  onClick="addWorkRecordSuccess(this.form)">&nbsp;&nbsp; 
  221.                         <input type="reset" name="Submit2" value="重置" class="file">&nbsp;&nbsp;
  222.                         <input type="button" name="Submit22" value="放弃" class="file" onClick="listWorkRecord(this.form)">
  223.                     </td>
  224.                   </tr>
  225.                 </table>
  226.               </td>
  227.             </tr>
  228.           </table>          
  229.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  230.        </TD>
  231.     </TR>
  232.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  233.      </TABLE>
  234.   <BR>
  235.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  236. </form></DIV>
  237. </BODY></HTML>