diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ManagerMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ManagerMapper.xml
index eda7ecae9..796fa9e63 100644
--- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ManagerMapper.xml
+++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ManagerMapper.xml
@@ -9,7 +9,7 @@
AND o.type = 0
]]>
and m.org_id=#{org_id}
- and org_id in
+ and m.org_id in
#{org_id}
diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js
index 512a6e310..a4fab9761 100644
--- a/src/main/ui/static/payment/partner/partner-manage.js
+++ b/src/main/ui/static/payment/partner/partner-manage.js
@@ -1984,24 +1984,35 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
app.controller('partnerChooseBDUserDialogCtrl', ['$scope', '$http', '$filter', 'partner', 'bdUsers', 'type', function ($scope, $http, $filter, partner, bdUsers, type) {
$scope.bdUsers = bdUsers.data;
$scope.data = {};
+ $scope.params = {};
$scope.chooseOrg = {};
$scope.chooseOrg.org_name = null;
if (($scope.currentUser.role & parseInt('1000011', 2)) > 0 && !$scope.currentUser.org_id) {
- $scope.showOrg = 'Organization';
+ /* $scope.showOrg = 'Organization';*/
$http.get('/sys/orgs', {params: {}}).then(function (resp) {
$scope.orgs = resp.data;
});
}
- $scope.chooseOrgFun = function (org) {
+
+ $scope.loadOrgs = function () {
+ var params = angular.copy($scope.params);
+ $http.get('/sys/orgs/orgChild',{params: params}).then(function (resp) {
+ $scope.orgs_child = resp.data;
+ })
+ };
+
+ /* $scope.chooseOrgFun = function (org) {
if (org == 'all') {
$scope.chooseOrg.org_name = null;
$scope.showOrg = 'All'
} else {
$scope.chooseOrg.org_name = org.name;
$scope.showOrg = org.name;
+ $scope.params.org_id = org.org_id;
+ $scope.loadOrgs();
}
- };
+ };*/
function initBD() {
$http.get('/sys/partners/' + partner.client_moniker + '/bd_user/current').then(function (resp) {
@@ -2011,7 +2022,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if (m.manager_id == e.bd_id) {
m.choose = true;
m.proportion = e.proportion;
- $scope.chooseOrgFun({org_id: m.org_id, name: m.org_name});
+ /* $scope.chooseOrgFun({org_id: m.org_id, name: m.org_name});*/
+ if(($scope.currentUser.role & parseInt('1000000000000', 2))>0){
+ $scope.params.org_ids = m.org_id;
+ $scope.params.org_id = m.org_id;
+ $scope.loadOrgs();
+ }else {
+ $scope.params.org_id = m.org_id;
+ $scope.loadOrgs();
+ }
}
});
});
diff --git a/src/main/ui/static/payment/partner/templates/bd_user_choose_dialog.html b/src/main/ui/static/payment/partner/templates/bd_user_choose_dialog.html
index 11f22079c..3610ef782 100644
--- a/src/main/ui/static/payment/partner/templates/bd_user_choose_dialog.html
+++ b/src/main/ui/static/payment/partner/templates/bd_user_choose_dialog.html
@@ -16,8 +16,23 @@