index.html 8.4 KB

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