head.jsp
5.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<%@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>