|
|
@@ -97,9 +97,12 @@ angular.module('app.system').controller("userCtrl",
|
|
97
|
97
|
angular.module('app.system').controller("userEditCtrl",
|
|
98
|
98
|
function($scope, $rootScope, $state, $stateParams, $filter, userService, userRoleService, orgService, roleService, FileUploader, APP_CONFIG) {
|
|
99
|
99
|
|
|
|
100
|
+ $scope.type = "";
|
|
100
|
101
|
if($stateParams.userId == null || $stateParams.userId == ""){//新增的时候默认为库主任
|
|
101
|
102
|
$scope.user = {status:"1"};
|
|
|
103
|
+ $scope.type = "insert";
|
|
102
|
104
|
}else{
|
|
|
105
|
+ $scope.type = "update";
|
|
103
|
106
|
$("#userPwd").hide();//修改时隐藏密码框
|
|
104
|
107
|
$scope.user = $rootScope.user;
|
|
105
|
108
|
$scope.user.rzrq = $filter('date')($rootScope.user.rzrq, "yyyy-MM-dd");
|
|
|
@@ -221,7 +224,9 @@ angular.module('app.system').controller("userEditCtrl",
|
|
221
|
224
|
});
|
|
222
|
225
|
var param = {
|
|
223
|
226
|
orgId : $rootScope.orgInfo.orgId,
|
|
224
|
|
- sfzhm : $scope.user.sfzhm
|
|
|
227
|
+ sfzhm : $scope.user.sfzhm,
|
|
|
228
|
+ userId : $scope.user.userId,
|
|
|
229
|
+ type : $scope.type
|
|
225
|
230
|
};
|
|
226
|
231
|
$.get(APP_CONFIG.systemUrl + '/userInfo/checkRepeat', param, function(data){
|
|
227
|
232
|
if (data == "true") {
|