Przeglądaj źródła

Merge branch 'master' of http://192.168.1.222:3000/zhoufan/12345_Base_Web

# Conflicts:
#	WebUI/CallCenterWeb.UI/Report/CallTime.html
zhengbingbing 8 lat temu
rodzic
commit
72b0b76c1c

+ 71 - 9
WebUI/CallCenterWeb.UI/Announcement/Add.html

@@ -6,7 +6,7 @@
6 6
     <script src="../Script/Common/huayi.config.js"></script>
7 7
     <link href="../css/layer/need/layer.css" />
8 8
     <link rel="stylesheet" href="../css/init.css" />
9
-    		   <title></title>
9
+     <title></title>
10 10
     		   <style>
11 11
     		   	.BiaoTi{
12 12
     		   		width: 100%;
@@ -39,6 +39,13 @@
39 39
 				</td>
40 40
 			</tr>
41 41
 			<tr>
42
+				<th>角色:</th>
43
+				<td>
44
+					<select name="" id="role" class="select_"></select>
45
+					<select name="" id="zx" class="select_"></select>
46
+				</td>
47
+			</tr>
48
+			<tr>
42 49
 				<th >内容:</th>
43 50
 				<td colspan="2">
44 51
 					<textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
@@ -60,7 +67,8 @@
60 67
              laydate({
61 68
                 elem: '#endTime',
62 69
                 event: 'focus'
63
-            });         
70
+            });  
71
+            
64 72
             $(document).ready(function(){         
65 73
             	$(".btns").click(function(){ 
66 74
             		if(!$("#title").val()){
@@ -71,19 +79,74 @@
71 79
             		}else if(!$("#endTime").val()){
72 80
             			layer.msg("输入选择日期");
73 81
             		}else{
74
-            			Add();
82
+//          			if($('#role').val()==0){
83
+//          				role=$('#role').val();
84
+//          			    user=0;
85
+//          			}else{
86
+//          				role=$('#role').val();
87
+//          				user=$('#role').val();
88
+//          			}
89
+						var user=$("#zx").val();
90
+			            var role=$('#role').val();
91
+            			Add(user,role)
75 92
             		}
76 93
             			
77 94
             	})
78
-            
95
+            	
96
+            	//获取下拉框
97
+				$.getJSON(huayi.config.callcenter_url + "Notice/GetRoleList", {
98
+					"token": $.cookie("token")
99
+				}, function(result) {
100
+					if(result.state.toLowerCase() == "success") {
101
+						goodslist = result.data;
102
+						bindseat($("#role"));
103
+					}
104
+				});
105
+				//下拉框
106
+				function bindseat(obj) {
107
+					obj.empty();
108
+					obj.append('<option value="0" selected="selected">所有角色</option>');
109
+					$(goodslist).each(function(i, n) {
110
+						obj.append('<option value="' + n.F_RoleId + '">' + n.F_RoleName + '</option>');
111
+					})
112
+				}
113
+				$.getJSON(huayi.config.callcenter_url + "Notice/GetUserListByRoleId", {
114
+							"token":$.cookie("token"),"roleid":0
115
+						}, function(result) {
116
+							if(result.state.toLowerCase() == "success") {
117
+								goodslist = result.data;
118
+								bindZX($("#zx"));
119
+							}
120
+						});
121
+				function bindZX(obj) {
122
+					obj.empty();
123
+						obj.append('<option value="0" selected="selected">所有人</option>');
124
+					$(goodslist).each(function(i, n) {
125
+						obj.append('<option value="' + n.F_UserId + '">' + n.F_UserCode + '</option>');
126
+					})
127
+				}
128
+				$("#role").change(function(){
129
+					var pid=$(this).val();
130
+					$.getJSON(huayi.config.callcenter_url + "Notice/GetUserListByRoleId", {
131
+							"token":$.cookie("token"),"roleid":pid
132
+						}, function(result) {
133
+							if(result.state.toLowerCase() == "success") {
134
+								goodslist = result.data;
135
+								bindZX($("#zx"));
136
+							}
137
+						});
138
+				})
79 139
             })
80
-            function Add(){   
140
+            
141
+            function Add(user,role){   
81 142
             	$.post(huayi.config.callcenter_url + "Notice/AddNotice", {
82 143
 						title:$("#title").val(),
83 144
 						content:$("#content").val(),
84
-						 stime:$("#startTime").val(),
85
-						  etime:$('#endTime').val(),
86
-						token: $.cookie("token")
145
+						stime:$("#startTime").val(),
146
+						etime:$('#endTime').val(),
147
+						token: $.cookie("token"),
148
+						userid:user,
149
+						roleid:role
87 150
 					}, function(result) {
88 151
 						result = JSON.parse(result);
89 152
 						if(result.state.toLowerCase() == "success") {
@@ -92,7 +155,6 @@
92 155
                     parent.layer.close(index); //再执行关闭
93 156
 						  parent.initTable();					 
94 157
 							parent.layer.msg("添加成功");
95
-						
96 158
 						}
97 159
 					})
98 160
             }

+ 59 - 19
WebUI/CallCenterWeb.UI/Announcement/AnnDatil.html

@@ -39,6 +39,13 @@
39 39
 				</td>
40 40
 			</tr>
41 41
 			<tr>
42
+				<th>角色:</th>
43
+				<td>
44
+					<select name="" id="role" class="select_"></select>
45
+					<select name="" id="zx" class="select_"></select>
46
+				</td>
47
+			</tr>
48
+			<tr>
42 49
 				<th >内容:</th>
43 50
 				<td colspan="2">
44 51
 					<textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
@@ -62,6 +69,7 @@
62 69
                 elem: '#endTime',
63 70
                 event: 'focus'
64 71
             });
72
+           
65 73
             var wid = helper.request.queryString("wid");
66 74
             $(document).ready(function(){
67 75
             	$(".btns").click(function(){
@@ -73,7 +81,9 @@
73 81
             		}else if(!$("#endTime").val()){
74 82
             			layer.msg("输入选择日期");
75 83
             		}else{
76
-            			Add();
84
+ 						 var user=$("#zx").val();
85
+           				 var role=$('#role').val();
86
+            			Add(user,role)
77 87
             		}
78 88
             			
79 89
             		})
@@ -87,35 +97,65 @@
87 97
 										$("#content").val(result.data.F_Content);
88 98
 										$('#startTime').val(result.data.F_StartDate);
89 99
 										$('#endTime').val(result.data.F_EndDate);
100
+										$('#role').val(result.data.F_RoleId);
101
+           								$("#zx").val(result.data.F_UserId);
90 102
 										console.log(result.data);
91 103
 									}
92 104
 								});
93 105
             	}
94 106
             })
95
-//          	$.post(huayi.config.callcenter_url + "Notice/AddNotice", {
96
-//						title:$("#title").val(),
97
-//						content:$("#content").val(),
98
-//						 stime:$("#startTime").val(),
99
-//						  etime:$('#endTime').val(),
100
-//						token: $.cookie("token")
101
-//					}, function(result) {
102
-//						result = JSON.parse(result);
103
-//						if(result.state.toLowerCase() == "success") {
104
-//									
105
-//					var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
106
-//                  parent.layer.close(index); //再执行关闭
107
-//						  parent.initTable();					 
108
-//							parent.layer.msg("添加成功");
109
-//						
110
-//						}
111
-//					})
112
- function Add(){
107
+//获取下拉框
108
+				$.getJSON(huayi.config.callcenter_url + "Notice/GetRoleList", {
109
+					"token": $.cookie("token")
110
+				}, function(result) {
111
+					if(result.state.toLowerCase() == "success") {
112
+						goodslist = result.data;
113
+						bindseat($("#role"));
114
+					}
115
+				});
116
+				//下拉框
117
+				function bindseat(obj) {
118
+					obj.empty();
119
+					obj.append('<option value="0" selected="selected">所有角色</option>');
120
+					$(goodslist).each(function(i, n) {
121
+						obj.append('<option value="' + n.F_RoleId + '">' + n.F_RoleName + '</option>');
122
+					})
123
+				}
124
+				$.getJSON(huayi.config.callcenter_url + "Notice/GetUserListByRoleId", {
125
+							"token":$.cookie("token"),"roleid":0
126
+						}, function(result) {
127
+							if(result.state.toLowerCase() == "success") {
128
+								goodslist = result.data;
129
+								bindZX($("#zx"));
130
+							}
131
+						});
132
+				function bindZX(obj) {
133
+					obj.empty();
134
+					obj.append('<option value="0" selected="selected">所有人</option>');
135
+					$(goodslist).each(function(i, n) {
136
+						obj.append('<option value="' + n.F_UserId + '">' + n.F_UserCode + '</option>');
137
+					})
138
+				}
139
+				$("#role").change(function(){
140
+					var pid=$(this).val();
141
+					$.getJSON(huayi.config.callcenter_url + "Notice/GetUserListByRoleId", {
142
+							"token":$.cookie("token"),"roleid":pid
143
+						}, function(result) {
144
+							if(result.state.toLowerCase() == "success") {
145
+								goodslist = result.data;
146
+								bindZX($("#zx"));
147
+							}
148
+						});
149
+				})
150
+ function Add(user,role){
113 151
             	$.post(huayi.config.callcenter_url + "Notice/EditNotice", {
114 152
 						title:$("#title").val(),
115 153
 						content:$("#content").val(),
116 154
 						 stime:$("#startTime").val(),
117 155
 						  etime:$('#endTime').val(),
118 156
 						  nid:wid,
157
+						  userid:user,
158
+						  roleid:role,
119 159
 						token: $.cookie("token")
120 160
 					}, function(result) {
121 161
 						result = JSON.parse(result);

+ 3 - 0
WebUI/CallCenterWeb.UI/Report/CallTime.html

@@ -121,6 +121,7 @@
121 121
 			})
122 122
 			//加载表头
123 123
 			function GetColumnList() {
124
+				$("#thead thead tr").html('');
124 125
 				/*请求后台*/
125 126
 				$.ajax({
126 127
 					type: "get",
@@ -143,6 +144,7 @@
143 144
 			}
144 145
 			//加载数据
145 146
 			function GetDataList() {
147
+				$(".hwbb tbody").html('');
146 148
 				/*请求后台*/
147 149
 				$.ajax({
148 150
 					type: "get",
@@ -162,6 +164,7 @@
162 164
 							for(var i = 0; i < content.length; i++) {
163 165
 							    //$("<tr><td>" + content[i].时间 + "</td><td>" + content[i].电话呼入次数 + "</td><td>" + content[i].电话呼出次数 + "</td><td>" + content[i].正常接听次数 + "</td><td>" + content[i].未接通次数 + "</td><td>" + content[i].语音留言次数 + "</td><td>" + content[i].主动放弃次数 + "</td><td>" + content[i].电话骚扰次数 + "</td><td>" + content[i].平均呼入时间 + "</td></tr>").appendTo(".hwbb tbody");
164 166
 							    $("<tr><td>" + content[i].时间 + "</td><td>" + content[i].电话呼入次数 + "</td><td>" + content[i].电话呼出次数 + "</td><td>" + content[i].正常接听次数 + "</td><td>" + content[i].未接通次数 + "</td><td>" + content[i].主动放弃次数 + "</td><td>" + content[i].电话骚扰次数 + "</td><td>" + content[i].平均呼入时间 + "</td></tr>").appendTo(".hwbb tbody");
167
+								//$("<tr><td>" + content[i].时间 + "</td><td>" + content[i].电话呼入次数 + "</td><td>" + content[i].电话呼出次数 + "</td><td>" + content[i].正常接听次数 + "</td><td>" + content[i].语音留言次数 + "</td><td>" + content[i].主动放弃次数 + "</td><td>" + content[i].平均呼入时间 + "</td></tr>").appendTo(".hwbb tbody");
165 168
 							}
166 169
 						}
167 170
 					}

+ 3 - 2
WebUI/CallCenterWeb.UI/ReportForm/callTime.html

@@ -304,7 +304,7 @@
304 304
 					},
305 305
 					success:function(res){
306 306
 						con=res.data;
307
-						//console.log(con);
307
+						$('#thead thead tr').html('');
308 308
 						for(var i=0;i<con.length;i++){
309 309
 							$('<th>' + con[i]+ '</th>').appendTo('#thead thead tr')
310 310
 						}
@@ -333,6 +333,7 @@
333 333
 	       		 }
334 334
 			        //表格数据
335 335
 			        function Ajax(stime,endtime){
336
+			        	
336 337
 			        	var zx_name=[],
337 338
 			        	    huru=[],
338 339
 			        	    huruTime=[],
@@ -355,7 +356,7 @@
355 356
 			        		},
356 357
 			        		success:function(data) {
357 358
 			        			var tbodyCon=data.data;
358
-			        			console.log(tbodyCon);
359
+			        			$('.thTable tbody').html('');
359 360
 			        			for(var j=0;j<tbodyCon.length;j++){
360 361
 			        				$('<tr><td>' + tbodyCon[j].坐席名称+ '</td><td>' + tbodyCon[j].呼入次数+ '</td><td>' +  studyTime(tbodyCon[j].呼入时长)+ '</td><td>' + tbodyCon[j].呼出次数+ '</td><td>' + studyTime(tbodyCon[j].呼出时长)+ '</td><td>' + tbodyCon[j].呼出未接通次数+ '</td><td>' + studyTime(tbodyCon[j].振铃时长) + '</td><td>' + studyTime(tbodyCon[j].通话总时长)+ '</td><td>' + studyTime(tbodyCon[j].平均通话总时长)+ '</td></tr>').appendTo('.thTable tbody')
361 362
 			        			    zx_name.push(tbodyCon[j].坐席名称);

+ 1 - 0
WebUI/CallCenterWeb.UI/ReportForm/riLiuLiang.html

@@ -232,6 +232,7 @@
232 232
         			})
233 233
              Ajax();
234 234
 			function Ajax(){
235
+				$('.thTable tbody').html('');
235 236
 				$.ajax({
236 237
 				type:"get",
237 238
 				url: huayi.config.callcenter_url + "FlowAnalysis/GetDayCount",

+ 0 - 1
WebUI/CallCenterWeb.UI/ReportForm/seatsCheck.html

@@ -161,7 +161,6 @@
161 161
 				success:function(data){
162 162
 					if(data.state.toLowerCase()=='success'){
163 163
 						$('#table1 tbody').html('');
164
-						
165 164
 						$(data.data).each(function(i,n){
166 165
 //							console.log(n)
167 166
 								$('<tr>'+

+ 1 - 0
WebUI/CallCenterWeb.UI/ReportForm/yueLiuLiang.html

@@ -260,6 +260,7 @@
260 260
         			})
261 261
              Ajax();
262 262
 			function Ajax(){
263
+				$('.thTable tbody').html('');
263 264
 				$.ajax({
264 265
 				type:"get",
265 266
 				url: huayi.config.callcenter_url + "FlowAnalysis/GetMonthCount",

Plik diff jest za duży
+ 3 - 1
WebUI/CallCenterWeb.UI/ReportForm/zuoXiTable.html


+ 3 - 2
WebUI/CallCenterWeb.UI/ReportForm/zuoXiTime.html

@@ -204,6 +204,7 @@
204 204
 		        			token:token
205 205
 		        		},
206 206
 		        		success:function(res){
207
+		        			$('#thead thead tr').html('');
207 208
 		        			var con=res.data;
208 209
 		        			for(var j=0;j<con.length;j++){
209 210
 							$('<th>' + con[j]+ '</th>').appendTo('#thead thead tr')
@@ -223,9 +224,9 @@
223 224
 		                		},
224 225
 		                		success:function(data){
225 226
 		                			var result=data.data;
226
-		                			console.log(result);
227
+		                		$('.thTable tbody').html('');
227 228
 		                			for(var i=0;i<result.length;i++){
228
-										$('<tr><td>' + result[i].坐席人员 + '</td><td>' + result[i].通话总时长 + '</td><td>' + result[i].呼出通话总时长 + '</td><td>' + result[i].呼出通话占比 + '</td><td>' + result[i].呼入通话总时长 + '</td><td>' + result[i].呼入通话占比 + '</td><td>' + result[i].平均日呼入通话时长 + '</td><td>' + result[i].平均日呼出通话时长 + '</td></tr>').appendTo('.thTable  tbody')
229
+										$('<tr><td>' + result[i].坐席人员 + '</td><td>' + result[i].通话总时长 + '</td><td>' + result[i].呼出通话总时长 + '</td><td>' + result[i].呼出通话占比 + '</td><td>' + result[i].呼入通话总时长 + '</td><td>' + result[i].呼入通话占比 + '</td><td>' + result[i].平均日呼入通话时长 + '</td><td>' + result[i].平均日呼出通话时长 + '</td></tr>').appendTo('.thTable tbody')
229 230
 		                			}
230 231
 		                		}
231 232
 		                	});

+ 320 - 0
WebUI/CallCenterWeb.UI/SystemManager/GroupClassManage.html

@@ -0,0 +1,320 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <script src="../Script/Common/huayi.load.js"></script>
7
+    <script src="../Script/Common/huayi.config.js"></script>
8
+    <script src="../js/jquery-ui.min.js"></script>
9
+    <link rel="stylesheet" href="../css/init.css" />
10
+    <link href="../js/fullcalendar/fullcalendar.css" rel="stylesheet" />
11
+    <script src="../js/fullcalendar/fullcalendar.min.js"></script>
12
+    <title>系统管理-->排班管理</title>
13
+    <style>
14
+        .fc-event-title {
15
+            color:white;
16
+        }
17
+        .group {
18
+            margin-bottom:5px;
19
+        }
20
+        .seatuser {
21
+            color: black;
22
+            padding: 5px 10px;
23
+            border-radius: 2px;
24
+            cursor: pointer;
25
+            margin-bottom: 5px;
26
+            background-color: #f3f3f4;
27
+        }
28
+        .active {
29
+            background-color: #1ab394;
30
+            color: #fff;
31
+        }
32
+        .lable {
33
+            display: none;
34
+            background-color: #d1dade;
35
+            color: #5e5e5e;
36
+            font-size: 10px;
37
+            padding: 3px 8px;
38
+            text-shadow: none;
39
+            font-size: 75%;
40
+            font-weight: 700;
41
+            line-height: 1;
42
+            text-align: center;
43
+            white-space: nowrap;
44
+            vertical-align: baseline;
45
+            border-radius: .25em;
46
+            margin:3px;
47
+            float:left;
48
+            cursor: pointer;
49
+        }
50
+        .active ~ .lable {
51
+            display: inline;
52
+        }
53
+    </style>
54
+</head>
55
+<body class="gray-bg">
56
+    <div class="container-fluid wrapper-content animated fadeInRight">
57
+        <div class="daoHang clearfix">
58
+            <div class="dhLeft">
59
+                <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">系统管理</a>&gt;<a href="" class="nowPosition">排班管理</a></sapn>
60
+            </div>
61
+            <div class="dhRight">
62
+                <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
63
+            </div>
64
+        </div>
65
+        <div class="col-sm-2">
66
+            <div class="ibox float-e-margins">
67
+                <div class="ibox-content">
68
+                    <div id='external-events'>
69
+                        <p>班别</p>
70
+                    </div>
71
+                </div>
72
+            </div>
73
+            <div class="ibox float-e-margins zxarea" style="display:none;">
74
+                <div class="ibox-content">
75
+                    <div  style="margin-bottom:10px;">
76
+                        <p>班组</p>
77
+                        <div id="bzlist" >
78
+                            <div class='seatuser' code=''>全部</div>
79
+                        </div>
80
+                        <div class="clearfix"></div>
81
+                    </div>
82
+                    <div class="wfz" style="display:none;">
83
+                        <p>未分组坐席</p>
84
+                        <div id="zxlist" >
85
+                        </div>
86
+                        <div class="clearfix" ></div>
87
+                    </div>
88
+                </div>
89
+            </div>
90
+        </div>
91
+        <div class="col-sm-10">
92
+            <div id="calendar"></div>
93
+        </div>
94
+    </div>
95
+    <script>
96
+        var bl = false;
97
+        $(document).ready(function () {
98
+
99
+            var rl = $('#RoleCode', top.document).val();
100
+            var gcode = $('#GroupCode', top.document).val();
101
+            if (rl == "GLY") {
102
+                bl = true;
103
+                //$(".zxarea").show();
104
+            }
105
+            $(".zxarea").show();
106
+
107
+            $.getJSON(huayi.config.callcenter_url + 'Class/GetClassList', {
108
+                "token": $.cookie("token")
109
+            }, function (result) {
110
+                if (result.state.toLowerCase() == "success") {
111
+                    $(result.data).each(function (i, n) {
112
+                        var html = "<div class='external-event navy-bg' code='" + n.F_Code + "' intime='" + n.F_InTime
113
+                            + "' outtime='" + n.F_OutTime + "'>" + n.F_Name + "[" + n.F_InTime + "-" + n.F_OutTime + "]" + "</div>";
114
+                        $("#external-events").append(html);
115
+                    })
116
+                    if (bl) {
117
+                        $("#external-events div.external-event").each(function () {
118
+                            var d = { title: $.trim($(this).text()), classcode: $(this).attr("code"), intime: $(this).attr("intime"), outtime: $(this).attr("outtime") };
119
+                            $(this).data("eventObject", d);
120
+                            $(this).draggable({ zIndex: 999, revert: true, revertDuration: 0 })
121
+                        });
122
+                    }
123
+                }
124
+            });
125
+            //获取班组列表
126
+
127
+            $.getJSON(huayi.config.callcenter_url + 'Group/GetGroupList', { "token": $.cookie("token") }, function (result) {
128
+                if (result.state.toLowerCase() == "success") {
129
+                    var num = 0;
130
+                    $(result.data).each(function (i, n) {
131
+                        var html = "<div class='group drag' code='" + n.F_GroupCode + "'>";
132
+                        html += "<div class='seatuser ' code='" + n.F_GroupCode + "'>" + n.F_GroupName + "</div>";
133
+                        $(n.Users).each(function (j, m) {
134
+                            html += "<span class='lable' code='" + m.F_UserCode + "'>" + m.F_UserName + "</span>";
135
+                        })
136
+                        html += '<div class="clearfix"></div></div>';
137
+                        $("#bzlist").append(html);
138
+                        if (gcode == n.F_GroupCode) {
139
+                            num = i+1;
140
+                        }
141
+                    })
142
+                    $(".seatuser").click(function (i, n) {
143
+                        $(".seatuser").removeClass("active");
144
+                        $(this).addClass("active");
145
+                        bind();
146
+                    })
147
+                    if (bl) {
148
+                        $(".group span.lable").each(function () {
149
+                            var d = { code: $(this).attr("code"), name: $(this).text() };
150
+                            $(this).data("eventObject", d);
151
+                            $(this).draggable({ zIndex: 999, revert: "invalid" })
152
+                        });
153
+                        $(".drag").droppable({
154
+                            drop: function (event, ui) {
155
+                                var dragobj = $(ui.draggable[0]);
156
+                                var dropobj = $(this);
157
+                                var dragdata = dragobj.data("eventObject");
158
+                                if (dragdata.code) {
159
+                                    $.post(huayi.config.callcenter_url + 'GroupClass/GroupSeat', {
160
+                                        groupcode: dropobj.attr("code"), usercode: dragdata.code,
161
+                                        "token": $.cookie("token")
162
+                                    }, function (result) {
163
+                                        result = JSON.parse(result);
164
+                                        if (result.state.toLowerCase() == "success") {
165
+                                            var html = "<span class='lable' code='" + dragdata.code + "'>" + dragdata.name + "</span>";
166
+                                            $(html).insertBefore(dropobj.find(".clearfix")).data("eventObject", dragdata).draggable({
167
+                                                zIndex: 999, revert: "invalid"
168
+                                            });
169
+                                            dragobj.remove();
170
+                                        }
171
+                                    })
172
+                                }
173
+                            }
174
+                        })
175
+                    }
176
+                    $($(".seatuser")[num]).trigger("click");
177
+                }
178
+            });
179
+            $.getJSON(huayi.config.callcenter_url + 'GroupClass/GetNoGroupSeatList', { "token": $.cookie("token") }, function (result) {
180
+                if (result.state.toLowerCase() == "success") {
181
+                    if (result.data.length > 0) {
182
+                        $(".wfz").show();
183
+                        $(result.data).each(function (i, n) {
184
+                            var html = "<span class='lable' style='display: inline;' code='" + n.F_UserCode + "'>" + n.F_UserName + "</span>";
185
+                            $("#zxlist").append(html);
186
+                        })
187
+                        if (bl) {
188
+                            $("#zxlist span.lable").each(function () {
189
+                                var d = { code: $(this).attr("code"), name: $(this).text() };
190
+                                $(this).data("eventObject", d);
191
+                                $(this).draggable({
192
+                                    zIndex: 999, revert: "invalid"
193
+                                })
194
+                            });
195
+                        }
196
+                    }
197
+                }
198
+            });
199
+
200
+        });
201
+        function bind() {
202
+            $('#calendar').html("");
203
+            $('#calendar').fullCalendar({
204
+                header: {
205
+                    //left: 'month,agendaWeek,agendaDay',
206
+                    left: 'month',
207
+                    center: 'title',
208
+                    right: 'today, prev, next'
209
+                },
210
+                monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
211
+                monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
212
+                titleFormat: {
213
+                    month: "yyyy MMMM "
214
+                },
215
+                firstDay: "1",
216
+                editable: bl,
217
+                droppable: bl,
218
+                drop: function (g, h) {
219
+                    var f = $(this).data("eventObject");
220
+                    var d = $.extend({}, f);
221
+                    if (f.classcode) {
222
+                        var groupcode = $(".active").attr("code");
223
+                        if (groupcode) {
224
+
225
+                            //d.start = g;
226
+                            //d.allDay = false;
227
+                            d.title = $(".active").text() + " " + d.title;
228
+                            var c = g.getDate();
229
+                            var a = g.getMonth() + 1;
230
+                            var e = g.getFullYear();
231
+                            var sdate = new Date(e + '-' + a + '-' + c + ' ' + f.intime);
232
+                            var edate = new Date(e + '-' + a + '-' + c + ' ' + f.outtime);
233
+                            d.start = sdate;
234
+                            d.end = edate;
235
+                            d.groupcode = groupcode;
236
+                            if (sdate > edate) {
237
+                                d.end = new Date(e + '-' + a + '-' + (c + 1) + ' ' + f.outtime);;
238
+                            }
239
+                            $.post(huayi.config.callcenter_url + 'GroupClass/AddGroupClass', {
240
+                                date: e + '-' + a + '-' + c, groupcode: groupcode, classcode: f.classcode,
241
+                                "token": $.cookie("token")
242
+                            }, function (result) {
243
+                                result = JSON.parse(result);
244
+                                if (result.state.toLowerCase() == "success") {
245
+                                    d.id = result.data;
246
+                                    $("#calendar").fullCalendar("renderEvent", d, true);
247
+                                }
248
+                            })
249
+                        }
250
+                        else {
251
+                            layer.confirm('请选择一个班组', {
252
+                                btn: ['确定'] //按钮
253
+                            });
254
+                        }
255
+                    }
256
+                },
257
+                //eventDragStart: function (event, jsEvent, ui, view) {
258
+                //    if (!$(".active").attr("code")) {
259
+                //        layer.confirm('请选择一个班组', {
260
+                //            btn: ['确定'] //按钮
261
+                //        });
262
+                //    }
263
+                //},
264
+                eventDrop: function (event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {
265
+                    var g = event.start;
266
+                    var c = g.getDate();
267
+                    var a = g.getMonth() + 1;
268
+                    var e = g.getFullYear();
269
+                    $.post(huayi.config.callcenter_url + 'GroupClass/AddGroupClass', {
270
+                        id: event.id, date: e + '-' + a + '-' + c, groupcode: event.groupcode, classcode: event.classcode,
271
+                        "token": $.cookie("token")
272
+                    }, function (result) {
273
+                        result = JSON.parse(result);
274
+                        if (result.state.toLowerCase() != "success") {
275
+                            revertFunc();
276
+                        }
277
+                    })
278
+                },
279
+                events: function (start, end, callback) {
280
+                    var st = $.fullCalendar.formatDate(start, "yyyy-MM-dd");
281
+                    var ed = $.fullCalendar.formatDate(end, "yyyy-MM-dd");
282
+
283
+                    $.getJSON(huayi.config.callcenter_url + "GroupClass/GetRLList", { "starttime": st, "endtime": ed, "groupcode": $(".active").attr("code"), "token": $.cookie("token") }, function (r) {
284
+
285
+                        //$(r).each(function (i, n) {
286
+                        //    n.allDay = false;
287
+                        //})
288
+                        callback(r);
289
+
290
+                    })
291
+                },
292
+                eventClick: function (calEvent, jsEvent, view) {
293
+                    if (bl) {
294
+                        var id = calEvent.id;
295
+                        layer.confirm('确定删除吗?', {
296
+                            btn: ['是', '否'] //按钮
297
+                        }, function () {
298
+                            /*发送请求*/
299
+                            $.post(huayi.config.callcenter_url + "GroupClass/DelGroupClass", {
300
+                                id: id,
301
+                                token: $.cookie("token")
302
+                            }, function (result) {
303
+                                result = JSON.parse(result);
304
+                                if (result.state.toLowerCase() == "success") {
305
+                                    layer.msg("删除成功");
306
+                                    $('#calendar').fullCalendar('removeEvents', id);
307
+                                }
308
+                            })
309
+                        });
310
+                    }
311
+                },
312
+                eventMouseover: function (calEvent, jsEvent, view) {
313
+                    var id = calEvent.id;
314
+                }
315
+            });
316
+        }
317
+    </script>
318
+</body>
319
+
320
+</html>

+ 171 - 0
WebUI/CallCenterWeb.UI/SystemManager/GroupEdit.html

@@ -0,0 +1,171 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <title>班组编辑</title>
7
+    <script src="../Script/Common/huayi.load.js"></script>
8
+    <script src="../Script/Common/huayi.config.js"></script>
9
+    <link rel="stylesheet" href="../css/init.css" />
10
+    <style>
11
+        th {
12
+            padding: 5px 8px 5px 0;
13
+            text-align: right;
14
+        }
15
+
16
+        input {
17
+            background-color: #FFF;
18
+            background-image: none;
19
+            border: 1px solid #ccc;
20
+            border-radius: 1px;
21
+            color: inherit;
22
+            padding: 6px 12px;
23
+            width:200px;
24
+        }
25
+
26
+        td {
27
+            padding: 6px 0 5px 10px;
28
+        }
29
+
30
+        .addts {
31
+            background: #1ab394;
32
+            color: #fff;
33
+            padding: 6px 10px;
34
+            outline: none;
35
+            font-size: 12px;
36
+            margin-left: 15px;
37
+            border: 0;
38
+            border-radius: 3px;
39
+            box-sizing: border-box;
40
+        }
41
+        .time-box {
42
+            display: inline-block;
43
+            position: relative;
44
+        }
45
+
46
+        .tub {
47
+            position: absolute;
48
+            right: 8px;
49
+            top: 10px;
50
+            font-size: 18px;
51
+            color: #00a0ca;
52
+        }
53
+
54
+        #layui-laydate3 .layui-laydate-header {
55
+            height: 31px;
56
+            padding: 5px;
57
+        }
58
+
59
+        .laydate-theme-molv .layui-laydate-header i,
60
+        .laydate-theme-molv .layui-laydate-header span {
61
+            top: 2px;
62
+        }
63
+
64
+        .layui-laydate-header {
65
+            padding: 0;
66
+        }
67
+
68
+        .laydate-theme-molv .layui-laydate-content {
69
+            height: 195px;
70
+            overflow: hidden;
71
+        }
72
+
73
+        .laydate-month-list > li {
74
+            margin: 10px 0;
75
+        }
76
+
77
+        .laydate-footer-btns span:hover {
78
+            color: #00a1cb;
79
+        }
80
+    </style>
81
+</head>
82
+
83
+<body>
84
+    <div style="padding: 10px;">
85
+        <div style="padding: 10px;" class="clearFix">
86
+            <div>
87
+                <span>【班组信息】</span>
88
+                <div class="box_content">
89
+                    <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
90
+                        <tr>
91
+                            <th>班组名称:</th>
92
+                            <td>
93
+                                <input type="text" class="name" /><input type="hidden" class="id" />
94
+                            </td>
95
+                        </tr>
96
+                        <tr>
97
+                            <th>班组代码:</th>
98
+                            <td>
99
+                                <input type="text" class="code" />
100
+                            </td>
101
+                        </tr>
102
+                        <tr>
103
+                            <th>说明:</th>
104
+                            <td>
105
+                                <textarea type="text" class="remark" style="width:200px;" ></textarea>
106
+                            </td>
107
+                        </tr>
108
+                    </table>
109
+                </div>
110
+            </div>
111
+            <div class="bton" style="text-align: center;">
112
+                <input class="addts" type="button" value="保存" />
113
+            </div>
114
+        </div>
115
+    </div>
116
+    <script>
117
+        var id = helper.request.queryString("id");
118
+        $(document).ready(function () {
119
+
120
+            if (id) {
121
+                $.getJSON(huayi.config.callcenter_url + 'Group/GetGroup', {
122
+                    id: id,
123
+                    "token": $.cookie("token")
124
+                }, function (result) {
125
+                    if (result.state.toLowerCase() == "success") {
126
+                        var content = result.data;
127
+
128
+                        $(".id").val(content.F_Id);
129
+                        $(".name").val(content.F_GroupName);
130
+                        $(".code").val(content.F_GroupCode);
131
+                        $(".remark").val(content.F_Remark);
132
+                    }
133
+                })
134
+            }
135
+            $(".addts").click(function () {
136
+                var id = $(".id").val();
137
+                var name = $(".name").val();
138
+                var code = $(".code").val();
139
+                var remark = $(".remark").val();
140
+
141
+                if (!name) {
142
+                    layer.confirm('请输入班组名称!', {
143
+                        btn: ['确定']
144
+                    });
145
+                    return;
146
+                }
147
+                if (!code) {
148
+                    layer.confirm('请输入班组代码!', {
149
+                        btn: ['确定']
150
+                    });
151
+                    return;
152
+                }
153
+
154
+                $.post(huayi.config.callcenter_url + 'Group/AddGroup', {
155
+                    id: $(".id").val(), code: code, name: name, remark: remark, "token": $.cookie("token")
156
+                }, function (result) {
157
+                    result = $.parseJSON(result);
158
+                    if (result.state.toLowerCase() == "success") {
159
+                        layer.msg("操作成功");
160
+                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
161
+                        parent.layer.close(index); //再执行关闭
162
+                        parent.initTable()();
163
+                    }
164
+                })
165
+            })
166
+        });
167
+
168
+    </script>
169
+</body>
170
+
171
+</html>

+ 178 - 0
WebUI/CallCenterWeb.UI/SystemManager/GroupManage.html

@@ -0,0 +1,178 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+    <script src="../Script/Common/huayi.load.js"></script>
8
+    <script src="../Script/Common/huayi.config.js"></script>
9
+    <link href="../css/init.css" rel="stylesheet" />
10
+    <link href="../css/Table/table1.css" rel="stylesheet" />
11
+    <title>班组管理</title>
12
+</head>
13
+<body class="gray-bg">
14
+    <div class="container-fluid wrapper-content animated fadeInRight">
15
+        <div class="daoHang clearfix">
16
+            <div class="dhLeft">
17
+                <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">系统管理</a>&gt;<a href="" class="nowPosition">班组管理</a></sapn>
18
+            </div>
19
+            <div class="dhRight">
20
+                <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
21
+            </div>
22
+        </div>
23
+        <div class="th-box">
24
+            <div class="th-bar clearfix">
25
+                <div class="operation fl">
26
+                    <a href="javascript:;" class="sc_btn add max-right">添加</a>
27
+                    <a class="sc_btn xg max-right">修改</a>
28
+                    <a class="sc_btn remove">删除</a>
29
+                </div>
30
+                <div class="seach-box fr">
31
+                    <ul>
32
+                        <li>班组名称:<input class="photo x-color" type="text" id="name" placeholder="请输入班组名称" /></li>
33
+                        <li>
34
+                            <a class="sc_btn  Block" id="sc_btns">搜索</a>
35
+                        </li>
36
+                    </ul>
37
+                </div>
38
+            </div>
39
+        </div>
40
+        <div style="width: 100%;padding: 10px;">
41
+            <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
42
+                <thead>
43
+                    <tr>
44
+                        <th data-field="state" data-checkbox="true"></th>
45
+                        <th data-align="center" data-formatter="setCode">编号</th>
46
+                        <th data-field="F_GroupName">班组名称</th>
47
+                        <th data-field="F_GroupCode">班组代码</th>
48
+                        <th data-field="F_Remark">说明</th>
49
+                        <th data-field="UserName">创建人</th>
50
+                        <th data-field="F_CreateTime">创建时间</th>
51
+                    </tr>
52
+                </thead>
53
+                <tbody id="tbody"></tbody>
54
+            </table>
55
+        </div>
56
+
57
+    </div>
58
+
59
+    <script>
60
+
61
+        $(document).ready(function () {
62
+
63
+            /*搜索*/
64
+            $("#sc_btns").click(function () {
65
+                initTable();
66
+            })
67
+            $(".add").click(function () {
68
+                layer.open({
69
+                    type: 2,
70
+                    content: "GroupEdit.html" , //iframe的url,no代表不显示滚动条
71
+                    title: '新增班组',
72
+                    area: ['40%', '50%'] //宽高
73
+                });
74
+            });
75
+            $(".xg").click(function () {
76
+                var id = $.map($('#list').bootstrapTable('getSelections'),
77
+						function(row) {
78
+						    return row.F_Id;
79
+						});
80
+                if (id.length != 1) {
81
+                    layer.confirm('请选择一行进行修改?', {
82
+                        btn: ['确定'] //按钮
83
+                    });
84
+                    return;
85
+                } else {
86
+                    layer.open({
87
+                        type: 2,
88
+                        content: "GroupEdit.html?id=" + id, //iframe的url,no代表不显示滚动条
89
+                        title: '修改班组',
90
+                        area: ['40%', '50%'] //宽高
91
+                    });
92
+                }
93
+            });
94
+            /*删除内容*/
95
+            $(".remove").click(function () {
96
+                var ids = $.map($('#list').bootstrapTable('getSelections'),
97
+                    function (row) {
98
+                        return row.F_Id;
99
+                    });
100
+                /*判断长度*/
101
+                if (ids.length <= 0) {
102
+                    layer.confirm('没有可删除的选项?', {
103
+                        btn: ['确定'] //按钮
104
+                    });
105
+                    return;
106
+                }
107
+                layer.confirm('确定删除选中的选项?', {
108
+                    btn: ['是', '否'] //按钮
109
+                }, function () {
110
+
111
+                    /*执行删除*/
112
+                    var ids = $.map($('#list').bootstrapTable('getSelections'),
113
+						function (row) {
114
+						    return row.F_Id;
115
+						});
116
+                    /*发送请求*/
117
+                    $.post(huayi.config.callcenter_url + "Group/DelGroup", {
118
+                        ids: ids,
119
+                        token: $.cookie("token")
120
+                    }, function (result) {
121
+                        result = JSON.parse(result);
122
+                        if (result.state.toLowerCase() == "success") {
123
+                            layer.msg("删除成功");
124
+                            initTable();
125
+                        }
126
+                    })
127
+                });
128
+            });
129
+            $('#ReIndex').click(function () {
130
+                top.home_index();
131
+            })
132
+            initTable();
133
+        })
134
+
135
+        function initTable() {
136
+            //先销毁表格
137
+            $('#list').bootstrapTable('destroy');
138
+            //初始化表格,动态从服务器加载数据
139
+            $("#list").bootstrapTable({
140
+                method: "get", //使用get请求到服务器获取数据
141
+                url: huayi.config.callcenter_url + "Group/GetList", //获取数据的Servlet地址
142
+                contentType: "application/x-www-form-urlencoded", striped: true, //表格显示条纹
143
+                pagination: true, //启动分页
144
+                pageSize: 10, //每页显示的记录数
145
+                pageNumber: 1, //当前第几页
146
+                pageList: [10, 20, 50, 100], //记录数可选列表
147
+                search: false, //是否启用查询
148
+                showColumns: false, //显示下拉框勾选要显示的列
149
+                showRefresh: false, //显示刷新按钮
150
+                sidePagination: "server", //表示服务端请求
151
+                //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
152
+                //设置为limit可以获取limit, offset, search, sort, order
153
+                queryParamsType: "undefined",
154
+                queryParams: function queryParams(params) { //设置查询参数
155
+                    var param = {
156
+                        page: params.pageNumber,
157
+                        pagesize: params.pageSize,
158
+                        name: $("#name").val(),
159
+                        token: $.cookie("token")
160
+                    };
161
+                    return param;
162
+                },
163
+                onLoadSuccess: function (data) { //加载成功时执行
164
+                    //layer.msg("加载成功");
165
+                },
166
+                onLoadError: function () { //加载失败时执行
167
+                    //layer.msg("加载数据失败", { time: 1500, icon: 2 });
168
+                }
169
+            });
170
+        }
171
+        //编号
172
+        function setCode(val, row, index) {
173
+            return index + 1;
174
+        }
175
+    </script>
176
+</body>
177
+
178
+</html>

+ 128 - 68
WebUI/CallCenterWeb.UI/TelCall/zxKong.html

@@ -339,6 +339,7 @@
339 339
 								<th>主叫号码</th>
340 340
 								<th>被叫号码</th>
341 341
 								<th>状态</th>
342
+								<th>实时时间</th>
342 343
 								<th>工号</th>
343 344
 								<th>姓名</th>
344 345
 								<th>分机号</th>
@@ -352,7 +353,7 @@
352 353
 								<th>当前签入时长 </th>
353 354
 								<th>呼入量</th>
354 355
 								<th>呼出量</th>
355
-
356
+								
356 357
 							</tr>
357 358
 						</thead>
358 359
 						<tbody>
@@ -426,30 +427,15 @@
426 427
 		<script src="../css/layer/layer.js"></script>
427 428
 		<script src="../js/zTree/jquery.ztree.core.js"></script>
428 429
 		<script>
429
-			var user;
430
-			var hour = 0,
431
-				minute = 0,
432
-				second = 0;
433
-//				var t;
434
-				var flag;
435
-			function studyTime(t) {
436
-				hour = Math.floor(t / 60 / 60);
437
-				minute = Math.floor(t / 60 % 60);
438
-				second = Math.floor(t % 60);
439
-				if(hour < 10) {
440
-					hour = "0" + hour;
441
-				}
442
-				if(minute < 10) {
443
-					minute = "0" + minute;
444
-				}
445
-				if(second < 10) {
446
-					second = "0" + second;
447
-				}
448
-				//      localStorage.setItem(,hour +":"+minute+":"+second);	
449
-//				t++;
450
-			}
430
+			
451 431
 
452 432
 			$(document).ready(function() {
433
+				
434
+				//=================================================================
435
+				var user;
436
+				var hour = 0,
437
+				minute = 0,
438
+				second = 0;
453 439
 					if(!top.ws) {
454 440
 						top.Connect();
455 441
 					}
@@ -468,7 +454,7 @@
468 454
 						$(".kqc").click(function() {
469 455
 //							alert(1)
470 456
 							if(!$(this).hasClass("dis")) {
471
-								Ajax();
457
+								Ajax(1);
472 458
 								setInterval(Ajax, 10000);
473 459
 							}
474 460
 						})
@@ -476,14 +462,6 @@
476 462
 					//停止监测
477 463
 					$(".jqc").click(function() {
478 464
 						if(!$(this).hasClass("dis")) {
479
-							//$(user).each(function (i, n) {
480
-							//    top.obj.Type = "SubScribeCancel";
481
-							//    top.obj.SubParmer = n.F_WorkNumber;
482
-							//    top.obj.SubType = "0";//根据工号取消订阅坐席状态
483
-							//    top.Send();
484
-							//    top.obj.SubType = "1";//根据工号取消订阅线路状态
485
-							//    top.Send();
486
-							//})
487 465
 							top.obj.Type = "SubScribeCancel";
488 466
 							top.obj.SubParmer = "-1";
489 467
 							top.obj.SubType = "0"; //根据工号取消订阅坐席状态
@@ -508,7 +486,8 @@
508 486
 				}
509 487
 
510 488
 			) //坐席表格
511
-			function Ajax() {
489
+			var userss=[];
490
+			function Ajax(jc) {
512 491
 				$.ajax({
513 492
 					type: "get",
514 493
 					url: huayi.config.callcenter_url + "SeatMonitoring/GetAgentList",
@@ -520,9 +499,26 @@
520 499
 					success: function(data) {
521 500
 						user = data.data;
522 501
 						$(".tjcount li").eq(0).find("b").text(user.length);
502
+						if(localStorage.getItem("userss")) {
503
+									userss=JSON.parse(localStorage.getItem("userss"));
504
+							}
523 505
 						if(data.state.toLowerCase() == 'success') {
524 506
 							$("#table1 tbody").html('');
525 507
 							$(user).each(function(i, n) {
508
+								var bl=0;
509
+								var ss=0;
510
+								var sts='lx';
511
+								$(userss).each(function(j,m){
512
+									if(m.code==n.UserCode){
513
+										bl=1;
514
+										ss=m.s;
515
+										sts=m.sts;
516
+									}
517
+								})
518
+								if(bl==0){
519
+									var users={code:n.UserCode,s:0,sts:'lx'};
520
+									userss.push(users);
521
+								}
526 522
 								if(localStorage.getItem(n.UserCode + "telnum")) {
527 523
 									var telNum = localStorage.getItem(n.UserCode + "telnum");
528 524
 									var beiTelnum = localStorage.getItem(n.UserCode + "beiTelnum");
@@ -536,7 +532,9 @@
536 532
 									+
537 533
 									'<td class=" ' + n.UserCode + 'beiTelnum">' + beiTelnum + '</td>' //被叫号码
538 534
 									+
539
-									'<td class=" ' + n.UserCode + 'state"><i class="lx" zx_item="0" xl_item="0"></i></td>' //状态
535
+									'<td class=" ' + n.UserCode + 'state"><i class="'+ sts +'" zx_item="0" xl_item="0"></i></td>' //状态
536
+									+
537
+									'<td class=" ' + n.UserCode + 'time" ></td>' //实时时间
540 538
 									+
541 539
 									'<td>' + n.UserCode + '</td>' //工号
542 540
 									+
@@ -544,13 +542,13 @@
544 542
 									+
545 543
 									'<td>' + n.ExtNumber + '</td>' //分机号
546 544
 									+
547
-									'<td class=" ' + n.UserCode + 'kxTime" second="0">' + n.free + '秒</td>' //空闲时长
545
+									'<td class=" ' + n.UserCode + 'kxTime">' + turnMin(n.free)+ '</td>' //空闲时长
548 546
 									+
549
-									'<td class=" ' + n.UserCode + 'zmTime" second="0">' + n.repose + '</td>' //置忙时长
547
+									'<td class=" ' + n.UserCode + 'zmTime">' + turnMin(n.repose) + '</td>' //置忙时长
550 548
 									+
551
-									'<td class=" ' + n.UserCode + 'thTime" second="0">' + n.talking + '</td>' //通话时长
549
+									'<td class=" ' + n.UserCode + 'thTime" >' + turnMin(n.talking) + '</td>' //通话时长
552 550
 									+
553
-									'<td class=" ' + n.UserCode + 'hhTime" second="0">' + n.postprocess + '</td>' //话后处理时长
551
+									'<td class=" ' + n.UserCode + 'hhTime">' + turnMin(n.postprocess) + '</td>' //话后处理时长
554 552
 									+
555 553
 									'<td>' + n.reposeconut + '</td>' //置忙次数
556 554
 									+
@@ -566,10 +564,7 @@
566 564
 									+
567 565
 									'</tr>';
568 566
 								$(html).appendTo($("#table1 tbody"));
569
-								//                  top.obj.Type = "SubScribe";
570
-								//                  top.obj.SubParmer = n.UserCode;
571
-								//                  top.obj.SubType = "0"; //根据工号订阅坐席状态
572
-								//                  top.Send();
567
+								intervalTime(ss,$('.'+ n.UserCode +'time'));
573 568
 								$('input:radio[name="seatSelect"]').click(function(event) {
574 569
 									event.stopPropagation();
575 570
 									if(top.obj.AgentID != $(this).attr("user-code")) {
@@ -583,13 +578,16 @@
583 578
 										$(this).prop("checked", false);
584 579
 									}
585 580
 								});
586
-								top.obj.Type = "SubScribe";
587
-								top.obj.SubParmer = n.UserCode * 1;
588
-								top.obj.SubType = "0"; //根据工号订阅坐席状态
589
-								top.Send();
590
-								top.obj.SubType = "1"; //根据工号订阅线路状态
591
-								top.Send();
581
+								if(jc){
582
+									top.obj.Type = "SubScribe";
583
+									top.obj.SubParmer = n.UserCode * 1;
584
+									top.obj.SubType = "0"; //根据工号订阅坐席状态
585
+									top.Send();
586
+									top.obj.SubType = "1"; //根据工号订阅线路状态
587
+									top.Send();
588
+								}
592 589
 							})
590
+							localStorage.setItem("userss",JSON.stringify(userss));
593 591
 						}
594 592
 					}
595 593
 				});
@@ -653,39 +651,42 @@
653 651
 
654 652
 			//坐席状态
655 653
 			function UpdateAgentState(WorkNumber, State) {
656
-				//      		console.log("坐席状态"+WorkNumber+","+State);
657 654
 				var sts = "";
658
-				var timeClass = "";
655
+//				var timeClass = "";
659 656
 				switch(State) {
660 657
 					case "0":sts = "lx";break; //离线
661 658
 					case "1":break; //登录中
662
-					case "2":sts = "kx";timeClass = "kxTime";break; //空闲
663
-					case "3":sts = "th";timeClass = "thTime";break; //通话中
664
-					case "4":sts = "hh";timeClass = "hhTime";break; //话后处理中
665
-					case "5":sts = "ml";timeClass = "zmTime";break; //小休
659
+					case "2":sts = "kx";break; //空闲
660
+					case "3":sts = "th";break; //通话中
661
+					case "4":sts = "hh";break; //话后处理中
662
+					case "5":sts = "ml";break; //小休
666 663
 					case "6":sts = "zl";break; //被请求
667 664
 					case "7":sts = "lx";break; //注销
668 665
 				}
669 666
 				if(WorkNumber * 1 < 10) {
670 667
 					WorkNumber = '0' + WorkNumber;
671 668
 				}
669
+				
670
+			if(localStorage.getItem("userss")) {
671
+				userss=JSON.parse(localStorage.getItem("userss"));
672
+							
673
+			   	$(userss).each(function(j,m){
674
+			   		if(m.code==WorkNumber){
675
+			   			m.s=0;
676
+			   			m.sts=sts;
677
+			   		}
678
+			   		var ele=$('.'+ m.code +'time');
679
+			   		intervalTime(m.s,ele);
680
+								})
681
+			   	localStorage.setItem("userss",JSON.stringify(userss));
682
+			   	}
672 683
 				var ele = $("." + WorkNumber + "state").find("i");
673 684
 				
674
-				//          console.log(sts);
675 685
 				if(sts) {
676 686
 					ele.removeClass().addClass(sts);
677
-					//              ele.addClass(sts);
678 687
 				}
679 688
 				ele.attr("zx_item", State);
680
-				if(timeClass){
681
-					t = $("." + WorkNumber + timeClass).attr("second");
682
-//					flag = setInterval(studyTime, 1000);
683
-					
684
-				}
685 689
 				if($(".zx-box_ul").attr('zxtp-code') == WorkNumber) {
686
-					//              if (sts) {
687
-					//                  $(".zxtp i").removeClass().addClass(sts);
688
-					//              }
689 690
 					UpdateSelState(State, ele.attr("xl_item"))
690 691
 				}
691 692
 				tjcount();
@@ -749,15 +750,27 @@
749 750
 				if(WorkNumber * 1 < 10) {
750 751
 					WorkNumber = '0' + WorkNumber;
751 752
 				}
753
+				if(localStorage.getItem("userss")) {
754
+						userss=JSON.parse(localStorage.getItem("userss"));
755
+							
756
+			   	$(userss).each(function(j,m){
757
+			   		if(m.code==WorkNumber){
758
+			   			m.s=0;
759
+			   			m.sts=sts;
760
+			   		}
761
+			   		var ele=$('.'+ m.code +'time');
762
+			   		intervalTime(m.s,ele);
763
+								})
764
+			   	localStorage.setItem("userss",JSON.stringify(userss));
765
+			   	}
766
+				
752 767
 				var ele = $("." + WorkNumber + "state").find("i");
768
+			
753 769
 				if(sts) {
754 770
 					ele.removeClass().addClass(sts);
755 771
 				}
756 772
 				ele.attr("xl_item", State);
757 773
 				if($(".zx-box_ul").attr('zxtp-code') == WorkNumber) {
758
-					//              if (sts) {
759
-					//                  $(".zxtp i").removeClass().addClass(sts);
760
-					//              }
761 774
 					UpdateSelState(ele.attr("zx_item"), State)
762 775
 				}
763 776
 				tjcount();
@@ -780,7 +793,54 @@
780 793
 					$(".zx-box_ul .dj").removeClass("dis");
781 794
 				}
782 795
 			}
796
+				 var flag;
797
+				 function intervalTime(t,ele) {
798
+			        hour = Math.floor(t / 60 / 60);
799
+			        minute = Math.floor(t / 60 % 60);
800
+			        second = Math.floor(t % 60);
801
+			        if(hour < 10) {
802
+			            hour = "0" + hour;
803
+			        }
804
+			        if(minute < 10) {
805
+			            minute = "0" + minute;
806
+			        }
807
+			        if(second < 10) {
808
+			            second = "0" + second;
809
+			        }
810
+			        $(ele).text(hour +":"+ minute +":"+ second) ;
811
+			    
812
+			   };
813
+			   setInterval(addTime, 1000);
814
+			   function addTime(){
815
+			   	if(localStorage.getItem("userss")) {
816
+						userss=JSON.parse(localStorage.getItem("userss"));
817
+							
818
+			   	$(userss).each(function(j,m){
819
+			   		m.s=m.s*1+1;
820
+			   		var ele=$('.'+ m.code +'time');
821
+			   		intervalTime(m.s,ele);
822
+								})
823
+			   	localStorage.setItem("userss",JSON.stringify(userss));
824
+			   	}
825
+			   }
826
+			   
827
+			function turnMin(t) {
828
+			        hour = Math.floor(t / 60 / 60);
829
+			        minute = Math.floor(t / 60 % 60);
830
+			        second = Math.floor(t % 60);
831
+			        if(hour < 10) {
832
+			            hour = "0" + hour;
833
+			        }
834
+			        if(minute < 10) {
835
+			            minute = "0" + minute;
836
+			        }
837
+			        if(second < 10) {
838
+			            second = "0" + second;
839
+			        }
840
+			       return hour +":"+ minute +":"+ second;
841
+			    
842
+			   };				     
843
+			     
783 844
 		</script>
784 845
 	</body>
785
-
786 846
 </html>

+ 2 - 2
WebUI/CallCenterWeb.UI/chatWith.html

@@ -41,7 +41,7 @@
41 41
 			 	</div>
42 42
 			</div>
43 43
 			<div class="chat_main">
44
-				<div class="chat_person">
44
+				<div class="chat_person disnone">
45 45
 			 		<p class="chat_name"></p>
46 46
 				</div>
47 47
 				<div class="main_message">
@@ -67,7 +67,7 @@
67 67
 						
68 68
 					</ul>
69 69
 				</div>
70
-				<div class="main_sendMessage">
70
+				<div class="main_sendMessage disnone">
71 71
 					<textarea name="" rows="" cols="" placeholder="按Enter 发送" class="send_content"></textarea>
72 72
 				    
73 73
 				    <div class="send_btn">

+ 12 - 1
WebUI/CallCenterWeb.UI/css/chat.css

@@ -90,6 +90,7 @@
90 90
 			    cursor: pointer;
91 91
 			    -webkit-transition: background-color .1s;
92 92
 			    transition: background-color .1s;
93
+			        position: relative;
93 94
 			}
94 95
 			.chat_sidebar_list li.actives ,.chat_left li.actives{
95 96
 			    background-color: hsla(0,0%,100%,.1);
@@ -102,7 +103,17 @@
102 103
 				}
103 104
 		/*chat_sidebar结束*/
104 105
 		/*聊天区域开始*/
105
-		
106
+		.message_count{
107
+			display: inline-block;
108
+			position: absolute;
109
+			right: 0;
110
+			border-radius: 50%;
111
+			background: red;
112
+			color: #fff;
113
+		}
114
+		.disnone{
115
+			display: none;
116
+		}
106 117
 		.main_message{
107 118
 			padding: 10px 15px;
108 119
 		    overflow-y: scroll;

+ 11 - 5
WebUI/CallCenterWeb.UI/css/style.min862f.css

@@ -7231,11 +7231,17 @@ body.skin-3 {
7231 7231
 	background-color: #999
7232 7232
 }
7233 7233
 
7234
+#chat .badge {
7235
+    position: absolute;
7236
+    top: -3px;
7237
+    right: -4px;
7238
+}
7239
+
7234 7240
 .gohome {
7235 7241
 	position: fixed;
7236
-	top: 20px;
7242
+	top: 35%;
7237 7243
 	right: 20px;
7238
-	z-index: 100
7244
+	z-index: 100;
7239 7245
 }
7240 7246
 
7241 7247
 .gohome a {
@@ -7247,12 +7253,12 @@ body.skin-3 {
7247 7253
 	text-align: center;
7248 7254
 	color: #fff;
7249 7255
 	border-radius: 50%;
7250
-	opacity: .5
7256
+	/*opacity: .5*/
7251 7257
 }
7252 7258
 
7253
-.gohome a:hover {
7259
+/*.gohome a:hover {
7254 7260
 	opacity: 1
7255
-}
7261
+}*/
7256 7262
 
7257 7263
 @media only screen and (-webkit-min-device-pixel-ratio:2) {
7258 7264
 	#content-main {

+ 1 - 0
WebUI/CallCenterWeb.UI/index.html

@@ -867,6 +867,7 @@
867 867
 									</span>
868 868
 								</a>
869 869
                                 <input id="RoleCode" type="hidden" />
870
+                                <input id="GroupCode" type="hidden" />
870 871
 							</div>
871 872
 							<div class="logo-element">
872 873
 							</div>

+ 56 - 11
WebUI/CallCenterWeb.UI/js/chat.js

@@ -1,5 +1,9 @@
1 1
 			var token= $.cookie("token");
2
+			var username=$.cookie("zx_user");
2 3
 			$('.chat_sidebar_list ul').on('click','li',function(){
4
+				if($('.disnone').css('display')=="none"){
5
+						$('.disnone').css('display','block')
6
+				}
3 7
 				$(this).addClass("actives").siblings().removeClass("actives");
4 8
 				var person_name=$(this).find('.chat_name .names').html();
5 9
 				var person_userId=$(this).find('.chat_name .user_id').html();
@@ -33,6 +37,9 @@
33 37
 				});
34 38
 			}
35 39
 			$('.chat_left ul').on('click','li',function(){
40
+					if($('.disnone').css('display')=="none"){
41
+						$('.disnone').css('display','block')
42
+				}
36 43
 				$(this).addClass("actives").siblings().removeClass("actives");
37 44
 				var person_name=$(this).find('.chat_name').html();
38 45
 				$('.chat_person .chat_name').html(person_name);
@@ -60,21 +67,34 @@
60 67
 					success:function(data){
61 68
 						if(data.state.toLowerCase()=='success'){
62 69
 							$('.chat_sidebar_list ul').html('');
63
-//							var con=JSON.parse(data.data);
70
+							var html='';
64 71
 							var con=data.data;
72
+							console.log(username)
65 73
 							$(con).each(function(i,n){
66
-								if($.cookie("user")==n.F_UserId){
67
-									$('.chat_sidebar_head').find('chat_name').html(n.F_UserName+n.F_UserCode)
74
+								if(username==n.F_UserCode){
75
+									$('.chat_sidebar_head').find('.chat_name').html(n.F_UserName+n.F_UserCode)
76
+								}
77
+								 html='<li IsToAll="0" RoleId="'+n.F_RoleId +'" UserId="'+ n.F_UserId +'" UserCode="'+ n.F_UserCode +'">'+  
78
+		//								 src="'+ huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + n.F_See +'"
79
+										'<img class="ver_middle" src="img/chat_pic.jpg" alt="" width="30" height="30"/>'+
80
+										'<p class="chat_name"><span class="names">'+n.F_UserName +'</span><br/><span class="user_id">'+ n.F_UserCode +'</span></p>'
81
+								if(n.counts>0){
82
+									html+='<p class="message_count">'+n.counts+'</p>'
68 83
 								}
69
-								$('<li IsToAll="0" RoleId="'+n.F_RoleId +'" UserId="'+ n.F_UserId +'" UserCode="'+ n.F_UserCode +'">'+  
70
-//								 src="'+ huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + n.F_See +'"
71
-								'<img class="ver_middle" src="img/chat_pic.jpg" alt="" width="30" height="30"/>'+
72
-								'<p class="chat_name"><span class="names">'+n.F_UserName +'</span><br/><span class="user_id">'+ n.F_UserCode +'</span></p>'+
73
-								'</li>').appendTo('.chat_sidebar_list ul');
84
+								html+='</li>'
85
+								$('.chat_sidebar_list ul').append(html);
86
+								
74 87
 							})
75 88
 						}
76 89
 					}
77 90
 				});
91
+				if(	$('.UserId').val()!=0){
92
+					$('.chat_sidebar_list ul li').each(function(i,n){
93
+						if($(n).attr('UserId')==$('.UserId').val()){
94
+							$(this).addClass('actives');
95
+						}
96
+					})
97
+				}
78 98
 			}
79 99
 			$('.chat_sidebar_list ul').on('click','li',function(){
80 100
 				var userId=$(this).attr("userid");
@@ -85,7 +105,12 @@
85 105
 				$('.UserId').val(userId);
86 106
 				jiShi(userId);
87 107
 			})
88
-			//即时通讯
108
+		
109
+		 $('.sidebar_foot_seach').on('input focus',function(){
110
+			 	side()
111
+			 })
112
+		
113
+		//即时通讯
89 114
 			function jiShi(){
90 115
 				$.ajax({
91 116
 					type:"get",
@@ -118,7 +143,10 @@
118 143
 									'</div>'+
119 144
 								'</li>').appendTo('.main_message .chatlist_con')
120 145
 							}
146
+							
121 147
 						})
148
+						var farTop=$(".main_message").css('height');
149
+						$(".main_message").animate({ scrollTop:farTop});
122 150
 					}
123 151
 				});
124 152
 			}
@@ -152,7 +180,24 @@
152 180
          	 	}
153 181
          	 })
154 182
          }
155
-
183
+	//键盘发送事件
184
+	$('input').bind('keypress', function(event) {
185
+					if(event.keyCode == "13") {
186
+						$('.sendTo').trigger("click");
187
+					}
188
+				});
189
+				$(document).keydown(function(event){ 
190
+					if(event.keyCode==13){ 
191
+						$(".sendTo").click(); 
192
+					} 
193
+				}); 
194
+				
195
+		function Ajax(){
196
+			side();
197
+			jiShi();
198
+		}
199
+	setInterval(Ajax, 2000);//Ajax调用函数			
200
+				
156 201
 
157 202
 /*
158 203
  Index/SaveChatInfo?Content=&ToUserId=&ToRoleId=&IsToAll=
@@ -163,5 +208,5 @@
163 208
 
164 209
 当ToRoleId!=0时群发给所在角色
165 210
 
166
-当ToUserId!=0时发给该坐席人员
211
+当ToUserId!=0时发给该坐席人员ssss
167 212
 */

Plik diff jest za duży
+ 44 - 1
WebUI/CallCenterWeb.UI/js/content.min.js


+ 1 - 1
WebUI/CallCenterWeb.UI/js/hplus.min.js

@@ -28,7 +28,7 @@ layer.config({
28 28
 		railOpacity: .4,
29 29
 		wheelStep: 10
30 30
 	}), $(".open-small-chat").click(function() {
31
-		$(this).children().toggleClass("fa-comments").toggleClass("fa-remove"), $(".small-chat-box").toggleClass("active")
31
+		$(this).children().toggleClass("fa-comment").toggleClass("fa-remove"), $(".small-chat-box").toggleClass("active")
32 32
 	}), $(".small-chat-box .content").slimScroll({
33 33
 		height: "336px",
34 34
 //		height: "100%",

+ 1 - 0
WebUI/CallCenterWeb.UI/js/huTotal.js

@@ -110,6 +110,7 @@
110 110
         		});
111 111
 
112 112
         		function Ajax(date) {
113
+        			$(".huTable tbody").html('');
113 114
         			$.ajax({
114 115
         				type: "get",
115 116
         				url: huayi.config.callcenter_url + "TotalCall/GetDataList",

Plik diff jest za duży
+ 18706 - 0
WebUI/CallCenterWeb.UI/js/jquery-ui.js


Plik diff jest za duży
+ 13 - 0
WebUI/CallCenterWeb.UI/js/jquery-ui.min.js


+ 3 - 1
WebUI/CallCenterWeb.UI/js/main.js

@@ -582,6 +582,7 @@ $(document).ready(function() {
582 582
 		$('.ldtp-con').css("display", "none");
583 583
 		obj.Type = "SayFree";
584 584
 		Send();
585
+		Clean();
585 586
 	})
586 587
 	//顶部小头像
587 588
 	var little_pic = $('.head-pic .hp-box img').attr("src");
@@ -699,7 +700,8 @@ $(document).ready(function() {
699 700
 	}, function(result) {
700 701
 		if(result.state.toLowerCase() == "success") {
701 702
 			//console.log(result);
702
-			$("#RoleCode").val(result.data.user.F_RoleCode);
703
+		    $("#RoleCode").val(result.data.user.F_RoleCode);
704
+		    $("#GroupCode").val(result.data.user.F_GroupCode);
703 705
 			//console.log($("#RoleCode").val());
704 706
 			$(".username").text(result.data.user.F_UserName);
705 707
 			if(result.data.role) {

+ 0 - 1
WebUI/CallCenterWeb.UI/login.html

@@ -221,7 +221,6 @@
221 221
 			</div>
222 222
 
223 223
 		</div>
224
-
225 224
 		<script>
226 225
 			$(function() {
227 226
 				var a=0;