d123 8 年 前
コミット
dbb9e0cf40

+ 115 - 0
CallCenterWeb.UI/Announcement/Add.html

@@ -0,0 +1,115 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+    <script src="../Script/Common/huayi.load.js"></script>
6
+    <script src="../Script/Common/huayi.config.js"></script>
7
+    <link href="../css/layer/need/layer.css" />
8
+    <link rel="stylesheet" href="../css/init.css" />
9
+     <title></title>
10
+    		   <style>
11
+    		   	.BiaoTi{
12
+    		   		width: 100%;
13
+    		   		text-align:center;
14
+    		   		border-color:#ccc ;
15
+    		   		border:1px solid #ccc;
16
+    		   	}
17
+    		   	textarea{
18
+    		   		border-color:#ccc ;
19
+    		   		border:1px solid #ccc;
20
+    		   		height: 100px;
21
+    		   	}
22
+    		   	.Common {
23
+    width: 100%;
24
+    background: #fff;
25
+    text-align: center;
26
+    padding: 10px 15px;
27
+    height: auto;
28
+    overflow-y: auto;
29
+}
30
+.Common table th {
31
+    padding: 5px 8px 5px 0;
32
+    text-align: right;
33
+    width: 20%;
34
+}
35
+.Common table  {
36
+        width: 100%;
37
+}
38
+.Common table td textarea {
39
+    width: 100%;
40
+    vertical-align: middle;
41
+    resize: none;
42
+    outline: none;
43
+}
44
+.Common table td {
45
+    padding: 6px 0 5px 10px;
46
+    text-align: left;
47
+    color: #717171;
48
+    line-height: 200%;
49
+}
50
+.btn_box {
51
+    margin-top: 30px;
52
+}
53
+    		   </style>
54
+	</head>
55
+	<body>
56
+		<div class="Common">
57
+		<table  >
58
+			<tr>
59
+				<th>标题:</th>
60
+					<td>
61
+						<input class="BiaoTi" id="title" type="text" style="" />
62
+					</td>
63
+				
64
+			</tr>
65
+			<tr>
66
+				<th >内容:</th>
67
+				<td colspan="2">
68
+					<textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
69
+				</td>
70
+			</tr>
71
+		</table>
72
+		<div class="btn_box">
73
+			<button class="btns">保存</button>
74
+		</div>
75
+		</div>
76
+		   <script >
77
+
78
+            
79
+            $(document).ready(function(){         
80
+            	$(".btns").click(function(){ 
81
+            		if(!$("#title").val()){
82
+            			layer.msg("输入标题");
83
+            		}
84
+					 else if(!$("#content").val()){
85
+            			layer.msg("输入内容");
86
+            		}
87
+            			Add()
88
+            	
89
+            			
90
+            	})
91
+            	
92
+            	
93
+            })
94
+            
95
+            function Add(){   
96
+            	$.post(huayi.config.callcenter_url + "Notice/AddNotice", {
97
+						title:$("#title").val(),
98
+						content:$("#content").val(),
99
+						token: $.cookie("token"),
100
+					}, function(result) {
101
+						result = JSON.parse(result);
102
+						if(result.state.toLowerCase() == "success") {
103
+									
104
+					var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
105
+                    parent.layer.close(index); //再执行关闭
106
+						  parent.initTable();					 
107
+							parent.layer.msg("添加成功");
108
+						}
109
+					})
110
+            }
111
+          
112
+		   </script>
113
+	</body>
114
+</html>
115
+

+ 140 - 0
CallCenterWeb.UI/Announcement/AnnD.html

@@ -0,0 +1,140 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>公告管理</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+
11
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
12
+		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
13
+		<link href="../css/init.css" rel="stylesheet" />
14
+		<style>
15
+			table td {
16
+				word-break: break-all;
17
+				word-wrap: break-word;
18
+			}
19
+			
20
+			.ld-service li {
21
+				float: left;
22
+				font-size: 14px;
23
+				color: #000;
24
+				padding: 5px 15px;
25
+				cursor: pointer;
26
+				border-bottom: 1px solid #ccc;
27
+			}
28
+			
29
+			.cr-click {
30
+				border: 1px solid #ccc;
31
+				background-color: #fff;
32
+				border-bottom: none !important;
33
+				border-bottom-left-radius: 5px;
34
+				border-bottom-right-radius: 5px;
35
+			}
36
+			
37
+			.Shows {
38
+				display: block !important;
39
+			}
40
+			
41
+			.complain {
42
+				display: none;
43
+			}
44
+			
45
+			th {
46
+				padding: 5px;
47
+				text-align: center;
48
+			}
49
+			
50
+			td {
51
+				padding: 5px;
52
+			}
53
+			
54
+			.Borders {
55
+				border: 1px solid #d7d7d7;
56
+			}
57
+			
58
+			.cx {
59
+				display: block;
60
+			}
61
+			span{
62
+				margin-right: 10px;
63
+			}
64
+			.Content{
65
+			    padding: 10px;
66
+    margin: 0 auto;
67
+    width: 30%;
68
+			}
69
+			#content{
70
+				    width: 80%;
71
+    margin: 0 auto;
72
+			}
73
+		</style>
74
+	</head>
75
+
76
+	<body class="gray-bg">
77
+		<div class="wrapper wrapper-content animated fadeInRight">
78
+			<div class="daoHang clearfix">
79
+				<div class="dhLeft">
80
+					<sapn>
81
+						<i class="syIcon"></i>位置:
82
+						<a href="javaScript:;" id="ReIndex">首页</a>&gt;
83
+						<a href="javaScript:;">信息管理</a>&gt;
84
+						<a class="nowPosition">公告管理</a>
85
+					</sapn>
86
+				</div>
87
+				<div class="dhRight">
88
+					<a href="" title="刷新"><i class="fa fa-refresh"></i></a>
89
+				</div>
90
+			</div>
91
+           <table border="0" cellspacing="" cellpadding="" style="width: 100%;">
92
+           	<tr>
93
+           		<th>
94
+           			<h3 id="title"></h3>
95
+           		</th>
96
+           	</tr>
97
+           	<tr>
98
+           		<td style="text-align: center;">
99
+           			<div class="Content">
100
+           				<span>发布人:</span> <span class="FBR"></span><span>发布时间:</span> <span class="RQ"></span>
101
+           			</div>
102
+           			
103
+           			
104
+           		</td>
105
+           	</tr>
106
+           	<tr>
107
+           		<td>
108
+           			<div  id="content">
109
+           				6195
110
+           			</div>
111
+           		</td>
112
+           	</tr>
113
+           </table>
114
+			
115
+		</div>
116
+
117
+		<script>
118
+			 var wid = helper.request.queryString("wid");
119
+            $(document).ready(function(){
120
+            	if(wid){
121
+            		$.getJSON(huayi.config.callcenter_url + 'Notice/GetNotice', {
122
+									noticeid: wid,
123
+									"token": $.cookie("token")
124
+								},function(result){
125
+									if(result.state.toLowerCase() == "success"){
126
+										$("#title").text(result.data.F_Title);
127
+										$("#content").text(result.data.F_Content);
128
+										$('#startTime').val(result.data.F_StartDate);
129
+										$('#endTime').val(result.data.F_EndDate);
130
+										$(".FBR").text(result.data.F_CreateByName);
131
+										$(".RQ").text(result.data.F_CreateOn);
132
+										console.log(result.data);
133
+									}
134
+								});
135
+            	}
136
+            })
137
+		</script>
138
+	</body>
139
+
140
+</html>

+ 139 - 0
CallCenterWeb.UI/Announcement/AnnDatil.html

@@ -0,0 +1,139 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+    <script src="../Script/Common/huayi.load.js"></script>
6
+    <script src="../Script/Common/huayi.config.js"></script>
7
+    <link href="../css/layer/need/layer.css" />
8
+    <link rel="stylesheet" href="../css/init.css" />
9
+    		   <title>详情</title>
10
+    		   <style>
11
+    		   	.BiaoTi{
12
+    		   		width: 100%;
13
+    		   		
14
+    		   		border-color:#ccc ;
15
+    		   		border:1px solid #ccc;
16
+    		   	}
17
+    		   	textarea{
18
+    		   		border-color:#ccc ;
19
+    		   		border:1px solid #ccc;
20
+    		   		height: 100px;
21
+    		   	}
22
+    		   		   	.BiaoTi{
23
+    		   		width: 100%;
24
+    		   		text-align:center;
25
+    		   		border-color:#ccc ;
26
+    		   		border:1px solid #ccc;
27
+    		   	}
28
+    		   	textarea{
29
+    		   		border-color:#ccc ;
30
+    		   		border:1px solid #ccc;
31
+    		   		height: 100px;
32
+    		   	}
33
+    		   	.Common {
34
+    width: 100%;
35
+    background: #fff;
36
+    text-align: center;
37
+    padding: 10px 15px;
38
+    height: auto;
39
+    overflow-y: auto;
40
+}
41
+.Common table th {
42
+    padding: 5px 8px 5px 0;
43
+    text-align: right;
44
+    width: 20%;
45
+}
46
+.Common table  {
47
+        width: 100%;
48
+}
49
+.Common table td textarea {
50
+    width: 100%;
51
+    vertical-align: middle;
52
+    resize: none;
53
+    outline: none;
54
+}
55
+.Common table td {
56
+    padding: 6px 0 5px 10px;
57
+    text-align: left;
58
+    color: #717171;
59
+    line-height: 200%;
60
+}
61
+.btn_box {
62
+    margin-top: 30px;
63
+}
64
+    		   </style>
65
+	</head>
66
+	<body>
67
+		<div class="Common">
68
+		<table  >
69
+			<tr>
70
+				<th>标题:</th>
71
+					<td>
72
+						<input class="BiaoTi" id="title" type="text" style="" />
73
+					</td>
74
+				
75
+			</tr>
76
+			
77
+			<tr>
78
+				<th >内容:</th>
79
+				<td colspan="2">
80
+					<textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
81
+				</td>
82
+			</tr>
83
+		</table>
84
+		<div class="btn_box">
85
+			<button class="btns">保存</button>
86
+		</div>
87
+		</div>
88
+		
89
+		   <script >
90
+		
91
+            var wid = helper.request.queryString("wid");
92
+            $(document).ready(function(){
93
+            	$(".btns").click(function(){
94
+            		if(!$("#title").val()){
95
+            			layer.msg("输入标题");
96
+            		}
97
+					 else if(!$("#content").val()){
98
+            			layer.msg("输入选择日期");
99
+            		}
100
+            			Add()
101
+            			
102
+            		})
103
+            	if(wid){
104
+            		$.getJSON(huayi.config.callcenter_url + 'Notice/GetNotice', {
105
+									noticeid: wid,
106
+									"token": $.cookie("token")
107
+								},function(result){
108
+									if(result.state.toLowerCase() == "success"){
109
+										$("#title").val(result.data.F_Title);
110
+										$("#content").val(result.data.F_Content);
111
+										
112
+										console.log(result.data);
113
+									}
114
+								});
115
+            	}
116
+            })
117
+//获取下拉框
118
+				
119
+ function Add(){
120
+            	$.post(huayi.config.callcenter_url + "Notice/EditNotice", {
121
+						title:$("#title").val(),
122
+						content:$("#content").val(),
123
+						token: $.cookie("token")
124
+					}, function(result) {
125
+						result = JSON.parse(result);
126
+						if(result.state.toLowerCase() == "success") {
127
+									
128
+					var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
129
+                    parent.layer.close(index); //再执行关闭
130
+						  parent.initTable();					 
131
+							parent.layer.msg("修改成功");
132
+						
133
+						}
134
+					})
135
+            }
136
+		   </script>
137
+	</body>
138
+</html>
139
+

+ 298 - 0
CallCenterWeb.UI/Announcement/AnnManagement.html

@@ -0,0 +1,298 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>公告管理</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+
11
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
12
+		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
13
+		<link href="../css/init.css" rel="stylesheet" />
14
+		<style>
15
+			table td {
16
+				word-break: break-all;
17
+				word-wrap: break-word;
18
+			}
19
+			
20
+			.ld-service li {
21
+				float: left;
22
+				font-size: 14px;
23
+				color: #000;
24
+				padding: 5px 15px;
25
+				cursor: pointer;
26
+				border-bottom: 1px solid #ccc;
27
+			}
28
+			
29
+			.cr-click {
30
+				border: 1px solid #ccc;
31
+				background-color: #fff;
32
+				border-bottom: none !important;
33
+				border-bottom-left-radius: 5px;
34
+				border-bottom-right-radius: 5px;
35
+			}
36
+			
37
+			.Shows {
38
+				display: block !important;
39
+			}
40
+			
41
+			.complain {
42
+				display: none;
43
+			}
44
+			
45
+			th {
46
+				padding: 5px;
47
+				text-align: center;
48
+			}
49
+			
50
+			td {
51
+				padding: 5px;
52
+			}
53
+			
54
+			.Borders {
55
+				border: 1px solid #d7d7d7;
56
+			}
57
+			
58
+			.cx {
59
+				display: block;
60
+			}
61
+		</style>
62
+	</head>
63
+
64
+	<body class="gray-bg">
65
+		<div class="wrapper wrapper-content animated fadeInRight">
66
+			<div class="daoHang clearfix">
67
+				<div class="dhLeft">
68
+					<sapn>
69
+						<i class="syIcon"></i>位置:
70
+						<a href="javaScript:;" id="ReIndex">首页</a>&gt;
71
+						<a href="javaScript:;">信息管理</a>&gt;
72
+						<a class="nowPosition">公告管理</a>
73
+					</sapn>
74
+				</div>
75
+				<div class="dhRight">
76
+					<a href="" title="刷新"><i class="fa fa-refresh"></i></a>
77
+				</div>
78
+			</div>
79
+
80
+			<div class="Content_box">
81
+				<!--待处理/-->
82
+				<div class="complain Shows">
83
+					<div class="th-box">
84
+						<div class="th-bar">
85
+							<div class="seach-box">
86
+								<ul>
87
+									<li>
88
+										<a class="sc_btn btns Add ">发布公告</a>
89
+										<a class="sc_btn btns  Remove">批量删除</a>
90
+									</li>
91
+								</ul>
92
+							</div>
93
+						</div>
94
+					</div>
95
+					<div style="width: 100%;padding: 10px;">
96
+						<table id="workorderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
97
+							<thead>
98
+								<tr>
99
+									<th data-field="state" data-checkbox="true"></th>
100
+									<th data-field="" data-align="center"data-formatter="Cr">序号</th>
101
+									<th data-field="F_Title" data-align="center" data-formatter="Creat">公告标题</th>
102
+									<th data-field="F_CreateByName" data-align="center">发布人</th>
103
+									<th data-field="F_CreateOn" data-align="center"data-formatter="CreateOn" >发布时间</th>
104
+									<th data-field="F_EndDate" data-align="center" data-formatter="Data">有效期</th>
105
+									<th data-field="f" data-align="center" data-formatter="Dispose">操作</th>
106
+								</tr>
107
+							</thead>
108
+						</table>
109
+					</div>
110
+				</div>
111
+
112
+			</div>
113
+		</div>
114
+
115
+		<script>
116
+			Ann();
117
+			initTable();
118
+			var keys;
119
+			$(document).ready(function() {
120
+				$("#workorderlist").on("click-row.bs.table", function(e, row, ele) {
121
+					$('.success').removeClass('success'); //去除之前选中的行的,选中样式
122
+					$(ele).addClass('success'); //添加当前选中的 success样式用于区别
123
+				});
124
+			})
125
+			//表格一
126
+			function initTable() {
127
+				//先销毁表格
128
+				$('#workorderlist').bootstrapTable('destroy');
129
+				//初始化表格,动态从服务器加载数据
130
+				$("#workorderlist").bootstrapTable({
131
+					method: "get", //使用get请求到服务器获取数据
132
+					url: huayi.config.callcenter_url + "Notice/GetList",
133
+					contentType: "application/x-www-form-urlencoded",
134
+					striped: true, //表格显示条纹
135
+					pagination: true, //启动分页
136
+					pageSize: 10, //每页显示的记录数
137
+					pageNumber: 1, //当前第几页
138
+					pageList: [10, 20, 50, 100], //记录数可选列表
139
+					search: false, //是否启用查询
140
+					showColumns: false, //显示下拉框勾选要显示的列
141
+					showRefresh: false, //显示刷新按钮
142
+					sidePagination: "server", //表示服务端请求
143
+					//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
144
+					//设置为limit可以获取limit, offset, search, sort, order
145
+					queryParamsType: "undefined",
146
+					queryParams: function queryParams(params) { //设置查询参数
147
+						var param = {
148
+							page: params.pageNumber,
149
+							pagesize: params.pageSize,
150
+							starttime: $("#startTimes").val(),
151
+							endtime: $("#endTimes").val(),
152
+							token: $.cookie("token")
153
+						};
154
+
155
+						return param;
156
+					},
157
+					onLoadSuccess: function() { //加载成功时执行
158
+						//layer.msg("加载成功");
159
+					},
160
+					onLoadError: function() { //加载失败时执行
161
+						//layer.msg("加载数据失败", { time: 1500, icon: 2 });
162
+					}
163
+				});
164
+			}
165
+			//序号
166
+			function Cr(val,row,index) {						
167
+					return index+1;
168
+	
169
+		}		
170
+			//内容
171
+			function GetCont(val) {
172
+				if(val) {
173
+					var str = '<div '
174
+					if(val.length > 10) {
175
+						str = str + ' title="' + val + '" ';
176
+						val = val.substr(0, 10) + "...";
177
+					}
178
+					return str + '>' + val + '</div>';
179
+				} else {
180
+					return '';
181
+				}
182
+			}
183
+			//跳转
184
+			function Creat(val,row){
185
+				return '<div class="imgs" style="color:#000;" >' +
186
+	'<a href="AnnD.html?wid='+row.F_NoticeId+'">'+row.F_Title+'</a>' +
187
+					'</div>';
188
+			}
189
+			//发布日期
190
+			function CreateOn(val,row){
191
+				var T= row.F_CreateOn;     //substring(0, row.F_CreateOn.indexOf(' '));
192
+				return '<div class="imgs" style="color:#000;" >'+T+'' +
193
+	
194
+					'</div>';
195
+			}
196
+         //日期
197
+         function Data(val,row) {
198
+         	var T= row.F_StartDate;
199
+         	var E=row.F_EndDate;
200
+				return '<div class="imgs" style="color:#000;" >'+T+'---'+E+' ' +
201
+	
202
+					'</div>';
203
+			}
204
+
205
+			//操作
206
+			function Dispose(val,row) {
207
+				return '<div class="imgs" >' +
208
+					'<a class="xg" onclick="xg(' + row.F_NoticeId+ ')"><i class="fa fa-edit"></i> </a>' +
209
+					'<a class="xg" onclick="remove(' + row.F_NoticeId+ ')"><i class="fa fa-remove"></i> </a>' +
210
+					'</div>';
211
+			}
212
+			//查看详情
213
+			function xg(str) {
214
+				layer.open({
215
+					type: 2,
216
+					content: "AnnDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
217
+					title: '公告详情',
218
+					area: ['60%', '55%'], //宽高
219
+				});
220
+			}
221
+			///添加公告
222
+			$(".Add").click(function() {
223
+				layer.open({
224
+					type: 2,
225
+					content: "Add.html?wid=", //iframe的url,no代表不显示滚动条
226
+					title: '添加公告',
227
+					area: ['60%', '55%'], //宽高
228
+				});
229
+			});
230
+			//删除
231
+			$(".remove").click(function() {
232
+				var ids = $.map($('#workorderlist').bootstrapTable('getSelections'),
233
+					function(row) {
234
+						return row.F_NoticeId;
235
+					});
236
+				/*判断长度*/
237
+				if(ids.length <= 0) {
238
+					layer.confirm('没有可删除的选项?', {
239
+						btn: ['确定'] //按钮
240
+					});
241
+					return;
242
+				}
243
+									remove();
244
+			});
245
+
246
+			function remove(str) {
247
+				layer.confirm('确定要删除么?', {
248
+					btn: ['确定','取消'] //按钮
249
+				},function(){
250
+					$.post(huayi.config.callcenter_url + "Notice/DelNotice", {
251
+						ids: str,
252
+						token: $.cookie("token")
253
+					}, function(result) {
254
+						result = JSON.parse(result);
255
+						if(result.state.toLowerCase() == "success") {
256
+							layer.msg("删除成功");
257
+							initTable();
258
+						}
259
+					})
260
+				});
261
+			}
262
+			//批量删除Remove
263
+			$(".Remove").click(function() {
264
+				var ids = $.map($('#workorderlist').bootstrapTable('getSelections'),
265
+					function(row) {
266
+						return row.F_NoticeId;
267
+					});
268
+				/*判断长度*/
269
+				if(ids.length <= 0) {
270
+					layer.confirm('没有可删除的选项?', {
271
+						btn: ['确定'] //按钮
272
+					});
273
+					return;
274
+				}
275
+           		$.post(huayi.config.callcenter_url + "Notice/DelNotice", {
276
+						ids: ids,
277
+						token: $.cookie("token")
278
+					}, function(result) {
279
+						result = JSON.parse(result);
280
+						if(result.state.toLowerCase() == "success") {
281
+							layer.msg("删除成功");
282
+							initTable();
283
+						}
284
+					})
285
+			});
286
+			function Ann() {
287
+	$.getJSON(huayi.config.callcenter_url + 'Notice/GetListTop', {
288
+		top:5,
289
+		"token": $.cookie("token")
290
+	}, function(result) {
291
+		
292
+	});
293
+}
294
+			
295
+		</script>
296
+	</body>
297
+
298
+</html>