<%@page import="com.framework.util.PropertiesLoader"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<link
	href="<%=request.getContextPath()%>/resource/library/css/base.css"
	rel="stylesheet">
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resource/library/easyui/uimaker/easyui.css">
 <link rel="stylesheet" 
 	href="<%=request.getContextPath()%>/resource/library/layui/css/layui.css" media="all">
<link rel="stylesheet" type="text/css"	
	href="<%=request.getContextPath()%>/resource/library/easyui/uimaker/icon.css">
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resource/library/css/providers.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/library/js/laydate/need/laydate.css" />
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resource/library/easyui/jquery.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resource/library/js/jquery.json.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resource/library/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resource/library/easyui/easyui-lang-zh_CN.js"></script>
<!--弹出层引入的JS-->
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resource/library/layer-v3.0.3/layer/layer.js"></script>
 <script type="text/javascript"
 	src="<%=request.getContextPath()%>/resource/library/layui/layui.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resource/library/js/avalon/avalon.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resource/library/js/laydate/laydate.js"></script>
 <link href="<%=request.getContextPath()%>/resource/library/layui2.4.5/css/layui.css" rel="stylesheet">
    <script src="<%=request.getContextPath()%>/resource/library/layui2.4.5/layui.js"></script>
<style>


<!--
table.kv-table td.kv-content, table.kv-table td.kv-label {
    padding-left: 10px;
}
-->
        .kv-table td span label {
            color: #FF0000;
            margin-right: 5px;
        }
        
        .add{
        	background: green;
        	color: white;
        }
         .delete{
        	background: red;
        	color: white;
        }
        .tabs li a.tabs-inner {
		    color: #fff;
		    background-color: #541770;
		}
		.tabs li {
		    float: left;
		    display: inline-block;
		    margin: 0 4px -3px 0;
		    padding: 0;
		    position: relative;
		    border: 0;
		    border-top: 2px solid #541770;
		    -moz-border-radius: 5px 5px 0 0;
		    -webkit-border-radius: 5px 5px 0 0;
		    border-radius: 5px 5px 0 0;
		}
		.tabs-panels{
			width: 1100px;
		}
</style>
<script>
<%if(session.getAttribute("userInfo")==null){%>
	window.location.href='<%=request.getContextPath()%>/login';
<%}%>
	(function($) {
		$.fn.serializeJson = function() {
			var serializeObj = {};
			var array = this.serializeArray();
			var str = this.serialize();
			$(array).each(
					function() {
						if (serializeObj[this.name]) {
							if ($.isArray(serializeObj[this.name])) {
								serializeObj[this.name].push(this.value);
							} else {
								serializeObj[this.name] = [
										serializeObj[this.name], this.value ];
							}
						} else {
							serializeObj[this.name] = this.value;
						}
					});
			return serializeObj;
		};
	})(jQuery);
	
	avalon.filters.notEmpty = function (str) {
		if(str&&str!='undefined'&&str!='null'){
			return str;
		}
		return '';
	}
	
	avalon.filters.dateX = function (str,format) {
		if(str&&str!='undefined'&&str!='null'){
			return avalon.filters.date(str,format);
		}
		return '';
	}
	
	function clearJson(json){
		for(i in json){
			if(json[i]==''){
				delete json[i];
			}
		}
		return json;
	}
	
	Date.prototype.format = function (format) {  
	    var o = {  
	        "M+": this.getMonth() + 1, // month  
	        "d+": this.getDate(), // day  
	        "h+": this.getHours(), // hour  
	        "m+": this.getMinutes(), // minute  
	        "s+": this.getSeconds(), // second  
	        "q+": Math.floor((this.getMonth() + 3) / 3), // quarter  
	        "S": this.getMilliseconds()  
	        // millisecond  
	    }  
	    if (/(y+)/.test(format))  
	        format = format.replace(RegExp.$1, (this.getFullYear() + "")  
	            .substr(4 - RegExp.$1.length));  
	    for (var k in o)  
	        if (new RegExp("(" + k + ")").test(format))  
	            format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));  
	    return format;  
	}  
	function formatDatebox(value) {  
	    if (value == null || value == '') {  
	        return '';  
	    }  
	    var dt;  
	    if (value instanceof Date) {  
	        dt = value;  
	    } else {  
	        dt = new Date(value);  
	    }  
	  
	    return dt.format("yyyy-MM-dd"); //扩展的Date的format方法(上述插件实现)  
	}  
</script>