<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", -10);
%>
<%@include file="/WEB-INF/views/base.jsp"%>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>DGT | 表单查询</title>
<%@include file="/WEB-INF/views/common_base_css.jsp"%>
<style>
body.DTTT_Print {
	background: #fff;
}

.DTTT_Print #page-wrapper {
	margin: 0;
	background: #fff;
}

button.DTTT_button,div.DTTT_button,a.DTTT_button {
	border: 1px solid #e7eaec;
	background: #fff;
	color: #676a6c;
	box-shadow: none;
	padding: 6px 8px;
}

button.DTTT_button:hover,div.DTTT_button:hover,a.DTTT_button:hover {
	border: 1px solid #d2d2d2;
	background: #fff;
	color: #676a6c;
	box-shadow: none;
	padding: 6px 8px;
}

.dataTables_filter label {
	margin-right: 5px;
}
</style>
</head>

<body>

	<div id="wrapper">

		<jsp:include page="../menu.jsp"></jsp:include>

		<div id="page-wrapper" class="gray-bg">
			<jsp:include page="../head.jsp"></jsp:include>
			<jsp:include page="../pageNav.jsp"></jsp:include>
			<div class="wrapper wrapper-content animated fadeInRight">
				<div class="row">
					<div class="row">
						<div class="col-lg-12">
							<div class="ibox float-e-margins">
								<div class="ibox-title">
		                            <h5>编辑部门</h5>
		                        </div>
		                        <div class="ibox-content">
									<form:form id="form" modelAttribute="sysDepartment" 
										action="${pageContext.request.contextPath}/sysDepartment/getUpdateSysdepartment"
										class="form-horizontal" method="post">
										<input name="depid" type="hidden" value="${sd.depid }" />
										
										<div class="form-group">
											<label class="col-sm-2 control-label" for="PositionName">部门名称</label>
											<div class="col-md-10">
												<form:input class="form-control placeholder-no-fix"
																		path="depname" value="${sd.depname}"
																		autocomplete="off" placeholder="部门名称" required="" />
												<form:errors path="depname" class="field-has-error"></form:errors>
											</div>
										</div>
										
										<div class="form-group">
											<label class="col-sm-2 control-label" for="PositionCode">部门编码</label>
											<div class="col-md-10">
												<input class="form-control placeholder-no-fix"
																		name="depcode" value="${sd.depcode}" /> <span
																		class="field-validation-valid text-danger"
																		data-valmsg-for="PositionCode"
																		data-valmsg-replace="true"></span>
											</div>

										</div>
									
										<div class="form-group">
		                                    <div class="col-sm-4 col-sm-offset-2">
		                                        <button onclick="history.go(-1)" class="btn btn-warning" type="button"><i class="fa fa-mail-forward"></i>&nbsp;&nbsp;返回</button>
		                                        <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i>&nbsp;&nbsp;更新并返回</button>
		                                    </div>
		                                </div>
										
									</form:form>	
								</div>	
							</div>
						</div>
					</div>
				</div>	
			</div>

		</div>
	</div>
	<%@include file="/WEB-INF/views/common_base_script.jsp"%>
	<script type="text/javascript">
	
		/* function check(){
			var flag = false;
				
			var parentid=$("#parentid").val();
			if (parentid == "") {
				CommonUtils.toastMsg(0, "更新失败，请选择部门！", 2);
			} else {
				flag = true;
			}
				return flag;
		} */
		
		$(function() {
			//前台js验证
			var ruleObj = {
				depname : {
					required : true
				}
			};
			var messageObj = {
				depname : {
					required : "请输入部门名称"
				}
			};
			CommonUtils.formValidate("form", ruleObj, messageObj);
		})
	</script>
</body>

</html>
