index.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <div class="panel-content">
  2. <div class="panel-title fluid">
  3. <div class="title-main">
  4. <% for (let menu of userMenu) { %>
  5. <% if (menu.title === secondMenu[action].title) { %>
  6. <%= menu.title %>
  7. <% } else { %>
  8. <a href="<%= menu.url %>" class="btn btn-primary btn-link" style="margin-left: 0;margin-right: 12px"><%= menu.title %></a>
  9. <% } %>
  10. <% } %>
  11. <!--<h2><%= secondMenu[action].title %><a href="/user/testUser" class="btn btn-primary btn-link">测试用户</a></h2>-->
  12. </div>
  13. </div>
  14. <div class="content-wrap">
  15. <div class="c-header">
  16. <form class="form-inline" method="get" action="">
  17. <!--最近使用定额-->
  18. <div class="btn-group">
  19. <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown"
  20. aria-haspopup="true" aria-expanded="false">
  21. 最近使用费用定额:<lable><%= compilationMap[filter.latestUsed] === undefined ? '所有' : compilationMap[filter.latestUsed].name %></lable> <span class="caret"></span>
  22. </button>
  23. <ul class="dropdown-menu selector">
  24. <li><a data-value="">所有</a></li>
  25. <% for(let compilation of compilationList){ %>
  26. <li><a data-value="<%= compilation._id.toString()%>"><%= compilation.name %></a></li>
  27. <% } %>
  28. </ul>
  29. <input type="hidden" name="latestUsed" value="<%= filter.latestUsed%>" />
  30. </div>
  31. <!--已升级费用定额-->
  32. <div class="btn-group">
  33. <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown"
  34. aria-haspopup="true" aria-expanded="false">
  35. 已升级费用定额:<lable><%= compilationMap[filter.upGrade] === undefined ? '所有' : compilationMap[filter.upGrade].name %></lable> <span class="caret"></span>
  36. </button>
  37. <ul class="dropdown-menu selector">
  38. <li><a data-value="">所有</a></li>
  39. <% for(let compilation of compilationList){ %>
  40. <li><a data-value="<%= compilation._id.toString()%>"><%= compilation.name %></a></li>
  41. <% } %>
  42. </ul>
  43. <input type="hidden" name="upGrade" value="<%= filter.upGrade%>" />
  44. </div>
  45. <!--最新注册-->
  46. <div class="btn-group">
  47. <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown"
  48. aria-haspopup="true" aria-expanded="false">
  49. 最新注册:<lable><%= filter.regtimeMsg === undefined ? '所有' : filter.regtimeMsg %></lable><span class="caret"></span>
  50. </button>
  51. <ul class="dropdown-menu selector">
  52. <li><a data-value="0">所有</a></li>
  53. <li><a data-value="1">最近24小时</a></li>
  54. <li><a data-value="2">最近3天</a></li>
  55. <li><a data-value="3">最近7天</a></li>
  56. <li><a data-value="4">最近30天</a></li>
  57. </ul>
  58. <input type="hidden" name="regtime" value="<%= filter.regtime%>" />
  59. </div>
  60. <!--最近登录-->
  61. <div class="btn-group">
  62. <button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown"
  63. aria-haspopup="true" aria-expanded="false">
  64. 最近登录:<lable><%= filter.loginMsg === undefined ? '所有' : filter.loginMsg %></lable><span class="caret"></span>
  65. </button>
  66. <ul class="dropdown-menu selector">
  67. <li><a data-value="0">所有</a></li>
  68. <li><a data-value="1">最近24小时</a></li>
  69. <li><a data-value="2">最近3天</a></li>
  70. <li><a data-value="3">最近7天</a></li>
  71. <li><a data-value="4">最近30天</a></li>
  72. </ul>
  73. <input type="hidden" name="loginTime" value="<%= filter.loginTime%>" />
  74. </div>
  75. <!--结果-->
  76. <div class="btn-group">
  77. &nbsp;共 <%= total %> 条结果
  78. </div>
  79. <!--搜索-->
  80. <div class="btn-group pull-right">
  81. <div class="input-group">
  82. <input type="text" name="keyword" class="form-control input-sm" value="<%= filter.keyword === undefined ? '' : filter.keyword %>" placeholder="手机/邮箱/姓名/公司">
  83. <span class="input-group-btn">
  84. <button class="btn btn-default btn-sm" type="submit">
  85. <i class="glyphicon glyphicon-search"></i>
  86. </button>
  87. </span>
  88. </div>
  89. </div>
  90. </form>
  91. </div>
  92. <div class="c-body">
  93. <table class="table">
  94. <thead>
  95. <tr>
  96. <th width="350">注册手机/邮箱</th>
  97. <th>姓名</th>
  98. <th>企业名称</th>
  99. <th>企业地区</th>
  100. <th>最近使用版本</th>
  101. <th width="180">注册时间 / 最近登录</th>
  102. <!--<th>详细</th>-->
  103. </tr>
  104. </thead>
  105. <tbody>
  106. <% userList.forEach(function (user){ %>
  107. <tr>
  108. <td><%= user.mobile %><br><%= user.email %></td>
  109. <td><%= user.real_name %></td>
  110. <td><%= user.company %></td>
  111. <td><%= model.province[user.province] %></td>
  112. <td><%= compilationMap[user.latest_used]?compilationMap[user.latest_used].name:""%></td>
  113. <td><%= moment(user.create_time).format('YYYY-MM-DD HH:mm:ss') %><br><%= user.latest_login?moment(user.latest_login).format('YYYY-MM-DD HH:mm:ss'):"" %></td>
  114. <!--<td><a role="button" data-toggle="modal" data-target="#view" onclick='getUserInfo("<%= user._id.toString()%>")'>详细</a></td>-->
  115. <!--<td><a href="#update" data-toggle="modal" data-target="#update" onclick='getUserUpgradeInfo("<%= user._id.toString()%>")'>升级</a></td>-->
  116. </tr>
  117. <% }) %>
  118. </tbody>
  119. </table>
  120. <nav aria-label="Page navigation">
  121. <%include ../layout/page.html %>
  122. </nav>
  123. </div>
  124. </div>
  125. </div>
  126. <!-- 弹窗查看用户详情-->
  127. <div class="modal fade" id="view" tabindex="-1" role="dialog">
  128. <div class="modal-dialog" role="document">
  129. <div class="modal-content">
  130. <div class="modal-header">
  131. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  132. <h4 class="modal-title" >用户信息</h4>
  133. </div>
  134. <div class="modal-body">
  135. <table class="table table-bordered">
  136. <tbody id="userInfoTable">
  137. </tbody>
  138. </table>
  139. </div>
  140. <div class="modal-footer">
  141. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <!-- 用户升级弹窗-->
  147. <div class="modal fade" id="update" tabindex="-1" role="dialog">
  148. <div class="modal-dialog" role="document">
  149. <div class="modal-content">
  150. <div class="modal-header">
  151. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  152. <h4 class="modal-title" >产品升级</h4>
  153. </div>
  154. <div class="modal-body">
  155. <table class="table table-bordered">
  156. <tbody id="upgrade_table">
  157. </tbody>
  158. </table>
  159. </div>
  160. <div class="modal-footer">
  161. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <script type="text/javascript">
  167. let compilationList = JSON.parse('<%- compilationString %>');
  168. let adminName = '<%- adminName %>';
  169. </script>
  170. <script type="text/javascript" src="/web/users/js/user.js"></script>