selectUser.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('用户列表')" />
  5. <th:block th:include="include :: layout-latest-css" />
  6. <th:block th:include="include :: ztree-css" />
  7. </head>
  8. <body class="gray-bg">
  9. <div class="ui-layout-center">
  10. <div class="container-div">
  11. <div class="row">
  12. <div class="col-sm-12 search-collapse">
  13. <form id="user-form">
  14. <input type="hidden" id="deptId" name="deptId">
  15. <input type="hidden" id="parentId" name="parentId">
  16. <div class="select-list">
  17. <ul>
  18. <li>
  19. 登录名称:<input type="text" name="loginName"/>
  20. </li>
  21. <li>
  22. 用户名称:<input type="text" name="userName"/>
  23. </li>
  24. <li>
  25. 手机号码:<input type="text" name="phonenumber"/>
  26. </li>
  27. <li>
  28. 组织名称:<input type="text" name="sysUserExt.orgName"/>
  29. </li>
  30. <li>
  31. 用户状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
  32. <option value="">所有</option>
  33. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  34. </select>
  35. </li>
  36. <li>
  37. 用户级别:<select name="sysUserExt.salesLevel" th:with="type=${@dict.getType('sales_level')}">
  38. <option value="">所有</option>
  39. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  40. </select>
  41. </li>
  42. <li class="select-time">
  43. <label>创建时间: </label>
  44. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  45. <span>-</span>
  46. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
  47. </li>
  48. <li>
  49. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  50. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  51. </li>
  52. </ul>
  53. </div>
  54. </form>
  55. </div>
  56. <div class="col-sm-12 select-table table-striped">
  57. <table id="bootstrap-table"></table>
  58. </div>
  59. <input id="selectUserId" type="hidden">
  60. </div>
  61. </div>
  62. </div>
  63. <th:block th:include="include :: footer" />
  64. <th:block th:include="include :: layout-latest-js" />
  65. <th:block th:include="include :: ztree-js" />
  66. <script th:inline="javascript">
  67. var salesLevelDict = [[${@dict.getType('sales_level')}]];//销售人员等级
  68. var datas = [[${@dict.getType('sys_yes_no')}]];
  69. var prefix = ctx + "system/user";
  70. $(function() {
  71. queryUserList();
  72. });
  73. function queryUserList() {
  74. var options = {
  75. url: prefix + "/list",
  76. sortName: "createTime",
  77. sortOrder: "desc",
  78. modalName: "用户",
  79. clickToSelect: true,
  80. singleSelect:true,
  81. onClickRow:function (row,$element) {
  82. $("#selectUserId").val(row.userId);
  83. $('.info').removeClass('info');
  84. $($element).addClass('info')
  85. },
  86. columns: [{
  87. checkbox: false
  88. },
  89. {
  90. field: 'userId',
  91. visible:false,
  92. },
  93. {
  94. field: 'loginName',
  95. title: '登录名称',
  96. sortable: true
  97. },
  98. {
  99. field: 'userName',
  100. title: '用户名称'
  101. },
  102. {
  103. field: 'dept.deptName',
  104. title: '部门'
  105. },
  106. {
  107. field: 'email',
  108. title: '邮箱',
  109. visible: false
  110. },
  111. /* {
  112. field: 'phonenumber',
  113. title: '手机'
  114. },*/
  115. {
  116. field: 'quit',
  117. width: 90,
  118. title: '是否离职',
  119. align: 'center',
  120. formatter: function(value, row, index) {
  121. if (value==2){
  122. return '是';
  123. }else{
  124. return '否';
  125. }
  126. }
  127. },
  128. {
  129. field: 'sysUserExt.salesLevel',
  130. title: '销售人员等级',
  131. formatter: function(value, row, index) {
  132. return $.table.selectDictLabel(salesLevelDict, value);
  133. }
  134. },
  135. {
  136. field: 'sysUserExt.orgName',
  137. title: '组织名称'
  138. },
  139. {
  140. field: 'sysUserExt.orgCode',
  141. title: '组织code'
  142. },
  143. {
  144. field: 'sysUserExt.isCustomerManager',
  145. title: '是否是负责人',
  146. formatter: function(value, row, index) {
  147. if (value==1){
  148. return "是";
  149. } else if (value==0){
  150. return "否";
  151. } else {
  152. return "-";
  153. }
  154. }
  155. }]
  156. };
  157. $.table.init(options);
  158. }
  159. </script>
  160. </body>
  161. </html>