Commit b6d34e39b5894fdead2cdef3acd81e73b48c6161

Authored by 王通
1 parent 51470411

1.某些特定角色将保留新增人员的功能,并可选择此人信息是否与人事库同步,放开修改功能

src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
1   -<!-- ui-route employeeInfoManage.list -->
2   -<div ng-controller="EmployeeInfoManageListCtrl as ctrl">
3   - <div class="fixDiv">
4   - <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column">
5   - <thead>
6   - <tr role="row" class="heading">
7   - <th style="width:70px;">序号</th>
8   - <th style="width: 100px;">姓名</th>
9   - <th style="width: 100px;">编号</th>
10   - <th style="width: 100px;">工号</th>
11   - <th style="width: 100px;">金蝶工号</th>
12   - <th style="width: 60px;">性别</th>
13   - <th style="width: 150px;">所在公司</th>
14   - <th >分公司</th>
15   - <th >工种</th>
16   - <th style="width: 80px;">停用</th>
17   - <th >操作</th>
18   - </tr>
19   - <tr role="row" class="filter">
20   - <td>
21   - </td>
22   - <td>
23   - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().personnelName_like" placeholder="输入姓名..."/>
24   - </td>
25   - <td>
26   - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jobCode_like" placeholder="输入编号..."/>
27   - </td>
28   - <td>
29   - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jobCodeori_like" placeholder="输入工号..."/>
30   - </td>
31   - <td>
32   - <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jdCodeori_like" placeholder="输入工号..."/>
33   - </td>
34   - <td>
35   - </td>
36   - <td>
37   - <sa-Select5 name="gs"
38   - model="ctrl.searchCondition()"
39   - cmaps="{'companyCode_eq': 'businessCode'}"
40   - dcname="companyCode_eq"
41   - icname="businessCode"
42   - dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}"
43   - iterobjname="item"
44   - iterobjexp="item.businessName"
45   - searchph="请输拼音..."
46   - searchexp="this.businessName"
47   - required
48   - >
49   - </sa-Select5>
50   - </td>
51   - <td>
52   - <sa-Select5 name="fgs"
53   - model="ctrl.searchCondition()"
54   - cmaps="{'brancheCompanyCode_eq': 'businessCode'}"
55   - dcname="brancheCompanyCode_eq"
56   - icname="businessCode"
57   - dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.searchCondition().companyCode_eq }, atype:'gs' } | json }}"
58   - iterobjname="item"
59   - iterobjexp="item.businessName"
60   - searchph="请输拼音..."
61   - searchexp="this.businessName"
62   - required
63   - >
64   - </sa-Select5>
65   - </td>
66   - <td>
67   - <sa-Select5 name="gz"
68   - model="ctrl.searchCondition()"
69   - cmaps="{'posts_eq': 'code'}"
70   - dcname="posts_eq"
71   - icname="code"
72   - dsparams="{{ {type: 'dic', param: 'gzType' } | json }}"
73   - iterobjname="item"
74   - iterobjexp="item.name"
75   - searchph="请输拼音..."
76   - searchexp="this.name"
77   - >
78   - </sa-Select5>
79   - </td>
80   - <td>
81   - <label class="checkbox-inline">
82   - <input type="checkbox" ng-true-value="1" ng-model="ctrl.searchCondition()['destroy_eq']"/>停用
83   - </label>
84   - </td>
85   - <td>
86   - <div class="btn-group">
87   - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;"
88   - ng-click="ctrl.doPage()">
89   - <i class="fa fa-search"></i> 搜索</button>
90   - <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle"
91   - data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
92   - <span class="caret"></span>
93   - <span class="sr-only">dropdown</span>
94   - </button>
95   - <ul class="dropdown-menu pull-right">
96   - <li>
97   - <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()">
98   - <i class="fa fa-sort-amount-asc" aria-hidden="true"></i>
99   - 排序选项
100   - </a>
101   - </li>
102   - </ul>
103   - </div>
104   -
105   - <button class="btn btn-sm red btn-outline filter-cancel"
106   - ng-click="ctrl.reset()">
107   - <i class="fa fa-times"></i> 重置</button>
108   -
109   - </td>
110   -
111   - </tr>
112   - </thead>
113   - <tbody>
114   - <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX" ng-class="{danger: info.destroy == '1'}">
115   - <td>
116   - <div>
117   - <a href="#"
118   - tooltip-animation="false"
119   - tooltip-placement="top"
120   - uib-tooltip="{{'姓名/工号:' + info.personnelName + '/' + info.jobCodeori}}"
121   - tooltip-class="headClass">
122   -
123   - <i class="fa fa-list-ol" aria-hidden="true"></i>
124   - {{$index + ctrl.page().number * 10 + 1}}
125   - </a>
126   - </div>
127   -
128   - </td>
129   - <td>
130   - <span ng-bind="info.personnelName"></span>
131   - </td>
132   - <td>
133   - <span ng-bind="info.jobCode"></span>
134   - </td>
135   - <td>
136   - <span ng-bind="info.jobCodeori"></span>
137   - </td>
138   - <td>
139   - <span ng-bind="info.jdCodeori"></span>
140   - </td>
141   - <td>
142   - <span ng-bind="info.personnelType | dict:'sexType':'未知'"></span>
143   -
144   - <!--<div ng-if="info.personnelType == '1'">-->
145   - <!--<a href="#">-->
146   - <!--<i class="fa fa-male"></i>-->
147   - <!--</a>-->
148   - <!--</div>-->
149   - <!--<div ng-if="info.personnelType == '2'">-->
150   - <!--<a href="#">-->
151   - <!--<i class="fa fa-female"></i>-->
152   - <!--</a>-->
153   - <!--</div>-->
154   -
155   - </td>
156   - <td>
157   - <span ng-bind="info.company"></span>
158   - </td>
159   - <td>
160   - <span ng-bind="info.brancheCompany"></span>
161   - </td>
162   - <td>
163   - <span ng-bind="info.posts | dict:'gzType':'未知'"></span>
164   - </td>
165   - <td>
166   - <span class="glyphicon glyphicon-ok" ng-if="info.destroy != '1'"></span>
167   - <span class="glyphicon glyphicon-remove" ng-if="info.destroy == '1'"></span>
168   - </td>
169   - <td>
170   - <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
171   - <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a>
172   - </td>
173   - </tr>
174   - </tbody>
175   - </table>
176   - </div>
177   -
178   - <div class="pageBar">
179   - <div class="pageBarLeft">
180   - {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}}
181   - </div>
182   -
183   - <div class="pageBarRight">
184   - <uib-pagination total-items="ctrl.page()['totalElements']"
185   - ng-model="ctrl.page()['uiNumber']"
186   - ng-change="ctrl.doPage()"
187   - rotate="false"
188   - max-size="10"
189   - boundary-links="true"
190   - first-text="首页"
191   - previous-text="上一页"
192   - next-text="下一页"
193   - last-text="尾页">
194   - </uib-pagination>
195   - </div>
196   - </div>
  1 +<!-- ui-route employeeInfoManage.list -->
  2 +<div ng-controller="EmployeeInfoManageListCtrl as ctrl">
  3 + <div class="fixDiv">
  4 + <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column">
  5 + <thead>
  6 + <tr role="row" class="heading">
  7 + <th style="width:70px;">序号</th>
  8 + <th style="width: 100px;">姓名</th>
  9 + <th style="width: 100px;">编号</th>
  10 + <th style="width: 100px;">工号</th>
  11 + <th style="width: 100px;">金蝶工号</th>
  12 + <th style="width: 60px;">性别</th>
  13 + <th style="width: 150px;">所在公司</th>
  14 + <th >分公司</th>
  15 + <th >工种</th>
  16 + <th style="width: 80px;">停用</th>
  17 + <th >操作</th>
  18 + </tr>
  19 + <tr role="row" class="filter">
  20 + <td>
  21 + </td>
  22 + <td>
  23 + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().personnelName_like" placeholder="输入姓名..."/>
  24 + </td>
  25 + <td>
  26 + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jobCode_like" placeholder="输入编号..."/>
  27 + </td>
  28 + <td>
  29 + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jobCodeori_like" placeholder="输入工号..."/>
  30 + </td>
  31 + <td>
  32 + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jdCodeori_like" placeholder="输入工号..."/>
  33 + </td>
  34 + <td>
  35 + </td>
  36 + <td>
  37 + <sa-Select5 name="gs"
  38 + model="ctrl.searchCondition()"
  39 + cmaps="{'companyCode_eq': 'businessCode'}"
  40 + dcname="companyCode_eq"
  41 + icname="businessCode"
  42 + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}"
  43 + iterobjname="item"
  44 + iterobjexp="item.businessName"
  45 + searchph="请输拼音..."
  46 + searchexp="this.businessName"
  47 + required
  48 + >
  49 + </sa-Select5>
  50 + </td>
  51 + <td>
  52 + <sa-Select5 name="fgs"
  53 + model="ctrl.searchCondition()"
  54 + cmaps="{'brancheCompanyCode_eq': 'businessCode'}"
  55 + dcname="brancheCompanyCode_eq"
  56 + icname="businessCode"
  57 + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.searchCondition().companyCode_eq }, atype:'gs' } | json }}"
  58 + iterobjname="item"
  59 + iterobjexp="item.businessName"
  60 + searchph="请输拼音..."
  61 + searchexp="this.businessName"
  62 + required
  63 + >
  64 + </sa-Select5>
  65 + </td>
  66 + <td>
  67 + <sa-Select5 name="gz"
  68 + model="ctrl.searchCondition()"
  69 + cmaps="{'posts_eq': 'code'}"
  70 + dcname="posts_eq"
  71 + icname="code"
  72 + dsparams="{{ {type: 'dic', param: 'gzType' } | json }}"
  73 + iterobjname="item"
  74 + iterobjexp="item.name"
  75 + searchph="请输拼音..."
  76 + searchexp="this.name"
  77 + >
  78 + </sa-Select5>
  79 + </td>
  80 + <td>
  81 + <label class="checkbox-inline">
  82 + <input type="checkbox" ng-true-value="1" ng-model="ctrl.searchCondition()['destroy_eq']"/>停用
  83 + </label>
  84 + </td>
  85 + <td>
  86 + <div class="btn-group">
  87 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;"
  88 + ng-click="ctrl.doPage()">
  89 + <i class="fa fa-search"></i> 搜索</button>
  90 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle"
  91 + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  92 + <span class="caret"></span>
  93 + <span class="sr-only">dropdown</span>
  94 + </button>
  95 + <ul class="dropdown-menu pull-right">
  96 + <li>
  97 + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()">
  98 + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i>
  99 + 排序选项
  100 + </a>
  101 + </li>
  102 + </ul>
  103 + </div>
  104 +
  105 + <button class="btn btn-sm red btn-outline filter-cancel"
  106 + ng-click="ctrl.reset()">
  107 + <i class="fa fa-times"></i> 重置</button>
  108 +
  109 + </td>
  110 +
  111 + </tr>
  112 + </thead>
  113 + <tbody>
  114 + <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX" ng-class="{danger: info.destroy == '1'}">
  115 + <td>
  116 + <div>
  117 + <a href="#"
  118 + tooltip-animation="false"
  119 + tooltip-placement="top"
  120 + uib-tooltip="{{'姓名/工号:' + info.personnelName + '/' + info.jobCodeori}}"
  121 + tooltip-class="headClass">
  122 +
  123 + <i class="fa fa-list-ol" aria-hidden="true"></i>
  124 + {{$index + ctrl.page().number * 10 + 1}}
  125 + </a>
  126 + </div>
  127 +
  128 + </td>
  129 + <td>
  130 + <span ng-bind="info.personnelName"></span>
  131 + </td>
  132 + <td>
  133 + <span ng-bind="info.jobCode"></span>
  134 + </td>
  135 + <td>
  136 + <span ng-bind="info.jobCodeori"></span>
  137 + </td>
  138 + <td>
  139 + <span ng-bind="info.jdCodeori"></span>
  140 + </td>
  141 + <td>
  142 + <span ng-bind="info.personnelType | dict:'sexType':'未知'"></span>
  143 +
  144 + <!--<div ng-if="info.personnelType == '1'">-->
  145 + <!--<a href="#">-->
  146 + <!--<i class="fa fa-male"></i>-->
  147 + <!--</a>-->
  148 + <!--</div>-->
  149 + <!--<div ng-if="info.personnelType == '2'">-->
  150 + <!--<a href="#">-->
  151 + <!--<i class="fa fa-female"></i>-->
  152 + <!--</a>-->
  153 + <!--</div>-->
  154 +
  155 + </td>
  156 + <td>
  157 + <span ng-bind="info.company"></span>
  158 + </td>
  159 + <td>
  160 + <span ng-bind="info.brancheCompany"></span>
  161 + </td>
  162 + <td>
  163 + <span ng-bind="info.posts | dict:'gzType':'未知'"></span>
  164 + </td>
  165 + <td>
  166 + <span class="glyphicon glyphicon-ok" ng-if="info.destroy != '1'"></span>
  167 + <span class="glyphicon glyphicon-remove" ng-if="info.destroy == '1'"></span>
  168 + </td>
  169 + <td>
  170 + <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
  171 + <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a>
  172 + <a ui-sref="employeeInfoManage_edit({id: info.id})" class="btn btn-info btn-sm" ng-if="ctrl.userInfo.getRole().indexOf('_ADMIN') > -1"> 修改 </a>
  173 + </td>
  174 + </tr>
  175 + </tbody>
  176 + </table>
  177 + </div>
  178 +
  179 + <div class="pageBar">
  180 + <div class="pageBarLeft">
  181 + {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}}
  182 + </div>
  183 +
  184 + <div class="pageBarRight">
  185 + <uib-pagination total-items="ctrl.page()['totalElements']"
  186 + ng-model="ctrl.page()['uiNumber']"
  187 + ng-change="ctrl.doPage()"
  188 + rotate="false"
  189 + max-size="10"
  190 + boundary-links="true"
  191 + first-text="首页"
  192 + previous-text="上一页"
  193 + next-text="下一页"
  194 + last-text="尾页">
  195 + </uib-pagination>
  196 + </div>
  197 + </div>
197 198 </div>
198 199 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
... ... @@ -247,8 +247,10 @@ angular.module(&#39;ScheduleApp&#39;).controller(
247 247 [
248 248 'EmployeeInfoManageService',
249 249 '$uibModal',
250   - function(service, $uibModal) {
  250 + 'UserInfo',
  251 + function(service, $uibModal, userInfo) {
251 252 var self = this;
  253 + self.userInfo = userInfo;
252 254 var Employee = service.getQueryClass();
253 255  
254 256 self.page = function() {
... ...