seimin 11 月之前
父節點
當前提交
2a3a03bae6
共有 1 個文件被更改,包括 17 次插入3 次删除
  1. 17 3
      assets/js/controllers/businessConfiguration/faultConsumablesCtrl.js

+ 17 - 3
assets/js/controllers/businessConfiguration/faultConsumablesCtrl.js

@@ -217,8 +217,15 @@ app.controller("faultConsumablesCtrl", [
217 217
               sum: 10,
218 218
               consumable: {
219 219
                 keyWord: key,
220
+                showZero: true,
220 221
               },
221 222
             };
223
+            // 当前所属院区或责任科室
224
+            if($rootScope.user.duty){
225
+              deptData.consumable.dutyDTO = $rootScope.user.duty;
226
+            }else if($rootScope.user.branch){
227
+
228
+            }
222 229
             api_user_data
223 230
               .fetchDataList("consumable", deptData)
224 231
               .then(function (data) {
@@ -248,7 +255,7 @@ app.controller("faultConsumablesCtrl", [
248 255
             if($rootScope.user.duty){
249 256
               postData.incidentcategory.duty = $rootScope.user.duty.id;
250 257
             }else if($rootScope.user.branch){
251
-                postData.incidentcategory.branch = $rootScope.user.branch.id;
258
+              postData.incidentcategory.branch = $rootScope.user.branch.id;
252 259
             }
253 260
             $scope.my_data = [];
254 261
             $scope.doing_async = true;
@@ -428,8 +435,15 @@ app.controller("faultConsumablesCtrl", [
428 435
               sum: 10,
429 436
               consumable: {
430 437
                 keyWord: key,
438
+                showZero: true,
431 439
               },
432 440
             };
441
+            // 当前所属院区或责任科室
442
+            if($rootScope.user.duty){
443
+              deptData.consumable.dutyDTO = $rootScope.user.duty;
444
+            }else if($rootScope.user.branch){
445
+
446
+            }
433 447
             api_user_data
434 448
               .fetchDataList("consumable", deptData)
435 449
               .then(function (data) {
@@ -459,7 +473,7 @@ app.controller("faultConsumablesCtrl", [
459 473
             if($rootScope.user.duty){
460 474
               postData.incidentcategory.duty = $rootScope.user.duty.id;
461 475
             }else if($rootScope.user.branch){
462
-                postData.incidentcategory.branch = $rootScope.user.branch.id;
476
+              postData.incidentcategory.branch = $rootScope.user.branch.id;
463 477
             }
464 478
             $scope.my_data = [];
465 479
             $scope.doing_async = true;
@@ -842,7 +856,7 @@ app.controller("faultConsumablesCtrl", [
842 856
       if($rootScope.user.duty){
843 857
         postData.incidentcategory.duty = $rootScope.user.duty.id;
844 858
       }else if($rootScope.user.branch){
845
-          postData.incidentcategory.branch = $rootScope.user.branch.id;
859
+        postData.incidentcategory.branch = $rootScope.user.branch.id;
846 860
       }
847 861
       $scope.my_data = [];
848 862
       $scope.doing_async = true;