소스 검색

处理日志修改为未沟通记录

seimin 2 년 전
부모
커밋
05de907880

+ 27 - 7
assets/js/controllers/customform/customformCtrl.js

@@ -13487,16 +13487,36 @@ appFormly.config(function config(formlyConfigProvider) {
13487 13487
       },
13488 13488
     ],
13489 13489
   });
13490
-  //处理日志
13490
+  //未沟通记录
13491 13491
   formlyConfigProvider.setType({
13492 13492
     name: "ui-handlerLog",
13493 13493
     templateUrl: "assets/views/customform/tpl/ui-handlerLog.html",
13494 13494
     controller: [
13495 13495
       "$scope",
13496
+      "$rootScope",
13497
+      "$modal",
13496 13498
       "api_bpm_data",
13497 13499
       "Restangular",
13498
-      function ($scope, api_bpm_data, Restangular) {
13499
-        console.log($scope, 'ui-handlerLog')
13500
+      function ($scope, $rootScope, $modal, api_bpm_data, Restangular) {
13501
+        console.log($scope, 'ui-handlerLog');
13502
+        //录音
13503
+        $scope.recordcall = function(data) {
13504
+          var modalInstance = $modal.open({
13505
+              backdrop: "static",
13506
+              templateUrl: 'assets/views/incident/tpl/audio.html',
13507
+              controller: function($rootScope, $scope, $modalInstance, $sce, $http, api_playservice) {
13508
+                  // $scope.audioUrl=$sce.trustAsResourceUrl(callIp+data.recordingFileName);
13509
+                  $scope.audioUrl=$sce.trustAsResourceUrl('https://www.runoob.com/try/demo_source/horse.ogg');//暂时写死
13510
+                  $scope.cancel = function() {
13511
+                      $modalInstance.dismiss('cancel');
13512
+                  };
13513
+                  $modalInstance.close();
13514
+              }
13515
+          });
13516
+          modalInstance.result.then(function(result) {}, function(reason) {
13517
+              $rootScope.setidle();
13518
+          });
13519
+        };
13500 13520
       },
13501 13521
     ],
13502 13522
   });
@@ -21761,9 +21781,9 @@ appFormly.controller("CustomformCtrl", [
21761 21781
             });
21762 21782
           });
21763 21783
           if (vm.model.incident){
21764
-            if(vm.model.incident.branch.id && vm.model.incident.area.id && vm.model.incident.place.id){
21784
+            if(vm.model.incident.branch.id && vm.model.incident.place.id){
21765 21785
 
21766
-            }else if(vm.model.incident.branch.id || vm.model.incident.area.id || vm.model.incident.place.id){
21786
+            }else if(vm.model.incident.branch.id || vm.model.incident.place.id){
21767 21787
               startsub = false;
21768 21788
               $scope.ldloading.expand_right = false;
21769 21789
               SweetAlert.swal({
@@ -22288,8 +22308,8 @@ appFormly.controller("CustomformCtrl", [
22288 22308
                   }
22289 22309
                   
22290 22310
                   function handlerLogFn(){
22291
-                    //处理日志
22292
-                    // 处理日志不为空并且事件是处理中状态
22311
+                    //未沟通记录
22312
+                    // 未沟通记录不为空并且事件是处理中状态
22293 22313
                     if (vm.model.handlerLog && vm.model.handlerLog.trim() && vm.model.incident.state.value == 'handler') {
22294 22314
                       api_bpm_data.addData('operationLog', { operationLog: { opType: 'handlerLog', opValue: vm.model.handlerLog, extra1: vm.model.incident.id } }).then(function (result1) {
22295 22315
                         baseHandler();

+ 51 - 6
assets/js/controllers/incident/incidentCtrl.js

@@ -2336,25 +2336,70 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2336 2336
             }
2337 2337
         });
2338 2338
     }
2339
-    // 新增处理日志弹窗baba
2339
+    // 新增未沟通记录弹窗
2340 2340
     $scope.toHandlerLog = function (model) {
2341 2341
         console.log(model)
2342 2342
         var modalInstance = $modal.open({
2343 2343
             templateUrl: 'assets/views/incident/tpl/toHandlerLog.tpl.html',
2344
-            controller: function ($scope, $modalInstance, api_bpm_domain,api_bpm_data, modelData, currentUserId, Alert, api_user_data) {
2344
+            controller: function ($scope, $rootScope, $modalInstance, api_bpm_domain,api_bpm_data, modelData, currentUserId, Alert, api_user_data) {
2345
+                $scope.model = model;
2345 2346
                 console.log(model,loginUser);
2346 2347
                 $scope.handlerLog = '';
2348
+                $scope.hdPhone = '';
2349
+                $scope.callId = '';
2347 2350
                 $scope.user = [];
2351
+                $scope.copyTo = function(phone){
2352
+                    $scope.hdPhone = phone;
2353
+                }
2354
+
2355
+                $scope.dialout = function (teleno) {
2356
+                    $rootScope.callout = 2;
2357
+                    if (localStorage.getItem('fenjiNumber')) {
2358
+                      $rootScope.toggle('off-sidebar');
2359
+                    }else if(localStorage.getItem('hk_phone')){
2360
+                      var gid = "@0"
2361
+                      var telephone = '9' + teleno
2362
+                      $rootScope.callout = 2;
2363
+                      if ($rootScope.takes) {
2364
+                        $rootScope.isMask = true;
2365
+                        api_text.dialout($rootScope.takes, gid, telephone).then(function (data) {
2366
+                            console.log(data);
2367
+                            $rootScope.isMask = false;
2368
+                            if (data.errno == 0) {
2369
+                                $scope.callId = '暂时写死';
2370
+                                $rootScope.status = 6;
2371
+                            }else{
2372
+                                $scope.callId = '';
2373
+                            }
2374
+                        })
2375
+                      } else {
2376
+                          SweetAlert.swal({
2377
+                              title: "呼叫失败",
2378
+                              text: "请先签入呼叫中心!",
2379
+                              type: "error",
2380
+                              confirmButtonColor: "#DD6B55"
2381
+                          });
2382
+                      }
2383
+                    } else {
2384
+                      SweetAlert.swal({
2385
+                        title: "呼叫失败",
2386
+                        text: "请先签入呼叫中心!",
2387
+                        type: "error",
2388
+                        confirmButtonColor: "#DD6B55",
2389
+                      });
2390
+                    }
2391
+                  };
2392
+
2348 2393
                 $scope.ok = function () {
2349 2394
                     if (!$scope.handlerLog.trim()){
2350 2395
                         Alert.swal({
2351 2396
                             title: "操作失败",
2352
-                            text: "请填写处理日志!",
2397
+                            text: "请填写沟通结果!",
2353 2398
                             type: "error"
2354 2399
                         });
2355 2400
                         return;
2356 2401
                     }
2357
-                    api_bpm_data.addData('operationLog',{operationLog:{opType:'handlerLog',opValue:$scope.handlerLog,extra1:model.id}}).then(function(response){
2402
+                    api_bpm_data.addData('operationLog',{operationLog:{opType:'handlerLog',opValue:$scope.handlerLog,extra1:model.id, extra2: $scope.callId}}).then(function(response){
2358 2403
                         console.log(response)
2359 2404
                         if (response.status == 200) {
2360 2405
                             Alert.swal({
@@ -3047,7 +3092,7 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
3047 3092
     $scope.delSj = function () {
3048 3093
         $scope.colobject.grid.appScope.delSj($scope.item);
3049 3094
     }
3050
-    // 新增处理日志
3095
+    // 新增未沟通记录
3051 3096
     $scope.toHandlerLog = function () { //print
3052 3097
         $scope.colobject.grid.appScope.toHandlerLog($scope.item);
3053 3098
         // $scope.doEdit($scope.item.id);
@@ -3130,7 +3175,7 @@ app.directive('incidentoperator', function () {
3130 3175
             '<a ng-click="visit()"  ng-show="{{item.huifang&&huifang}}"  class="bianjifont">回访</a>' +
3131 3176
             '<a ng-click="changeCenter()"  ng-show="jry_modify(item)"  class="luyinfont">编辑</a>' +
3132 3177
             '<a ng-click="toAssign()" ng-show="{{(item.state.id==1543||item.state.id==1544)&&assignFlag&&item.assignee}}" class="assign" >指派</a>' +
3133
-            '<a ng-click="toHandlerLog()" ng-show="{{item.state.id==1544}}" class="assign" >新增处理日志</a>' +
3178
+            '<a ng-click="toHandlerLog()" ng-show="{{item.state.id==1544}}" class="assign" >新增未沟通记录</a>' +
3134 3179
             '<a ng-click="delSj()" ng-show="{{delFlag&&item.state.value!== \'deleted\'}}" class="assign" >删除</a>' +
3135 3180
             '<a ng-click="print()" ng-show="dayin" class="bianjifont" >打印</a>' +
3136 3181
             // '<a ng-click="jry_evaluate()"  ng-show="jry_evaluateShow()" class="luyinfont" >评价</a>' +

+ 9 - 5
assets/views/customform/tpl/ui-handlerLog.html

@@ -1,23 +1,27 @@
1 1
 <div class="row padding-sm no-padding-vr bordered no-border-hr ">
2 2
     <div class="col-md-12">
3
-        <div style="color: #333;">处理日志:</div>
3
+        <div style="color: #333;">未沟通记录:</div>
4 4
         <div class="panel panel-white">
5 5
             <div class="panel-body">
6 6
                 <table class="table table-striped table-hover" style="table-layout:fixed">
7 7
                     <thead>
8 8
                         <tr>
9 9
                             <th class="center" style="width:10px">#</th>
10
-                            <th class="center" style="width:100px">处理人</th>
11
-                            <th class="center" style="width:200px">时间</th>
12
-                            <th class="center">内容</th>
10
+                            <th class="center" style="width:200px">沟通时间</th>
11
+                            <th class="center" style="width:100px">操作人</th>
12
+                            <th class="center" style="width:200px">沟通电话</th>
13
+                            <th class="center">沟通成果</th>
14
+                            <th class="center">操作</th>
13 15
                         </tr>
14 16
                     </thead>
15 17
                     <tbody>
16 18
                         <tr ng-repeat="item in model.incident.handlerLogs">
17 19
                             <td class="center">{{$index + 1}}</td>
18
-                            <td class="center">{{item.userName}}</td>
19 20
                             <td class="center">{{item.opTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
21
+                            <td class="center">{{item.userName}}</td>
22
+                            <td class="center">暂时写死</td>
20 23
                             <td class="center" style="white-space: normal;word-break:break-all">{{item.opValue}}</td>
24
+                            <td class="center"><a ng-click="recordcall(item)" ng-if="true" class="bianjifont">通话录音</a></td>
21 25
                         </tr>
22 26
                     </tbody>
23 27
                 </table>

+ 46 - 7
assets/views/incident/tpl/toHandlerLog.tpl.html

@@ -1,16 +1,49 @@
1
-<!-- 新增处理日志 -->
1
+<!-- 新增未沟通记录 -->
2 2
 <div class="modal-header">
3
-    <div class="modal-title fontcolor-two fontsizes-14">新增处理日志
3
+    <div class="modal-title fontcolor-two fontsizes-14">新增未沟通记录
4 4
         <button type="button" class="close pull-right" ng-click="cancel()">×</button>
5 5
     </div>
6 6
 </div>
7 7
 <div class="modal-body center">
8 8
     <div class="form-group incidentsearch" style="margin:0 auto;width: 250px;">
9
-        <div class=" input-group" style="margin:30px 0 ;">
10
-            <!-- <div class="control-label pull-left margin-top-5 margin-right-5">
11
-                <label class="demoincident">新增处理日志</label>:</div> -->
9
+        <div class=" input-group">
10
+            <div class="control-label pull-left margin-right-5">
11
+                <label class="demoincident">联系人</label>:</div>
12 12
             <div>
13
-                <textarea data-ng-model="handlerLog" rows="5"  maxlength="255" style="width: 100%;resize:none;" placeholder="请填写处理日志"></textarea>
13
+                {{model.contacts}}<span class="cl_tel" ng-click="copyTo(model.contactsInformation)" ng-if="model.contactsInformation">({{model.contactsInformation}})</span>
14
+            </div>
15
+        </div>
16
+    </div>
17
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 250px;">
18
+        <div class=" input-group">
19
+            <div class="control-label pull-left margin-right-5">
20
+                <label class="demoincident">报修人</label>:</div>
21
+            <div>
22
+                {{model.requester.name}}<span class="cl_tel" ng-click="copyTo(model.requester.mphone)" ng-if="model.requester.mphone">({{model.requester.mphone}})</span>
23
+            </div>
24
+        </div>
25
+    </div>
26
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 250px;">
27
+        <div class=" input-group">
28
+            <div class="control-label pull-left margin-right-5">
29
+                <label class="demoincident">回访电话</label>:</div>
30
+            <div style="display: flex;width:100%;">
31
+                <input class="form-control" data-ng-model="hdPhone" placeholder="请填写回访电话">
32
+                <span class="input-group-btn">
33
+                    <button class="btn btn-default" tooltip="拨打" tooltip-placement="top"
34
+                        ng-click="dialout(hdPhone)"
35
+                        type="button"><i class="fa fa-phone greenfont"></i>
36
+                    </button>
37
+                </span>
38
+            </div>
39
+        </div>
40
+    </div>
41
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 250px;">
42
+        <div class=" input-group">
43
+            <div class="control-label pull-left margin-right-5">
44
+                <label class="demoincident">沟通结果</label>:</div>
45
+            <div>
46
+                <textarea data-ng-model="handlerLog" rows="5"  maxlength="255" style="width: 100%;resize:none;" placeholder="请填写沟通结果"></textarea>
14 47
             </div>
15 48
         </div>
16 49
     </div>
@@ -18,4 +51,10 @@
18 51
 <div class="modal-footer modelfooter-hint pointfont">
19 52
     <div class="hintfooterleft pull-left" ng-click="ok()" translate="modal.button.OK ">OK</div>
20 53
     <div class="hintfooterright pull-right" ng-click="cancel() " translate="modal.button.CANCEL ">Cancel</div>
21
-</div>
54
+</div>
55
+<style>
56
+    .cl_tel{
57
+        cursor: pointer;
58
+        text-decoration: underline;
59
+    }
60
+</style>