index.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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 width="180">注册时间</th>
  97. <th>详细</th>
  98. <th>升级</th>
  99. </tr>
  100. </thead>
  101. <tbody>
  102. <% userList.forEach(function (user){ %>
  103. <tr>
  104. <td><%= user.mobile %> / <%= user.email %></td>
  105. <td><%= user.real_name %></td>
  106. <td><a tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="更多信息"
  107. data-content="企业类型:<%= model.companyType[user.company_type] %>,企业规模:<%= model.companyScale[user.company_scale] %>"><%= user.company %></a>
  108. </td>
  109. <td><%= model.province[user.province] %></td>
  110. <td><%= compilationMap[user.latest_used]?compilationMap[user.latest_used].name:""%></td>
  111. <td><%= user.latest_login?moment(user.latest_login).format('YYYY-MM-DD HH:mm:ss'):"" %></td>
  112. <td><%= moment(user.create_time).format('YYYY-MM-DD HH:mm:ss') %></td>
  113. <td><a role="button" data-toggle="modal" data-target="#view" onclick='getUserInfo("<%= user._id.toString()%>")'>详细</a></td>
  114. <td><a href="#update" data-toggle="modal" data-target="#update" onclick='getUserUpgradeInfo("<%= user._id.toString()%>")'>升级</a></td>
  115. </tr>
  116. <% }) %>
  117. </tbody>
  118. </table>
  119. <nav aria-label="Page navigation">
  120. <%include ../layout/page.html %>
  121. </nav>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- 弹窗查看用户详情-->
  126. <div class="modal fade" id="view" tabindex="-1" role="dialog">
  127. <div class="modal-dialog" role="document">
  128. <div class="modal-content">
  129. <div class="modal-header">
  130. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  131. <h4 class="modal-title" >用户信息</h4>
  132. </div>
  133. <div class="modal-body">
  134. <table class="table table-bordered">
  135. <tbody id="userInfoTable">
  136. </tbody>
  137. </table>
  138. </div>
  139. <div class="modal-footer">
  140. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <!-- 用户升级弹窗-->
  146. <div class="modal fade" id="update" tabindex="-1" role="dialog">
  147. <div class="modal-dialog" role="document">
  148. <div class="modal-content">
  149. <div class="modal-header">
  150. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  151. <h4 class="modal-title" >产品升级</h4>
  152. </div>
  153. <div class="modal-body">
  154. <table class="table table-bordered">
  155. <tbody id="upgrade_table">
  156. </tbody>
  157. </table>
  158. </div>
  159. <div class="modal-footer">
  160. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <script type="text/javascript">
  166. let compilationList = JSON.parse('<%- compilationString %>');
  167. let adminName = '<%- adminName %>';
  168. </script>
  169. <script type="text/javascript" src="/web/users/js/user.js"></script>