|
@@ -301,6 +301,15 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
301
|
301
|
'</div>'
|
302
|
302
|
},
|
303
|
303
|
{
|
|
304
|
+ name: 'visited',
|
|
305
|
+ displayName: '回访状态',
|
|
306
|
+ width: '70',
|
|
307
|
+ enableSorting: false,
|
|
308
|
+ cellTemplate: '<div>' +
|
|
309
|
+ '<div class="ui-grid-cell-contents" >{{row.entity.visited === 1 ? "已回访" : (row.entity.visited === 0 ? "未回访" : "")}}</div>' +
|
|
310
|
+ '</div>'
|
|
311
|
+ },
|
|
312
|
+ {
|
304
|
313
|
name: '操作',
|
305
|
314
|
enableSorting: false,
|
306
|
315
|
width: 500,
|
|
@@ -952,14 +961,20 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
952
|
961
|
fildata.searchType = $scope.searchstate;
|
953
|
962
|
}
|
954
|
963
|
console.log(fildata,78777);
|
955
|
|
- if(fildata.searchType === 'all'){
|
956
|
|
- if(fildata.incident&&fildata.incident.selectType){
|
957
|
|
- fildata.incident.selectType = fildata.incident.selectType.id;
|
958
|
|
- }
|
959
|
|
- }else{
|
960
|
|
- if(fildata.incident&&fildata.incident.selectType){
|
961
|
|
- delete fildata.incident.selectType;
|
962
|
|
- }
|
|
964
|
+ // if(fildata.searchType === 'all'){
|
|
965
|
+ // if(fildata.incident&&fildata.incident.selectType){
|
|
966
|
+ // fildata.incident.selectType = fildata.incident.selectType.id;
|
|
967
|
+ // }
|
|
968
|
+ // }else{
|
|
969
|
+ // if(fildata.incident&&fildata.incident.selectType){
|
|
970
|
+ // delete fildata.incident.selectType;
|
|
971
|
+ // }
|
|
972
|
+ // }
|
|
973
|
+ if(fildata.incident&&fildata.incident.selectType){
|
|
974
|
+ fildata.incident.selectType = fildata.incident.selectType.id;
|
|
975
|
+ }
|
|
976
|
+ if(fildata.incident&&fildata.incident.visited){
|
|
977
|
+ fildata.incident.visited = fildata.incident.visited.id;
|
963
|
978
|
}
|
964
|
979
|
// /seimin
|
965
|
980
|
$scope.refreshData('expand-right', fildata);
|
|
@@ -2250,7 +2265,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2250
|
2265
|
}
|
2251
|
2266
|
});
|
2252
|
2267
|
}
|
2253
|
|
- // 指派弹窗baba
|
|
2268
|
+ // 指派弹窗
|
2254
|
2269
|
$scope.toAssign = function (model) {
|
2255
|
2270
|
console.log(model)
|
2256
|
2271
|
var modalInstance = $modal.open({
|
|
@@ -2395,6 +2410,117 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2395
|
2410
|
});
|
2396
|
2411
|
}
|
2397
|
2412
|
|
|
2413
|
+ // 新增发送短信弹窗 liaomingming
|
|
2414
|
+ $scope.toSms = function (model) {
|
|
2415
|
+ console.log(model)
|
|
2416
|
+ var modalInstance = $modal.open({
|
|
2417
|
+ templateUrl: 'assets/views/incident/tpl/toSms.tpl.html',
|
|
2418
|
+ controller: function ($scope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data) {
|
|
2419
|
+ console.log(model,loginUser);
|
|
2420
|
+ $scope.assignUser = null;
|
|
2421
|
+ $scope.assignGroup = null;
|
|
2422
|
+ //获取用户
|
|
2423
|
+ $scope.getUsers = function(key = ''){
|
|
2424
|
+ $scope.user = [];
|
|
2425
|
+ var postData = postData = {
|
|
2426
|
+ "idx": 0,
|
|
2427
|
+ "sum": 10,
|
|
2428
|
+ user: {
|
|
2429
|
+ name: key,
|
|
2430
|
+ roledata: { rolecode: "first-line support" },
|
|
2431
|
+ selectType: "pinyin_qs"
|
|
2432
|
+ }
|
|
2433
|
+ };
|
|
2434
|
+ api_user_data.fetchDataList('user', postData).then(function (data) {
|
|
2435
|
+ $scope.user = data.list;
|
|
2436
|
+ })
|
|
2437
|
+ }
|
|
2438
|
+ //获取组
|
|
2439
|
+ $scope.getGroups = function(){
|
|
2440
|
+ $scope.user = [];
|
|
2441
|
+ var postData = postData = {
|
|
2442
|
+ "idx": 0,
|
|
2443
|
+ "sum": 100,
|
|
2444
|
+ group: {
|
|
2445
|
+ 'selectType':'nouser'
|
|
2446
|
+ }
|
|
2447
|
+ };
|
|
2448
|
+ api_user_data.fetchDataList('group', postData).then(function (data) {
|
|
2449
|
+ $scope.group = data.list;
|
|
2450
|
+ })
|
|
2451
|
+ }
|
|
2452
|
+ $scope.userOrGroup = 1;
|
|
2453
|
+ $scope.user = [];
|
|
2454
|
+ $scope.group = [];
|
|
2455
|
+ $scope.getUsers();
|
|
2456
|
+ $scope.getGroups();
|
|
2457
|
+
|
|
2458
|
+ $scope.ok = function () {
|
|
2459
|
+ if ($scope.userOrGroup == 1 && !$scope.assignUser){
|
|
2460
|
+ Alert.swal({
|
|
2461
|
+ title: "操作失败",
|
|
2462
|
+ text: "请选择处理人!",
|
|
2463
|
+ type: "error"
|
|
2464
|
+ });
|
|
2465
|
+ return;
|
|
2466
|
+ }
|
|
2467
|
+ if ($scope.userOrGroup == 2 && !$scope.assignGroup){
|
|
2468
|
+ Alert.swal({
|
|
2469
|
+ title: "操作失败",
|
|
2470
|
+ text: "请选择处理组!",
|
|
2471
|
+ type: "error"
|
|
2472
|
+ });
|
|
2473
|
+ return;
|
|
2474
|
+ }
|
|
2475
|
+ return;
|
|
2476
|
+ api_bpm_domain.delegateTask(model.taskId, {assginee:$scope.assignUser}).then(function (response) {
|
|
2477
|
+ console.log(response)
|
|
2478
|
+ if (response.status == 200) {
|
|
2479
|
+ Alert.swal({
|
|
2480
|
+ title: "操作成功!",
|
|
2481
|
+ confirmButtonColor: "#007AFF",
|
|
2482
|
+ type: "success"
|
|
2483
|
+ });
|
|
2484
|
+ $modalInstance.close('success');
|
|
2485
|
+ } else {
|
|
2486
|
+ Alert.swal({
|
|
2487
|
+ title: "操作失败",
|
|
2488
|
+ text: "操作失败, 请稍后再试!",
|
|
2489
|
+ type: "error"
|
|
2490
|
+ });
|
|
2491
|
+ }
|
|
2492
|
+ });
|
|
2493
|
+ }
|
|
2494
|
+
|
|
2495
|
+ $scope.cancel = function () {
|
|
2496
|
+ $modalInstance.dismiss('cancel');
|
|
2497
|
+ }
|
|
2498
|
+ },
|
|
2499
|
+ size: 'sm',
|
|
2500
|
+ resolve: {
|
|
2501
|
+ api_bpm: function () {
|
|
2502
|
+ return api_bpm;
|
|
2503
|
+ },
|
|
2504
|
+ modelData: function () {
|
|
2505
|
+ return model;
|
|
2506
|
+ },
|
|
2507
|
+ currentUserId: function () {
|
|
2508
|
+ return loginUser.id;
|
|
2509
|
+ },
|
|
2510
|
+ Alert: function () {
|
|
2511
|
+ return SweetAlert;
|
|
2512
|
+ },
|
|
2513
|
+ api_user_data: function () {
|
|
2514
|
+ return api_user_data;
|
|
2515
|
+ }
|
|
2516
|
+ }
|
|
2517
|
+ });
|
|
2518
|
+ modalInstance.result.then(function (selectedItem) {
|
|
2519
|
+ if (selectedItem == 'success') {
|
|
2520
|
+ $scope.refreshData('expand-right', defaultFilterData);
|
|
2521
|
+ }
|
|
2522
|
+ });
|
|
2523
|
+ }
|
2398
|
2524
|
// 新增沟通记录弹窗
|
2399
|
2525
|
$scope.toHandlerLog = function (model) {
|
2400
|
2526
|
console.log(model)
|
|
@@ -2471,7 +2597,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2471
|
2597
|
});
|
2472
|
2598
|
return;
|
2473
|
2599
|
}
|
2474
|
|
- api_bpm_data.getCallRecordId({ano: localStorage.getItem('hk_phone'), bno: $scope.telephone, agentId: $rootScope.user.id}).then(function(response){
|
|
2600
|
+ api_bpm_data.getCallRecordId({ano: localStorage.getItem('hk_phone') || undefined, bno: $scope.telephone || undefined, agentId: $rootScope.user.id}).then(function(response){
|
2475
|
2601
|
console.log(response)
|
2476
|
2602
|
if (response.status == 200) {
|
2477
|
2603
|
$scope.callId = response.data || undefined;//获取callId
|
|
@@ -2741,24 +2867,43 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2741
|
2867
|
// $scope.jry_refresh()
|
2742
|
2868
|
// }, $rootScope.refreshTime);
|
2743
|
2869
|
}
|
2744
|
|
- // 是否逾期下拉框选择seimin
|
|
2870
|
+ // 是否逾期下拉框选择
|
2745
|
2871
|
$scope.selectTypeChange = function(){
|
2746
|
2872
|
console.log($scope.searchkeys.selectType,66666);
|
2747
|
2873
|
if(window.sessionStorage.getItem('isGoyuqi') == 'yes'){
|
2748
|
2874
|
$scope.searchkeys.selectType = {id:'2',name:'是'};
|
2749
|
|
- // window.sessionStorage.removeItem('isGoyuqi');//seimin
|
|
2875
|
+ // window.sessionStorage.removeItem('isGoyuqi');
|
2750
|
2876
|
}
|
2751
|
2877
|
var ids = $scope.searchkeys.selectType.id
|
2752
|
2878
|
if(defaultFilterData.incident){
|
2753
|
|
- defaultFilterData.incident.selectType = ids;//seimin
|
|
2879
|
+ defaultFilterData.incident.selectType = ids;
|
2754
|
2880
|
}else{
|
2755
|
2881
|
defaultFilterData.incident = {
|
2756
|
2882
|
selectType:ids
|
2757
|
2883
|
};
|
2758
|
2884
|
}
|
2759
|
|
- defaultFilterData.searchType = 'all';
|
|
2885
|
+ defaultFilterData.searchType = $scope.searchstate;
|
2760
|
2886
|
console.log(defaultFilterData,2222)
|
2761
|
|
- $scope.onChange('all');
|
|
2887
|
+ $scope.onChange($scope.searchstate);
|
|
2888
|
+ }
|
|
2889
|
+ // 是否回访下拉框选择
|
|
2890
|
+ $scope.visited = [
|
|
2891
|
+ {id: 1, name: '已回访'},
|
|
2892
|
+ {id: 0, name: '未回访'}
|
|
2893
|
+ ]
|
|
2894
|
+ $scope.visitedChange = function(){
|
|
2895
|
+ console.log($scope.searchkeys.visited,66666);
|
|
2896
|
+ var ids = $scope.searchkeys.visited.id;
|
|
2897
|
+ if(defaultFilterData.incident){
|
|
2898
|
+ defaultFilterData.incident.visited = ids;
|
|
2899
|
+ }else{
|
|
2900
|
+ defaultFilterData.incident = {
|
|
2901
|
+ visited:ids
|
|
2902
|
+ };
|
|
2903
|
+ }
|
|
2904
|
+ defaultFilterData.searchType = $scope.searchstate;
|
|
2905
|
+ console.log(defaultFilterData,3333)
|
|
2906
|
+ $scope.onChange($scope.searchstate);
|
2762
|
2907
|
}
|
2763
|
2908
|
//获取列表数据
|
2764
|
2909
|
$scope.refreshData = function (style, filterData) {
|
|
@@ -3182,6 +3327,10 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
|
3182
|
3327
|
$scope.delSj = function () {
|
3183
|
3328
|
$scope.colobject.grid.appScope.delSj($scope.item);
|
3184
|
3329
|
}
|
|
3330
|
+ // 发送短信
|
|
3331
|
+ $scope.toSms = function () {
|
|
3332
|
+ $scope.colobject.grid.appScope.toSms($scope.item);
|
|
3333
|
+ }
|
3185
|
3334
|
// 新增沟通记录
|
3186
|
3335
|
$scope.toHandlerLog = function () { //print
|
3187
|
3336
|
$scope.colobject.grid.appScope.toHandlerLog($scope.item);
|
|
@@ -3270,6 +3419,7 @@ app.directive('incidentoperator', function () {
|
3270
|
3419
|
// '<a ng-click="print()" ng-show="dayin" class="bianjifont" >打印</a>' +
|
3271
|
3420
|
// '<a ng-click="jry_evaluate()" ng-show="jry_evaluateShow()" class="luyinfont" >评价</a>' +
|
3272
|
3421
|
'<a ng-click="record()" ng-show="{{item.callID}}" class="luyinfont" >录音</a>' +
|
|
3422
|
+ '<a ng-click="toSms()" ng-show="{{item.huifang&&huifang}}" class="assign" >发送短信</a>' +
|
3273
|
3423
|
'<a ng-click="toHandlerLog()" ng-show="{{item.huifang&&huifang}}" class="assign" >新增沟通记录</a>' +
|
3274
|
3424
|
// '<a ng-click="rotate()" ng-show="{{item.state.id==4}}" class="rotate" >转派</a>' +
|
3275
|
3425
|
// '<a ng-click="upgrade()" ng-show="{{up&&item.state.id==4&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >升级</a>' +
|