pools.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <include file="public@header"/>
  2. </head>
  3. <style>
  4. .form-inline .form-control {
  5. margin: 10px 0;
  6. vertical-align: middle;
  7. }
  8. .form-inline span {
  9. margin-left: 5px;
  10. vertical-align: middle;
  11. }
  12. .margin-left-10 {
  13. margin-left: 10px;
  14. }
  15. .profile em {
  16. font-style: normal;
  17. color: #0b6cbc;
  18. }
  19. .profile em.red {
  20. color: red;
  21. }
  22. span.sort {
  23. color: red;
  24. display: inline-block;
  25. margin-left: 2px;
  26. vertical-align: middle;
  27. }
  28. td .info {
  29. display: flex;
  30. }
  31. td .info a {
  32. position: relative;
  33. display: inline-block;
  34. width: 30px;
  35. height: 30px;
  36. }
  37. td .info span {
  38. vertical-align: top;
  39. padding: 0px 4px;
  40. }
  41. td img.avatar, td img.sex {
  42. width: 30px;
  43. height: 30px;
  44. vertical-align: middle;
  45. border-radius: 100%;
  46. }
  47. td img.sex {
  48. position: absolute;
  49. z-index: 2;
  50. width: 12px;
  51. height: 12px;
  52. left: 0;
  53. right: 0;
  54. bottom: 0;
  55. margin: 0 auto;
  56. }
  57. .form .form-control {
  58. margin-bottom: 20px;
  59. }
  60. .form .control-label {
  61. text-align: center;
  62. }
  63. .form label {
  64. text-align: left;
  65. margin-bottom: 10px;
  66. margin-right: 10px;
  67. }
  68. .radio-inline+.radio-inline, .checkbox-inline+.checkbox-inline {
  69. margin-left: 0;
  70. }
  71. .table-actions span {
  72. margin-right: 10px;
  73. font-weight: bold;
  74. }
  75. .table-actions span em {
  76. font-style: normal;
  77. color: red;
  78. }
  79. .layui-layer-page .layui-layer-content {
  80. overflow: hidden !important;
  81. }
  82. span.expired {
  83. color: red;
  84. }
  85. .js-bootstrap-date {
  86. line-height: 22px !important;
  87. }
  88. </style>
  89. <body>
  90. <div class="wrap js-check-wrap">
  91. <ul class="nav nav-tabs">
  92. <li class="active"><a>标签分类资源</a>
  93. </li>
  94. </ul>
  95. <form id="search" class="well form-inline margin-top-20" method="post" action="{:url('admin/medias/pools')}">
  96. <span>会员ID:</span>
  97. <input class="form-control" type="text" name="uid" style="width: 150px;" value="{:input('request.uid')}"
  98. placeholder="会员ID">
  99. <span>用户昵称:</span>
  100. <input class="form-control" type="text" name="user_nickname" style="width: 200px;"
  101. value="{:input('request.user_nickname')}" placeholder="用户昵称"><br>
  102. <span>用户姓名:</span>
  103. <input class="form-control" type="text" name="real_name" style="width: 200px;"
  104. value="{:input('request.real_name')}" placeholder="用户姓名">
  105. <span>手机号:</span>
  106. <input class="form-control" type="text" name="mobile" style="width: 200px;" value="{:input('request.mobile')}"
  107. placeholder="手机号">
  108. <input id="sort" type="hidden" name="sort" value="{$params.sort?$params.sort: 1}">
  109. <input id="sortType" type="hidden" name="sort_type" value="{$params.sort_type?$params.sort_type: 'desc'}">
  110. <input type="submit" class="btn btn-primary margin-left-10 " value="搜索"/>
  111. <a class="btn btn-default margin-left-10" href="{:url('admin/medias/pools')}">清空</a>
  112. </form>
  113. <form class="form-horizontal js-ajax-form margin-top-20" role="form">
  114. <div class="table-actions tags">
  115. <a href="{:url('admin/medias/pools',['intention'=> -1])}" <if condition="$params.intention eq -1">class="btn btn-primary margin-left-10"<else>class="btn btn-default margin-left-10"</if>>全部({$total})</a>
  116. <foreach name="tagCounts" item="vo" key="k">
  117. <a href="{:url('admin/medias/pools',['intention'=> $k])}" <if condition="$k eq $params.intention">class="btn btn-primary margin-left-10"<else>class="btn btn-default margin-left-10"</if>>{$vo.name}({$vo.num})</a>
  118. </foreach>
  119. </div>
  120. <table class="table table-hover table-bordered">
  121. <thead>
  122. <tr>
  123. <th>ID</th>
  124. <th width="120">用户名</th>
  125. <th>基本资料</th>
  126. <th>姓名</th>
  127. <th>手机号</th>
  128. <th width="80">注册情况</th>
  129. <th width="80">关注情况</th>
  130. <th width="100">VIP会员</th>
  131. <th width="100">充值过</th>
  132. <th width="100">消费过</th>
  133. <th width="100">媒体推广账号</th>
  134. <th width="100">跟进</th>
  135. <th width="100">意向标签</th>
  136. <th width="80">已注销</th>
  137. <th width="180">注册时间 <span class="row sort join-time" data-status="{$params.sort == 4? $params.sort_type : 'desc'}" onclick="sort(this,4)"><if condition="$params.sort eq 4 && $params.sort_type eq 'asc'">&#8595;<else>&#8593;</if></span></th>
  138. <th width="180">加入时间 <span class="row sort join-time" data-status="{$params.sort == 1? $params.sort_type : 'desc'}" onclick="sort(this,1)"><if condition="$params.sort eq 1 && $params.sort_type eq 'asc'">&#8595;<else>&#8593;</if></span></th>
  139. <th width="150">最后登录<span class="row sort last-time" data-status="{$params.sort == 2? $params.sort_type : 'desc'}" onclick="sort(this,5)"><if condition="$params.sort eq 5 && $params.sort_type eq 'asc'">&#8595;<else>&#8593;</if></span></th>
  140. <th width="140">坠海时间 <span class="row sort pool-time" data-status="{$params.sort == 2? $params.sort_type : 'desc'}" onclick="sort(this,2)"><if condition="$params.sort eq 2 && $params.sort_type eq 'asc'">&#8595;<else>&#8593;</if></span></th>
  141. <th width="150">最后联系<span class="row sort last-time" data-status="{$params.sort == 3? $params.sort_type : 'desc'}" onclick="sort(this,3)"><if condition="$params.sort eq 3 && $params.sort_type eq 'asc'">&#8595;<else>&#8593;</if></span></th>
  142. <th width="120">跟进备注</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <foreach name="list" item="vo">
  147. <tr>
  148. <td>{$vo.user_id}</td>
  149. <td>
  150. <div class="info">
  151. <a href="{:url('admin/medias/info',['id'=> $vo.user_id])}"><img class="avatar" src="{$vo.avatar}"> <if condition="$vo['sex'] eq 1"><img class="sex" src="/static/images/male.png" alt=""><else><img class="sex" src="/static/images/fmale.png" alt=""></if></a><span>{$vo['user_nickname']}</span>
  152. </div>
  153. </td>
  154. <td>
  155. <p class="profile">{$vo.profile_text}</p>
  156. </td>
  157. <td>{$vo['real_name']}</td>
  158. <td><span <if condition="$vo.is_expired">class="expired"</if>>{$vo['mobile']? $vo['mobile']:'无'}</span></td>
  159. <td>
  160. <if condition="$vo['is_reg_profile'] eq 1">
  161. <span style="color: green;">已注册</span>
  162. <else>
  163. <span style="color: red;">未注册</span>
  164. </if>
  165. </td>
  166. <td>
  167. <if condition="$vo['is_follow'] eq 1">
  168. <span style="color: green;">已关注</span>
  169. <else>
  170. <span style="color: red;">未关注</span>
  171. </if>
  172. </td>
  173. <td>
  174. <if condition="$vo['is_vip'] eq 1">
  175. <span style="color: green;">是</span>
  176. <else>
  177. <span style="color: red;">否</span>
  178. </if>
  179. </td>
  180. <td>
  181. <if condition="$vo['is_recharge'] eq 1">
  182. <span style="color: green;">是</span>
  183. <else>
  184. <span style="color: red;">否</span>
  185. </if>
  186. </td>
  187. <td>
  188. <if condition="$vo['is_cost'] eq 1">
  189. <span style="color: green;">是</span>
  190. <else>
  191. <span style="color: red;">否</span>
  192. </if>
  193. </td>
  194. <td>
  195. <if condition="$vo.parent_id">
  196. <span style="color: #0B90C4;">{$vo['parent_name']}(ID:{$vo['parent_id']})</span>
  197. </if>
  198. </td>
  199. <td><span id="follow-num{$vo.pool_id}">{$vo['followup_num']}</span></td>
  200. <td>
  201. <span id="tag-row{$vo.pool_id}">{$vo.intention_text? $vo.intention_text: '-'}</span>
  202. </td>
  203. <td>
  204. <if condition="$vo['user_status'] eq -1">
  205. <span style="color: green;">是</span>
  206. <else>
  207. <span style="color: red;">否</span>
  208. </if>
  209. </td>
  210. <td>{$vo['reg_time']}</td>
  211. <td>{$vo['create_time']}</td>
  212. <td>{$vo['last_login_time']}</td>
  213. <td><span <if condition="$vo.is_expired">class="expired"</if>>{$vo['expire_text']}</span></td>
  214. <td><span id="follow-time{$vo.pool_id}">{$vo['last_follow_time']? $vo['last_follow_time'] : '-'}</span></td>
  215. <td><a data-remark="{$vo.remark}" onclick="showRemark(this,'{$vo.real_name}')">查看</a></td>
  216. </foreach>
  217. </tbody>
  218. </table>
  219. <div class="pagination">{$page}</div>
  220. </form>
  221. </div>
  222. <script src="__STATIC__/js/admin.js"></script>
  223. <script src="__STATIC__/js/clipboard.min.js"></script>
  224. <script src="__STATIC__/js/layer/layer.js"></script>
  225. <script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
  226. <script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
  227. <script>
  228. /**
  229. * 排序
  230. * @param type
  231. */
  232. function sort(ele,type){
  233. $("#sort").val(type);
  234. var status = $(ele).attr('data-status');
  235. $("#sortType").val(status=='desc'? 'asc': 'desc');
  236. $(ele).html(status == 'desc'? '&#8595;' : '&#8593;');
  237. $(ele).attr('data-status', status=='desc'? 'asc': 'desc');
  238. $("#search").submit();
  239. }
  240. /**
  241. * 设置跟进情况
  242. * @returns {boolean}
  243. */
  244. function setTag(pool_id,real_name){
  245. layer.open({
  246. type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
  247. title: '设置[ID:'+pool_id+'-'+real_name+']用户跟进情况',
  248. shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
  249. shade: 0.8, //遮罩
  250. offset: 'auto',
  251. scrollbar: false,
  252. area: ['800px', '600px'],
  253. content: "{:url('admin/sales/set')}?id="+pool_id,
  254. btnAlign: 'c',
  255. });
  256. return false;
  257. }
  258. /**
  259. * 设置跟进情况
  260. * @returns {boolean}
  261. */
  262. function showRemark(eve, realname){
  263. let remark = $(eve).attr('data-remark');
  264. if(!remark){
  265. layer.msg('暂无跟进备注');
  266. return false;
  267. }
  268. layer.open({
  269. type: 1, //1:页面层,2:iframe层,3:加载层,4:tips层。
  270. title: '查看['+realname+']用户跟进情况',
  271. shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
  272. shade: 0.8, //遮罩
  273. offset: 'auto',
  274. scrollbar: false,
  275. area: ['800px', '600px'],
  276. content: "<div class='remark' style='height: 100%;'><textarea disabled style='border: none;\n" +
  277. " width: 100%;\n" +
  278. " height: 100%;padding: 15px;' cols='30' rows='10'>"+remark+"</textarea></div>",
  279. btnAlign: 'c',
  280. });
  281. return false;
  282. }
  283. /**
  284. * 清除
  285. * @returns {boolean}
  286. */
  287. function doDelete() {
  288. var ids = [];
  289. $(".js-check:checked").each(function () {
  290. var id = $(this).val();
  291. if (id > 0) {
  292. ids.push(id);
  293. }
  294. });
  295. if (ids.length <= 0) {
  296. layer.msg('请先选择操作项');
  297. return false;
  298. }
  299. if (confirm('确定批量清除选择项?不可恢复')) {
  300. $.post('/admin/pools/clear', {ids: ids}, function (res) {
  301. if (res.code == 1) {
  302. layer.msg(res.msg);
  303. setTimeout(function () {
  304. location.reload();
  305. }, 800)
  306. } else {
  307. layer.msg(res.msg);
  308. }
  309. }, "json")
  310. }
  311. }
  312. </script>
  313. </body>
  314. </html>