Quellcode durchsuchen

用户需求修改

hanqingsong vor 1 Jahr
Ursprung
Commit
f84cd8ae48

+ 49 - 9
src/main/resources/static/app/system/controller/userCtrl.js

@@ -1,8 +1,7 @@
1 1
 "use strict";
2 2
 
3
-angular.module('app.system').controller("userCtrl",
4
-    function($scope, $state, $stateParams, $rootScope, userService, orgService,roleService, APP_CONFIG) {
5
-
3
+angular.module('app.system').controller("userCtrl", function($scope, $state, $stateParams, $rootScope, userService, $uibModal) {
4
+        console.log("MD5", md5("1qaz@WSX"))
6 5
 	    // 替换字符串首尾%
7 6
 	    $scope.replaceStr = function(str) {
8 7
 	    	var firstStr = str.substring(0);
@@ -44,6 +43,29 @@ angular.module('app.system').controller("userCtrl",
44 43
             });
45 44
         }
46 45
 
46
+        // 获取当前保管员所在粮库的所有仓房和当前保管员的权限
47
+        $scope.selected = []; //仓房数组
48
+        //$scope.orgId = ""; //当前保管员的单位
49
+        $scope.bgyId = ""; //当前保管员的ID
50
+        $scope.getUnitStoreList = function(id) {
51
+            var modalInstance = $uibModal.open({
52
+                size:'md',
53
+                templateUrl: 'app/system/views/userHousePower-edit.html',
54
+                controller: 'userHousePowerCtrl',
55
+                resolve: {
56
+                    id : id,
57
+                    orgId : $rootScope.orgInfo.orgId
58
+                }
59
+            });
60
+            modalInstance.result.then(function (result) {
61
+                $scope.selected = []; //仓房数组
62
+                $scope.orgId = ""; //当前保管员的单位
63
+                $scope.bgyId = ""; //当前保管员的ID
64
+            }, function (reason) {
65
+                console.log(reason);
66
+            });
67
+        }
68
+
47 69
         // 翻页
48 70
         $scope.goPage = function(pageNum) {
49 71
             $scope.pageInfo.pageNum = pageNum;
@@ -53,6 +75,7 @@ angular.module('app.system').controller("userCtrl",
53 75
         //获取用户信息
54 76
         $rootScope.user=null;
55 77
         $scope.update = function(userId) {
78
+            // $state.go("app.system.user.edit",{userId:userId});
56 79
             userService.editUser(userId).then(function(data) {
57 80
                 $rootScope.user = data;
58 81
                 if($rootScope.user.status == null || $rootScope.user.status == ""){
@@ -60,12 +83,12 @@ angular.module('app.system').controller("userCtrl",
60 83
                 }else{
61 84
                 	$rootScope.user.status = ""+$rootScope.user.status;
62 85
                 }
63
-                
86
+
64 87
                 $state.go("app.system.user.edit",{userId:userId});
65 88
             },function(data) {
66 89
                 console.log(data);
67 90
             });
68
-        }
91
+        };
69 92
 
70 93
         //重置密码
71 94
         $scope.resetPwd = function(userId) {
@@ -96,6 +119,19 @@ angular.module('app.system').controller("userEditCtrl",
96 119
 
97 120
         $rootScope.userRoleIds=[];
98 121
         $rootScope.crkRoleIds=[];
122
+
123
+        // 身份证号查询数据
124
+        $scope.keyUpFunction = function (sfzhm) {
125
+            if (sfzhm.length === 18) {
126
+                // 调用市平台数据查询员工信息
127
+                userService.getBySfzhmFunction(sfzhm, $rootScope.orgInfo.orgId).then(function(data) {
128
+                    $scope.user = data;
129
+                }, function(data) {
130
+                    console.log(data);
131
+                });
132
+            }
133
+        };
134
+
99 135
         // 提交表单
100 136
         var validator = $("#user-form").validate({
101 137
             rules: {
@@ -154,14 +190,18 @@ angular.module('app.system').controller("userEditCtrl",
154 190
                     }
155 191
                 });
156 192
                 userService.saveUser($scope.user,$scope.userRoleIds,$scope.crkRoleIds).then(function(data) {
157
-                    alert("保存成功!");
158
-                    // 跳转到列表页
159
-                    $state.go("app.system.user");
193
+                    if (data.status === 'success') {
194
+                        alert("保存成功!");
195
+                        // 跳转到列表页
196
+                        $state.go("app.system.user");
197
+                    } else {
198
+                        alert("保存成功!");
199
+                    }
160 200
                 }, function(data) {
161 201
                     console.log(data);
162 202
                 });
163 203
             }
164
-        }
204
+        };
165 205
 
166 206
         // 文件上传实例
167 207
         $scope.uploader = new FileUploader({

+ 55 - 0
src/main/resources/static/app/system/controller/userHousePowerCtrl.js

@@ -0,0 +1,55 @@
1
+"use strict";
2
+angular.module('app.system').controller("userHousePowerCtrl", function ($scope, $rootScope, $http, $location, $uibModalInstance, $stateParams, keeperService, id, orgId) {
3
+    $scope.selected = []; //仓房数组
4
+    // 获取当前保管员所在粮库的所有仓房和当前保管员的权限
5
+    $scope.edit = function () {
6
+        keeperService.getUnitStoreKeepList(id, orgId, "0").then(function (data) {
7
+            $scope.housePowerList = data.storeList;
8
+            //初始化选中仓房的数组
9
+            for (var i = 0; i < data.storeList.length; i++) {
10
+                if (data.storeList[i].delFlag == 5) {
11
+                    $scope.selected.push(data.storeList[i].storehouseId);
12
+                }
13
+            }
14
+        }, function (data) {
15
+            console.log(data);
16
+        });
17
+    };
18
+    $scope.edit();
19
+
20
+    // 更新仓房数组的值
21
+    $scope.updateSelection = function ($event, hid) {
22
+        var checkbox = $event.target;
23
+        var checked = checkbox.checked;
24
+        if (checked) {
25
+            $scope.selected.push(hid);
26
+        } else {
27
+            var idx = $scope.selected.indexOf(hid);
28
+            $scope.selected.splice(idx, 1);
29
+        }
30
+    };
31
+
32
+    // 提交保管员权限分配
33
+    $scope.save = function () {
34
+        var checkArray = angular.toJson($scope.selected);
35
+        keeperService.saveKeeperHouse(checkArray, $rootScope.userInfo, id).then(function (data) {
36
+            if (data.status === 'success') {
37
+                alert("保存成功!");
38
+            } else {
39
+                alert("保存失败!");
40
+            }
41
+        }, function (data) {
42
+            console.log(data);
43
+        });
44
+        //清空变量
45
+        $scope.selected = []; //仓房数组
46
+
47
+        $scope.cancel();
48
+    };
49
+
50
+    // 关闭模态窗口
51
+    $scope.cancel = function () {
52
+        $uibModalInstance.close();
53
+    }
54
+
55
+});

+ 20 - 4
src/main/resources/static/app/system/service/userService.js

@@ -449,8 +449,24 @@ angular.module('app.system').service("userService", function($http, $q, $rootSco
449 449
 			d.reject("error");
450 450
 		});
451 451
 		return d.promise;
452
-	}
453
-})
452
+	};
453
+
454
+    // 身份证号带出员工信息
455
+    this.getBySfzhmFunction = function(sfzhm, orgId) {
456
+        var d = $q.defer();
457
+        $http({
458
+            method : 'GET',
459
+            url : APP_CONFIG.systemUrl + '/userInfo/getBySfzhm/' + sfzhm + '/' + orgId
460
+        }).then(function successCallback(response) {
461
+            // 请求成功执行代码
462
+            d.resolve(response.data);
463
+        }, function errorCallback(response) {
464
+            // 请求失败执行代码
465
+            d.reject("error");
466
+        });
467
+        return d.promise;
468
+    }
469
+});
454 470
 
455 471
 angular.module('app.system').service("userRoleService", function($http, $q, APP_CONFIG) {
456 472
 	
@@ -495,6 +511,6 @@ angular.module('app.system').service("userRoleService", function($http, $q, APP_
495 511
 			d.reject("error");
496 512
 		});
497 513
 		return d.promise;
498
-	}
514
+	};
499 515
 
500
-})
516
+});

+ 63 - 183
src/main/resources/static/app/system/views/user-edit.html

@@ -37,66 +37,61 @@
37 37
 								<fieldset>
38 38
 									<div class="row">
39 39
 										<section class="col col-4">
40
-											<label class="label txt-bg-red">登录账号<span style="color: red;">*</span></label> 
41
-											<label class="input"> 
42
-												<i class="icon-prepend fa fa-user"></i>
43
-												<input type="text" name="username" ng-model="user.username" 
44
-													 minlength="2" maxlength="20" required validUsername="true" />
45
-												<b class="tooltip tooltip-bottom-right">2-20位字母、数字和下划线</b>
40
+											<label class="label">身份证号码<span style="color: red;">*</span></label>
41
+											<label class="input">
42
+												<!-- validCard=true validSfzhm="true"-->
43
+												<input type="text" ng-model="user.sfzhm" name="sfzhm" maxlength="18" ng-change="keyUpFunction(user.sfzhm)" required/>
46 44
 											</label>
47 45
 										</section>
48 46
 										<section class="col col-4">
49
-											<label class="label">用户姓名<span style="color: red;">*</span></label> 
50
-											<label class="input"> 
47
+											<label class="label">用户姓名<span style="color: red;">*</span></label>
48
+											<label class="input">
51 49
 												<i class="icon-prepend fa fa-user"></i>
52 50
 												<input type="text" name="realName" ng-model="user.realName" maxlength="20" required>
53 51
 											</label>
54 52
 										</section>
55 53
 										<section class="col col-4">
56
-											<label class="label">部门名称<span style="color: red;">*</span></label>
54
+											<label class="label txt-bg-red">登录账号<span style="color: red;">*</span></label> 
57 55
 											<label class="input">
58
-												<input id="verificationInput"  type="text" ng-model="user.bmmc" name="bmmc" maxlength="100" required ng-blur="bmmcBlur()"/>
56
+												<i class="icon-prepend fa fa-user"></i>
57
+												<input type="text" name="username" ng-model="user.username" 
58
+													 minlength="2" maxlength="20" required validUsername="true" />
59
+												<b class="tooltip tooltip-bottom-right">2-20位字母、数字和下划线</b>
59 60
 											</label>
60
-											<div style="color:#D56161;display:none;font-size:11px" id="verificationContainer">不能填写“无”、“暂无”、“空”</div>
61 61
 										</section>
62 62
 									</div>
63 63
 									<div class="row">
64 64
 										<section class="col col-4">
65
-											<label class="label">身份证号码<span style="color: red;">*</span></label>
65
+											<label class="label">部门名称<span style="color: red;">*</span></label>
66 66
 											<label class="input">
67
-												<input type="text" ng-model="user.sfzhm" name="sfzhm" maxlength="18" validSfzhm="true" required validCard=true/>
67
+												<input id="verificationInput"  type="text" ng-model="user.bmmc" name="bmmc" maxlength="100" required ng-blur="bmmcBlur()"/>
68 68
 											</label>
69
+											<div style="color:#D56161;display:none;font-size:11px" id="verificationContainer">不能填写“无”、“暂无”、“空”</div>
69 70
 										</section>
70 71
 										<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.rzrq" name="rzrq" id="rzrq" class="form-control" onClick="WdatePicker({lang:'zh-cn'})" 
74
-												 required ng-blur="rzrqChange()" />
75
-											</label>
72
+											<label class="label">所属组织<span style="color: red;">*</span></label>
73
+											<multi-select-tree  data-input-model="data2" data-default-label="请选择"
74
+																multi-select="false" data-output-model="user.orgId"
75
+																data-callback="selectOnly(item, selectedItems)">
76
+											</multi-select-tree>
76 77
 										</section>
77 78
 										<section class="col col-4">
78
-											<label class="label">性别<span style="color: red;">*</span></label>
79
-											<label class="select"> 
80
-												<select ng-model="user.sex" name="sex" ng-options="enum.enumid as enum.enumname for enum in dicDataList[5287]"
81
-													class="form-control" required>
82
-														<option value="">--请选择--</option>
83
-												</select>
84
-												<i></i>
85
-											</label>
79
+											<label class="label">库级角色(可多选)</label>
80
+											<multi-select-tree data-input-model="data4" data-default-label="请选择"
81
+															   select-only-leafs="true"
82
+															   multi-select="true" data-output-model="userRole.roleIds"
83
+															   data-callback="selectOnly1Or2(item, selectedItems)">
84
+											</multi-select-tree>
86 85
 										</section>
87 86
 									</div>
88 87
 									<div class="row">
89 88
 										<section class="col col-4">
90
-											<label class="label">岗位性质<span style="color: red;">*</span></label>
91
-											<label class="select">
92
-												<select ng-model="user.gwxz" name="gwxz" class="form-control" required>
93
-													<option value="">--请选择--</option>
94
-													<option value="11">在岗职工(长期)</option>
95
-													<option value="12">在岗职工(临时)</option>
96
-													<option value="20">其它从业人员</option>
97
-												</select>
98
-												<i></i>
99
-											</label>
89
+											<label class="label">出入库角色(可多选)</label>
90
+											<multi-select-tree data-input-model="crkData4" data-default-label="请选择"
91
+															   select-only-leafs="true"
92
+															   multi-select="true" data-output-model="crkRole.crkRoleIds"
93
+															   data-callback="selectOnly1Or2(item, selectedItems)">
94
+											</multi-select-tree>
100 95
 										</section>
101 96
 										<section class="col col-4">
102 97
 											<label class="label">在岗状态<span style="color: red;">*</span></label>
@@ -110,41 +105,15 @@
110 105
 											</label>
111 106
 										</section>
112 107
 										<section class="col col-4">
113
-										   <label class="label">所属组织<span style="color: red;">*</span></label> 
114
-										    <multi-select-tree  data-input-model="data2" data-default-label="请选择"
115
-														multi-select="false" data-output-model="user.orgId" 
116
-														data-callback="selectOnly(item, selectedItems)">
117
-												 </multi-select-tree>
118
-										</section>
119
-									</div>
120
-									<div class="row">
121
-										<section class="col col-4">
122
-											<label class="label">库级角色(可多选)</label> 
123
-											 <multi-select-tree data-input-model="data4" data-default-label="请选择"
124
-                                                    select-only-leafs="true"
125
-													multi-select="true" data-output-model="userRole.roleIds"
126
-													data-callback="selectOnly1Or2(item, selectedItems)">
127
-											 </multi-select-tree>
128
-										</section>
129
-										<section class="col col-4">
130
-											<label class="label">出入库角色(可多选)</label>
131
-											<multi-select-tree data-input-model="crkData4" data-default-label="请选择"
132
-															   select-only-leafs="true"
133
-															   multi-select="true" data-output-model="crkRole.crkRoleIds"
134
-															   data-callback="selectOnly1Or2(item, selectedItems)">
135
-											</multi-select-tree>
136
-										</section>
137
-										<section class="col col-4">
138 108
 											<label class="label">离职日期</label>
139 109
 											<label class="input">
140
-												<input type="text" ng-model="user.lzrq" name="lzrq" class="form-control"  
141
-												onClick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'rzrq\')}'})"/>
110
+												<input type="text" ng-model="user.lzrq" name="lzrq" class="form-control" onClick="WdatePicker({lang:'zh-cn'})"/>
142 111
 											</label>
143 112
 										</section>
144 113
 									</div>
145 114
 									<div class="row">
146 115
 										<section class="col col-4">
147
-											<label class="label">固定电话</label> 
116
+											<label class="label">固定电话</label>
148 117
 											<label class="input">
149 118
 												<i class="icon-prepend fa fa-phone"></i>
150 119
 												<input type="tel" ng-model="user.telphone" name="telphone" maxlength="30" validZjh=true />
@@ -152,154 +121,65 @@
152 121
 										</section>
153 122
 										<section class="col col-4">
154 123
 											<label class="label">手机号<span style="color: red;">*</span></label>
155
-											<label class="input"> 
124
+											<label class="input">
156 125
 												<i class="icon-prepend fa fa-mobile-phone"></i>
157 126
 												<input type="text" ng-model="user.mobile" name="mobile" validSjh=true required />
158 127
 											</label>
159 128
 										</section>
160 129
 										<section class="col col-4">
161
-											<label class="label">地址</label> 
162
-											<label class="input"> 
163
-												<i class="icon-prepend fa fa-map-marker"></i> 
130
+											<label class="label">地址</label>
131
+											<label class="input">
132
+												<i class="icon-prepend fa fa-map-marker"></i>
164 133
 												<input type="text" ng-model="user.address" name="address" maxlength="100" />
165 134
 											</label>
166 135
 										</section>
167 136
 									</div>
168
-									<div class="row" id="userPwd">
169
-										<section class="col col-6">
170
-											<label class="label">密码<span style="color: red;">*</span></label> 
171
-											<label class="input"> 
172
-												<i class="icon-prepend fa fa-key"></i> 
173
-												<input type="password" id="newPassword" name="newPassword" 
174
-													ng-model="user.password" minlength="12" maxlength="18" required  validUsePwd="true" />
175
-											</label>
176
-										</section>
177
-										<section class="col col-6">
178
-											<label class="label">确认密码<span style="color: red;">*</span></label> 
179
-											<label class="input"> 
180
-												<i class="icon-prepend fa fa-key"></i> 
181
-												<input type="password" name="newPassword1" ng-model="newPassword1" 
182
-													 minlength="12" maxlength="18" required  />
183
-											</label>
184
-										</section>
185
-									</div>
186 137
 									<div class="row">
187 138
 										<section class="col col-4">
188 139
 											<label class="label">电子邮箱</label>
189
-											<label class="input"> 
190
-												<i class="icon-prepend fa fa-envelope-o"></i> 
191
-												<input type="input" ng-model="user.email" name="email" maxlength="60" validEmail=true />
192
-											</label>
193
-										</section>
194
-										<section class="col col-4">
195
-											<label class="label">民族<span style="color: red;">*</span></label>
196
-											<label class="select">
197
-												<select ng-model="user.mz" name="mz" ng-options="enum.enumid as enum.enumname for enum in dicDataList[7176]"
198
-														class="form-control" required>
199
-													<option value="">--请选择--</option>
200
-												</select>
201
-												<i></i>
202
-											</label>
203
-										</section>
204
-										<section class="col col-4">
205
-											<label class="label">政治面貌<span style="color: red;">*</span></label>
206
-											<label class="select">
207
-												<select ng-model="user.zzmm" name="zzmm" ng-options="enum.enumid as enum.enumname for enum in dicDataList[1043]"
208
-														class="form-control" required>
209
-													<option value="">--请选择--</option>
210
-												</select>
211
-												<i></i>
212
-											</label>
213
-										</section>
214
-									</div>
215
-									<div class="row">
216
-										<section class="col col-4">
217
-											<label class="label">人员类别<span style="color: red;">*</span></label>
218
-											<label class="select">
219
-												<select ng-model="user.rylb" name="rylb" ng-options="enum.enumid as enum.enumname for enum in dicDataList[6888]"
220
-														class="form-control" required>
221
-													<option value="">--请选择--</option>
222
-												</select>
223
-												<i></i>
224
-											</label>
225
-										</section>
226
-										<section class="col col-4">
227
-											<label class="label">全日制最高学历<span style="color: red;">*</span></label>
228
-											<label class="select">
229
-												<select ng-model="user.xl" name="xl" ng-options="enum.enumid as enum.enumname for enum in dicDataList[5294]"
230
-														class="form-control" required>
231
-													<option value="">--请选择--</option>
232
-												</select>
233
-												<i></i>
234
-											</label>
235
-										</section>
236
-										<section class="col col-4">
237
-											<label class="label">专业<span style="color: red;">*</span></label>
238
-											<label class="input">
239
-												<input type="text" ng-model="user.zy" name="zy" maxlength="30"  required />
240
-											</label>
241
-										</section>
242
-									</div>
243
-									<div class="row">
244
-										<section class="col col-4">
245
-											<label class="label">岗位类别</label> 
246
-											<label class="select"> 
247
-												<select ng-model="user.status" class="form-control">
248
-													<option value="">--请选择--</option>
249
-													<option value="1">后勤</option>
250
-													<option value="2">业务</option>
251
-													<option value="3">财务</option>
252
-													<option value="4">统计</option>
253
-													<option value="5">仓储</option>
254
-													<option value="6">化验</option>
255
-													<option value="7">管理</option>
256
-												</select>
257
-												<i></i>
258
-											</label>
259
-										</section>
260
-										<section class="col col-4">
261
-											<label class="label">职务(岗位)<span style="color: red;">*</span></label>
262
-											<label class="input">
263
-												<input type="text" ng-model="user.zw" name="zw" maxlength="30" required />
264
-												<i></i>
265
-											</label>
266
-										</section>
267
-										<section class="col col-4">
268
-											<label class="label">最高职称<span style="color: red;">*</span></label>
269 140
 											<label class="input">
270
-												<input type="text" ng-model="user.zc" name="zc" maxlength="30" required />
271
-												<i></i>
272
-											</label>
273
-										</section>
274
-									</div>
275
-									<div class="row">
276
-										<section class="col col-4">
277
-											<label class="label">取得最高职称或职业资格时间</label>
278
-											<label class="input">
279
-												<input type="text" ng-model="user.qdzgzchzyzgsj" name="qdzgzchzyzgsj" class="form-control" onClick="WdatePicker({lang:'zh-cn'})" />
141
+												<i class="icon-prepend fa fa-envelope-o"></i>
142
+												<input type="input" ng-model="user.email" name="email" maxlength="60" validEmail=true />
280 143
 											</label>
281 144
 										</section>
282 145
 										<section class="col col-4">
283
-											<label class="label">用户头像</label> 
146
+											<label class="label">电子签名</label>
284 147
 											<div class="input input-file">
285 148
 									            <span class="button">
286 149
 									            	<input type="file" nv-file-select="" uploader="uploader" accept="image/*">
287 150
 									                	浏览
288
-									            </span><input type="text" name="imgUrl" ng-model="user.imgUrl" placeholder="" readonly="">
289
-									        </div>
151
+									            </span><input type="text" name="sigature" ng-model="user.sigature" placeholder="" readonly="">
152
+											</div>
290 153
 										</section>
291 154
 										<section class="col col-4">
292
-											<label class="label">电子签名</label> 
155
+											<label class="label">用户头像</label>
293 156
 											<div class="input input-file">
294 157
 									            <span class="button">
295 158
 									            	<input type="file" nv-file-select="" uploader="uploader" accept="image/*">
296 159
 									                	浏览
297
-									            </span><input type="text" name="sigature" ng-model="user.sigature" placeholder="" readonly="">
298
-									        </div>
160
+									            </span><input type="text" name="imgUrl" ng-model="user.imgUrl" placeholder="" readonly="">
161
+											</div>
162
+										</section>
163
+									</div>
164
+									<div class="row" id="userPwd">
165
+										<section class="col col-6">
166
+											<label class="label">密码<span style="color: red;">*</span></label> 
167
+											<label class="input"> 
168
+												<i class="icon-prepend fa fa-key"></i> 
169
+												<input type="password" id="newPassword" name="newPassword" 
170
+													ng-model="user.password" minlength="12" maxlength="18" required  validUsePwd="true" />
171
+											</label>
172
+										</section>
173
+										<section class="col col-6">
174
+											<label class="label">确认密码<span style="color: red;">*</span></label> 
175
+											<label class="input"> 
176
+												<i class="icon-prepend fa fa-key"></i> 
177
+												<input type="password" name="newPassword1" ng-model="newPassword1" 
178
+													 minlength="12" maxlength="18" required  />
179
+											</label>
299 180
 										</section>
300 181
 									</div>
301 182
 								</fieldset>
302
-								
303 183
 					            <footer class="text-align-center">
304 184
 					                <button type="button" class="btn btn-primary" ng-click="save()">提交</button>
305 185
 					                <button type="button" class="btn btn-default" ng-click="back()">取消</button>

+ 7 - 0
src/main/resources/static/app/system/views/user-list.html

@@ -52,6 +52,7 @@
52 52
 				                            <th data-hide="phone">电话</th>
53 53
 				                            <th data-hide="phone,tablet">所属组织</th>
54 54
 				                            <th data-hide="phone,tablet">在岗状态</th>
55
+				                            <th data-hide="phone,tablet">状态</th>
55 56
 				                            <th data-hide="phone,tablet">角色</th>
56 57
 				                            <th data-hide="phone">操作</th>
57 58
 				                        </tr>
@@ -65,9 +66,15 @@
65 66
 			                        		<td>{{user.telphone}}</td>
66 67
 			                        		<td>{{user.orgName}}</td>
67 68
 			                        		<td>{{user.zgzt=='01'?'在岗':'已离职'}}</td>
69
+			                        		<td>{{user.zgzt=='01'?'启用':'禁用'}}</td>
68 70
 			                        		<td>{{user.roleNames}}</td>
69 71
 			                        		<td>
70 72
 			                        			<a has-permission="171" ng-click="update(user.userId)"><i class="fa fa-edit"></i> 修改</a>
73
+												<span ng-if="user.roleNames=='保管员'||user.roleNames=='仓储人员'">
74
+													<a href-void ng-click="getUnitStoreList(user.userId)">
75
+														<i class="fa fa-cogs"></i>分配仓房
76
+													</a>
77
+												</span>
71 78
 <!-- 												<a has-permission="298" href-void ng-click="remove(user.userId)"><i class="fa fa-trash-o"></i> 删除</a> -->
72 79
 												<!-- <a has-permission="525" href-void ng-click="resetPwd(user.userId)"><i class="fa fa-edit"></i> 重置密码</a> -->
73 80
 											</td>

+ 47 - 0
src/main/resources/static/app/system/views/userHousePower-edit.html

@@ -0,0 +1,47 @@
1
+<div class="modal-content">
2
+    <div class="modal-header">
3
+        <button type="button" class="close" ng-click="cancel()">
4
+            &times;</button>
5
+        <h4 class="modal-title" id="myModalLabel">保管员仓房权限信息</h4>
6
+    </div>
7
+    <div class="modal-body">
8
+        <form id="basicEnum-form" name='basicEnum-form'
9
+              class="smart-form ng-pristine ng-valid"
10
+              ng-submit='basicEnum-form.$valid&&save(basicEnum)'
11
+              novalidate="novalidate">
12
+
13
+            <fieldset>
14
+                <section>
15
+                    <label class="label">复选框勾上的便是当前保管员所管理的仓房</label><br />
16
+                    <br />
17
+
18
+                    <div class="row">
19
+                        <div class="col col-4" ng-repeat="store in housePowerList">
20
+                            <label class="checkbox">
21
+								<span ng-if="store.delFlag==5">
22
+									<input type="checkbox" name="checkbox" ng-click="updateSelection($event,store.storehouseId)"
23
+                                           checked="checked" />
24
+									<i></i>{{store.storehouseName}}
25
+								</span>
26
+                                <span ng-if="store.delFlag!=5">
27
+									<input type="checkbox" name="checkbox" ng-click="updateSelection($event,store.storehouseId)" />
28
+									<i></i>{{store.storehouseName}}
29
+								</span>
30
+                            </label>
31
+                        </div>
32
+                        <br />
33
+                        <br />
34
+
35
+                    </div>
36
+                </section>
37
+
38
+            </fieldset>
39
+        </form>
40
+        <div class="modal-footer">
41
+            <button type="button" class="btn btn-primary" ng-click="save()">
42
+                提交</button>
43
+            <button type="button" class="btn btn-default" ng-click="cancel()">
44
+                取消</button>
45
+        </div>
46
+    </div>
47
+</div>