<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 70px;
	}
	.date_width{
	     width: 100px;
	}
	td div{
     word-break:break-all;
	}
</style>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">老师注册审核管理</a></li>
		<li><a href="#">审核</a></li>
	</ul>
</div>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/audit/TeacherAuditList.html}" method="post">
	 <input id="url" name="url" type="hidden">
	 <input id="leagueName" name="leagueName" type="hidden">
	<ul class="seachform">
		<li>
			<label>老师姓名</label>
			<input name="LIKE_realName" type="text" class="scinput" th:value="${search.get('LIKE_realName')}"/>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <th style="width: 40px;">序号</th>
		        <th>老师姓名</th>
		        <th>性别</th>
		        <th>老师头像</th>
		        <th>科目</th>
		        <th>教龄</th>
		        <th>审核状态</th>
		        <th>申请时间</th>
		        <th style="text-align: center;">操作</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
				<td th:text="${itemStat.count}" ></td>
					<td th:title="${item.realName}" th:text="${item.realName}">
					</td>
					<td th:switch="${item.sex}" >
					    <a href="javascript:;" th:case="0" >未知</a>
					    <a href="javascript:;" th:case="1" >男</a>
					    <a href="javascript:;" th:case="2" >女</a>
					</td>
					<td  class="imgtd">
							<img  th:if="${item.headPicUrl}!=null" th:src="${imgUrl}+''+${item.headPicUrl}" class="tablelink" style="width: 50px;height: 50px;" />
					</td>
					<td th:title="${item.subject}" th:text="${item.subject}">
					</td>
					<td th:text="${item.schoolAge}" ></td>
					<td th:switch="${item.auditState}" >
					    <a href="javascript:;" th:case="1" >审核中</a>
					    <a href="javascript:;" th:case="2" >审核通过</a>
					    <a href="javascript:;" th:case="3" >审核未通过</a>
					</td>
					<td th:text="${#calendars.format(item.createTime,'yyyy-MM-dd')}" ></td>
					<td>
					  <div>
						<a th:if="${item.auditState eq '1' }" th:href="@{/sys/audit/teacherAudit.html(id=${item.id})}"  class="tablelink">审核</a>
						<a th:if="${item.auditState ne '1' }" th:href="@{/sys/audit/teacherAudit.html(id=${item.id})}"  class="tablelink">查看</a>
					  </div>
				    </td>
				
			</tr>
		</tbody>
	</table>
	<!-- 分页 -->
	<div class="pagin">
    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录，当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
   	</div>
</div>
</body>
<script type="text/javascript">

function createQrById(id){
	parent.layer.open({
	    type: 2,
	    title: "创建图书二维码",
	    closeBtn: 1, //不显示关闭按钮
	    shift: 0.8,
	    //offset: '100px',
	    area: ['40%', '50%'],
	    content: '[[${sysUrl}]]/sys/lib/libDetailAdd.html?libId='+id
	});
}

function qrCodeDown(){
	
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/lib/ajaxDetailQrCode";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/lib/libJoinList.html";
};

function downloadById (url,leagueName){
	$('#url').val(url);
	$('#leagueName').val(leagueName);
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/lib/downloadQrCode";
	$("#seachform").submit();
	document.getElementById("seachform").action = "[[${sysUrl}]]/sys/lib/libJoinList.html";
}


function pushNotice(libId){
	$.ajax({
		url: '[[${sysUrl}]]/sys/lib/pushNotice',
		type: "post",
		data:{
			libId:libId
		},
		dataType: "json",
		success:function(data){
				
				if(data.meta.success){
					layer.msg("同步成功",{icon:1});
				}else{
					layer.msg(data.meta.message,{icon:11});
				}
		}
	});
}
</script>
</html>