|
|
@@ -996,6 +996,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
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);
|
|
|
@@ -10859,6 +10860,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
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);
|
|
|
@@ -11735,6 +11737,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
AddPartner.addSupplier({businessCode: vendUID}, {}, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
}
|
|
|
if(data.error) {
|
|
|
toaster.pop('error','提示', data.error);
|
|
|
@@ -11749,6 +11752,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
AddPartner.addCust({businessCode: vendUID}, {}, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
}
|
|
|
if(data.error) {
|
|
|
toaster.pop('error','提示', data.error);
|
|
|
@@ -11772,7 +11776,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
// 拒绝申请
|
|
|
$scope.refuse = function(id, reason) {
|
|
|
@@ -11782,7 +11786,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
// 取消供应商关系
|
|
|
$scope.relieve = function(id) {
|
|
|
@@ -11795,7 +11799,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
// 建立供应商关系
|
|
|
$scope.activeVend = function(id) {
|
|
|
@@ -11925,6 +11929,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
AddPartner.addSupplier({businessCode: vendUID}, {}, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
}
|
|
|
if(data.error) {
|
|
|
toaster.pop('error','提示', data.error);
|
|
|
@@ -11939,6 +11944,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
AddPartner.addCust({businessCode: vendUID}, {}, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
}
|
|
|
if(data.error) {
|
|
|
toaster.pop('error','提示', data.error);
|
|
|
@@ -11962,7 +11968,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
+
|
|
|
+ AddPartnerMyRequest.requestAmount({}, function(data) {
|
|
|
+ $scope.requestTodo = data;
|
|
|
+ });
|
|
|
|
|
|
// 拒绝申请
|
|
|
$scope.refuse = function(id, reason) {
|
|
|
@@ -11972,7 +11982,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
// 取消供应商关系
|
|
|
$scope.relieve = function(id) {
|
|
|
@@ -12030,7 +12040,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 建立合作关系处理申请
|
|
|
*/
|
|
|
- app.controller('AddPartnerMessageCtrl', ['$scope', 'AddPartnerMyMessage', 'toaster', 'BaseService', 'ngTableParams', 'AddPartner', function($scope, AddPartnerMyMessage, toaster, BaseService, ngTableParams, AddPartner) {
|
|
|
+ app.controller('AddPartnerMessageCtrl', ['$scope', 'AddPartnerMyMessage', 'toaster', 'BaseService', 'ngTableParams', 'AddPartner', 'AddPartnerMyRequest', function($scope, AddPartnerMyMessage, toaster, BaseService, ngTableParams, AddPartner, AddPartnerMyRequest) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'todo';
|
|
|
var getMessagetStatus = function(active) {
|
|
|
@@ -12093,19 +12103,21 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.agree = function(id) {
|
|
|
AddPartner.agreeRequest({id: id}, {}, function(data) {
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
+ $scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
// 拒绝申请
|
|
|
$scope.refuse = function(id, reason) {
|
|
|
AddPartner.refuseRequest({id: id, reason: reason}, {}, function(data) {
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
+ $scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
$scope.status = 'get';
|
|
|
}]);
|
|
|
@@ -12129,6 +12141,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.addCust = function(partner) {
|
|
|
GetProductInfo.addCust({}, partner, function(data) {
|
|
|
toaster.pop('success', '提示', '添加客户成功');
|
|
|
+ $scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '添加客户失败', response.data);
|
|
|
});
|
|
|
@@ -12138,6 +12151,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.addSupplier = function(partner) {
|
|
|
GetProductInfo.addSupplier({}, partner, function(data) {
|
|
|
toaster.pop('success', '提示', '添加供应商成功');
|
|
|
+ $scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '添加供应商失败', response.data);
|
|
|
});
|
|
|
@@ -15328,7 +15342,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.customerParams.page(1);
|
|
|
+ // $scope.customerParams.page(1);
|
|
|
$scope.customerParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -15341,7 +15355,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.customerParams.page(1);
|
|
|
+ // $scope.customerParams.page(1);
|
|
|
$scope.customerParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -15404,7 +15418,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.customerParams.page(1);
|
|
|
+ // $scope.customerParams.page(1);
|
|
|
$scope.customerParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -15417,7 +15431,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.customerParams.page(1);
|
|
|
+ // $scope.customerParams.page(1);
|
|
|
$scope.customerParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -15510,6 +15524,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
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);
|