<%@ page language="java"  pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="${ctx}/favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="robots" content="all" />
<meta name="author" content="WBZ" />
<meta name="Copyright" content="武汉启明泰和软件服务有限公司" />
<meta name="Description" content="" />
<meta name="Keywords" content="" />

<link rel="stylesheet" href="${ctx}/resources/css/zTreeStyle/zTreeStyle.css" type="text/css" />
<link rel="stylesheet" href="${ctx}/resources/css/dateinput-skin1.css" type="text/css" />
<link rel="stylesheet" href="${ctx}/resources/css/jquery.autocomplete.css" type="text/css" />
<link rel="stylesheet" href="${ctx}/resources/css/ui-lightness/jquery-ui-1.8.23.custom.css" type="text/css" />
<script type="text/javascript" src="${ctx}/resources/js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquerytools/jquery.tools.min.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery.ztree.all-3.2.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery.autocomplete.min.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/json2.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery-form-json.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery-dateFormat.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/jquery.mask.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/common.js"></script>
<script type="text/javascript">
	//layout
	function qmth_layout(){
		var headerHeight = $('#header').height() + 16;
		var pageHeaderHeight = $('.page-header').height() == null ? 0 : ($('.page-header').height()+11);
		var pageFooterHeight = $('.page-footer').height() == null ? 0 : ($('.page-footer').height()+35);
		$('.menu').height($(window).height()-headerHeight);
		$('.page-body').height($(window).height()-headerHeight-pageHeaderHeight-pageFooterHeight);
		//$('.page-footer').show();
		//var mask = $('<div class="mask" />');
		//mask.height($('#content').height()-10);
		//mask.width($('#content').width());
		//$('#content').append(mask);
	
	}
	
	$(function(){
		qmth_layout();
		$(window).resize(function(){
			qmth_layout();
		});

		$.tools.dateinput.localize("zh-CN", { 
			months: '一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月', 
			shortMonths: '一,二,三,四,无,六,七,八,九,十,十一,十二', 
			days: '星期日,星期一,星期二,星期三,星期四,星期五,星期六', 
			shortDays: '日,一,二,三,四,五,六' 
		}); 
	});
	
	/**
	* 把时间对象转换成“yyyy-MM-dd HH:mm:ss”格式的字符串，一般用于easyui-datagrid里面的字段formatter
	*
	*/
	function formatToNormalDateStr(date){
		var d=undefined;
		if(typeof(date)=="undefined"){
			return "-";
		}else{
			d = new Date(date);
		}
		return (d.getFullYear()+"-"+formatTo00(d.getMonth()+1)+"-"+formatTo00(d.getDate()) + " " + formatTo00(d.getHours())+":"+formatTo00(d.getMinutes())+":"+formatTo00(d.getSeconds()));
	}
	
	/**
	* 把时间对象转换成“yyyyMMddHHmmss”格式的字符串，一般用于easyui-datagrid里面的字段formatter
	*
	*/
	function formatToNormalDateStr2(date){
		var d=undefined;
		if(typeof(date)=="undefined"){
			return "-";
		}else{
			d = new Date(date);
		}
		return (d.getFullYear() + formatTo00(d.getMonth()+1) + formatTo00(d.getDate()) + formatTo00(d.getHours()) + formatTo00(d.getMinutes()) + formatTo00(d.getSeconds()));
	}

	function formatTo00(num){
		var str = "" + num;
		return str.length < 2 ? ("0" + str):str;
	}

	/**
	* 获取普通对象里面name属性，一般用于easyui-datagrid里面的字段formatter
	*
	*/
	function formatNormalBean(data){
		if(data == null){
			return "";
		}
		return data.name;
	}

	/**
	* 获取普通对象里面name属性，一般用于easyui-datagrid里面的字段formatter
	*
	*/
	function formatNormalBeanToCode(data){
		if(data == null){
			return "";
		}
		return data.code;
	}
	
	function getUserId(data){
		return data.id;
	}
	
	function formatDate(date){
		console.log(date);
		var d=undefined;
		if(typeof(date)=="undefined" || date == null || date == ""){
			return "";
		}else{
			if(typeof(date)== 'object'){
				d = new Date(date.time);
			}else{
				d = new Date(date);
			}
		}
		return d.getFullYear()+"-"+formatTo00(d.getMonth()+1)+"-"+formatTo00(d.getDate());
	}
	
	function shortFormatDate(date){
		var d=undefined;
		if(typeof(date)=="undefined" || date == null || date == ""){
			return "";
		}else{
			if(typeof(date)== 'object'){
				d = new Date(date.time);
			}else{
				d = new Date(date);
			}
		}
		return d.getFullYear()+"-"+formatTo00(d.getMonth()+1);
	}
	
	function longFormatDate(date){
		var d=undefined;
		if(typeof(date)=="undefined" || date == null || date == ""){
			return "";
		}else{
			if(typeof(date)== 'object'){
				d = new Date(date.time);
			}else{
				d = new Date(date);
			}
		}
		return d.getFullYear()+"-"+formatTo00(d.getMonth()+1)+"-"+formatTo00(d.getDate())
			+" "+formatTo00(d.getHours())+":"+formatTo00(d.getMinutes())+":"+formatTo00(d.getSeconds());
	}
    
    function reloadWin(){
    	try{$(document).mask('正在重新刷新页面，请稍等...');}catch(e){}
    	window.location.reload();
    }
    
	/**
	$(document).ajaxStart(onStart)
	.ajaxComplete(onComplete)
	.ajaxSuccess(onSuccess);
	
	function onStart(event) {
		//$('.mask').show();
	}
	function onComplete(event, xhr, settings) {
		//$('.mask').hide();
	}
	function onSuccess(event, xhr, settings) {
	}
	**/
</script>
</html>