|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|