seimin 2 år sedan
förälder
incheckning
cb2d142eef
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      assets/js/controllers/customform/customformCtrl.js

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

@@ -22009,7 +22009,7 @@ appFormly.controller("CustomformCtrl", [
22009 22009
                     currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22010 22010
                     intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22011 22011
                   }
22012
-                  if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22012
+                  if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length && integralRoles.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22013 22013
                     $modal.open({
22014 22014
                       templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
22015 22015
                       controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope,api_bpm_data) {
@@ -22168,7 +22168,7 @@ appFormly.controller("CustomformCtrl", [
22168 22168
                           currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22169 22169
                           intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22170 22170
                         }
22171
-                        if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22171
+                        if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length && integralRoles.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22172 22172
                           api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
22173 22173
                             var auditState = res.find(v=>v.value == 0);
22174 22174
                             var postData = { 
@@ -22277,7 +22277,7 @@ appFormly.controller("CustomformCtrl", [
22277 22277
                     currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22278 22278
                     intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22279 22279
                   }
22280
-                  if($scope.formData.name === 'handlerform'&&((integralMechanism == 1 && intersection.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22280
+                  if($scope.formData.name === 'handlerform'&&((integralMechanism == 1 && intersection.length && integralRoles.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22281 22281
                       $modal.open({
22282 22282
                         templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
22283 22283
                         controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope,api_bpm_data) {