|
@@ -10984,9 +10984,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 再次申请
|
|
// 再次申请
|
|
|
- $scope.reapply = function(id) {
|
|
|
|
|
- AddPartner.reapply({id: id}, {}, function(data) {
|
|
|
|
|
- toaster.pop('success', '提示', '操作成功');
|
|
|
|
|
|
|
+ $scope.addAgain = function(name, businessCode) {
|
|
|
|
|
+ AddPartner.addPartner({name: name, businessCode: businessCode}, {}, function(data) {
|
|
|
|
|
+ if(data.success) {
|
|
|
|
|
+ toaster.pop("success", '添加成功', data.success);
|
|
|
|
|
+ $scope.tableParams.reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ if(data.error) {
|
|
|
|
|
+ toaster.pop("error", '添加失败', data.error);
|
|
|
|
|
+ }
|
|
|
}, function(response) {
|
|
}, function(response) {
|
|
|
toaster.pop('error','失败',response.data);
|
|
toaster.pop('error','失败',response.data);
|
|
|
});
|
|
});
|
|
@@ -11030,9 +11036,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.agree = function(id) {
|
|
$scope.agree = function(id) {
|
|
|
AddPartner.agreeRequest({id: id}, {}, function(data) {
|
|
AddPartner.agreeRequest({id: id}, {}, function(data) {
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
- $timeout(function() {
|
|
|
|
|
- window.location.reload();
|
|
|
|
|
- }, 500);
|
|
|
|
|
|
|
+ $scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
});
|
|
@@ -11042,9 +11046,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.refuse = function(id, reason) {
|
|
$scope.refuse = function(id, reason) {
|
|
|
AddPartner.refuseRequest({id: id, reason: reason}, {}, function(data) {
|
|
AddPartner.refuseRequest({id: id, reason: reason}, {}, function(data) {
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
- $timeout(function() {
|
|
|
|
|
- window.location.reload();
|
|
|
|
|
- }, 500);
|
|
|
|
|
|
|
+ $scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
});
|