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

电子政务应用

开发平台:

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