ソースを参照

资产和任务管理BUG修复

seimin 11 ヶ月 前
コミット
d39fce60f2

+ 16 - 0
assets/js/controllers/customform/customformCtrl.js

@@ -10201,8 +10201,16 @@ appFormly.config(function config(formlyConfigProvider) {
10201
                 sum: 1000,
10201
                 sum: 1000,
10202
                 user: {
10202
                 user: {
10203
                   engineer: 1,
10203
                   engineer: 1,
10204
+                  "simple": true,
10204
                 }
10205
                 }
10205
               };
10206
               };
10207
+              if($rootScope.user.duty){
10208
+                // 当前的所属责任科室
10209
+                data.user.duty = $rootScope.user.duty;
10210
+              }else if($rootScope.user.branch){
10211
+                // 当前的所属院区
10212
+                data.user.branch = $rootScope.user.branch;
10213
+              }
10206
               api_user_data.fetchDataList("user", data).then(function (res) {
10214
               api_user_data.fetchDataList("user", data).then(function (res) {
10207
                 $scope.personListData = res.list;
10215
                 $scope.personListData = res.list;
10208
               });
10216
               });
@@ -10508,8 +10516,16 @@ appFormly.config(function config(formlyConfigProvider) {
10508
                 sum: 1000,
10516
                 sum: 1000,
10509
                 user: {
10517
                 user: {
10510
                   engineer: 1,
10518
                   engineer: 1,
10519
+                  "simple": true,
10511
                 }
10520
                 }
10512
               };
10521
               };
10522
+              if($rootScope.user.duty){
10523
+                // 当前的所属责任科室
10524
+                data.user.duty = $rootScope.user.duty;
10525
+              }else if($rootScope.user.branch){
10526
+                // 当前的所属院区
10527
+                data.user.branch = $rootScope.user.branch;
10528
+              }
10513
               api_user_data.fetchDataList("user", data).then(function (res) {
10529
               api_user_data.fetchDataList("user", data).then(function (res) {
10514
                 $scope.personListData = res.list;
10530
                 $scope.personListData = res.list;
10515
               });
10531
               });

+ 8 - 0
assets/js/controllers/task/moonTaskCtrl.js

@@ -248,8 +248,16 @@ app.controller('moonTaskListCtrl', ["$rootScope", "$scope", "$state", "$timeout"
248
             "sum":1000,
248
             "sum":1000,
249
             user: {
249
             user: {
250
                 engineer: 1,
250
                 engineer: 1,
251
+                "simple": true,
251
             }
252
             }
252
         }
253
         }
254
+        if($rootScope.user.duty){
255
+            // 当前的所属责任科室
256
+            data.user.duty = $rootScope.user.duty;
257
+        }else if($rootScope.user.branch){
258
+            // 当前的所属院区
259
+            data.user.branch = $rootScope.user.branch;
260
+        }
253
         api_user_data.fetchDataList("user",data).then(function(res){
261
         api_user_data.fetchDataList("user",data).then(function(res){
254
             $scope.personListData=res.list;
262
             $scope.personListData=res.list;
255
         })
263
         })

+ 17 - 0
assets/js/controllers/task/taskFormCtr.js

@@ -345,6 +345,23 @@ sysFormly.controller('taskFormCtrl', ['$rootScope', '$scope', '$parse', '$filter
345
                     process = WechatRestangular.all("");
345
                     process = WechatRestangular.all("");
346
                 }
346
                 }
347
                 var datakey = { "idx": 0, "sum": 1000 };
347
                 var datakey = { "idx": 0, "sum": 1000 };
348
+                if(field.templateOptions.optionsUrl === 'user/data/fetchDataList/user'){
349
+                    datakey = {
350
+                        "idx": 0,
351
+                        "sum": 1000,
352
+                        "user": {
353
+                            "engineer": 1,
354
+                            "simple": true
355
+                        }
356
+                    }
357
+                    if($rootScope.user.duty){
358
+                        // 当前的所属责任科室
359
+                        datakey.user.duty = $rootScope.user.duty;
360
+                    }else if($rootScope.user.branch){
361
+                        // 当前的所属院区
362
+                        datakey.user.branch = $rootScope.user.branch;
363
+                    }
364
+                }
348
                 if (field.templateOptions.modelreasondata) {
365
                 if (field.templateOptions.modelreasondata) {
349
                     datakey = field.templateOptions.modelreasondata
366
                     datakey = field.templateOptions.modelreasondata
350
                 }
367
                 }

+ 8 - 0
assets/js/controllers/task/taskListCtrl.js

@@ -196,8 +196,16 @@ app.controller('taskListListCtrl', ["$rootScope", "$scope", "$state", "$timeout"
196
             "sum":1000,
196
             "sum":1000,
197
             user: {
197
             user: {
198
                 engineer: 1,
198
                 engineer: 1,
199
+                "simple": true,
199
             }
200
             }
200
         }
201
         }
202
+        if($rootScope.user.duty){
203
+            // 当前的所属责任科室
204
+            data.user.duty = $rootScope.user.duty;
205
+        }else if($rootScope.user.branch){
206
+            // 当前的所属院区
207
+            data.user.branch = $rootScope.user.branch;
208
+        }
201
         api_user_data.fetchDataList("user",data).then(function(res){
209
         api_user_data.fetchDataList("user",data).then(function(res){
202
             $scope.personListData=res.list;
210
             $scope.personListData=res.list;
203
         })
211
         })

+ 2 - 2
assets/views/task/moonTask.html

@@ -69,10 +69,10 @@
69
     .selectBotBox .search_condition{
69
     .selectBotBox .search_condition{
70
         width: 80%;
70
         width: 80%;
71
         display: flex;
71
         display: flex;
72
-        flex-wrap:wrap;        
72
+        flex-wrap:wrap;
73
     }
73
     }
74
     .selectBotBox .search_condition .search_children{
74
     .selectBotBox .search_condition .search_children{
75
-        width: 220px;
75
+        width: 230px;
76
         height: 28px;
76
         height: 28px;
77
         line-height: 28px;
77
         line-height: 28px;
78
         display: flex;
78
         display: flex;

+ 1 - 1
assets/views/task/taskList.html

@@ -71,7 +71,7 @@
71
         flex-wrap:wrap;
71
         flex-wrap:wrap;
72
     }
72
     }
73
     .selectBotBox .search_condition .search_children{
73
     .selectBotBox .search_condition .search_children{
74
-        width: 220px;
74
+        width: 230px;
75
         height: 28px;
75
         height: 28px;
76
         line-height: 28px;
76
         line-height: 28px;
77
         display: flex;
77
         display: flex;