Browse Source

Merge remote-tracking branch 'origin/release-201843-wangcz' into release-201843-wangcz

wangcz 7 years ago
parent
commit
0f1b74d120

+ 2 - 2
src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

@@ -593,9 +593,9 @@ public class VendorsServiceImpl implements VendorService {
                         }
                         // 进行权限转移时判断该用户是否是当前用户,如果不是,去掉当前用户的转移状态
                         if (!Objects.equals(u.getUserUU(), SystemSession.getUser().getUserUU())) {
-                            List<VendorDistribute> currentDistributes = vendorDistributeDao.findByUserUUAndVendorId(u.getUserUU(), vendor.getId());
+                            List<VendorDistribute> currentDistributes = vendorDistributeDao.findByUserUUAndVendorId(SystemSession.getUser().getUserUU(), vendor.getId());
                             if (!CollectionUtil.isEmpty(currentDistributes)) {
-                                distribute = distributes.get(0);
+                                distribute = currentDistributes.get(0);
                                 distribute.setIsTransfer(Constant.NO);
                                 saveList.add(distribute);
                             }

+ 1 - 5
src/main/webapp/resources/js/index/app.js

@@ -2688,7 +2688,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             if (save) {
                 if (uuData) {
                     // 当前用户是管理员时
-                    if ($scope.thisUser.sys) {
+                    if ($scope.thisUser.sys || type === 'sale') {
                         angular.forEach($scope.userinfos, function (item, i) {
                             chooseResult.push(item);
                         });
@@ -2707,10 +2707,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                             toaster.pop('error', '保存失败', "您未勾选任何记录");
                         }
                     } else {
-                        if(type === 'sale') {
-                            toaster.pop('info', '提示', "您没有权限转移对象");
-                            return
-                        }
                         // 非管理员转移自己的权限时
                         angular.forEach($scope.userinfos, function (item, i) {
                             if (item.transfer && item.userUU !== $scope.thisUser.userUU) {