Просмотр исходного кода

坐席考勤 绩效考勤 增加排序功能

zhangshuangnan лет назад: 8
Родитель
Сommit
0a35886e3a

+ 49 - 69
WebUI/CallCenterWeb.UI/ReportForm/seatsCheck.html

@@ -88,45 +88,29 @@
88 88
 
89 89
 								</div>
90 90
 							</div>
91
-							<div style="width: 100%;padding: 10px;">
92
-								<div class="table-head">
93
-									<table id="thead1" class="table table-hover table-striped table-bordered table-condensed">
94
-										<colgroup>
95
-											<col style="width: 80px;" />
96
-											<col/>
97
-										</colgroup>
91
+							<!--<div style="width: 100%;padding: 10px;">-->
92
+								<!--<div class="table-head">-->
93
+									<table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
98 94
 										<thead>
99
-											<tr>
100
-												<th>工号</th>
101
-												<th>姓名</th>
102
-												<th>分机号</th>
103
-												<th>首次签入时间</th>
104
-												<th>最后签出时间</th>
105
-												<th>签入总时长</th>
106
-												<th>空闲时长</th>
107
-												<th>通话时长</th>
108
-												<th>话后处理时长</th>
109
-												<th>置忙时长</th>
110
-												<th>置忙次数</th>
111
-												<th>登录次数</th>
112
-												<th>呼入量</th>
113
-												<th>呼出量</th>
114
-											</tr>
95
+										<tr>
96
+											<th data-field="UserCode" data-align="center">工号</th>
97
+											<th data-field="UserName" data-align="center">姓名</th>
98
+											<th data-field="ExtNumber" data-align="center">分机号</th>
99
+											<th data-field="logintime" data-align="center" data-sortable="true">首次签入时间</th>
100
+											<th data-field="logouttime" data-align="center" data-sortable="true"> 最后签出时间</th>
101
+											<th data-field="logintimes" data-align="center"> 签入总时长</th>
102
+											<th data-field="free" data-align="center" data-sortable="true"> 空闲时长</th>
103
+											<th data-field="talking" data-align="center" data-sortable="true"> 通话时长</th>
104
+											<th data-field="postprocess" data-align="center" data-sortable="true"> 话后处理时长</th>
105
+											<th data-field="repose" data-align="center" data-sortable="true"> 置忙时长</th>
106
+											<th data-field="reposeconut" data-align="center" data-sortable="true"> 置忙次数</th>
107
+											<th data-field="logcount" data-align="center" data-sortable="true"> 登录次数</th>
108
+											<th data-field="callincount" data-align="center" data-sortable="true"> 呼入量</th>
109
+											<th data-field="calloutcount" data-align="center" data-sortable="true"> 呼出量</th>
110
+										</tr>
115 111
 										</thead>
116 112
 									</table>
117
-								</div>
118
-								<div class="table-body">
119
-									<table id="table1" class="table table-hover table-striped table-bordered table-condensed">
120
-										<colgroup>
121
-											<col style="width: 80px;" />
122
-											<col/>
123
-										</colgroup>
124
-										<tbody>
125
-
126
-										</tbody>
127
-									</table>
128
-								</div>
129
-							</div>
113
+							<!--</div>-->
130 114
 						</div>
131 115
 						<div class="two_content" style="display: none;">
132 116
 							<div class="toolBar clearfix">
@@ -143,16 +127,16 @@
143 127
 										<th data-field="UserCode" data-align="center">工号</th>
144 128
 										<th data-field="UserName" data-align="center">姓名</th>
145 129
 										<th data-field="ExtNumber" data-align="center">分机号</th>
146
-										<th data-field="logintime" data-align="center">签入时间</th>
147
-										<th data-field="logouttime" data-align="center"> 签出时间</th>
148
-										<th data-field="logtimes" data-align="center"> 签入总时长</th>
149
-										<th data-field="free" data-align="center"> 空闲时长</th>
150
-										<th data-field="talking" data-align="center"> 通话时长</th>
151
-										<th data-field="postprocess" data-align="center"> 话后处理时长</th>
152
-										<th data-field="repose" data-align="center"> 置忙时长</th>
153
-										<th data-field="reposeconut" data-align="center"> 置忙次数</th>
154
-										<th data-field="callincount" data-align="center"> 呼入量</th>
155
-										<th data-field="calloutcount" data-align="center"> 呼出量</th>
130
+										<th data-field="logintime" data-align="center" data-sortable="true">签入时间</th>
131
+										<th data-field="logouttime" data-align="center" data-sortable="true"> 签出时间</th>
132
+										<th data-field="logtimes" data-align="center" data-sortable="true"> 签入总时长</th>
133
+										<th data-field="free" data-align="center" data-sortable="true"> 空闲时长</th>
134
+										<th data-field="talking" data-align="center" data-sortable="true"> 通话时长</th>
135
+										<th data-field="postprocess" data-align="center" data-sortable="true"> 话后处理时长</th>
136
+										<th data-field="repose" data-align="center" data-sortable="true"> 置忙时长</th>
137
+										<th data-field="reposeconut" data-align="center" data-sortable="true"> 置忙次数</th>
138
+										<th data-field="callincount" data-align="center" data-sortable="true"> 呼入量</th>
139
+										<th data-field="calloutcount" data-align="center" data-sortable="true"> 呼出量</th>
156 140
 									</tr>
157 141
 								</thead>
158 142
 							</table>
@@ -227,36 +211,16 @@
227 211
 					},
228 212
 					success: function(data) {
229 213
 						if(data.state.toLowerCase() == 'success') {
230
-							$('#table1 tbody').html('');
231
-							$(data.data).each(function(i, n) {
232
-								//							console.log(n)
233
-								$('<tr>' +
234
-									'<td>' + n.UserCode + '</td>' +
235
-									'<td>' + n.UserName + '</td>' +
236
-									'<td>' + n.ExtNumber + '</td>' +
237
-									'<td>' + n.logintime + '</td>' + //签入
238
-									'<td>' + n.logouttime + '</td>' + //签出
239
-									'<td>' + n.logintimes + '</td>' + //签入总时长
240
-									'<td>' + n.free + '</td>' + //空闲
241
-									'<td>' + n.talking + '</td>' + //通话
242
-									'<td>' + n.postprocess + '</td>' + //话后处理
243
-									'<td>' + n.repose + '</td>' + //置忙
244
-									'<td>' + n.reposeconut + '</td>' + //置忙次数
245
-									'<td>' + n.logcount + '</td>' + //登录次数
246
-									'<td>' + n.callincount + '</td>' + //呼入
247
-									'<td>' + n.calloutcount + '</td>' + //呼出
248
-									'</tr>').appendTo('#table1 tbody')
249
-							})
250
-
214
+							$('#table1').bootstrapTable('load',data.data); 
251 215
 						}
252 216
 
253 217
 					}
254 218
 
255 219
 				});
220
+					$('#table1').bootstrapTable('destroy').bootstrapTable({striped: true});
256 221
 
257 222
 			}
258 223
 			var table = $("#workorderlist");
259
-
260 224
 			function initTable2() {
261 225
 				//先销毁表格
262 226
 				table.bootstrapTable('destroy');
@@ -294,7 +258,23 @@
294 258
 						//layer.msg("加载数据失败", { time: 1500, icon: 2 });
295 259
 					}
296 260
 				});
297
-
261
+//				
262
+//				
263
+//				 $.ajax({
264
+//	         	type:"get",
265
+//	         	url: huayi.config.callcenter_url+"SeatMonitoring/GetReportDetailList",
266
+//	         	async:true,
267
+//	         	dataType:'json',
268
+//	         	data:{
269
+//	         			token: $.cookie("token"),
270
+//						stime: $('#startTime1').val(),
271
+//						etime: $('#endTime1').val()
272
+//	         	},
273
+//	         	success:function(data){
274
+//	         		table.bootstrapTable('load',data.rows); 
275
+//	         	}
276
+//	         });
277
+//				table.bootstrapTable('destroy').bootstrapTable({striped: true});
298 278
 			}
299 279
 			//导出
300 280
 			$('.export').click(function() {

+ 35 - 64
WebUI/CallCenterWeb.UI/jiXiao/jiXiao.html

@@ -13,19 +13,19 @@
13 13
 		<script src="../js/laydate/laydate.js"></script>
14 14
 		<style type="text/css">
15 15
 				.time-box{
16
-			display: inline-block;
17
-			position: relative;
18
-		}
19
-		.toolRight input{
20
-			    padding-right: 30px;
21
-		}
22
-			.tub{
23
-		   position: absolute;
24
-		    right: 8px;
25
-		    top: 5px;
26
-		    font-size: 18px;
27
-		    color: #00a0ca;
28
-		}
16
+					display: inline-block;
17
+					position: relative;
18
+				}
19
+				.toolRight input{
20
+					padding-right: 30px;
21
+				}
22
+				.tub{
23
+				    position: absolute;
24
+				    right: 8px;
25
+				    top: 5px;
26
+				    font-size: 18px;
27
+				    color: #00a0ca;
28
+				}
29 29
 		</style>
30 30
 	</head>
31 31
 	<body class="gray-bg">
@@ -56,7 +56,7 @@
56 56
 						</div>
57 57
 					</div>
58 58
 					<div style="width: 100%;padding: 10px;">
59
-					<table id="table1" data-row-style="rowStyle" data-query-params="queryParams">
59
+					<table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
60 60
 						<thead>
61 61
 							<tr>
62 62
 								<!--<th data-field="state" data-checkbox="true" data-align="center"></th>-->
@@ -78,68 +78,39 @@
78 78
 			</div>
79 79
 		</div>
80 80
 		<script>
81
-			var table1=$('#table1');
81
+//			var table1=$('#table1');
82 82
 			var dates=new Date();
83 83
 			var time=dates.getFullYear()+"-"+(dates.getMonth()+1);
84 84
 			$(document).ready(function() {
85 85
 				$('#startTime').val(time)
86 86
 					//年月选择器
87 87
 				laydate.render({
88
-			  elem: '#startTime'
89
-			  ,format: 'yyyy-MM',
90
-			  type: 'month',
91
-			  theme: '#00a1cb'
92
-//			  value: new Date() 
93
-			});
94
-				console.log($('#startTime').val())
88
+				  elem: '#startTime'
89
+				  ,format: 'yyyy-MM',
90
+				  type: 'month',
91
+				  theme: '#00a1cb'
92
+				});
95 93
 				initTable1();
96 94
 				//搜索
97 95
 				$('.search').click(function(){
98 96
 					initTable1();
99 97
 				})
100
-					
101 98
 			})
102 99
 			function initTable1() {
103
-				//先销毁表格
104
-				table1.bootstrapTable('destroy');
105
-				//初始化表格,动态从服务器加载数据
106
-				table1.bootstrapTable({
107
-					method: "GET", //使用GET请求到服务器获取数据
108
-					url: huayi.config.callcenter_url+"DeptAssessment/GetDeptAssessment", //获取数据的Servlet地址
109
-					contentType: "application/x-www-form-urlencoded",striped: true,
110
-					striped: true, //表格显示条纹
111
-					pagination: false, //启动分页
112
-					sortable: true,      //是否启用排序
113
-   					sortOrder: "asc",     //排序方式
114
-					pageSize:10, //每页显示的记录数
115
-					pageNumber: 1, //当前第几页
116
-					pageList: [10,20, 50, 100], //记录数可选列表
117
-					search: false, //是否启用查询
118
-					showColumns: false, //显示下拉框勾选要显示的列
119
-					showRefresh: false, //显示刷新按钮
120
-					sidePagination: "server", //表示服务端请求
121
-					
122
-					//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
123
-					//设置为limit可以获取limit, offset, search, sort, order
124
-					queryParamsType: "undefined",
125
-					queryParams: function queryParams(params) { //设置查询参数
126
-						var param = {
127
-							page: params.pageNumber,
128
-							pagesize: params.pageSize,
129
-							sort: params.sort,  //排序列名 
130
-    						sortOrder: params.order,//排位命令(desc,asc)
131
-							strdatetime: $('#startTime').val(),
132
-							token: $.cookie("token"),
133
-						};
134
-						return param;
135
-					},
136
-					onLoadSuccess: function() { //加载成功时执行
137
-						//layer.msg("加载成功");
138
-					},
139
-					onLoadError: function() { //加载失败时执行
140
-						//layer.msg("加载数据失败", { time: 1500, icon: 2 });
141
-					}
142
-				});
100
+			   $.ajax({
101
+	         	type:"get",
102
+	         	url:huayi.config.callcenter_url+"DeptAssessment/GetDeptAssessment",
103
+	         	async:true,
104
+	         	dataType:'json',
105
+	         	data:{
106
+	         		strdatetime: $('#startTime').val(),
107
+					token: $.cookie("token")
108
+	         	},
109
+	         	success:function(data){
110
+	         		$('#table1').bootstrapTable('load',data.rows); 
111
+	         	}
112
+	         });
113
+				$('#table1').bootstrapTable('destroy').bootstrapTable({striped: true});
143 114
 			}
144 115
 	            //导出
145 116
         		$('.export').click(function() {
@@ -161,7 +132,7 @@
161 132
             			url += "&strdatetime=" + $("#startTime").val() +"&isExport=true";
162 133
                 		obj.href = url;
163 134
             }
164
-	         
135
+	    
165 136
 	       
166 137
 		</script>
167 138
 	</body>

+ 15 - 42
WebUI/CallCenterWeb.UI/jiXiao/jiXiaoTongJi.html

@@ -81,7 +81,7 @@
81 81
 			</div>
82 82
 		</div>
83 83
 		<script>
84
-			var table1=$('#table1');
84
+//			var table1=$('#table1');
85 85
 			var dates=new Date();
86 86
 			var time=dates.getFullYear()+"-"+(dates.getMonth()+1);
87 87
 			$(document).ready(function() {
@@ -104,51 +104,24 @@
104 104
 					
105 105
 			})
106 106
 			function initTable1() {
107
-				//先销毁表格
108
-				table1.bootstrapTable('destroy');
109
-				//初始化表格,动态从服务器加载数据
110
-				table1.bootstrapTable({
111
-					method: "GET", //使用GET请求到服务器获取数据
112
-					url: huayi.config.callcenter_url+"DeptAssessment/GetDeptAssessment", //获取数据的Servlet地址
113
-					contentType: "application/x-www-form-urlencoded",striped: true,
114
-					striped: true, //表格显示条纹
115
-					pagination: false, //启动分页
116
-					pageSize:10, //每页显示的记录数
117
-					pageNumber: 1, //当前第几页
118
-					pageList: [10,20, 50, 100], //记录数可选列表
119
-					search: false, //是否启用查询
120
-					showColumns: false, //显示下拉框勾选要显示的列
121
-					showRefresh: false, //显示刷新按钮
122
-					sidePagination: "server", //表示服务端请求
123
-					sortable: true,      //是否启用排序
124
-   					sortOrder: "asc",     //排序方式
125
-					//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
126
-					//设置为limit可以获取limit, offset, search, sort, order
127
-					queryParamsType: "undefined",
128
-					queryParams: function queryParams(params) { //设置查询参数
129
-						var param = {
130
-							page: params.pageNumber,
131
-							pagesize: params.pageSize,
132
-							sort: params.sort,  //排序列名 
133
-    						sortOrder: params.order,//排位命令(desc,asc)
134
-							strdatetime: $('#startTime').val(),
135
-							token: $.cookie("token"),
136
-						};
137
-						return param;
138
-					},
139
-					onLoadSuccess: function() { //加载成功时执行
140
-						//layer.msg("加载成功");
141
-					},
142
-					onLoadError: function() { //加载失败时执行
143
-						//layer.msg("加载数据失败", { time: 1500, icon: 2 });
144
-					}
145
-				});
107
+			   $.ajax({
108
+	         	type:"get",
109
+	         	url: huayi.config.callcenter_url+"DeptAssessment/GetDeptAssessment",
110
+	         	async:true,
111
+	         	dataType:'json',
112
+	         	data:{
113
+	         			strdatetime: $('#startTime').val(),
114
+						token: $.cookie("token"),
115
+	         	},
116
+	         	success:function(data){
117
+	         		$('#table1').bootstrapTable('load',data.rows); 
118
+	         	}
119
+	         });
120
+				$('#table1').bootstrapTable('destroy').bootstrapTable({striped: true});
146 121
 			}
147
-	       
148 122
 	       function detail(val,row){
149 123
 	       	   return '<div> <a title="查看详情" onclick=go("'+ row.deptid +'")><i class="fa fa-bars"></i></a></div>'
150 124
 	       }
151
-			
152 125
 			function go(deptname){
153 126
 				console.log(deptname)
154 127
 				top.$("iframe:visible")[0].src = "jiXiao/jiXiaoDetail.html?depid=" + deptname +"&time="+$('#startTime').val();