|
|
@@ -1816,8 +1816,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
modalInstance.result.then(function(data) {
|
|
|
- $scope.contact = data;
|
|
|
- Vendor.saveContact({}, $scope.contact, function(data) {
|
|
|
+ Vendor.saveContact({}, data, function(data) {
|
|
|
+ loadData();
|
|
|
toaster.pop('success', '提示', '联系人修改成功');
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '失败', response.data);
|
|
|
@@ -8554,6 +8554,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.checking = false;
|
|
|
$scope.checkSuccess = false;
|
|
|
$scope.checkFailed = false;
|
|
|
+ $modalInstance.close();
|
|
|
}, function(response){
|
|
|
toaster.pop('error', '错误', response.data);
|
|
|
});
|
|
|
@@ -11061,8 +11062,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
modalInstance.result.then(function(data) {
|
|
|
- $scope.contact = data;
|
|
|
- Vendor.saveContact({}, $scope.contact, function(data) {
|
|
|
+ Vendor.saveContact({}, data, function(data) {
|
|
|
+ loadData();
|
|
|
toaster.pop('success', '提示', '联系人修改成功');
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '失败', response.data);
|
|
|
@@ -11142,30 +11143,29 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
window.location.hash = "#/purc/purcinquiry/" + businessCode;
|
|
|
}
|
|
|
}]);
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑供应商联系人
|
|
|
*/
|
|
|
app.controller('EditContacCtrl', ['$scope', 'toaster', '$modalInstance', 'contact', function($scope, toaster, $modalInstance, contact) {
|
|
|
-
|
|
|
- $scope.contact = contact;
|
|
|
-
|
|
|
+ $scope.contact = angular.copy(contact);
|
|
|
+
|
|
|
$scope.save = function(contact) {
|
|
|
$modalInstance.close(contact);
|
|
|
- }
|
|
|
-
|
|
|
+ };
|
|
|
+
|
|
|
$scope.cancel = function() {
|
|
|
- $modalInstance.dismiss();
|
|
|
- }
|
|
|
+ $modalInstance.dismiss();
|
|
|
+ }
|
|
|
}]);
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 新增供应商联系人
|
|
|
*/
|
|
|
app.controller('AddContacCtrl', ['$scope', 'toaster', '$modalInstance', function($scope, toaster, $modalInstance) {
|
|
|
$scope.save = function(contact) {
|
|
|
$modalInstance.close(contact);
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
$scope.cancel = function() {
|
|
|
$modalInstance.dismiss();
|