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

电子政务应用

开发平台:

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. <script language="JavaScript" src="/vnex/validate.js"></script>
  8. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  9. <%
  10.     int userId = BusinessName.getEmpId();
  11.     String beginDate = "";
  12.     String beginHour = "00";
  13.     String beginMin = "00";
  14.     String beginTime = "";
  15.     String endDate = "";
  16.     String endHour = "00";
  17.     String endMin = "00";
  18.     String endTime = "";
  19.     
  20.     String ss = request.getParameter("beginHour");       
  21.     if (ss!=null)
  22.     {
  23.         beginDate = request.getParameter("beginDate");
  24.         beginHour = request.getParameter("beginHour");
  25.         beginMin = request.getParameter("beginMin");
  26.         beginTime = beginDate + " " + beginHour + ":" + beginMin + ":00";
  27.         endDate = request.getParameter("endDate");
  28.         endHour = request.getParameter("endHour");
  29.         endMin = request.getParameter("endMin");
  30.         endTime = endDate + " " + endHour + ":" + endMin + ":00";
  31.     }
  32.             
  33.     String num = request.getParameter("num");            
  34.     int personNum = 0;
  35.     if( num!= null)
  36.     {
  37.         personNum = Integer.parseInt(num);
  38.     }
  39.     
  40.     String type = request.getParameter("type");            
  41.     int autotype = 0;
  42.     
  43.     String pageTo = "/mainctrl/manage/autoBasicList?a";
  44.     
  45.     if(type!=null)
  46.     {
  47.         autotype = Integer.parseInt(type);
  48.         pageTo = pageTo + "&type="+autotype;
  49.     }
  50.     String start = request.getParameter("start");
  51.     if(  start!= null )
  52.     {
  53.         start = "&start=" + start;
  54.     }
  55.     //String queryCondition = "开始时间为 " + beginTime + " 终止时间为 " + endTime + " 所乘人数 " + personNum;
  56.     
  57. %>
  58. <HTML>
  59. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  60. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  61. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  62. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  63. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  64. <script language="JavaScript" src="/vnex/validate.js"></script>
  65. <script language=JavaScript>
  66. function addd()
  67. {
  68.   document.form1.action="/mainctrl/booking/autoBasicAdd";
  69.   document.form1.submit();
  70. }
  71. function deletee()
  72. {
  73.   document.form1.action="/mainctrl/manage/autoBasicList";
  74.   document.form1.submit();
  75. }
  76. function query()
  77. {
  78.     if(check())
  79.     {
  80.       document.form1.action="/mainctrl/booking/autoBookingList";
  81.       document.form1.submit();
  82.     }
  83. }
  84. function qMe()
  85. {
  86.   document.form1.action="/mainctrl/booking/autoBookingMe";
  87.   document.form1.submit();
  88. }
  89. function check()
  90. {
  91.     var begin = document.form1.beginDate.value;
  92.     var beginTime = begin.split("-");
  93.     beginYear = beginTime[0];
  94.     beginMonth = beginTime[1];
  95.     beginDay = beginTime[2];
  96.     beginHour = document.form1.beginHour.value;
  97.     beginMin = document.form1.beginMin.value;
  98.     begin = beginYear + beginMonth + beginDay + beginHour + beginMin;                    
  99.                     
  100.     var end = document.form1.endDate.value;
  101.     var endTime = end.split("-");    
  102.     endYear = endTime[0];
  103.     endMonth = endTime[1];
  104.     endDay = endTime[2];    
  105.     endHour = document.form1.endHour.value;
  106.     endMin = document.form1.endMin.value;
  107.     end = endYear + endMonth + endDay + endHour + endMin;
  108.     
  109.     personNum = document.form1.num.value;
  110.     
  111.     if(begin.length!=12)
  112.     {
  113.         alert("开始时间必须填写 ");
  114.         return false;        
  115.     }
  116.     if(end.length!=12)
  117.     {
  118.         alert("终止时间必须填写 ");
  119.         return false;        
  120.     }   
  121.     
  122.     if(begin >= end)
  123.     {
  124.         alert("开始时间要大于终止时间 ");
  125.         document.form1.beginDate.focus();
  126.         return false;
  127.     }
  128.     else if (!isInteger(personNum)||parseInt(personNum)<1||personNum.length<0)
  129.     {
  130.         alert("所乘人数是整数且要大于等于1 ");
  131.         document.form1.num.focus();
  132.         return false;        
  133.     }
  134.     else
  135.     {
  136.         return true;
  137.     }    
  138. }
  139. </script>
  140.   
  141. <DIV align=center>
  142. <form name="form1" method="post">
  143.    
  144.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  145.     <TBODY>
  146.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  147.     <TR> 
  148.         <TD colSpan=3 align="center"><br>
  149.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  150.             <tr bgcolor="#fafafa"> 
  151.               <td> 
  152.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  153.                   <tr> 
  154.                     <td bgcolor="#666666" colspan="6"><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;车辆预订 
  155.                       </font></td>
  156.                   </tr>
  157.                 </table>
  158.                 <table class=title cellspacing=1 cellpadding=2 width="100%" border=0>
  159.                   <tr bgcolor="#fafafa"> 
  160.                     <td width="15%"><font  class="strong">&nbsp;开始时间:</font></td>
  161.                     <td width="40%"> 
  162.                       <input type="text" name="beginDate" readonly size="10" class="text" value="<%=beginDate%>">
  163.                       <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(beginDate);return false;" width="16" height="16"> 
  164.                       <select name="beginHour">
  165.                         <option value="00" <%if (beginHour.equals("00")) out.print("selected");%>>0 时</option>
  166.                         <option value="01" <%if (beginHour.equals("01")) out.print("selected");%>>1 时</option>
  167.                         <option value="02" <%if (beginHour.equals("02")) out.print("selected");%>>2 时</option>
  168.                         <option value="03" <%if (beginHour.equals("03")) out.print("selected");%>>3 时</option>
  169.                         <option value="04" <%if (beginHour.equals("04")) out.print("selected");%>>4 时</option>
  170.                         <option value="05" <%if (beginHour.equals("05")) out.print("selected");%>>5 时</option>
  171.                         <option value="06" <%if (beginHour.equals("06")) out.print("selected");%>>6 时</option>
  172.                         <option value="07" <%if (beginHour.equals("07")) out.print("selected");%>>7 时</option>
  173.                         <option value="08" <%if (beginHour.equals("08")) out.print("selected");%>>8 时</option>
  174.                         <option value="09" <%if (beginHour.equals("09")) out.print("selected");%>>9 时</option>
  175.                         <option value="10" <%if (beginHour.equals("10")) out.print("selected");%>>10时</option>
  176.                         <option value="11" <%if (beginHour.equals("11")) out.print("selected");%>>11时</option>
  177.                         <option value="12" <%if (beginHour.equals("12")) out.print("selected");%>>12时</option>
  178.                         <option value="13" <%if (beginHour.equals("13")) out.print("selected");%>>13时</option>
  179.                         <option value="14" <%if (beginHour.equals("14")) out.print("selected");%>>14时</option>
  180.                         <option value="15" <%if (beginHour.equals("15")) out.print("selected");%>>15时</option>
  181.                         <option value="16" <%if (beginHour.equals("16")) out.print("selected");%>>16时</option>
  182.                         <option value="17" <%if (beginHour.equals("17")) out.print("selected");%>>17时</option>
  183.                         <option value="18" <%if (beginHour.equals("18")) out.print("selected");%>>18时</option>
  184.                         <option value="19" <%if (beginHour.equals("19")) out.print("selected");%>>19时</option>
  185.                         <option value="20" <%if (beginHour.equals("20")) out.print("selected");%>>20时</option>
  186.                         <option value="21" <%if (beginHour.equals("21")) out.print("selected");%>>21时</option>
  187.                         <option value="22" <%if (beginHour.equals("22")) out.print("selected");%>>22时</option>
  188.                         <option value="23" <%if (beginHour.equals("23")) out.print("selected");%>>23时</option>
  189.                       </select>
  190.                       <select name="beginMin">
  191.                         <option value="00" <%if (beginMin.equals("00")) out.print("selected");%>>00分</option>
  192.                         <option value="15" <%if (beginMin.equals("15")) out.print("selected");%>>15分</option>
  193.                         <option value="30" <%if (beginMin.equals("30")) out.print("selected");%>>30分</option>
  194.                         <option value="45" <%if (beginMin.equals("45")) out.print("selected");%>>45分</option>
  195.                       </select>
  196.                     </td>
  197.                     <td width="15%"><font  class="strong">车型:</font></td>
  198.                     <td width="30%"> 
  199.                       <select size="1" name="type" value="0" style="width=80">
  200. <%                    
  201.                         Hashtable hash = VehicleLoader.getAllAutomobileType();
  202.                         Enumeration enum = hash.keys();
  203.                         
  204.                         if(enum != null)
  205.                         {
  206.                             while(enum.hasMoreElements())
  207.                             {
  208.                                 String key = (String)enum.nextElement();
  209.                                 String s = (String)hash.get(key);
  210.                                 if (key.equals(type))
  211.                                 {
  212. %>                          
  213.                     <option value="<%= key%>" selected><%= s%>
  214. <%}
  215. else
  216. {%>                    
  217.                     <option value="<%= key%>"><%= s%>
  218. <%}}}%>                    
  219.                     </select>
  220.                     </td>                    
  221.                   
  222.                   </tr>
  223.                   <tr bgcolor="#e0e0e0"> 
  224.                     <td width="15%"><font  class="strong">&nbsp;终止时间:</font></td>
  225.                     <td width="40%" > 
  226.                       <input type="text" name="endDate" readonly size="10" class="text" value="<%=endDate%>">
  227.                       <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(endDate);return false;" width="16" height="16"> 
  228.                       <select name="endHour" >
  229.                         <option value="00" <%if (endHour.equals("00")) out.print("selected");%>>0 时</option>
  230.                         <option value="01" <%if (endHour.equals("01")) out.print("selected");%>>1 时</option>
  231.                         <option value="02" <%if (endHour.equals("02")) out.print("selected");%>>2 时</option>
  232.                         <option value="03" <%if (endHour.equals("03")) out.print("selected");%>>3 时</option>
  233.                         <option value="04" <%if (endHour.equals("04")) out.print("selected");%>>4 时</option>
  234.                         <option value="05" <%if (endHour.equals("05")) out.print("selected");%>>5 时</option>
  235.                         <option value="06" <%if (endHour.equals("06")) out.print("selected");%>>6 时</option>
  236.                         <option value="07" <%if (endHour.equals("07")) out.print("selected");%>>7 时</option>
  237.                         <option value="08" <%if (endHour.equals("08")) out.print("selected");%>>8 时</option>
  238.                         <option value="09" <%if (endHour.equals("09")) out.print("selected");%>>9 时</option>
  239.                         <option value="10" <%if (endHour.equals("10")) out.print("selected");%>>10时</option>
  240.                         <option value="11" <%if (endHour.equals("11")) out.print("selected");%>>11时</option>
  241.                         <option value="12" <%if (endHour.equals("12")) out.print("selected");%>>12时</option>
  242.                         <option value="13" <%if (endHour.equals("13")) out.print("selected");%>>13时</option>
  243.                         <option value="14" <%if (endHour.equals("14")) out.print("selected");%>>14时</option>
  244.                         <option value="15" <%if (endHour.equals("15")) out.print("selected");%>>15时</option>
  245.                         <option value="16" <%if (endHour.equals("16")) out.print("selected");%>>16时</option>
  246.                         <option value="17" <%if (endHour.equals("17")) out.print("selected");%>>17时</option>
  247.                         <option value="18" <%if (endHour.equals("18")) out.print("selected");%>>18时</option>
  248.                         <option value="19" <%if (endHour.equals("19")) out.print("selected");%>>19时</option>
  249.                         <option value="20" <%if (endHour.equals("20")) out.print("selected");%>>20时</option>
  250.                         <option value="21" <%if (endHour.equals("21")) out.print("selected");%>>21时</option>
  251.                         <option value="22" <%if (endHour.equals("22")) out.print("selected");%>>22时</option>
  252.                         <option value="23" <%if (endHour.equals("23")) out.print("selected");%>>23时</option>
  253.                       </select>
  254.                       <select name="endMin">
  255.                         <option value="00" <%if (endMin.equals("00")) out.print("selected");%>>00分</option>
  256.                         <option value="15" <%if (endMin.equals("15")) out.print("selected");%>>15分</option>
  257.                         <option value="30" <%if (endMin.equals("30")) out.print("selected");%>>30分</option>
  258.                         <option value="45" <%if (endMin.equals("45")) out.print("selected");%>>45分</option>
  259.                       </select>
  260.                     </td>
  261.                     <td width="15%"><font  class="strong">所乘人数:</font></td>
  262.                     <td width="25%"> 
  263.                       <input type="text" name="num" size="12" class="text" value=<%=personNum%>>
  264.                     </td>
  265.                   </tr>
  266.                 </table>
  267.                 <table class=title cellspacing=1 cellpadding=2 width="100%" border=0>
  268.                   <tr bgcolor="#fafafa">
  269.                     <td colspan="7">&nbsp; 
  270.   <input type="button" name="Button3222" value="查询" class="file" onClick="query()">
  271.   &nbsp;&nbsp;
  272.   <input type="button" name="queryMe" value="我的预订" class="file" onClick="qMe()" style="width:60px">
  273.                     </td>
  274.                   </tr>
  275. <%
  276. if (!beginDate.equals(""))
  277. {
  278. %>                  <tr align=middle> 
  279.                     <td width="15%"><font  class="strong">车牌号</font></td>
  280.                     <td width="15%"><font  class="strong">车辆类型</font></td>
  281.                     <td width="15%"><font  class="strong">核定载客</font></td>
  282.                     <td width="15%"><font  class="strong">厂牌</font></td>
  283.                     <td><font  class="strong">型号</font></td>
  284.                   </tr>
  285. <vnex_automobile:automobileBookingList employeeId="<%=userId%>" autoType="<%=autotype%>" beginTime="<%=beginTime%>" endTime="<%=endTime%>" personNum="<%=personNum%>">
  286.                   <vnex:items paging="true">      
  287. <tr bgcolor="<vnex:itemsColor/>" align="center">                   
  288.                     <td width="15%" height="26">
  289.                         <a href="/mainctrl/booking/autoBookingAdd?beginTime=<%=beginTime%>&endTime=<%=endTime%>&employeeId=<%=userId%>&personNum=<%=personNum%>&automobileId=<vnex_automobile:automobileManageAttribute attribute = "automobileId"/><%= start %>">
  290.                         <vnex_automobile:automobileManageAttribute attribute = "carCertNo"/>
  291.                         </a>
  292.                     </td>
  293.                     <td width="15%" height="26">
  294.                         <vnex_automobile:automobileManageAttribute attribute = "typeName"/>
  295.                     </td>
  296.                     <td width="15%" height="26">
  297.                         <vnex_automobile:automobileManageAttribute attribute = "passengerNum"/>
  298.                     </td>
  299.                     <td width="15%" height="26">
  300.                         <vnex_automobile:automobileManageAttribute attribute = "brand"/>
  301.                     </td>
  302.                     <td colspan="3" height="26">
  303.                         <vnex_automobile:automobileManageAttribute attribute = "carType"/>
  304.                     </td>
  305.                   </tr>
  306.                   </vnex:items>                                   
  307.                   <tr align=center bgcolor="#fafafa"> 
  308.                     <td colspan="7" align="left">&nbsp;
  309.                         <vnex:pagingTag pageName="<%=pageTo%>" /> 
  310.                     </td>
  311.                   </tr>
  312. </vnex_automobile:automobileBookingList>  
  313. <%
  314. }
  315. %>                  
  316.                 </table>
  317.               </td>
  318.             </tr>
  319.           </table>
  320.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  321.        </TD>
  322.      </TR>
  323.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  324.     </TBODY> 
  325.   </TABLE>
  326.     <BR>
  327.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  328. </form>
  329. </DIV>
  330. </BODY>
  331. </HTML>