<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>数据检查</title>
	<meta name="decorator" content="default"/>
	<%@include file="/WEB-INF/views/include/head.jsp" %>
	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/admin/exam/check/answer">识别结果检查</a></li>
		<li class="active"><a href="${ctx}/admin/exam/check/image">图片检查</a></li>
<%-- 		<li><a href="${ctx}/admin/exam/check/score">分数检查</a></li> --%>
		<li><a href="${ctx}/admin/exam/check/student">人工确认</a></li>
	</ul>
	<form id="searchForm" action="${ctx}/admin/exam/check/image" method="post" class="breadcrumb form-search">
		<input type="hidden" id="pageNumber" name="pageNumber" value="${query.pageNumber }"/>
		<input type="hidden" id="pageSize" name="pageSize" value="${query.pageSize }"/>
		<div>
			<label>姓名</label>
			<input type="text" name="name" value="${query.name}"  maxlength="10" class="input-mini"/>
			<label>准考证号</label>
			<input type="text" name="examNumber" value="${query.examNumber}" maxlength="50" class="input-small"/>
			<label>学号</label>
			<input type="text" name="studentCode" value="${query.studentCode}" maxlength="30" class="input-small"/>
			<label>科目</label>
			<select name="subjectCode">
				<option value="">请选择</option>
				<c:forEach items="${subjectList}" var="subject">
				<option value="${subject.code}" <c:if test="${subject.code==query.subjectCode}">selected</c:if>>${subject.code}-${subject.name}</option>
				</c:forEach>
			</select>
		<%-- 	<label>学习中心</label>
			<select name="campusName">
				<option value="">请选择</option>
				<c:forEach items="${campusList}" var="campus">
				<option value="${campus}" <c:if test="${campus==query.campusName}">selected</c:if>>${campus}</option>
				</c:forEach>
			</select> --%>
			
			<br><br>
			
			<input id="btnSubmit" class="btn btn-primary" type="button" value="异常查询" onclick="goSearch()"/>
			&nbsp;
			<input id="export-button" class="btn" type="button" value="导出" onclick="goExport()"/>
			
			<c:if test="${web_user.schoolAdmin==true}">
			&nbsp;
			<c:if test="${running==false}">
			<a href="${ctx}/admin/exam/check/image/run" class="btn">开始检查</a>
			</c:if>
			<c:if test="${running==true}">
			<a href="javascript:void(0)" class="btn" disabled>正在检查</a>
			</c:if>
			</c:if>
		</div>
	</form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>准考证号</th>
				<th>姓名</th>
				<th>学号</th>
				<th>科目</th>
			<!-- 	<th>学习中心</th> -->
				<th>扫描批次</th>
				<th>上传时间</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${query.result}" var="student">
			<tr>
				<td>${student.examNumber}</td>
				<td>${student.name}</td>
				<td>${student.studentCode}</td>
				<td>${student.subjectCode}-${student.subjectName}</td>
			<%-- 	<td>${student.campusName}</td> --%>
				<td>${student.batchCode}</td>
				<td><fmt:formatDate value="${student.uploadTime}" pattern="yyyy-MM-dd hh:MM:ss"/></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${query}</div>
<script type="text/javascript">
function page(n,s){
	$("#pageNumber").val(n);
	$("#pageSize").val(s);
	$("#searchForm").attr('action','${ctx}/admin/exam/check/image');
	$("#searchForm").submit();
	return false;
}
function goSearch(){
	$("#pageNumber").val(1);
	$("#pageSize").val('${query.pageSize}');
	$("#searchForm").attr('action','${ctx}/admin/exam/check/image');
	$("#searchForm").submit();
	return false;
}
function goExport(){
	$("#searchForm").attr('action','${ctx}/admin/exam/check/image/export');
	$("#searchForm").submit();
}
</script>	
</body>
</html>