|
|
@@ -1139,10 +1139,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// checkTel($scope.userInfo);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ $scope.logout = function() {
|
|
|
+ $modal.open({
|
|
|
+ templateUrl: 'static/tpl/index/account/logout.html',
|
|
|
+ controller: 'LogOutCtrl'
|
|
|
+ }).result.then(function(s){
|
|
|
+ if(s) {
|
|
|
+ AuthenticationService.logout();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
|
|
|
- $scope.logout = function() {
|
|
|
- AuthenticationService.logout();
|
|
|
- };
|
|
|
$scope.switchto = function(enUU) {// 切换企业
|
|
|
AuthenticationService.reSignin(enUU).success(function(){
|
|
|
$window.location.reload();
|
|
|
@@ -1165,6 +1173,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
}]);
|
|
|
+
|
|
|
+ app.controller('LogOutCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance) {
|
|
|
+ $scope.close = function(confirm) {
|
|
|
+ $modalInstance.close(confirm);
|
|
|
+ };
|
|
|
+ }]);
|
|
|
|
|
|
app.controller('ImageInsertCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance) {
|
|
|
$scope.image = {src: null};
|
|
|
@@ -4508,8 +4522,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.loading = true;
|
|
|
$rootScope.enteryStatus = true;
|
|
|
Quotation.getItem({id: $stateParams.id}, function(data){
|
|
|
- data.$editing = false;
|
|
|
- $scope.item = data;
|
|
|
+ // data.$editing = false;
|
|
|
+ $scope.item = data;
|
|
|
+ $scope.item.$editing = true; // 取消要点击修改才可以编辑的交互
|
|
|
staticItem = angular.copy(data);
|
|
|
$scope.loading = false;
|
|
|
}, function(response){
|
|
|
@@ -4649,7 +4664,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '保存失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
// 更新
|
|
|
$scope.update = function(){
|
|
|
$scope.item.$editing = true;
|
|
|
@@ -4664,7 +4678,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 提交
|
|
|
$scope.submit = function(){
|
|
|
$scope.loading = true;
|
|
|
- $scope.item.quotation.status = 101;//在录入
|
|
|
+ $scope.item.quotation.status = 101;//已提交
|
|
|
Quotation.save({}, $scope.item, function(data){
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('success', '成功', '提交成功');
|
|
|
@@ -8402,7 +8416,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.ok = function () {
|
|
|
if($scope.user.newPassword == $scope.user.newPassword1) {//验证重复密码相等
|
|
|
AccountUser.updatePassword({password: $scope.user.password, newPassword: $scope.user.newPassword}, {}, function(data){
|
|
|
- toaster.pop('success', '成功', '修改密码成功,请牢记您的新密码。');
|
|
|
+ var tip = '修改成功,请牢记您的新密码:' + $scope.user.newPassword;
|
|
|
+ toaster.pop('success', '成功', tip);
|
|
|
$scope.user.password = null;
|
|
|
$scope.user.newPassword = null;
|
|
|
$scope.user.newPassword1 = null;
|