<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/admin/include/taglib.jsp"%>
<link href="assets/admin/bootstrap/2.3.1/css_cerulean/bootstrap.min.css" type="text/css" rel="stylesheet" />
<script src="assets/admin/bootstrap/2.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<link href="assets/admin/bootstrap/2.3.1/awesome/font-awesome.min.css" type="text/css" rel="stylesheet" />
<link type="text/css" rel="stylesheet" href="assets/js/jquery/easyui/themes/bootstrap/easyui.css"/>
<script src="assets/js/jquery/easyui/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	var arg = new Array();
	arg='${allList}';
	if(arg=='[]'){  
		$.messager.alert("提示","当前暂无数据","info")
	}
});
	//点击查询按钮时
	function searchlist(){
		var laterNo=$.trim($("#laterNo").val().trim());
		var departStation=$.trim($("#departStation").val().trim());
		
		var flag1=false,flag2=false;
		for(var k=0;k<laterNo.length;k++){  
		     if ((!/^\s+$/g.test(laterNo.charAt(k)))&&(!/^[\u4e00-\u9fa5]+$/.test(laterNo.charAt(k)))&&(!laterNo.charAt(k).match(/\d+/g))&&(!/^[A-Za-z]+$/.test(laterNo.charAt(k)))){   
		    	 flag1=true;
		    	break;
			 }   
	    }
		for(var k=0;k<departStation.length;k++){  
		     if ((!/^[\u4e00-\u9fa5]+$/.test(departStation.charAt(k)))&&(departStation.charAt(k) != "|")){   
		    	 flag2=true;
		    	break;
			 }   
	   }
		if(flag1||flag2){  
			  $.messager.alert("提示","您输入的数据含有非法字符！","info");
			  if(flag1){
				  $("#laterNo").val("");
			  }
			  if(flag2){
				  $("#departStation").val("");
			  }
			 return false;     
		}     
		else{
			var url="table/fechZWD?laterNo="+encodeURI(laterNo)+"&departStation="+encodeURI(departStation);
			loadPage(url);  
		}
	}
</script>
<div class="about_top">
	当前位置: 动态查询
</div>
<!-- 从数据库获取的数据列表 -->
<div class="cont" style="overflow: auto;">
		<!-- grid-->
		<table id="contentTable" class="table table-striped table-bordered table-condensed" style="width:98%">
			<thead><tr><th>车次</th><th>始发站</th><th>始发站发车时间</th><th>终点站</th><th>终点站到站时间</th><th>到站</th><th>到站时间</th><th>晚点时间（分钟）</th><th>计划到站时间</th><th>发车时间</th></tr></thead>
			<tbody>
			<c:forEach items="${allList}" var="laterTrainInfo">
				<tr>
					<td>${laterTrainInfo.laterNo}</td>
					<td>${laterTrainInfo.startStation}</td>
					<td>${laterTrainInfo.startTime}</td>
					<td>${laterTrainInfo.endStation}</td>
					<td>${laterTrainInfo.endTime}</td>
					<td>${laterTrainInfo.departStation}</td>
					<td>${laterTrainInfo.arrTime}</td>
					<td>${laterTrainInfo.laterTime}</td>
					<td>${laterTrainInfo.departTimePlan}</td>
					<td>${laterTrainInfo.goTime}</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
</div>	
<div class="bottom" >
		<p>以上数据仅供参考，以实际公布信息为准！</p>
</div>
