fix 账号组织bug,过滤manangerList

master
yuan 7 years ago
parent f9a76696f5
commit fea62f737f

@ -50,7 +50,7 @@
<select id="listRoyalPayUsers" resultType="com.alibaba.fastjson.JSONObject">
SELECT m.*
FROM sys_managers m
WHERE m.org_id IS NULL OR m.org_id = 1
WHERE (m.org_id IS NULL OR m.org_id = 1) AND m.is_valid=1
</select>
<select id="getOnlyCompliance" resultType="com.alibaba.fastjson.JSONObject">
@ -68,7 +68,7 @@
</select>
<select id="listRiskManagers" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
select wx_openid from sys_managers WHERE role & 10000000000 and wx_openid is not null
select wx_openid from sys_managers WHERE role & 10000000000 and wx_openid is not null AND is_valid = 1
]]>
</select>
@ -77,6 +77,7 @@
<foreach collection="list" separator="," close=")" open="(" item="item">
#{item}
</foreach>
AND is_valid = 1
</select>
<select id="listOpenIdByRole" resultType="com.alibaba.fastjson.JSONObject">

@ -44,7 +44,7 @@
</select>
</div>
<div ng-if="(orgs_child.length > 1)&&('1'|withRole)">
<div ng-if="(orgs_child.length > 1)&&('1'|withRole)&&params.org_id">
<select id="org-child-select" class="form-control" ng-model="params.org_id2"
ng-options="org.org_id as org.name group by org.org_type for org in orgs_child"
ng-change="listManagers()">

@ -95,7 +95,7 @@
</select>
</div>
<div class="form-group" ng-if="(('1'|withRole)||('1000000000000'|withRole)) && !manager.admin && !manager.operator && orgs_child.length > 1">
<div class="form-group" ng-if="(('1'|withRole)||('1000000000000'|withRole)) && !manager.admin && !manager.operator && !manager.sitemanager && orgs_child.length > 1">
<label class="control-label" for="org-select">Sub Organization</label>
<select class="form-control" ng-model="manager.org_id2" id="org-child-select"
ng-options="org.org_id as org.name group by org.org_type for org in orgs_child">

@ -386,8 +386,9 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}]);
app.controller('newManagerCtrl', ['$scope', '$http','org',function ($scope, $http,org) {
$scope.isOrg = true;
$scope.org = angular.copy(org);
$scope.save = function (form) {
$scope.manager.org_id = org.org_id;
$scope.manager.org_id = $scope.org.org_id;
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
@ -399,11 +400,11 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}
if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && $scope.currentUser.org_id){
$scope.manager.bd = true;
/* if($scope.manager.org_id2 != "null") {
$scope.manager.org_id = $scope.manager.org_id2;
}
delete $scope.manager.org_id2;*/
}
if($scope.manager.org_id2 != "null") {
$scope.manager.org_id = $scope.manager.org_id2;
}
delete $scope.manager.org_id2;
$http.post('/sys/manager_accounts', $scope.manager).then(function () {
$scope.$close();

Loading…
Cancel
Save