auto_booking_list.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:17k
源码类别:
电子政务应用
开发平台:
Java
- <%@jsp:include file="/vnex/head.jsp"%>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.*" %>
- <%@ page import="com.vnex.intranet.vehicle.loader.*" %>
- <%@ taglib uri="/vnex_vehicle_automobile.tld" prefix="vnex_automobile" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <%
- int userId = BusinessName.getEmpId();
- String beginDate = "";
- String beginHour = "00";
- String beginMin = "00";
- String beginTime = "";
- String endDate = "";
- String endHour = "00";
- String endMin = "00";
- String endTime = "";
- String ss = request.getParameter("beginHour");
- if (ss!=null)
- {
- beginDate = request.getParameter("beginDate");
- beginHour = request.getParameter("beginHour");
- beginMin = request.getParameter("beginMin");
- beginTime = beginDate + " " + beginHour + ":" + beginMin + ":00";
- endDate = request.getParameter("endDate");
- endHour = request.getParameter("endHour");
- endMin = request.getParameter("endMin");
- endTime = endDate + " " + endHour + ":" + endMin + ":00";
- }
- String num = request.getParameter("num");
- int personNum = 0;
- if( num!= null)
- {
- personNum = Integer.parseInt(num);
- }
- String type = request.getParameter("type");
- int autotype = 0;
- String pageTo = "/mainctrl/manage/autoBasicList?a";
- if(type!=null)
- {
- autotype = Integer.parseInt(type);
- pageTo = pageTo + "&type="+autotype;
- }
- String start = request.getParameter("start");
- if( start!= null )
- {
- start = "&start=" + start;
- }
- //String queryCondition = "开始时间为 " + beginTime + " 终止时间为 " + endTime + " 所乘人数 " + personNum;
- %>
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language=JavaScript>
- function addd()
- {
- document.form1.action="/mainctrl/booking/autoBasicAdd";
- document.form1.submit();
- }
- function deletee()
- {
- document.form1.action="/mainctrl/manage/autoBasicList";
- document.form1.submit();
- }
- function query()
- {
- if(check())
- {
- document.form1.action="/mainctrl/booking/autoBookingList";
- document.form1.submit();
- }
- }
- function qMe()
- {
- document.form1.action="/mainctrl/booking/autoBookingMe";
- document.form1.submit();
- }
- function check()
- {
- var begin = document.form1.beginDate.value;
- var beginTime = begin.split("-");
- beginYear = beginTime[0];
- beginMonth = beginTime[1];
- beginDay = beginTime[2];
- beginHour = document.form1.beginHour.value;
- beginMin = document.form1.beginMin.value;
- begin = beginYear + beginMonth + beginDay + beginHour + beginMin;
- var end = document.form1.endDate.value;
- var endTime = end.split("-");
- endYear = endTime[0];
- endMonth = endTime[1];
- endDay = endTime[2];
- endHour = document.form1.endHour.value;
- endMin = document.form1.endMin.value;
- end = endYear + endMonth + endDay + endHour + endMin;
- personNum = document.form1.num.value;
- if(begin.length!=12)
- {
- alert("开始时间必须填写 ");
- return false;
- }
- if(end.length!=12)
- {
- alert("终止时间必须填写 ");
- return false;
- }
- if(begin >= end)
- {
- alert("开始时间要大于终止时间 ");
- document.form1.beginDate.focus();
- return false;
- }
- else if (!isInteger(personNum)||parseInt(personNum)<1||personNum.length<0)
- {
- alert("所乘人数是整数且要大于等于1 ");
- document.form1.num.focus();
- return false;
- }
- else
- {
- return true;
- }
- }
- </script>
- <DIV align=center>
- <form name="form1" method="post">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa">
- <td>
- <table width="600" border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td bgcolor="#666666" colspan="6"><font class="strongw"> <a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>>>车辆预订
- </font></td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="100%" border=0>
- <tr bgcolor="#fafafa">
- <td width="15%"><font class="strong"> 开始时间:</font></td>
- <td width="40%">
- <input type="text" name="beginDate" readonly size="10" class="text" value="<%=beginDate%>">
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(beginDate);return false;" width="16" height="16">
- <select name="beginHour">
- <option value="00" <%if (beginHour.equals("00")) out.print("selected");%>>0 时</option>
- <option value="01" <%if (beginHour.equals("01")) out.print("selected");%>>1 时</option>
- <option value="02" <%if (beginHour.equals("02")) out.print("selected");%>>2 时</option>
- <option value="03" <%if (beginHour.equals("03")) out.print("selected");%>>3 时</option>
- <option value="04" <%if (beginHour.equals("04")) out.print("selected");%>>4 时</option>
- <option value="05" <%if (beginHour.equals("05")) out.print("selected");%>>5 时</option>
- <option value="06" <%if (beginHour.equals("06")) out.print("selected");%>>6 时</option>
- <option value="07" <%if (beginHour.equals("07")) out.print("selected");%>>7 时</option>
- <option value="08" <%if (beginHour.equals("08")) out.print("selected");%>>8 时</option>
- <option value="09" <%if (beginHour.equals("09")) out.print("selected");%>>9 时</option>
- <option value="10" <%if (beginHour.equals("10")) out.print("selected");%>>10时</option>
- <option value="11" <%if (beginHour.equals("11")) out.print("selected");%>>11时</option>
- <option value="12" <%if (beginHour.equals("12")) out.print("selected");%>>12时</option>
- <option value="13" <%if (beginHour.equals("13")) out.print("selected");%>>13时</option>
- <option value="14" <%if (beginHour.equals("14")) out.print("selected");%>>14时</option>
- <option value="15" <%if (beginHour.equals("15")) out.print("selected");%>>15时</option>
- <option value="16" <%if (beginHour.equals("16")) out.print("selected");%>>16时</option>
- <option value="17" <%if (beginHour.equals("17")) out.print("selected");%>>17时</option>
- <option value="18" <%if (beginHour.equals("18")) out.print("selected");%>>18时</option>
- <option value="19" <%if (beginHour.equals("19")) out.print("selected");%>>19时</option>
- <option value="20" <%if (beginHour.equals("20")) out.print("selected");%>>20时</option>
- <option value="21" <%if (beginHour.equals("21")) out.print("selected");%>>21时</option>
- <option value="22" <%if (beginHour.equals("22")) out.print("selected");%>>22时</option>
- <option value="23" <%if (beginHour.equals("23")) out.print("selected");%>>23时</option>
- </select>
- <select name="beginMin">
- <option value="00" <%if (beginMin.equals("00")) out.print("selected");%>>00分</option>
- <option value="15" <%if (beginMin.equals("15")) out.print("selected");%>>15分</option>
- <option value="30" <%if (beginMin.equals("30")) out.print("selected");%>>30分</option>
- <option value="45" <%if (beginMin.equals("45")) out.print("selected");%>>45分</option>
- </select>
- </td>
- <td width="15%"><font class="strong">车型:</font></td>
- <td width="30%">
- <select size="1" name="type" value="0" style="width=80">
- <%
- Hashtable hash = VehicleLoader.getAllAutomobileType();
- Enumeration enum = hash.keys();
- if(enum != null)
- {
- while(enum.hasMoreElements())
- {
- String key = (String)enum.nextElement();
- String s = (String)hash.get(key);
- if (key.equals(type))
- {
- %>
- <option value="<%= key%>" selected><%= s%>
- <%}
- else
- {%>
- <option value="<%= key%>"><%= s%>
- <%}}}%>
- </select>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="15%"><font class="strong"> 终止时间:</font></td>
- <td width="40%" >
- <input type="text" name="endDate" readonly size="10" class="text" value="<%=endDate%>">
- <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(endDate);return false;" width="16" height="16">
- <select name="endHour" >
- <option value="00" <%if (endHour.equals("00")) out.print("selected");%>>0 时</option>
- <option value="01" <%if (endHour.equals("01")) out.print("selected");%>>1 时</option>
- <option value="02" <%if (endHour.equals("02")) out.print("selected");%>>2 时</option>
- <option value="03" <%if (endHour.equals("03")) out.print("selected");%>>3 时</option>
- <option value="04" <%if (endHour.equals("04")) out.print("selected");%>>4 时</option>
- <option value="05" <%if (endHour.equals("05")) out.print("selected");%>>5 时</option>
- <option value="06" <%if (endHour.equals("06")) out.print("selected");%>>6 时</option>
- <option value="07" <%if (endHour.equals("07")) out.print("selected");%>>7 时</option>
- <option value="08" <%if (endHour.equals("08")) out.print("selected");%>>8 时</option>
- <option value="09" <%if (endHour.equals("09")) out.print("selected");%>>9 时</option>
- <option value="10" <%if (endHour.equals("10")) out.print("selected");%>>10时</option>
- <option value="11" <%if (endHour.equals("11")) out.print("selected");%>>11时</option>
- <option value="12" <%if (endHour.equals("12")) out.print("selected");%>>12时</option>
- <option value="13" <%if (endHour.equals("13")) out.print("selected");%>>13时</option>
- <option value="14" <%if (endHour.equals("14")) out.print("selected");%>>14时</option>
- <option value="15" <%if (endHour.equals("15")) out.print("selected");%>>15时</option>
- <option value="16" <%if (endHour.equals("16")) out.print("selected");%>>16时</option>
- <option value="17" <%if (endHour.equals("17")) out.print("selected");%>>17时</option>
- <option value="18" <%if (endHour.equals("18")) out.print("selected");%>>18时</option>
- <option value="19" <%if (endHour.equals("19")) out.print("selected");%>>19时</option>
- <option value="20" <%if (endHour.equals("20")) out.print("selected");%>>20时</option>
- <option value="21" <%if (endHour.equals("21")) out.print("selected");%>>21时</option>
- <option value="22" <%if (endHour.equals("22")) out.print("selected");%>>22时</option>
- <option value="23" <%if (endHour.equals("23")) out.print("selected");%>>23时</option>
- </select>
- <select name="endMin">
- <option value="00" <%if (endMin.equals("00")) out.print("selected");%>>00分</option>
- <option value="15" <%if (endMin.equals("15")) out.print("selected");%>>15分</option>
- <option value="30" <%if (endMin.equals("30")) out.print("selected");%>>30分</option>
- <option value="45" <%if (endMin.equals("45")) out.print("selected");%>>45分</option>
- </select>
- </td>
- <td width="15%"><font class="strong">所乘人数:</font></td>
- <td width="25%">
- <input type="text" name="num" size="12" class="text" value=<%=personNum%>>
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="100%" border=0>
- <tr bgcolor="#fafafa">
- <td colspan="7">
- <input type="button" name="Button3222" value="查询" class="file" onClick="query()">
-
- <input type="button" name="queryMe" value="我的预订" class="file" onClick="qMe()" style="width:60px">
- </td>
- </tr>
- <%
- if (!beginDate.equals(""))
- {
- %> <tr align=middle>
- <td width="15%"><font class="strong">车牌号</font></td>
- <td width="15%"><font class="strong">车辆类型</font></td>
- <td width="15%"><font class="strong">核定载客</font></td>
- <td width="15%"><font class="strong">厂牌</font></td>
- <td><font class="strong">型号</font></td>
- </tr>
- <vnex_automobile:automobileBookingList employeeId="<%=userId%>" autoType="<%=autotype%>" beginTime="<%=beginTime%>" endTime="<%=endTime%>" personNum="<%=personNum%>">
- <vnex:items paging="true">
- <tr bgcolor="<vnex:itemsColor/>" align="center">
- <td width="15%" height="26">
- <a href="/mainctrl/booking/autoBookingAdd?beginTime=<%=beginTime%>&endTime=<%=endTime%>&employeeId=<%=userId%>&personNum=<%=personNum%>&automobileId=<vnex_automobile:automobileManageAttribute attribute = "automobileId"/><%= start %>">
- <vnex_automobile:automobileManageAttribute attribute = "carCertNo"/>
- </a>
- </td>
- <td width="15%" height="26">
- <vnex_automobile:automobileManageAttribute attribute = "typeName"/>
- </td>
- <td width="15%" height="26">
- <vnex_automobile:automobileManageAttribute attribute = "passengerNum"/>
- </td>
- <td width="15%" height="26">
- <vnex_automobile:automobileManageAttribute attribute = "brand"/>
- </td>
- <td colspan="3" height="26">
- <vnex_automobile:automobileManageAttribute attribute = "carType"/>
- </td>
- </tr>
- </vnex:items>
- <tr align=center bgcolor="#fafafa">
- <td colspan="7" align="left">
- <vnex:pagingTag pageName="<%=pageTo%>" />
- </td>
- </tr>
- </vnex_automobile:automobileBookingList>
- <%
- }
- %>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>