瀏覽代碼

增加事件列表已删除tab__事件修改

seimin 3 年之前
父節點
當前提交
7cf49befcf

+ 3 - 3
assets/js/controllers/customform/customformDetailCtrl.js

@@ -1,8 +1,8 @@
1 1
 var appFormly = angular.module('formlyDetail', ['formlyExample']);
2 2
 app.requires.push('formlyDetail');
3 3
 
4
-appFormly.controller('CustomformDetailCtrl', ['$scope', 'i18nService', '$rootScope', '$parse', '$injector', '$http', '$q', '$state', '$stateParams', '$modal', '$timeout', '$interval', 'SweetAlert', 'FileUploader', 'Restangular', 'BpmRestangular', 'UserRestangular', 'api_configure_form', 'api_bpm_domain', 'api_bpm_data', 'api_user_data', 'up_down_file',
5
-    function($scope, i18nService, $rootScope, $parse, $injector, $http, $q, $state, $stateParams, $modal, $timeout, $interval, SweetAlert, FileUploader, Restangular, BpmRestangular, UserRestangular, api_configure_form, api_bpm_domain, api_bpm_data, api_user_data, up_down_file) {
4
+appFormly.controller('CustomformDetailCtrl', ['$scope', 'i18nService', '$rootScope', '$parse', '$injector', '$http', '$q', '$state', '$stateParams', '$modal', '$timeout', '$interval', 'SweetAlert', 'FileUploader', 'Restangular', 'BpmRestangular', 'UserRestangular', 'api_configure_form', 'api_bpm_domain', 'api_bpm_data', 'api_user_data', 'up_down_file','WechatRestangular',
5
+    function($scope, i18nService, $rootScope, $parse, $injector, $http, $q, $state, $stateParams, $modal, $timeout, $interval, SweetAlert, FileUploader, Restangular, BpmRestangular, UserRestangular, api_configure_form, api_bpm_domain, api_bpm_data, api_user_data, up_down_file,WechatRestangular) {
6 6
         //console.log($parse('Restangular')($scope));
7 7
         //console.log($injector.get('Restangular'));
8 8
         //保存报修主体
@@ -456,7 +456,7 @@ appFormly.controller('CustomformDetailCtrl', ['$scope', 'i18nService', '$rootSco
456 456
                 if (pdKey != "") {
457 457
                     if (pdKey == "incident") { //修改
458 458
                         vm.model.incident.category = { id: vm.model.incident.category.id };
459
-                        api_bpm_data.updData("incident", { "incident": vm.model.incident }).then(function(response) {
459
+                        api_bpm_data.addData("incident", { "incident": vm.model.incident }).then(function(response) {
460 460
                             if (response) {
461 461
                                 var resData = Restangular.stripRestangular(response);
462 462
                                 SweetAlert.swal({

+ 19 - 9
assets/js/controllers/incident/incidentCtrl.js

@@ -939,7 +939,11 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
939 939
         $scope.memoryfilterData = fildata;
940 940
         fildata.assignee = loginUser.id;
941 941
         // seimin
942
-        fildata.searchType = $scope.searchstate;
942
+        if($scope.searchstate === 'all_del'){
943
+            fildata.searchType = 'all'; 
944
+        }else{
945
+            fildata.searchType = $scope.searchstate;
946
+        }
943 947
         console.log(fildata,78777);
944 948
         if(fildata.searchType === 'all'){
945 949
             if(fildata.incident&&fildata.incident.selectType){
@@ -2552,6 +2556,13 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2552 2556
         $scope.searchstate = 'todo';//baba
2553 2557
     }
2554 2558
     $scope.onChange = function (searchType) {
2559
+        if(searchType === 'all_del'){
2560
+            var obj = $scope.state.find(function(v){return v.id == 1708});
2561
+            $scope.othcode = {state:obj};
2562
+            $scope.isDisabledState = true;
2563
+        }else{
2564
+            $scope.isDisabledState = false;
2565
+        }
2555 2566
         $scope.searchstate = searchType;
2556 2567
         $scope.chiceIncident($scope.searchkeys,$scope.othcode.state);
2557 2568
         // console.log(defaultFilterData,'fanbu')
@@ -2932,18 +2943,17 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
2932 2943
     // }
2933 2944
 
2934 2945
     //修改页面显示判断
2935
-    $scope.jry_modify = function () {
2946
+    $scope.jry_modify = function (item) {
2947
+        console.log(item)
2936 2948
         var jry_role = false;
2937 2949
         for (var i = 0; i < $rootScope.user.role.length; i++) {
2938
-            if ($rootScope.user.role[i].role == "服务台" && $rootScope.user.role[i].rolecode == "call center") {
2950
+            if ($rootScope.user.role[i].rolecode == "call center") {
2939 2951
                 jry_role = true
2940 2952
             }
2941 2953
         }
2942
-        if (jry_role) {
2943
-            return true
2944
-        } else {
2945
-            return false
2946
-        }
2954
+        var arrFlag = ['reassign','assigned','pending','handler','storage'];
2955
+        var stateFlag = arrFlag.includes(item.state.value)
2956
+        return jry_role && stateFlag;
2947 2957
     }
2948 2958
     // 回访操作权限
2949 2959
     for (var obj in $rootScope.user.role) {
@@ -3100,7 +3110,7 @@ app.directive('incidentoperator', function () {
3100 3110
         template: '<div><div class="cl-effect-1 ui-grid-cell-contents pull-left" >' +
3101 3111
             // '<a ng-click="look()"   tooltip="查看" tooltip-placement="left"><i class="ti-eye"></i></a>'+
3102 3112
             '<a ng-click="handler()" ng-show="{{item.state.id != 1546 &&!item.handlerUser&&item.tiquPower&&qiangdan}}" class="bianjifont" >抢单</a>' +
3103
-            // '<a ng-click="changeCenter()"  ng-show="jry_modify()"  class="luyinfont">修改</a>' +
3113
+            '<a ng-click="changeCenter()"  ng-show="jry_modify(item)"  class="luyinfont">修改</a>' +
3104 3114
             '<a ng-click="edit()"  ng-show="{{item.chaozuoPower&&chuli}}"  class="bianjifont">处理</a>' +
3105 3115
             '<a ng-click="visit()"  ng-show="{{item.huifang&&huifang}}"  class="bianjifont">回访</a>' +
3106 3116
             '<a ng-click="print()" ng-show="dayin" class="bianjifont" >打印</a>' +

+ 1 - 1
assets/views/customform/tpl/ui-textAreaKnowledge.html

@@ -1,7 +1,7 @@
1 1
 <!-- <div>
2 2
 	<textarea class="form-control autosize msd-elastic: \n;" data-ng-model="model[options.key]" ng-change="to['onChange'](model[options.key], options, this, $event ,model);"></textarea>
3 3
 </div> -->
4
-<div class="jry_tit">事件描述<span class="important_red">*</span>:<span class="knowledge" tooltip="点击查看可以引用的知识库" tooltip-placement="right" ng-click="openSolution(model[options.key], options, this, $event ,model)">引用知识库</span></div>
4
+<div class="jry_tit">事件描述<span class="important_red">*</span>:<span ng-if="!options.templateOptions.isHidden" class="knowledge" tooltip="点击查看可以引用的知识库" tooltip-placement="right" ng-click="openSolution(model[options.key], options, this, $event ,model)">引用知识库</span></div>
5 5
 <div>
6 6
 	<textarea class="form-control autosize msd-elastic: \n;" maxlength="{{to.maxlength}}" data-ng-model="model[options.key]" ng-change="to['onChange'](model[options.key], options, this, $event ,model);" ng-disabled="{{to.readOnly}}" rows="{{options.templateOptions.rows||0}}"></textarea>
7 7
 </div>

+ 11 - 9
assets/views/incident/list.html

@@ -21,6 +21,8 @@
21 21
                     ng-click="onChange('done')">处理过</button>
22 22
                 <button class="btn btn-statebutton statebutton keeprightbottom wt_btn2"
23 23
                     ng-class="{'statecolor':searchstate=='create'}" ng-click="onChange('create')">我创建</button>
24
+                <button class="btn btn-statebutton statebutton keeprightbottom wt_btn2"
25
+                    ng-class="{'statecolor':searchstate=='all_del'}" ng-click="onChange('all_del')">已删除</button>
24 26
                 <!-- <button class="btn btn-statebutton statebutton keeprightbottom wt_btn2" ng-class="{'statecolor':searchstate=='overDate'}"
25 27
                     ng-click="onChange('overDate')">已逾期</button> -->
26 28
                 <!-- <button class="btn btn-statebutton statebutton keeprightbottom wt_btn2" ng-class="{'statecolor':searchstate=='wt_all'}" ng-click="onChange1('wt_all')">我的通知</button> -->
@@ -83,7 +85,7 @@
83 85
                                 <div class="control-label pull-left margin-top-5">报修人:</div>
84 86
                                 <ui-select class="pull-right selectzise wt_width1 wt_width3"
85 87
                                     ng-model="searchkeys.requester" theme="bootstrap">
86
-                                    <ui-select-match placeholder="">
88
+                                    <ui-select-match placeholder="请选择报修人">
87 89
                                         {{$select.selected.name}}
88 90
                                     </ui-select-match>
89 91
                                     <ui-select-choices repeat="item in requester"
@@ -129,7 +131,7 @@
129 131
                             <div class="control-label pull-left margin-top-5 ">区域:</div>
130 132
                             <ui-select class="pull-right selectzise wt_width1 wt_width3" ng-model="searchkeys.area" theme="bootstrap"
131 133
                                 ng-change="onChangearea(searchkeys)">
132
-                                <ui-select-match placeholder="">
134
+                                <ui-select-match placeholder="请选择区域">
133 135
                                     {{$select.selected.area}}
134 136
                                 </ui-select-match>
135 137
                                 <ui-select-choices repeat="item in outarea | filter: $select.search">
@@ -143,7 +145,7 @@
143 145
                             <div class="control-label pull-left margin-top-5">地点:</div>
144 146
                             <ui-select class="pull-right selectzise wt_width1 wt_width3" ng-model="searchkeys.place" theme="bootstrap"
145 147
                                 ng-change="onChangeplace(key)">
146
-                                <ui-select-match placeholder="">
148
+                                <ui-select-match placeholder="请选择地点">
147 149
                                     {{$select.selected.place}}
148 150
                                 </ui-select-match>
149 151
                                 <ui-select-choices repeat="item in outplace | filter: $select.search">
@@ -154,9 +156,9 @@
154 156
                         </div>
155 157
                         <div class="form-group incidentsearch  wt_width">
156 158
                             <div class="control-label pull-left margin-top-5">状态:</div>
157
-                            <ui-select class="pull-right selectzise wt_width1 wt_width3" ng-model="othcode.state"
159
+                            <ui-select ng-disabled="isDisabledState" class="pull-right selectzise wt_width1 wt_width3" ng-model="othcode.state"
158 160
                                 theme="bootstrap">
159
-                                <ui-select-match placeholder="">
161
+                                <ui-select-match placeholder="请选择状态">
160 162
                                     {{$select.selected.name}}
161 163
                                 </ui-select-match>
162 164
                                 <ui-select-choices repeat="item in state | filter: $select.search">
@@ -166,7 +168,7 @@
166 168
                         </div>
167 169
                         <div class="form-group incidentsearch  wt_width">
168 170
                             <div class="control-label pull-left margin-top-5">事件分类:</div>
169
-                            <multi-select-tree class="pull-right selectzise wt_width1 wt_width3"
171
+                            <multi-select-tree data-default-label="请选择事件分类" class="pull-right selectzise wt_width1 wt_width3"
170 172
                                 ng-model="cifilter_classic" data-input-model="select_treedata"
171 173
                                 data-output-model="cifilter_classics" theme="bootstrap" multi-select="false"
172 174
                                 data-callback="onFilterCallback(item)" data-select-only-leafs="false"
@@ -177,7 +179,7 @@
177 179
                             <div class="control-label pull-left margin-top-5 ">受理人:</div>
178 180
                             <ui-select class="pull-right selectzise wt_width1 wt_width3"
179 181
                                 ng-model="searchkeys.acceptUser" theme="bootstrap">
180
-                                <ui-select-match placeholder="">
182
+                                <ui-select-match placeholder="请选择受理人">
181 183
                                     {{$select.selected.name}}
182 184
                                 </ui-select-match>
183 185
                                 <ui-select-choices repeat="item in acceptUser | filter: $select.search"
@@ -190,7 +192,7 @@
190 192
                             <div class="control-label pull-left margin-top-5">处理人:</div>
191 193
                             <ui-select class="pull-right selectzise wt_width1 wt_width3"
192 194
                                 ng-model="searchkeys.handlingPersonnelUser" theme="bootstrap">
193
-                                <ui-select-match placeholder="">
195
+                                <ui-select-match placeholder="请选择处理人">
194 196
                                     {{$select.selected.name}}
195 197
                                 </ui-select-match>
196 198
                                 <ui-select-choices repeat="item in handlingPersonnelUser"
@@ -228,7 +230,7 @@
228 230
                         <div class="form-group incidentsearch wt_width">
229 231
                             <div class="control-label pull-left margin-top-5">是否逾期:</div>
230 232
                             <ui-select ng-change="selectTypeChange()" ng-model="searchkeys.selectType" class="pull-right selectzise wt_width1 wt_width3" theme="bootstrap">
231
-                                <ui-select-match>
233
+                                <ui-select-match placeholder="请选择">
232 234
                                     <span ng-bind="$select.selected.name"></span>
233 235
                                 </ui-select-match>
234 236
                                 <ui-select-choices repeat="item in selectType">