Commit 986ef6a4ea9cf0bf27a168f0bef460c07bb2c478
1 parent
d0cfd750
1、修改车辆信息管理/人员信息管理/车辆配置管理中所属公司下拉显示列表,根据登录用户权限显示所属公司列表
Showing
11 changed files
with
76 additions
and
7 deletions
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
| ... | ... | @@ -72,7 +72,7 @@ |
| 72 | 72 | cmaps="{'businessCode': 'businessCode', 'company': 'businessName'}" |
| 73 | 73 | dcname="businessCode" |
| 74 | 74 | icname="businessCode" |
| 75 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 75 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 76 | 76 | iterobjname="item" |
| 77 | 77 | iterobjexp="item.businessName" |
| 78 | 78 | searchph="请选择所属分公司..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | cmaps="{'businessCode': 'businessCode', 'company': 'businessName'}" |
| 72 | 72 | dcname="businessCode" |
| 73 | 73 | icname="businessCode" |
| 74 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 74 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 75 | 75 | iterobjname="item" |
| 76 | 76 | iterobjexp="item.businessName" |
| 77 | 77 | searchph="请选择所属分公司..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | cmaps="{'businessCode_eq': 'businessCode'}" |
| 36 | 36 | dcname="businessCode_eq" |
| 37 | 37 | icname="businessCode" |
| 38 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 38 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 39 | 39 | iterobjname="item" |
| 40 | 40 | iterobjexp="item.businessName" |
| 41 | 41 | searchph="请输拼音..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
| ... | ... | @@ -15,6 +15,12 @@ angular.module('ScheduleApp').factory( |
| 15 | 15 | "equipmentCode_like" : "", |
| 16 | 16 | "carPlate_like" : "" |
| 17 | 17 | }; |
| 18 | + | |
| 19 | + // 所属公司下拉框查询参数 | |
| 20 | + var gsSelectQueryCondition = { | |
| 21 | + businessCode_in: '-999' | |
| 22 | + }; | |
| 23 | + | |
| 18 | 24 | // 当前查询返回的信息 |
| 19 | 25 | var currentPage = { // 后台spring data返回的格式 |
| 20 | 26 | totalElements: 0, |
| ... | ... | @@ -58,6 +64,15 @@ angular.module('ScheduleApp').factory( |
| 58 | 64 | return orderColumns; |
| 59 | 65 | }, |
| 60 | 66 | /** |
| 67 | + * 获取所属公司下拉框查询条件。 | |
| 68 | + */ | |
| 69 | + getGsSelectQueryCondition: function() { | |
| 70 | + if (UserPrincipal.getGsbmStrsQuery().length > 0) { | |
| 71 | + gsSelectQueryCondition["businessCode_in"] = UserPrincipal.getGsbmStrsQuery(); | |
| 72 | + } | |
| 73 | + return gsSelectQueryCondition; | |
| 74 | + }, | |
| 75 | + /** | |
| 61 | 76 | * 获取查询条件信息, |
| 62 | 77 | * 用于给controller用来和页面数据绑定。 |
| 63 | 78 | */ |
| ... | ... | @@ -277,6 +292,10 @@ angular.module('ScheduleApp').controller( |
| 277 | 292 | return service.getSearchCondition(); |
| 278 | 293 | }; |
| 279 | 294 | |
| 295 | + self.gsSelectQueryParam = function() { | |
| 296 | + return service.getGsSelectQueryCondition(); | |
| 297 | + }; | |
| 298 | + | |
| 280 | 299 | self.doPage = function() { |
| 281 | 300 | var result = Cars.list(self.searchCondition(), function() { |
| 282 | 301 | if (!result.status) { |
| ... | ... | @@ -408,6 +427,10 @@ angular.module('ScheduleApp').controller( |
| 408 | 427 | }); |
| 409 | 428 | }; |
| 410 | 429 | |
| 430 | + self.gsSelectQueryParam = function() { | |
| 431 | + return service.getGsSelectQueryCondition(); | |
| 432 | + }; | |
| 433 | + | |
| 411 | 434 | } |
| 412 | 435 | ] |
| 413 | 436 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | cmaps="{'companyCode': 'businessCode', 'company': 'businessName'}" |
| 42 | 42 | dcname="companyCode" |
| 43 | 43 | icname="businessCode" |
| 44 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 44 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 45 | 45 | iterobjname="item" |
| 46 | 46 | iterobjexp="item.businessName" |
| 47 | 47 | searchph="请选择所属分公司..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | cmaps="{'companyCode': 'businessCode', 'company': 'businessName'}" |
| 42 | 42 | dcname="companyCode" |
| 43 | 43 | icname="businessCode" |
| 44 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 44 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 45 | 45 | iterobjname="item" |
| 46 | 46 | iterobjexp="item.businessName" |
| 47 | 47 | searchph="请选择所属分公司..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | cmaps="{'companyCode_eq': 'businessCode'}" |
| 40 | 40 | dcname="companyCode_eq" |
| 41 | 41 | icname="businessCode" |
| 42 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 42 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 43 | 43 | iterobjname="item" |
| 44 | 44 | iterobjexp="item.businessName" |
| 45 | 45 | searchph="请输拼音..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| ... | ... | @@ -16,6 +16,11 @@ angular.module('ScheduleApp').factory( |
| 16 | 16 | //"carPlate_like" : "" |
| 17 | 17 | }; |
| 18 | 18 | |
| 19 | + // 所属公司下拉框查询参数 | |
| 20 | + var gsSelectQueryCondition = { | |
| 21 | + businessCode_in: '-999' | |
| 22 | + }; | |
| 23 | + | |
| 19 | 24 | // 当前查询返回的信息 |
| 20 | 25 | var currentPage = { // 后台spring data返回的格式 |
| 21 | 26 | totalElements: 0, |
| ... | ... | @@ -57,6 +62,15 @@ angular.module('ScheduleApp').factory( |
| 57 | 62 | return orderColumns; |
| 58 | 63 | }, |
| 59 | 64 | /** |
| 65 | + * 获取所属公司下拉框查询条件。 | |
| 66 | + */ | |
| 67 | + getGsSelectQueryCondition: function() { | |
| 68 | + if (UserPrincipal.getGsbmStrsQuery().length > 0) { | |
| 69 | + gsSelectQueryCondition["businessCode_in"] = UserPrincipal.getGsbmStrsQuery(); | |
| 70 | + } | |
| 71 | + return gsSelectQueryCondition; | |
| 72 | + }, | |
| 73 | + /** | |
| 60 | 74 | * 获取查询条件信息, |
| 61 | 75 | * 用于给controller用来和页面数据绑定。 |
| 62 | 76 | */ |
| ... | ... | @@ -262,6 +276,10 @@ angular.module('ScheduleApp').controller( |
| 262 | 276 | return service.getSearchCondition(); |
| 263 | 277 | }; |
| 264 | 278 | |
| 279 | + self.gsSelectQueryParam = function() { | |
| 280 | + return service.getGsSelectQueryCondition(); | |
| 281 | + }; | |
| 282 | + | |
| 265 | 283 | self.doPage = function() { |
| 266 | 284 | var result = Employee.list(self.searchCondition(), function() { |
| 267 | 285 | if (!result.status) { |
| ... | ... | @@ -397,6 +415,10 @@ angular.module('ScheduleApp').controller( |
| 397 | 415 | }); |
| 398 | 416 | }; |
| 399 | 417 | |
| 418 | + self.gsSelectQueryParam = function() { | |
| 419 | + return service.getGsSelectQueryCondition(); | |
| 420 | + }; | |
| 421 | + | |
| 400 | 422 | $scope.$watch( |
| 401 | 423 | function() { |
| 402 | 424 | return self.employeeInfoForSave; | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/main.js
| ... | ... | @@ -21,6 +21,8 @@ ScheduleApp.factory('UserPrincipal', [ |
| 21 | 21 | var gsinfo_strs_u = []; // 拼装以后的(分公司代码_公司代码) |
| 22 | 22 | var gsinfo_strs_query = []; // 拼装以后的(公司代码_分公司代码),带单引号 |
| 23 | 23 | |
| 24 | + var gsbm_strs_query = []; // 公司代码,逗号分隔 | |
| 25 | + | |
| 24 | 26 | $http({ |
| 25 | 27 | method: 'GET', |
| 26 | 28 | url: '/user/companyData' |
| ... | ... | @@ -29,6 +31,7 @@ ScheduleApp.factory('UserPrincipal', [ |
| 29 | 31 | gsinfos = result; |
| 30 | 32 | angular.forEach(result.data, function(obj) { |
| 31 | 33 | var gsbm = obj.companyCode; |
| 34 | + gsbm_strs_query.push(gsbm); | |
| 32 | 35 | angular.forEach(obj.children, function(obj2) { |
| 33 | 36 | var fgsbm = obj2.code; |
| 34 | 37 | gsinfo_strs.push(gsbm + "_" + fgsbm); |
| ... | ... | @@ -51,6 +54,9 @@ ScheduleApp.factory('UserPrincipal', [ |
| 51 | 54 | }, |
| 52 | 55 | getGsStrsQuery: function() { |
| 53 | 56 | return gsinfo_strs_query; |
| 57 | + }, | |
| 58 | + getGsbmStrsQuery: function() { | |
| 59 | + return gsbm_strs_query; | |
| 54 | 60 | } |
| 55 | 61 | }; |
| 56 | 62 | } | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | cmaps="{'cl.businessCode_eq': 'businessCode'}" |
| 40 | 40 | dcname="cl.businessCode_eq" |
| 41 | 41 | icname="businessCode" |
| 42 | - dsparams="{{ {type: 'ajax', param:{'businessCode_eq': '100' }, atype:'gs' } | json }}" | |
| 42 | + dsparams="{{ {type: 'ajax', param: ctrl.gsSelectQueryParam(), atype:'gs' } | json }}" | |
| 43 | 43 | iterobjname="item" |
| 44 | 44 | iterobjexp="item.businessName" |
| 45 | 45 | searchph="请输拼音..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
| ... | ... | @@ -8,6 +8,11 @@ angular.module('ScheduleApp').factory( |
| 8 | 8 | /** 当前的查询条件信息 */ |
| 9 | 9 | var currentSearchCondition = {'isCancel_eq': false}; |
| 10 | 10 | |
| 11 | + // 所属公司下拉框查询参数 | |
| 12 | + var gsSelectQueryCondition = { | |
| 13 | + businessCode_in: '-999' | |
| 14 | + }; | |
| 15 | + | |
| 11 | 16 | // 当前查询返回的信息 |
| 12 | 17 | var currentPage = { // 后台spring data返回的格式 |
| 13 | 18 | totalElements: 0, |
| ... | ... | @@ -49,6 +54,15 @@ angular.module('ScheduleApp').factory( |
| 49 | 54 | return orderColumns; |
| 50 | 55 | }, |
| 51 | 56 | /** |
| 57 | + * 获取所属公司下拉框查询条件。 | |
| 58 | + */ | |
| 59 | + getGsSelectQueryCondition: function() { | |
| 60 | + if (UserPrincipal.getGsbmStrsQuery().length > 0) { | |
| 61 | + gsSelectQueryCondition["businessCode_in"] = UserPrincipal.getGsbmStrsQuery(); | |
| 62 | + } | |
| 63 | + return gsSelectQueryCondition; | |
| 64 | + }, | |
| 65 | + /** | |
| 52 | 66 | * 获取查询条件信息, |
| 53 | 67 | * 用于给controller用来和页面数据绑定。 |
| 54 | 68 | */ |
| ... | ... | @@ -253,6 +267,10 @@ angular.module('ScheduleApp').controller( |
| 253 | 267 | }); |
| 254 | 268 | }; |
| 255 | 269 | |
| 270 | + self.gsSelectQueryParam = function() { | |
| 271 | + return service.getGsSelectQueryCondition(); | |
| 272 | + }; | |
| 273 | + | |
| 256 | 274 | self.doPage(); |
| 257 | 275 | |
| 258 | 276 | self.customOrder = function() { | ... | ... |