|
|
@@ -12172,9 +12172,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 同意申请
|
|
|
$scope.agree = function(id) {
|
|
|
AddPartner.agreeRequest({id: id}, {}, function(data) {
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
- $scope.tableParams.reload();
|
|
|
- // $window.location.reload();
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', '操作成功');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', '操作失败');
|
|
|
+ }
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ $window.location.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -12183,9 +12188,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 拒绝申请
|
|
|
$scope.refuse = function(id, reason) {
|
|
|
AddPartner.refuseRequest({id: id, reason: reason}, {}, function(data) {
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
- $scope.tableParams.reload();
|
|
|
- // $window.location.reload();
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', '操作成功');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', '操作失败');
|
|
|
+ }
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ $window.location.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -12366,9 +12376,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 同意申请
|
|
|
$scope.agree = function(id) {
|
|
|
AddPartner.agreeRequest({id: id}, {}, function(data) {
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
- $scope.tableParams.reload();
|
|
|
- // $window.location.reload();
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', '操作成功');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', '操作失败');
|
|
|
+ }
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ $window.location.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -12381,9 +12396,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 拒绝申请
|
|
|
$scope.refuse = function(id, reason) {
|
|
|
AddPartner.refuseRequest({id: id, reason: reason}, {}, function(data) {
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
- $scope.tableParams.reload();
|
|
|
- // $window.location.reload();
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', '操作成功');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', '操作失败');
|
|
|
+ }
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ $window.location.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -12506,10 +12526,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 同意申请
|
|
|
$scope.agree = function(id) {
|
|
|
- AddPartner.agreeRequest({id: id}, {}, function(data) {
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
- $scope.tableParams.reload();
|
|
|
- // $window.location.reload();
|
|
|
+ AddPartner.agreeReq
|
|
|
+ uest({id: id}, {}, function(data) {
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', '操作成功');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', '操作失败');
|
|
|
+ }
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ $window.location.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -12518,9 +12544,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 拒绝申请
|
|
|
$scope.refuse = function(id, reason) {
|
|
|
AddPartner.refuseRequest({id: id, reason: reason}, {}, function(data) {
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
- $scope.tableParams.reload();
|
|
|
- // $window.location.reload();
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', '操作成功');
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', '操作失败');
|
|
|
+ }
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ $window.location.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|