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

电子政务应用

开发平台:

Java

  1. <%@jsp:include file="/vnex/head.jsp"%>
  2. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="com.vnex.intranet.vehicle.loader.*" %>
  5. <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_automobile" %>
  6. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  7. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  8. <%
  9.     int userId = BusinessName.getEmpId();
  10.     
  11.     String beginTime = request.getParameter("beginTime");
  12.     String endTime = request.getParameter("endTime");
  13.     String personNum = request.getParameter("personNum");
  14.     int automobileId = Integer.parseInt(request.getParameter("automobileId"));    
  15.     String start = request.getParameter("start");
  16.     if(  start!= null )
  17.     {
  18.         //start = start;
  19.         start = "1";
  20.     }
  21. %>
  22. <script language=JavaScript>
  23. function checkChar(str)
  24. {
  25.     var i,j,strTemp;
  26.     strTemp=""<>/\'%&";
  27.     for (i=0;i<str.length;i++)
  28.     {
  29.       j=strTemp.indexOf(str.charAt(i));
  30.       if (j!=-1)
  31.       {
  32.         return false;
  33.       }
  34.     }
  35.     return true;
  36. }
  37. function save()
  38. {
  39.     if (check())
  40.     {
  41.         document.form1.action="/mainctrl/booking/autoBookingAddSave";
  42.         document.form1.submit();
  43.     }
  44. }
  45. function cancel()
  46. {
  47.   document.form1.action="/mainctrl/booking/autoBookingList?start=1";
  48.   document.form1.submit();
  49. }
  50. function check()
  51. {
  52.     if (document.form1.reason.value.length <= 0||isWhitespace(document.form1.reason.value))
  53.     {
  54.         alert("理由字段必须输入 ");
  55.         document.form1.reason.focus();
  56.         return false;        
  57.     }
  58. /*        
  59.     if(!checkChar(document.form1.reason.value))
  60.     {
  61.         alert("请不要在理由中加入"<>/\'%&这样的字符");
  62.         document.form1.reason.focus();
  63.         return false;
  64.     }    
  65. */    
  66.     if (document.form1.route.value.length <= 0||isWhitespace(document.form1.route.value))
  67.     {
  68.         alert("路线字段必须输入 ");
  69.         document.form1.route.focus();        
  70.         return false;        
  71.     }
  72. /*    
  73.     if(!checkChar(document.form1.route.value))
  74.     {
  75.         alert("请不要在路线中加入"<>/\'%&这样的字符");
  76.         document.form1.route.focus();
  77.         return false;
  78.     }
  79. */            
  80.     if (document.form1.note.value.length > 50)
  81.     {
  82.         alert("备注字段长度要小于50个字母 ");
  83.         document.form1.note.focus();                
  84.         return false;        
  85.     }
  86. /*    
  87.     if(!checkChar(document.form1.note.value))
  88.     {
  89.         alert("请不要在备注中加入"<>/\'%&这样的字符");
  90.         document.form1.note.focus();
  91.         return false;
  92.     }    
  93. */
  94.     
  95.     return true;    
  96. }
  97. </script>
  98. <HTML>
  99. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  100. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  101. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  102. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  103. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  104. <script language="JavaScript" src="/vnex/validate.js"></script>
  105. <DIV align=center>
  106.   <form name="form1" method="post">
  107.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  108.     <TBODY>
  109.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  110.     <TR>
  111.         <TD colSpan=3 align="center"><br>
  112.            <!--个人信息开始 -->
  113.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  114.             <tr bgcolor="#fafafa"> 
  115.               <td> 
  116.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  117.                   <tr> 
  118.                     <td colspan="2" height="14" bgcolor="#666666"><font class="strongw">&nbsp;<a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;<a href="/mainctrl/booking/autoBookingList"><font color="#FFFFFF">车辆预订</font></a>&gt;&gt;添加预订信息 
  119.                       </font></td>
  120.                   </tr>
  121.                   <tr> 
  122.                     <input type="hidden" name="automobileId" value="<%=automobileId%>">                  
  123.                     <input type="hidden" name="personNum" value="<%=personNum%>">
  124.                     <input type="hidden" name="userId" value="<%=userId%>">
  125.                   </tr>
  126.                   <tr> 
  127.                     <td width="125" bgcolor="#e0e0e0"><font  class="strong">&nbsp;开始时间: 
  128.                       </font></td>
  129.                     <td width="469" bgcolor="#e0e0e0">
  130.                       <input type="hidden" name="beginDate" value="<%=beginTime%>">
  131.                     <%=beginTime%>
  132.                     </td>
  133.                   </tr>
  134.                   <tr> 
  135.                     <td width="125" bgcolor="#fafafa"><font  class="strong">&nbsp;终止时间: 
  136.                       </font></td>
  137.                     <td width="469" bgcolor="#fafafa">
  138.                       <input type="hidden" name="endDate" value="<%=endTime%>">
  139.                     <%=endTime%>
  140.                      </td>
  141.                   </tr>
  142.                   <tr> 
  143.                     <td width="125" bgcolor="#e0e0e0"><font  class="strong"> </font><font class="strong" >&nbsp;乘车人数:</font></td>
  144.                     <td width="469" bgcolor="#e0e0e0"> 
  145.                       <input type="hidden" name="endTime" value="<%=personNum%>">
  146.                     <%=personNum%>
  147.                     </td>
  148.                   </tr>
  149.                   <tr> 
  150.                     <td width="125" bgcolor="#fafafa"><font  class="strong">&nbsp;带司机:</font></td>
  151.                     <td width="469" bgcolor="#fafafa">
  152.                       <input type="checkbox" name="hasDriver" value="1" checked>
  153.                     </td>
  154.                   </tr>
  155.                   <tr> 
  156.                     <td width="125" bgcolor="#e0e0e0"><font  class="strong">&nbsp;理由:</font></td>
  157.                     <td width="469" bgcolor="#e0e0e0"> 
  158.                       <input type="text" name="reason" size="30" class=text maxlength="30">
  159.                       &nbsp;* (注:带*为必填内容) </td>
  160.                   </tr>
  161.                   <tr> 
  162.                     <td width="125" bgcolor="#fafafa"><font class="strong" >&nbsp;路线:</font></td>
  163.                     <td width="469" bgcolor="#fafafa"> 
  164.                       <input type="text" name="route" size="30" class=text maxlength="30">
  165.                       &nbsp;*
  166.                     </td>
  167.                   </tr>
  168.                   <tr> 
  169.                     <td width="125" bgcolor="#e0e0e0"><font  class="strong">&nbsp;备注:</font></td>
  170.                     <td width="469" bgcolor="#e0e0e0"> 
  171.                       <textarea name="note" class=text cols="24" rows="6"></textarea>
  172.                     </td>
  173.                   </tr>
  174.                   <tr align="center" bgcolor="#fafafa"> 
  175.                     <td colspan="2" height="30"> 
  176.                       <input type="button" name="Submit22" value="保存" class="file" onClick="save()">
  177.                       &nbsp;&nbsp; 
  178.                       <input type="reset" name="Submit223" value="重置" class="file">
  179.                       &nbsp;&nbsp; 
  180.                       <input type="button" name="Submit222" value="放弃" class="file" onClick="cancel()">
  181.                     </td>
  182.                   </tr>
  183.                 </table>
  184.               </td>
  185.             </tr>
  186.           </table>
  187.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  188.        </TD>
  189.      </TR>
  190.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  191.     </TBODY> 
  192.   </TABLE>
  193.     <BR>
  194.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  195. </form>
  196. </DIV>
  197. </BODY>
  198. </HTML>