seimin 1 year ago
parent
commit
2a3a03bae6

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

@@ -217,8 +217,15 @@ app.controller("faultConsumablesCtrl", [
217
               sum: 10,
217
               sum: 10,
218
               consumable: {
218
               consumable: {
219
                 keyWord: key,
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
             api_user_data
229
             api_user_data
223
               .fetchDataList("consumable", deptData)
230
               .fetchDataList("consumable", deptData)
224
               .then(function (data) {
231
               .then(function (data) {
@@ -248,7 +255,7 @@ app.controller("faultConsumablesCtrl", [
248
             if($rootScope.user.duty){
255
             if($rootScope.user.duty){
249
               postData.incidentcategory.duty = $rootScope.user.duty.id;
256
               postData.incidentcategory.duty = $rootScope.user.duty.id;
250
             }else if($rootScope.user.branch){
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
             $scope.my_data = [];
260
             $scope.my_data = [];
254
             $scope.doing_async = true;
261
             $scope.doing_async = true;
@@ -428,8 +435,15 @@ app.controller("faultConsumablesCtrl", [
428
               sum: 10,
435
               sum: 10,
429
               consumable: {
436
               consumable: {
430
                 keyWord: key,
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
             api_user_data
447
             api_user_data
434
               .fetchDataList("consumable", deptData)
448
               .fetchDataList("consumable", deptData)
435
               .then(function (data) {
449
               .then(function (data) {
@@ -459,7 +473,7 @@ app.controller("faultConsumablesCtrl", [
459
             if($rootScope.user.duty){
473
             if($rootScope.user.duty){
460
               postData.incidentcategory.duty = $rootScope.user.duty.id;
474
               postData.incidentcategory.duty = $rootScope.user.duty.id;
461
             }else if($rootScope.user.branch){
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
             $scope.my_data = [];
478
             $scope.my_data = [];
465
             $scope.doing_async = true;
479
             $scope.doing_async = true;
@@ -842,7 +856,7 @@ app.controller("faultConsumablesCtrl", [
842
       if($rootScope.user.duty){
856
       if($rootScope.user.duty){
843
         postData.incidentcategory.duty = $rootScope.user.duty.id;
857
         postData.incidentcategory.duty = $rootScope.user.duty.id;
844
       }else if($rootScope.user.branch){
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
       $scope.my_data = [];
861
       $scope.my_data = [];
848
       $scope.doing_async = true;
862
       $scope.doing_async = true;