seimin 11 ay önce
ebeveyn
işleme
e92849c476

+ 12 - 6
assets/js/controllers/mainCtrl.js

@@ -4196,6 +4196,12 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4196 4196
               });
4197 4197
           };
4198 4198
 
4199
+          // 切换派人或派组
4200
+          $scope.assginChange = function(){
4201
+            $scope.incidentModel.user = '';
4202
+            $scope.incidentModel.group = '';
4203
+          }
4204
+
4199 4205
           // 处理人/处理组加责任科室搜索
4200 4206
           $scope.userAndGroupSearch = async function(){
4201 4207
             // $scope.jry_userSearch();
@@ -4256,11 +4262,11 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4256 4262
                   dutyId: $scope.selectedDuty.id
4257 4263
                 },
4258 4264
               };
4259
-              api_user_data.fetchDataList("incidentAssignManager", postData).then(function(result){
4265
+              api_user_data.fetchDataList("incidentAssignManager", postData).then(async function(result){
4260 4266
                 if(result.status == 200){
4261 4267
                   var deptBinduserConfig = result.list?result.list[0]:null;//获取第一条配置
4262 4268
                   if(deptBinduserConfig){
4263
-                    $scope.userAndGroupSearch();
4269
+                    await $scope.userAndGroupSearch();
4264 4270
                     // 如果有科室绑定人员的配置
4265 4271
                     if(deptBinduserConfig.userOrGroupType == 1){
4266 4272
                       // 派单给人
@@ -4283,7 +4289,7 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4283 4289
                         dutyId: $scope.selectedDuty.id
4284 4290
                       },
4285 4291
                     };
4286
-                    api_user_data.fetchDataList("incidentAssignManager", postData).then(function(result){
4292
+                    api_user_data.fetchDataList("incidentAssignManager", postData).then(async function(result){
4287 4293
                       if(result.status == 200){
4288 4294
                         //获取配置
4289 4295
                         var deptBinduserConfig = result.list || [];
@@ -4292,7 +4298,7 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4292 4298
                         // 获取第一条配置
4293 4299
                         deptBinduserConfig = deptBinduserConfig[0] || null;
4294 4300
                         if(deptBinduserConfig){
4295
-                          $scope.userAndGroupSearch();
4301
+                          await $scope.userAndGroupSearch();
4296 4302
                           // 如果有科室绑定人员的配置
4297 4303
                           if(deptBinduserConfig.userOrGroupType == 1){
4298 4304
                             // 派单给人
@@ -4984,10 +4990,10 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4984 4990
             }
4985 4991
           });
4986 4992
           // 派人或派组
4987
-          function assignCommon(sj){
4993
+          async function assignCommon(sj){
4988 4994
             console.log(sj);
4989 4995
             if(!sj){return;}
4990
-            $scope.userAndGroupSearch();
4996
+            await $scope.userAndGroupSearch();
4991 4997
             if (sj.branchType == 0) {
4992 4998
               if (sj.userOrGroupType === 1) {
4993 4999
                 //派人

+ 2 - 0
assets/views/newOrderSeimin.html

@@ -338,6 +338,7 @@
338 338
               name="assign"
339 339
               ng-value="1"
340 340
               ng-model="incidentModel.assign"
341
+              ng-change="assginChange()"
341 342
             />
342 343
             派单给人
343 344
           </label>
@@ -347,6 +348,7 @@
347 348
               name="assign"
348 349
               ng-value="2"
349 350
               ng-model="incidentModel.assign"
351
+              ng-change="assginChange()"
350 352
             />
351 353
             派单给组
352 354
           </label>