user.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <style>
  2. .base-info .title {
  3. width: 56px;
  4. line-height: 30px;
  5. }
  6. .base-info .content {
  7. line-height: 30px;
  8. }
  9. .radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]
  10. {
  11. margin-top: 10px;
  12. }
  13. .password label {
  14. }
  15. .password .col {
  16. line-height: 30px;
  17. }
  18. .password .line {
  19. margin-bottom: 15px;
  20. }
  21. .row-operator2 {
  22. position: relative;
  23. }
  24. .row-operator2>.operator-menu2 {
  25. position: absolute;
  26. width: 140px;
  27. height: 60;
  28. line-height: 30px;
  29. padding: 0 10px;
  30. top: 30;
  31. background-color: #333;
  32. border-radius: 0 3px 3px 0;
  33. opacity: 0;
  34. right: 0;
  35. }
  36. .row-operator2>.operator-menu2 a {
  37. color: #fff;
  38. }
  39. .row-operator2>.operator-menu2 a:hover {
  40. color: #56a022;
  41. }
  42. .row-operator2:hover>.operator-menu2 {
  43. z-index:100;
  44. height: 60px;
  45. opacity: .75;
  46. -webkit-transition: all 0s ease-in-out;
  47. -moz-transition: all 0s ease-in-out;
  48. transition: all 0s ease-in-out;
  49. }
  50. .row-operator2>.operator-menu3 {
  51. position: absolute;
  52. width: 125px;
  53. height: 60;
  54. line-height: 30px;
  55. padding: 0 10px;
  56. top: 30;
  57. background-color: #333;
  58. border-radius: 0 3px 3px 0;
  59. opacity: 0;
  60. }
  61. .row-operator2>.operator-menu3 a {
  62. color: #fff;
  63. }
  64. .row-operator2>.operator-menu3 a:hover {
  65. color: #56a022;
  66. }
  67. .row-operator2:hover>.operator-menu3 {
  68. z-index:100;
  69. height: 40px;
  70. opacity: .75;
  71. -webkit-transition: all 0s ease-in-out;
  72. -moz-transition: all 0s ease-in-out;
  73. transition: all 0s ease-in-out;
  74. }
  75. .com_head {
  76. width: 100%;
  77. height: 40px;
  78. line-height: 44px;
  79. background: url("static/img/approvalFlow/comm_bg01.png") no-repeat left;
  80. background-color: #f5f5f5;
  81. background-size: 100% 100%;
  82. }
  83. .com_head span {
  84. margin-left: 20px;
  85. color: #000;
  86. font-size: 14px;
  87. }
  88. .title-div .pull-right{
  89. float: right;
  90. margin-right: 15px;
  91. font-weight: normal;
  92. }
  93. .title-div .pull-right a{
  94. font-weight: normal;
  95. font-size: 14px;
  96. color: #5078cb;
  97. }
  98. .pane{
  99. box-shadow: none;
  100. margin-bottom: 0;
  101. }
  102. .base-info{
  103. border-bottom: #e8e8e8 1px solid;
  104. }
  105. .pane .pane-body{
  106. font-size: 14px;
  107. padding: 15px;
  108. }
  109. #order-detail-list{
  110. padding: 0;
  111. }
  112. #order-detail-list .table-default .header th{
  113. color: #323232;
  114. font-weight: bold;
  115. border-bottom: #e8e8e8 1px solid;
  116. }
  117. #order-detail-list .table>tbody+tbody{
  118. border-top: none;
  119. }
  120. #order-detail-list .table-default td{
  121. border-bottom: #e8e8e8 1px solid;
  122. border-top: none;
  123. }
  124. #order-detail-list .table-default td i{
  125. color: #5078cb;
  126. }
  127. #order-detail-list tbody tr{
  128. height: 60px;
  129. }
  130. .row-operator>.operator-menu a:hover{
  131. color: #fff;
  132. }
  133. .title-div .row-operator2 ul li a{
  134. color: #fff;
  135. }
  136. .title-div .row-operator2 ul li a:hover{
  137. color: #fff;
  138. }
  139. .base-info .title{
  140. font-weight: normal;
  141. color: #323232;
  142. }
  143. .base-info .content{
  144. color: #969595;
  145. }
  146. .base-info .form-control{
  147. margin-top: 10px;
  148. height: 36px;
  149. border: #bfbfbf 1px solid;
  150. font-size: 14px;
  151. margin-left: 5px;
  152. }
  153. .modal-body{
  154. padding-top: 0;
  155. }
  156. .table-default .header{
  157. box-shadow: none;
  158. }
  159. #order-detail-list .table-default th, #order-detail-list .table-default td{
  160. border-top: none;
  161. }
  162. .row-operator>.operator-menu{
  163. right: 100%;
  164. left: inherit;
  165. }
  166. .search .input-group-addon{
  167. width: 70px;
  168. height: 36px;
  169. display: inline-block;
  170. background: #327ebe;
  171. font-size: 16px;
  172. text-align: center;
  173. line-height: 36px;
  174. color: #fff;
  175. padding: 0;
  176. border: none;
  177. border-radius: 0;
  178. position: absolute;
  179. top: 0;
  180. right: -4px;
  181. }
  182. .search .col-xs-6{
  183. width: 40%;
  184. padding: 0;
  185. }
  186. </style>
  187. <div class="loading in" ng-class="{'in': loading}">
  188. <i></i>
  189. </div>
  190. <div class="pane base-info">
  191. <div class="com_head"><span>人员信息</span></div>
  192. <div class="title-div" style="border-bottom: 1px dashed #327ebe;">
  193. <span class="f14">我的个人资料</span>
  194. <div class="pull-right">
  195. <a ng-disabled="userForm.$invalid" class="text-simple text-success"
  196. ng-show="editing" ng-click="saveUser()">
  197. <i class="fa fa-save fa-fw"></i>保存修改</a>
  198. <a class="text-simple" ng-show="editing" ng-click="editing=false">
  199. <i class="fa fa-reply-all fa-fw"></i>取消编辑</a>
  200. <a class="text-simple" ng-show="!editing" ng-click="editing=true">
  201. <i class="fa fa-pencil fa-fw"></i>编辑</a>
  202. <a class="text-simple text-danger" ng-click="updatePassword()">
  203. <i class="fa fa-lock fa-fw"></i>修改密码</a>
  204. </div>
  205. </div>
  206. <div class="pane-body" style="padding-left: 30px;">
  207. <form ng="userForm" class="form-inline">
  208. <div class="row row-sm item">
  209. <div class="col-xs-4">
  210. <span class="title">姓名</span>
  211. <div class="content" ng-show="!editing" ng-bind="user.userName"></div>
  212. <div class="content" ng-show="editing">
  213. <input reqired ng-model="user.userName"
  214. class="form-control input-sm" type="text" />
  215. </div>
  216. </div>
  217. <div class="col-xs-4">
  218. <span class="title">性别</span>
  219. <div class="content" ng-show="!editing"
  220. ng-bind="user.userSex == 'F' ? '女' : '男'"></div>
  221. <div class="content" ng-show="editing">
  222. <label class="radio-inline"><input ng-model="user.userSex"
  223. value="F" type="radio" /> 女 </label> <label class="radio-inline"><input
  224. ng-model="user.userSex" value="M" type="radio" /> 男 </label>
  225. </div>
  226. </div>
  227. <div class="col-xs-4">
  228. <span class="title">身份证号</span>
  229. <div class="content" ng-show="!editing" ng-bind="user.userIdcode"></div>
  230. <div class="content" ng-show="editing">
  231. <input ng-model="user.userIdcode" class="form-control input-sm"
  232. type="text" />
  233. </div>
  234. </div>
  235. </div>
  236. <div class="row row-sm item">
  237. <div class="col-xs-4">
  238. <span class="title">UU</span>
  239. <div class="content" ng-bind="::user.userUU"></div>
  240. </div>
  241. <div class="col-xs-4">
  242. <span class="title">电话</span>
  243. <div class="content" ng-show="!editing" ng-bind="user.userTel"></div>
  244. <div class="content" ng-show="editing">
  245. <input reqired ng-model="user.userTel"
  246. class="form-control input-sm" type="text" />
  247. </div>
  248. </div>
  249. <div class="col-xs-4">
  250. <span class="title">邮箱</span>
  251. <div class="content" ng-show="!editing" ng-bind="user.userEmail"></div>
  252. <div class="content" ng-show="editing">
  253. <input reqired ng-model="user.userEmail"
  254. class="form-control input-sm" type="text" />
  255. </div>
  256. </div>
  257. </div>
  258. </form>
  259. </div>
  260. </div>
  261. <style>
  262. .password .col-md-4.text-left{
  263. width: 100px;
  264. padding-right: 0;
  265. margin-left: 120px;
  266. }
  267. </style>
  268. <div class="pane base-info" style="border-bottom: none;">
  269. <div class="title-div" style="border-bottom: 1px dashed #327ebe;">
  270. <span class="f14">我的客户</span>
  271. <div class="pull-right">
  272. 共&nbsp;{{distributes.length}}&nbsp;客户
  273. </div>
  274. </div>
  275. <div class="pane-body" id="order-detail-list">
  276. <table class="block table table-default table-striped" style="margin-bottom: 0;">
  277. <tr class="header" style="height: 40px;">
  278. <th width="90">UU</th>
  279. <th width="120">企业名称</th>
  280. <th width="80">简称</th>
  281. </tr>
  282. <tr ng-repeat="distribute in distributes">
  283. <td ng-bind="distribute.myEnterprise.uu" class="text-center"></td>
  284. <td ng-bind="distribute.myEnterprise.enName" class="text-center"></td>
  285. <td ng-bind="distribute.myEnterprise.enShortname" class="text-center"></td>
  286. </tr>
  287. </table>
  288. </div>
  289. </div>
  290. <script type="text/ng-template" id="updatePassword.html">
  291. <div class="modal-header">
  292. <h3 class="modal-title"><i class="fa fa-lock fa-fw"></i>修改密码</h3>
  293. </div>
  294. <form class="password" name="sampleSendForm" ng-submit="ok()">
  295. <div class="modal-body">
  296. <div class="row" style="margin-top: 10px;">
  297. <label class="col-md-4 col-sm-4 col text-left">用户:</label>
  298. <div class="col-md-4 col-sm-4 col">{{::user.userUU}} - {{::user.userName}} </div>
  299. </div>
  300. <div class="row line form-group" ng-class="{'has-success': checkSuccess, 'has-error': checkFailed}">
  301. <label class="col-md-4 col-sm-4 col text-left">原密码:</label>
  302. <div class="col-md-4 col-sm-4 col"><input ng-model="user.password" class="form-control input-sm" type="password" ng-blur="checkPassword(user.password)" required placeholder="当前密码"></div>
  303. <div class="col-md-4 col-sm-4 col">
  304. <span ng-show="checking">验证密码...</span>
  305. <i ng-show="checkSuccess" class="fa fa-check" style="color:#339933"></i>
  306. <i ng-show="checkFailed" class="fa fa-close" style="color:#CC3333;"></i>
  307. </div>
  308. </div>
  309. <div class="row">
  310. <label class="col-md-4 col-sm-4 col text-left">新密码:</label>
  311. <div class="col-md-4 col-sm-4 col">
  312. <input ng-model="user.newPassword" ng-pattern="/^([\w~!@#$%^&\*\(\)-_\+=,.;\[\]{}\<\>]){6,20}$/" class="form-control input-sm" type="password" required placeholder="6~20位字母、数字、符号">
  313. <!-- <div>密码复杂度</div> -->
  314. </div>
  315. <div class="col-md-4 col-sm-4 col">
  316. </div>
  317. </div>
  318. <div class="row line form-group" ng-class="{'has-success': user.newPassword1 && (user.newPassword1==user.newPassword)}">
  319. <label ng-model="user.newPassword1" class="col-md-4 col-sm-4 col text-left">重复新密码:</label>
  320. <div class="col-md-4 col-sm-4 col">
  321. <input ng-pattern="/^[\S]{6,}$/" ng-model="user.newPassword1" class="form-control input-sm" type="password" required placeholder="重复新密码">
  322. </div>
  323. </div>
  324. </div>
  325. <div class="modal-footer">
  326. <button class="btn btn-primary" ng-disabled="!checkSuccess" type="submit">确认</button>
  327. <button class="btn btn-warning" ng-click="cancel()" type="button">取消</button>
  328. </div>
  329. </form>
  330. </script>
  331. <div class="pane base-info">
  332. <div class="title-div" style="border-bottom: 1px dashed #327ebe;">
  333. <span class="f14">企业人员信息</span>
  334. <div class="pull-right" ng-show="user.sys">
  335. <a title="新增用户默认密码为111111" ng-show="adding == true" class="btn btn-success btn-sm" ng-disabled="newUserForm.$invalid || submit" ng-click="addUser(newUser)" class="text-simple" style="color: #fff;">
  336. <i class="fa fa-user-plus fa-fw"></i>
  337. 确定添加
  338. </a>
  339. <a ng-click="adding = false" ng-show="adding == true" class="text-simple">
  340. <i class="fa fa-user-plus fa-fw"></i>
  341. 取消
  342. </a>
  343. <!-- 添加用户 start -->
  344. <div class="row-operator2">
  345. <a ng-show="adding != true" class="text-simple operator-trigger" href="javascript:void(0);">
  346. <i class="fa fa-user-plus fa-fw"></i>
  347. 添加用户
  348. </a>
  349. <ul ng-show="adding != true" class="list-unstyle list-inline operator-menu2">
  350. <li><a ng-click="adding = true">添加未注册用户</a></li>
  351. <li><a ng-click="addExistUser()">添加已注册用户</a></li>
  352. </ul>
  353. </div>
  354. <!-- 添加用户 end -->
  355. </div>
  356. </div>
  357. <div class="pane-body" id="order-detail-list">
  358. <form name="newUserForm">
  359. <table class="block table table-default table-striped" ng-table="tableParams">
  360. <div class="search col-xs-6" style="float: right;">
  361. <div class="form-group form-group-sm has-feedback">
  362. <input type="search" class="form-control input-sm" ng-model="keyword"
  363. ng-search="onSearch(keyword)" placeholder="输入人员姓名、电话号码、邮箱或UU号进行搜索" style="width: 100%"/>
  364. <a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
  365. </div>
  366. </div>
  367. <thead>
  368. <tr class="header">
  369. <th width="90">UU</th>
  370. <th width="120">姓名</th>
  371. <th width="80">性别</th>
  372. <!--<th width="170">身份证号</th>-->
  373. <th width="170">电话</th>
  374. <th width="150">邮箱</th>
  375. <th width="100">客户分配</th>
  376. <th width="120">角色</th>
  377. <th>&nbsp;</th>
  378. </tr>
  379. </thead>
  380. <tbody>
  381. <tr ng-show="adding">
  382. <td class="text-center">
  383. <div style="line-height: 30px;">系统生成</div>
  384. </td>
  385. <td class="text-center"><input ng-model="newUser.userName"
  386. class="form-control input-sm" required type="text"
  387. placeholder="用户名"></td>
  388. <td class="text-center"><select ng-model="newUser.userSex"
  389. class="form-control input-sm" ng-init="newUser.userSex='M'" style="width: 80px;">
  390. <option value="F">女</option>
  391. <option value="M">男</option>
  392. </select>
  393. </td>
  394. <!--<td class="text-center"><input ng-model="newUser.userIdcode"
  395. class="form-control input-sm" type="text" placeholder="身份证号">
  396. </td>-->
  397. <td class="text-center"
  398. ng-class="{'has-error': userTelError, 'has-success': userTelSuccess}">
  399. <input ng-model="newUser.userTel"
  400. ng-blur="telValid(newUser.userTel)" required name="newUserTel"
  401. class="form-control input-sm" ng-pattern="/^1[3|4|5|7|8]\d{9}$/" type="text" placeholder="手机号">
  402. </td>
  403. <td class="text-center"
  404. ng-class="{'has-error': userEmailError, 'has-success': userEmailSuccess}">
  405. <input ng-model="newUser.userEmail" ng-pattern="/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"
  406. ng-blur="emailValid(newUser.userEmail)" required
  407. name="newUserEmail" class="form-control input-sm" type="text"
  408. placeholder="邮箱">
  409. </td>
  410. <td colspan="2"></td>
  411. </tr>
  412. </tbody>
  413. <tbody>
  414. <tr ng-repeat="u in $data">
  415. <td class="text-center" ng-bind="::u.userUU"></td>
  416. <td class="text-center" ng-bind="::u.userName"></td>
  417. <td class="text-center" ng-bind="::u.userSex == 'F' ? '女' : '男'"></td>
  418. <!--<td class="text-center" ng-bind="::u.userIdcode"></td>-->
  419. <td class="text-center" ng-bind="::u.userTel"></td>
  420. <td class="text-center" ng-bind="::u.userEmail"></td>
  421. <td class="text-center row-operator2">
  422. <a class="operator-trigger" href="javascript:void(0);" ng-click="addVendor(u,user.sys)" style="color: green;"><i class="fa fa-plus-circle fa-lg"></i></a>
  423. <!-- <ul class="list-unstyle list-inline operator-menu3" ng-show="user.sys">
  424. <li><a ng-click="addVendor(u,true)"><i class="fa fa-fw fa-pencil-square-o"></i>添加</a></li>
  425. <li><a ng-click="removeVendor(u)" ng-if="u.userUU != user.userUU"><i class="fa fa-fw fa-trash-o"></i>删除</a></li>
  426. </ul>-->
  427. </td>
  428. <td class="user-role">
  429. <div class="role-item" ng-repeat="role in u.roles"
  430. title="{{role.desc}}">
  431. <span class="icon"
  432. ng-class="{'info':role.issys == 1,'danger':role.isdefault == 0}"
  433. ng-bind="::role.desc | firstchar"></span>
  434. </div>
  435. </td>
  436. <!-- 系统管理员无法被编辑限制,因为用户反馈注册用户都是业务员,需要权限来保护隐私,所以拿掉这个限制 -->
  437. <!-- ng-show="user.sys && enterprise.enAdminuu != u.userUU" -->
  438. <td class="row-operator" ng-show="isManager">
  439. <a class="operator-trigger" href="javascript:void(0);"><i class="fa fa-pencil fa-lg" ng-show="(user.sys && enterprise.enAdminuu != u.userUU) || $data.length == 1"></i></a>
  440. <ul class="list-unstyle list-inline operator-menu" ng-show="(user.sys && enterprise.enAdminuu != u.userUU) || $data.length == 1">
  441. <li><a ng-click="editUserRole(u)"><i class="fa fa-fw fa-pencil-square-o" style="color: #fff"></i>编辑</a></li>
  442. <li><a ng-click="removeUser(u)" ng-if="u.userUU != user.userUU"><i class="fa fa-fw fa-trash-o" style="color: #fff"></i>删除</a></li>
  443. </ul>
  444. </td>
  445. </tr>
  446. </tbody>
  447. </table>
  448. </form>
  449. </div>
  450. </div>