Explorar el Código

处理供应商资料与客户资料接口问题

wangcz hace 7 años
padre
commit
1070ee6bab

+ 6 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/PurcVendorCtrl.js

@@ -5,6 +5,12 @@ define(['app/app'], function(app) {
     app.register.controller('PurcVendorCtrl', ['$scope', 'B2bVendor', 'BaseService', 'B2bAuthenticationService', 'ngTableParams', '$modal', 'toaster', '$rootScope', 'B2bVendorInfo', function ($scope, Vendor, BaseService, AuthenticationService, ngTableParams, $modal, toaster, $rootScope, VendorInfo) {
     app.register.controller('PurcVendorCtrl', ['$scope', 'B2bVendor', 'BaseService', 'B2bAuthenticationService', 'ngTableParams', '$modal', 'toaster', '$rootScope', 'B2bVendorInfo', function ($scope, Vendor, BaseService, AuthenticationService, ngTableParams, $modal, toaster, $rootScope, VendorInfo) {
         BaseService.scrollBackToTop();
         BaseService.scrollBackToTop();
         $rootScope.active = 'purc_vendor';
         $rootScope.active = 'purc_vendor';
+
+        AuthenticationService.getAuthentication().success(function (data) {
+            $scope.loading = false;
+            $scope.thisUser = data;
+        });
+
         // 搜索框回车
         // 搜索框回车
         $scope.onSearch = function (keyword) {
         $scope.onSearch = function (keyword) {
             $scope.keyword = keyword;
             $scope.keyword = keyword;

+ 2 - 2
src/main/webapp/resources/js/vendor/controllers/b2b/sale/saleCustomerCtrl.js

@@ -92,7 +92,7 @@ define(['app/app'], function (app) {
         $scope.transferUserInfo = function (customer) {
         $scope.transferUserInfo = function (customer) {
             customer.enDistribute = null;
             customer.enDistribute = null;
             // 获取当前用户在当前企业是否被转移权限
             // 获取当前用户在当前企业是否被转移权限
-            AccountUser.getDistribute ({custUU: customer.myEnterprise.uu}, function(data) {
+            AccountUser.getDistribute ({id: customer.id}, function(data) {
                 customer.enDistribute = data.result;
                 customer.enDistribute = data.result;
                 //是管理员,或者被分配时
                 //是管理员,或者被分配时
                 if ($scope.enabled || customer.enDistribute) {
                 if ($scope.enabled || customer.enDistribute) {
@@ -320,7 +320,7 @@ define(['app/app'], function (app) {
                         });
                         });
                         if (chooseResult.length > 0) {
                         if (chooseResult.length > 0) {
                             $scope.loading = true;
                             $scope.loading = true;
-                            AccountUser.transferUserToVendor({uu: customer.myEnterprise.uu}, chooseResult, function (data) {
+                            AccountUser.transferUserToVendor({id: customer.id}, chooseResult, function (data) {
                                 $scope.loading = false;
                                 $scope.loading = false;
                                 toaster.pop('success', '提示', '保存成功');
                                 toaster.pop('success', '提示', '保存成功');
                                 $modalInstance.close(false);
                                 $modalInstance.close(false);