|
@@ -123,7 +123,7 @@ app.controller('calllogCtrl', ["$scope", "i18nService", "$rootScope", "$state",
|
123
|
123
|
enableFiltering: false,
|
124
|
124
|
cellTemplate: '<div class="links cl-effect-1 pull-left ui-grid-cell-contents">' +
|
125
|
125
|
'<a ng-click="grid.appScope.recordcall(row.entity)" ng-show="grid.appScope.chuli&&grid.appScope.yijieFn(row.entity)" class="bianjifont">通话录音</a>' +
|
126
|
|
- '<a ng-click="grid.appScope.recordcallid(row.entity)" ng-show="grid.appScope.chuli" class="bianjifont">回拨</a>' +
|
|
126
|
+ '<a ng-click="grid.appScope.recordcallid(row.entity)" ng-show="grid.appScope.chuli&&grid.appScope.isHuibo(row.entity)" class="bianjifont">回拨</a>' +
|
127
|
127
|
'</div>'
|
128
|
128
|
|
129
|
129
|
},
|
|
@@ -135,6 +135,13 @@ app.controller('calllogCtrl', ["$scope", "i18nService", "$rootScope", "$state",
|
135
|
135
|
return false
|
136
|
136
|
}
|
137
|
137
|
}
|
|
138
|
+ $scope.isHuibo=function(data){
|
|
139
|
+ if(data.callerIdNumber != $rootScope.phoneNumber){
|
|
140
|
+ return true
|
|
141
|
+ }else{
|
|
142
|
+ return false
|
|
143
|
+ }
|
|
144
|
+ }
|
138
|
145
|
$scope.chuli=false;
|
139
|
146
|
for(var i=0;i<loginUser.menu.length;i++){
|
140
|
147
|
if(loginUser.menu[i].link=="tonghualiebiao_chuli"){
|
|
@@ -315,6 +322,7 @@ app.controller('calllogCtrl', ["$scope", "i18nService", "$rootScope", "$state",
|
315
|
322
|
$scope.jsearchkeys={};
|
316
|
323
|
$scope.refreshData('expand-right',$scope.fileData);
|
317
|
324
|
}
|
|
325
|
+
|
318
|
326
|
$scope.recordcallid = function(data) {
|
319
|
327
|
// var telephone = '9' + data.ano;
|
320
|
328
|
// $rootScope.callout = 2;
|
|
@@ -333,7 +341,27 @@ app.controller('calllogCtrl', ["$scope", "i18nService", "$rootScope", "$state",
|
333
|
341
|
// confirmButtonColor: "#DD6B55"
|
334
|
342
|
// });
|
335
|
343
|
// }
|
336
|
|
- $rootScope.dial(data.callerIdNumber)
|
|
344
|
+ // $rootScope.dial(data.callerIdNumber)
|
|
345
|
+ var agcount = tlwsa.tlaGetagentcount();
|
|
346
|
+ var agcountFlag = false;
|
|
347
|
+ console.log(data.callerIdNumber)
|
|
348
|
+ // 查询当前话机是否签入
|
|
349
|
+ for (var i = 0; i < agcount; i++) {
|
|
350
|
+ if (tlwsa.tlaGetagentwid(i) == $rootScope.phoneNumber) {
|
|
351
|
+ agcountFlag = true;
|
|
352
|
+ }
|
|
353
|
+ }
|
|
354
|
+ if (agcountFlag) {
|
|
355
|
+ var caller = localStorage.getItem('phoneNumber');//呼叫人
|
|
356
|
+ tlwsa.tlaCallout(data.callerIdNumber, caller, 0);
|
|
357
|
+ } else {
|
|
358
|
+ SweetAlert.swal({
|
|
359
|
+ title: "呼叫失败",
|
|
360
|
+ text: "请先签入呼叫中心!",
|
|
361
|
+ type: "error",
|
|
362
|
+ confirmButtonColor: "#DD6B55",
|
|
363
|
+ });
|
|
364
|
+ }
|
337
|
365
|
};
|
338
|
366
|
$scope.ldloading = {};
|
339
|
367
|
$scope.refreshData = function(style, filterData) {
|