소스 검색

发送短信

seimin 2 년 전
부모
커밋
451d7700c0

+ 10 - 8
assets/js/controllers/incident/incidentCtrl.js

@@ -2415,10 +2415,13 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2415 2415
         console.log(model)
2416 2416
         var modalInstance = $modal.open({
2417 2417
             templateUrl: 'assets/views/incident/tpl/toSms.tpl.html',
2418
-            controller: function ($scope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data) {
2418
+            controller: function ($scope, $modalInstance, api_bpm_domain, api_webservice1, modelData, currentUserId, Alert, api_user_data) {
2419 2419
                 console.log(model,loginUser);
2420
-                $scope.assignUser = null;
2421
-                $scope.assignGroup = null;
2420
+                $scope.sms = {
2421
+                    assignUser: null,
2422
+                    assignGroup: null,
2423
+                    content: '',
2424
+                }
2422 2425
                 //获取用户
2423 2426
                 $scope.getUsers = function(key = ''){
2424 2427
                     $scope.user = [];
@@ -2456,7 +2459,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2456 2459
                 $scope.getGroups();
2457 2460
                 
2458 2461
                 $scope.ok = function () {
2459
-                    if ($scope.userOrGroup == 1 && !$scope.assignUser){
2462
+                    if ($scope.userOrGroup == 1 && !$scope.sms.assignUser){
2460 2463
                         Alert.swal({
2461 2464
                             title: "操作失败",
2462 2465
                             text: "请选择处理人!",
@@ -2464,7 +2467,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2464 2467
                         });
2465 2468
                         return;
2466 2469
                     }
2467
-                    if ($scope.userOrGroup == 2 && !$scope.assignGroup){
2470
+                    if ($scope.userOrGroup == 2 && !$scope.sms.assignGroup){
2468 2471
                         Alert.swal({
2469 2472
                             title: "操作失败",
2470 2473
                             text: "请选择处理组!",
@@ -2472,10 +2475,9 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2472 2475
                         });
2473 2476
                         return;
2474 2477
                     }
2475
-                    return;
2476
-                    api_bpm_domain.delegateTask(model.taskId, {assginee:$scope.assignUser}).then(function (response) {
2478
+                    api_webservice1.notifyUser({content: $scope.sms.content, groupId: $scope.sms.assignGroup ? $scope.sms.assignGroup.id : undefined, userId: $scope.sms.assignUser ? $scope.sms.assignUser.id : undefined}).then(function (response) {
2477 2479
                         console.log(response)
2478
-                        if (response.status == 200) {
2480
+                        if (response.state == 200) {
2479 2481
                             Alert.swal({
2480 2482
                                 title: "操作成功!",
2481 2483
                                 confirmButtonColor: "#007AFF",

+ 2 - 0
assets/js/controllers/system/user/schedulingplan.js

@@ -103,7 +103,9 @@ app.controller("calendarCtrl", function($scope,$rootScope, $filter, $q, $timeout
103 103
                 }
104 104
             }
105 105
             // delete weekdata[0];
106
+        $rootScope.isMask = true;
106 107
         api_bpm_data.addData('workDayconfigure', weekdata).then(function(response) {
108
+            $rootScope.isMask = false;
107 109
             if (response.status == 200) {
108 110
                 SweetAlert.swal({
109 111
                     title: "修改成功!",

+ 3 - 0
assets/js/main.js

@@ -331,6 +331,9 @@ app.factory('api_webservice1', ['webserviceRestangular', function (webserviceRes
331 331
     return {
332 332
         fetchDataList: function (model, data) {
333 333
             return dataService.customPOST(data, 'samsQuery/' + model, {});
334
+        },
335
+        notifyUser: function (data) {
336
+            return dataService.customPOST(data, 'notifyUser', {});
334 337
         }
335 338
     };
336 339
 }]);

+ 21 - 4
assets/views/incident/tpl/toSms.tpl.html

@@ -26,11 +26,11 @@
26 26
             <div class="control-label pull-left margin-top-5 margin-right-5">
27 27
                 <label class="demoincident">处理人</label>:</div>
28 28
             <div class="pull-right">
29
-                <ui-select class="pull-left" style="width:230px" ng-model="assignUser" theme="bootstrap">
29
+                <ui-select class="pull-left" style="width:230px" ng-model="sms.assignUser" theme="bootstrap">
30 30
                     <ui-select-match placeholder="">
31 31
                         {{$select.selected.name}}
32 32
                     </ui-select-match>
33
-                    <ui-select-choices repeat="item in user | filter:{$:$select.search}" refresh="getUsers($select.search)">
33
+                    <ui-select-choices repeat="item in user" refresh="getUsers($select.search)">
34 34
                         <div ng-bind-html="(item.name + '(' + item.account + ')') | highlight: $select.search"></div>
35 35
                     </ui-select-choices>
36 36
                 </ui-select>
@@ -42,17 +42,34 @@
42 42
             <div class="control-label pull-left margin-top-5 margin-right-5">
43 43
                 <label class="demoincident">处理组</label>:</div>
44 44
             <div class="pull-right">
45
-                <ui-select class="pull-left" style="width:230px" ng-model="assignGroup" theme="bootstrap">
45
+                <ui-select class="pull-left" style="width:230px" ng-model="sms.assignGroup" theme="bootstrap">
46 46
                     <ui-select-match placeholder="">
47 47
                         {{$select.selected.groupName}}
48 48
                     </ui-select-match>
49
-                    <ui-select-choices repeat="item in group | filter:{$:$select.search}">
49
+                    <ui-select-choices repeat="item in group">
50 50
                         <div ng-bind-html="item.groupName | highlight: $select.search"></div>
51 51
                     </ui-select-choices>
52 52
                 </ui-select>
53 53
             </div>
54 54
         </div>
55 55
     </div>
56
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;">
57
+        <div class=" input-group" style="margin:8px 0 0;">
58
+            <div class="control-label pull-left margin-top-5 margin-right-5">
59
+                <label class="demoincident">内容</label>:</div>
60
+            <div class="pull-right">
61
+                <!-- <ui-select class="pull-left" style="width:230px" ng-model="assignGroup" theme="bootstrap">
62
+                    <ui-select-match placeholder="">
63
+                        {{$select.selected.groupName}}
64
+                    </ui-select-match>
65
+                    <ui-select-choices repeat="item in group">
66
+                        <div ng-bind-html="item.groupName | highlight: $select.search"></div>
67
+                    </ui-select-choices>
68
+                </ui-select> -->
69
+                <textarea rows="3" ng-model="sms.content" class="describePlace" style="resize:none;width:230px;"></textarea>
70
+            </div>
71
+        </div>
72
+    </div>
56 73
     
57 74
 </div>
58 75
 <div class="modal-footer modelfooter-hint pointfont">