Bläddra i källkod

天津改造计划——用户基本信息改造

fanxw 4 år sedan
förälder
incheckning
5bdb81d806

+ 4 - 0
src/main/resources/static/app/basic/keeper/controller/keeperCtrl.js

@@ -223,8 +223,12 @@ angular.module('app.basic')
223 223
             $scope.keeper.name = data.realName; //姓名
224 224
             $scope.keeper.userAlias = data.userAlias; //别名
225 225
             $scope.keeper.sex = data.sex;  //性别
226
+			$scope.keeper.idCard = data.sfzhm; //身份证号码
226 227
             $scope.keeper.phone = data.mobile; //电话
228
+			$scope.keeper.employeeNature = data.rylb; //职员类别
229
+			$scope.keeper.entryTime = data.rzrq; //入职日期
227 230
             $scope.keeper.email = data.email;  //邮箱
231
+			$scope.keeper.political = data.zzmm; //政治面貌
228 232
             $scope.keeper.avatorUrl = data.imgUrl; //头像
229 233
         },function(data){
230 234
             console.log(data);

+ 12 - 2
src/main/resources/static/app/system/controller/userCtrl.js

@@ -95,13 +95,13 @@ angular.module('app.system').controller("userCtrl",
95 95
     });
96 96
 
97 97
 angular.module('app.system').controller("userEditCtrl",
98
-    function($scope, $rootScope, $state, $stateParams, userService, userRoleService, orgService, roleService, FileUploader, APP_CONFIG) {
98
+    function($scope, $rootScope, $state, $stateParams, $filter, userService, userRoleService, orgService, roleService, FileUploader, APP_CONFIG) {
99 99
 		
100 100
 		if($stateParams.userId == null || $stateParams.userId == ""){//新增的时候默认为库主任
101 101
 			$scope.user = {status:"1"};
102 102
 		}else{
103 103
 			$("#userPwd").hide();//修改时隐藏密码框
104
-		}	
104
+		}
105 105
 
106 106
         $rootScope.userRoleIds=[];
107 107
         $rootScope.crkRoleIds=[];
@@ -145,6 +145,16 @@ angular.module('app.system').controller("userEditCtrl",
145 145
                 if($stateParams.userId == null || $stateParams.userId == ""){
146 146
                 	$scope.user.password = md5($scope.user.password);
147 147
                 }
148
+                $("input[name='rzrq']").each(function(j,item){
149
+                    if(item.value != '' && item.value != null && typeof item.value != 'undefined'){
150
+                        $scope.user.rzrq = $filter('date')(item.value, "yyyy-MM-dd");
151
+                    }
152
+                });
153
+                $("input[name='lzrq']").each(function(j,item){
154
+                    if(item.value != '' && item.value != null && typeof item.value != 'undefined'){
155
+                        $scope.user.lzrq = $filter('date')(item.value, "yyyy-MM-dd");
156
+                    }
157
+                });
148 158
                 userService.saveUser($scope.user,$scope.userRoleIds,$scope.crkRoleIds).then(function(data) {
149 159
                     alert("保存成功!");
150 160
                     // 跳转到列表页

+ 131 - 21
src/main/resources/static/app/system/views/user-edit.html

@@ -62,16 +62,61 @@
62 62
 									</div>
63 63
 									<div class="row">
64 64
 										<section class="col col-4">
65
-											<label class="label">性别</label> 
65
+											<label class="label">部门名称<span style="color: red;">*</span></label>
66
+											<label class="input">
67
+												<input type="text" ng-model="user.bmmc" name="bmmc" maxlength="100" required />
68
+											</label>
69
+										</section>
70
+										<section class="col col-4">
71
+											<label class="label">身份证号码<span style="color: red;">*</span></label>
72
+											<label class="input">
73
+												<input type="text" ng-model="user.sfzhm" name="sfzhm" maxlength="18" required />
74
+											</label>
75
+										</section>
76
+										<section class="col col-4">
77
+											<label class="label">入职日期<span style="color: red;">*</span></label>
78
+											<label class="input">
79
+												<input type="text" ng-model="user.rzrq" name="rzrq" class="form-control" onClick="WdatePicker({lang:'zh-cn'})" required />
80
+											</label>
81
+										</section>
82
+									</div>
83
+									<div class="row">
84
+										<section class="col col-4">
85
+											<label class="label">性别<span style="color: red;">*</span></label>
66 86
 											<label class="select"> 
67
-												<select ng-model="user.sex" ng-options="enum.enumid as enum.enumname for enum in dicDataList[5287]"
68
-													class="form-control">
87
+												<select ng-model="user.sex" name="sex" ng-options="enum.enumid as enum.enumname for enum in dicDataList[5287]"
88
+													class="form-control" required>
69 89
 														<option value="">--请选择--</option>
70 90
 												</select>
71 91
 												<i></i>
72 92
 											</label>
73 93
 										</section>
74 94
 										<section class="col col-4">
95
+											<label class="label">岗位性质<span style="color: red;">*</span></label>
96
+											<label class="select">
97
+												<select ng-model="user.gwxz" name="gwxz" class="form-control" required>
98
+													<option value="">--请选择--</option>
99
+													<option value="11">在岗职工(长期)</option>
100
+													<option value="12">在岗职工(临时)</option>
101
+													<option value="20">其它从业人员</option>
102
+												</select>
103
+												<i></i>
104
+											</label>
105
+										</section>
106
+										<section class="col col-4">
107
+											<label class="label">在岗状态<span style="color: red;">*</span></label>
108
+											<label class="select">
109
+												<select ng-model="user.zgzt" name="zgzt" class="form-control" required>
110
+													<option value="">--请选择--</option>
111
+													<option value="01">在岗</option>
112
+													<option value="02">已离职</option>
113
+												</select>
114
+												<i></i>
115
+											</label>
116
+										</section>
117
+									</div>
118
+									<div class="row">
119
+										<section class="col col-4">
75 120
 										   <label class="label">所属组织<span style="color: red;">*</span></label> 
76 121
 										    <multi-select-tree  data-input-model="data2" data-default-label="请选择"
77 122
 														multi-select="false" data-output-model="user.orgId" 
@@ -85,29 +130,35 @@
85 130
 													multi-select="true" data-output-model="userRole.roleIds"
86 131
 													data-callback="selectOnly1Or2(item, selectedItems)">
87 132
 											 </multi-select-tree>
88
-										</section> 
133
+										</section>
134
+										<section class="col col-4">
135
+											<label class="label">出入库角色(可多选)</label>
136
+											<multi-select-tree data-input-model="crkData4" data-default-label="请选择"
137
+															   select-only-leafs="true"
138
+															   multi-select="true" data-output-model="crkRole.crkRoleIds"
139
+															   data-callback="selectOnly1Or2(item, selectedItems)">
140
+											</multi-select-tree>
141
+										</section>
89 142
 									</div>
90 143
 									<div class="row">
91 144
 										<section class="col col-4">
92
-											<label class="label">出入库角色(可多选)</label> 
93
-											 <multi-select-tree data-input-model="crkData4" data-default-label="请选择"
94
-                                                    select-only-leafs="true"
95
-													multi-select="true" data-output-model="crkRole.crkRoleIds"
96
-													data-callback="selectOnly1Or2(item, selectedItems)">
97
-											 </multi-select-tree>
145
+											<label class="label">离职日期<span style="color: red;">*</span></label>
146
+											<label class="input">
147
+												<input type="text" ng-model="user.lzrq" name="lzrq" class="form-control" onClick="WdatePicker({lang:'zh-cn'})" required />
148
+											</label>
98 149
 										</section>
99 150
 										<section class="col col-4">
100 151
 											<label class="label">固定电话</label> 
101
-											<label class="input"> 
152
+											<label class="input">
102 153
 												<i class="icon-prepend fa fa-phone"></i>
103 154
 												<input type="tel" ng-model="user.telphone" maxlength="30">
104 155
 											</label>
105 156
 										</section>
106 157
 										<section class="col col-4">
107
-											<label class="label">手机号</label> 
158
+											<label class="label">手机号<span style="color: red;">*</span></label>
108 159
 											<label class="input"> 
109 160
 												<i class="icon-prepend fa fa-mobile-phone"></i>
110
-												<input type="text" ng-model="user.mobile" name="mobile" maxlength="20">
161
+												<input type="text" ng-model="user.mobile" name="mobile" maxlength="20" required />
111 162
 											</label>
112 163
 										</section>
113 164
 									</div>
@@ -145,10 +196,68 @@
145 196
 											</label>
146 197
 										</section>
147 198
 										<section class="col col-4">
148
-											<label class="label">电子邮箱</label> 
199
+											<label class="label">电子邮箱<span style="color: red;">*</span></label>
149 200
 											<label class="input"> 
150 201
 												<i class="icon-prepend fa fa-envelope-o"></i> 
151
-												<input type="email" ng-model="user.email" maxlength="60">
202
+												<input type="email" ng-model="user.email" name="email" maxlength="60" required />
203
+											</label>
204
+										</section>
205
+									</div>
206
+									<div class="row">
207
+										<section class="col col-4">
208
+											<label class="label">名族<span style="color: red;">*</span></label>
209
+											<label class="select">
210
+												<select ng-model="user.mz" name="mz" ng-options="enum.enumid as enum.enumname for enum in dicDataList[7176]"
211
+														class="form-control" required>
212
+													<option value="">--请选择--</option>
213
+												</select>
214
+												<i></i>
215
+											</label>
216
+										</section>
217
+										<section class="col col-4">
218
+											<label class="label">政治面貌<span style="color: red;">*</span></label>
219
+											<label class="select">
220
+												<select ng-model="user.zzmm" name="zzmm" ng-options="enum.enumid as enum.enumname for enum in dicDataList[1043]"
221
+														class="form-control" required>
222
+													<option value="">--请选择--</option>
223
+												</select>
224
+												<i></i>
225
+											</label>
226
+										</section>
227
+										<section class="col col-4">
228
+											<label class="label">人员类别<span style="color: red;">*</span></label>
229
+											<label class="select">
230
+												<select ng-model="user.rylb" name="rylb" ng-options="enum.enumid as enum.enumname for enum in dicDataList[6888]"
231
+														class="form-control" required>
232
+													<option value="">--请选择--</option>
233
+												</select>
234
+												<i></i>
235
+											</label>
236
+										</section>
237
+									</div>
238
+									<div class="row">
239
+										<section class="col col-4">
240
+											<label class="label">学历<span style="color: red;">*</span></label>
241
+											<label class="select">
242
+												<select ng-model="user.xl" name="xl" ng-options="enum.enumid as enum.enumname for enum in dicDataList[5294]"
243
+														class="form-control" required>
244
+													<option value="">--请选择--</option>
245
+												</select>
246
+												<i></i>
247
+											</label>
248
+										</section>
249
+										<section class="col col-4">
250
+											<label class="label">职务<span style="color: red;">*</span></label>
251
+											<label class="input">
252
+												<input type="text" ng-model="user.zw" name="zw" maxlength="30" required />
253
+												<i></i>
254
+											</label>
255
+										</section>
256
+										<section class="col col-4">
257
+											<label class="label">职称<span style="color: red;">*</span></label>
258
+											<label class="input">
259
+												<input type="text" ng-model="user.zc" name="zc" maxlength="30" required />
260
+												<i></i>
152 261
 											</label>
153 262
 										</section>
154 263
 									</div>
@@ -177,12 +286,13 @@
177 286
 											<label class="label">人员类型</label> 
178 287
 											<label class="select"> 
179 288
 												<select ng-model="user.status" class="form-control">
180
-														<option value="1">库级领导</option>
181
-														<option value="2">经营人员</option>
182
-														<option value="3">仓储人员</option>
183
-														<option value="4">质检人员</option>
184
-														<option value="5">保卫人员</option>
185
-														<option value="6">中转人员</option>
289
+													<option value="">--请选择--</option>
290
+													<option value="1">库级领导</option>
291
+													<option value="2">经营人员</option>
292
+													<option value="3">仓储人员</option>
293
+													<option value="4">质检人员</option>
294
+													<option value="5">保卫人员</option>
295
+													<option value="6">中转人员</option>
186 296
 												</select>
187 297
 												<i></i>
188 298
 											</label>