<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> 
<script src="sys/js/jquery.validate.min.js" th:src="@{/static/sys/js/jquery.validate.min.js}"></script>
<script src="sys/js/jquery-validation/messages_zh.js" th:src="@{/static/sys/js/jquery-validation/messages_zh.js}"></script>
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
 <style>
    	.clearfix:after {
			visibility: hidden;
			display: block;
			font-size: 0;
			content: " ";
			clear: both;
			height: 0;
		}
		.clearfix { display: inline-table; }
		* html .clearfix { height: 1%; }
		.clearfix { display: block; }
		.fl{display:inline;float:left}
		clearfix >control-label-error{display:inline;float:left;marign-left:10px}
		 label.control-label-error {
  				color: Red;
             }
          .lispan {line-height: 34px;}   
          
          .select1{
   		    width:100%;
		    height: 32px;
		    line-height: 32px;
		    border-top: solid 1px #a7b5bc;
		    border-left: solid 1px #a7b5bc;
		    border-right: solid 1px #ced9df;
		    border-bottom: solid 1px #ced9df;
		    opacity:1;
	        margin-bottom: 10px;
    	}
    </style>
</head>

<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    	<li><a href="#">机构</a></li>
    	<li><a href="#">机构老师审核</a></li>
    </ul>
</div>
<div class="formbody">
	<div class="formtitle"><span>老师申请审核</span></div>
	<form id="submitFrom"   method="post" class="form-horizontal form-validate">
		     <input type="hidden" name="id" th:if="${ws.id}" th:value="${ws.id}"/>
		     <input type="hidden" name="libManagerId" th:if="${ws.libManagerId}" th:value="${ws.libManagerId}"/>
		<ul class="forminfo">
			<li class="clearfix">
				<label>老师姓名:<b>*</b></label>
				<input  id="name" class="dfinput fl" name="name"  th:value="${ws.name}" disabled="disabled" />
			</li>
			<li class="clearfix">
				<label>老师性别:<b>*</b></label>
				<input type="hidden" id="sex"  class="dfinput fl" name="sex"  th:value="${ws.sex}"/>
				<input type="text"  class="dfinput fl"   th:value="${ws.sex ==0 ?'未知':ws.sex==1?'男':'女'}" disabled="disabled"/>
			</li>
			<li class="clearfix">
				<label>电话:<b>*</b></label>
				<input type="text" id="telephone" class="dfinput fl" name="telephone"  th:value="${ws.telephone}" disabled="disabled"/>
			</li>
			<li class="clearfix">
				<label>科目:<b>*</b></label>
				<input type="text" id="subject" class="dfinput fl" name="subject"  th:value="${ws.subject}" disabled="disabled"/>
			</li>
			<li class="clearfix">
				<label>机构名称:<b>*</b></label>
				<input type="text" id="orgName" class="dfinput fl" name="orgName"  th:value="${ws.orgName}" disabled="disabled"/>
			</li>
			<li class="clearfix">
				<label>教师资格证</label>
				<img id="certification" th:src=" ${ws.certification} !=null  ? (${ws.certification} !='' ? ${imgUrl}+''+${ws.certification}: '' ) :'' "  style="width:200px;height:140px;" />
			</li>
			<li class="clearfix">
				<label>身份证正面</label>
				<img id="idFace" th:src=" ${ws.idFace} !=null  ? (${ws.idFace} !='' ? ${imgUrl}+''+${ws.idFace}: '' ) :'' "  style="width:200px;height:140px;" />
			</li>
			<li class="clearfix">
				<label>身份证反面</label>
				<img id="idCon" th:src=" ${ws.idCon} !=null  ? (${ws.idCon} !='' ? ${imgUrl}+''+${ws.idCon}: '' ) :'' "  style="width:200px;height:140px;" />
			</li>
			<li class="clearfix">
				<label>申请时间:<b>*</b></label>
				<input id="createTime"  name="createTime"  class="dfinput fl" type="text" th:value="${#calendars.format(ws.createTime,'yyyy-MM-dd HH:mm:ss')}" disabled="disabled"/>
			</li>
			<li class="clearfix">
				<label>审批时间:<b>*</b></label>
				<input id="lastUpdateTime"  name="lastUpdateTime"  class="dfinput fl" type="text" th:value="${#calendars.format(ws.lastUpdateTime,'yyyy-MM-dd HH:mm:ss')}" disabled="disabled"/>
			</li>
			<li>
				<label>&nbsp;</label>
				<input type="hidden" id="status" name="status">
				<button type="button" class="btn" onclick="roleFrom(1)" th:if="${ws.status eq 3}">审核通过</button>
				<button type="button" class="btn" onclick="roleFrom(2)" th:if="${ws.status eq 3}">审核不通过</button>
				<button type="button" class="btn" onClick="javascript :history.back(-1);" >返回</button>
			</li>
		</ul>
	</form>
</div>
</body>
<script type="text/javascript">
$(function(){
});
function roleFrom(status){
    $("#status").val(status);
	var url="[[${sysUrl}]]/sys/audit/orgAuditSave";
	var params = $("#submitFrom").serialize();
	$.post(url,params,function(data){
		if(data != null){
				if(data.meta.success){
					layer.msg("操作成功!",{icon:1});
			    	setTimeout(function(){
			    		window.location.href ='[[${sysUrl}]]/sys/audit/orgTeacherAuditList.html';
					},1000);
				}else{
					layer.msg(data.meta.message,{icon:11});
				}
		}
	});
}
</script>
</html>