<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>


	<style>
		body {
			min-width: 180px;
		}

		.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;
		}
		.selectg {
			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;
		}

		.btn {
			width: 100px;
		}

		label.control-label-error {
			color: Red;
		}

		.forminfo li label {
			width: 85px;
			line-height: 34px;
			display: block;
			float: left;
		}
	</style>
</head>

<body>
<div class="formbody">
	<form id="submitFrom"   method="post" class="form-horizontal form-validate">
		<input type="hidden" name="id" id="hid" th:if="${ws.id}" th:value="${ws.id}"/>
		<ul class="forminfo">
			<li class="clearfix">
				<label>留言:<b>*</b></label>
				<textarea rows="10" cols="80" id="name" class="textinput"></textarea>
			</li>
			<li>
				<label>&nbsp;</label>
				<button onclick="roleFrom(1)" class="btn">通过</button>
				<button onclick="roleFrom(2)"class="btn">拒绝</button>
				<button type="button" class="btn" onclick="closeWin();">取消</button>
			</li>
		</ul>
	</form>
</div>
</body>
<script type="text/javascript">

	function roleFrom(state){
		var url="[[${sysUrl}]]/sys/dispatcher/saveApplyAudit";
		$.ajax({
			url: url,
			type: "post",
			data:{
				'id': $("#hid").val(),
				'msg': $("#name").val(),
				"state":state
			},
			dataType: "json",
			success:function(data){
				if(data.code="999"){
					parent.layer.msg("操作成功",{icon:1});
					closeWin();
				}else{
					parent.layer.msg(data.msg,{icon:11});
					closeWin();
				}
			}
		});
	}
	function closeWin(){
		parent.location.reload();
		parent.layer.close(parent.layer.getFrameIndex(window.name));
	}



</script>
</html>