No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

users_index.htm 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. {include file="member/left" /}
  6. <div class="page min-hg-c-10" style="min-width:auto;margin-left:100px;">
  7. <div class="flexigrid flexigrid-xin member_lt">
  8. <div class="mDiv pt0">
  9. <div class="ftitle">
  10. {eq name="'Member@users_batch_add'|is_check_access" value="1"}
  11. <div class="fbutton">
  12. <a href="javascript:void(0);" data-href="{:url('Member/users_batch_add')}" onclick="openFullframe(this, '新增会员','60%','80%');">
  13. <div class="add" title="新增会员">
  14. <span><i class="layui-icon layui-icon-addition"></i>新增会员</span>
  15. </div>
  16. </a>
  17. </div>
  18. {/eq}
  19. </div>
  20. </div>
  21. <div class="header-bar mb20">
  22. <div class="more">
  23. <div class="search">
  24. <div class="content">
  25. <form id="postForm" action="{:url('Member/users_index')}" method="get" onsubmit="layer_loading('正在处理');" style="display: unset;">
  26. {$searchform.hidden|default=''}
  27. <div class="ey-form-item"><label class="users-form-item-label">关键词:</label>
  28. <div class="users-form-item-content">
  29. <div class="users-select">
  30. <div tabindex="0" class="users-select-selection">
  31. <div class="sDiv2">
  32. <input type="text" size="50" name="keywords" value="{$Request.param.keywords}" class="qsbox w220" placeholder="会员名/昵称/手机号/邮箱/会员ID">
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="ey-form-item">
  39. <label class="users-form-item-label">会员来源:</label>
  40. <div class="users-form-item-content">
  41. <div class="users-select">
  42. <div tabindex="0" class="users-select-selection">
  43. <div>
  44. <select name="source">
  45. <option value="">全部</option>
  46. <option value="1" {eq name="$Request.param.source" value="1"}selected{/eq}>PC端</option>
  47. <option value="2" {eq name="$Request.param.source" value="2"}selected{/eq}>H5</option>
  48. <option value="3" {eq name="$Request.param.source" value="3"}selected{/eq}>微信公众号</option>
  49. <option value="4" {eq name="$Request.param.source" value="4"}selected{/eq}>微信小程序</option>
  50. <option value="5" {eq name="$Request.param.source" value="5"}selected{/eq}>百度小程序</option>
  51. <option value="6" {eq name="$Request.param.source" value="6"}selected{/eq}>抖音小程序</option>
  52. </select>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="ey-form-item"><label class="users-form-item-label">会员等级:</label>
  59. <div class="users-form-item-content">
  60. <div class="users-select">
  61. <div tabindex="0" class="users-select-selection">
  62. <div class="">
  63. <select name="level" id="level">
  64. <option value="" >全部</option>
  65. {foreach name="$level" item="vo" key="k" }
  66. <option value="{$vo.level_id}" {eq name="$Request.param.level" value="$vo.level_id"}selected{/eq}>{$vo.level_name}</option>
  67. {/foreach}
  68. </select>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="ey-form-item"><label class="users-form-item-label">注册时间:</label>
  75. <div class="users-form-item-content">
  76. <div class="users-select">
  77. <div tabindex="0" class="users-select-selection">
  78. <div class="sDiv2">
  79. <input type="text" name="add_time" id="eYLaydateTimeLinkage" data-max_date="{php}echo date('Y-m-d');{/php}" autocomplete="off" class="qsbox" placeholder="会员注册时间" lay-key="1" style="width: 220px;" value="{$Request.param.add_time}">
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="ey-form-item"><label class="users-form-item-label">黑名单:</label>
  86. <div class="users-form-item-content">
  87. <div class="users-select">
  88. <div tabindex="0" class="users-select-selection">
  89. <div class="">
  90. <select name="is_lock">
  91. <option value="">全部</option>
  92. <option value="-99" {eq name="$Request.param.is_lock" value="-99"}selected{/eq}>是</option>
  93. <option value="0" {eq name="$Request.param.is_lock" value="0"}selected{/eq}>否</option>
  94. </select>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </form>
  101. <div class="ey-form-item" style="margin-left: 20px;">
  102. <div class="users-form-item-content">
  103. <span class="bt-xin" onclick="OrderQuery();">查询</span>
  104. <span class="bt-xin-no" onclick="OrderQuery('reset');">重置</span>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="flexigrid">
  113. <div class="hDiv">
  114. <div class="hDivBox">
  115. <table cellspacing="0" cellpadding="0" style="width: 100%">
  116. <thead>
  117. <tr>
  118. <th class="sign w40" axis="col0">
  119. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  120. </th>
  121. <th abbr="article_title" axis="col3" class="w40">
  122. <div class="tc">ID</div>
  123. </th>
  124. <th abbr="article_title" axis="col3" class="w50">
  125. <div class="tc">头像</div>
  126. </th>
  127. <th abbr="ac_id" axis="col4">
  128. <div class="tl text-l10">昵称/绑定</div>
  129. </th>
  130. <th abbr="ac_id" axis="col4" class="w100">
  131. <div class="tc">级别</div>
  132. </th>
  133. <th abbr="ac_id" axis="col4" class="w60">
  134. <div class="tc">激活</div>
  135. </th>
  136. <th abbr="ac_id" axis="col4" class="w150">
  137. <div class="tc">注册日期</div>
  138. </th>
  139. <th axis="col1" class="w120">
  140. <div class="tc">操作</div>
  141. </th>
  142. </tr>
  143. </thead>
  144. </table>
  145. </div>
  146. </div>
  147. <div class="bDiv" style="height: auto;">
  148. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  149. <table style="width: 100%">
  150. <tbody>
  151. {empty name="list"}
  152. <div class="no-data">
  153. <div class="no_row">
  154. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  155. </div>
  156. </div>
  157. {else/}
  158. {foreach name="list" item="vo" key="k" }
  159. <tr>
  160. <td class="sign">
  161. <div class="w40 tc">
  162. <input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.users_id}">
  163. </div>
  164. </td>
  165. <td class="sort">
  166. <div class="w40 tc">{$vo.users_id}</div>
  167. </td>
  168. <td class="sign">
  169. <div class="w50 tc">
  170. <img id="img_head_pic" style="height: 40px;margin-right: 5px;float: unset;margin: auto;" src="{$vo.head_pic|get_head_pic=###,false,$vo['sex']}" />
  171. </div>
  172. </td>
  173. <td style="width: 100%">
  174. <div class="text-l10">
  175. <p style="margin-top: -5px;">
  176. {eq name="'Member@users_edit'|is_check_access" value="1"}
  177. <a href="{:url('Member/users_edit',array('id'=>$vo['users_id']))}">{$vo.nickname|default=$vo.username}</a>
  178. {else /}
  179. {$vo.nickname|default=$vo.username}
  180. {/eq}
  181. </p>
  182. <p class="binding">
  183. {if condition="$vo['is_mobile'] == 1 && !empty($vo['mobile'])"}
  184. <img src="__STATIC__/admin/images/r_phone.png">
  185. {/if}
  186. {if condition="in_array($vo['thirdparty'], [5]) || !empty($wxlogin[$vo['users_id']]['openid'])"}
  187. <img src="__STATIC__/admin/images/r_weixin.png">
  188. {/if}
  189. {if condition="in_array($vo['thirdparty'], [6])"}
  190. <img src="__STATIC__/admin/images/r_wechat.png">
  191. {/if}
  192. {if condition="!empty($qqlogin[$vo['users_id']])"}
  193. <img src="__STATIC__/admin/images/r_qq.png">
  194. {/if}
  195. {if condition="in_array($vo['thirdparty'], [4])"}
  196. <img src="__STATIC__/admin/images/r_wxapp.png">
  197. {/if}
  198. {if condition="!empty($wblogin[$vo['users_id']])"}
  199. <img src="__STATIC__/admin/images/r_wb.png">
  200. {/if}
  201. </p>
  202. </div>
  203. </td>
  204. <td>
  205. <div class="w100 tc">
  206. {$vo.level_name}
  207. </div>
  208. </td>
  209. <td class="">
  210. <div class="w60 tc">
  211. {eq name="$vo['is_activation']" value='1'}
  212. <span class="yes" {eq name="'Member@users_edit'|is_check_access" value="1"}onclick="changeIsActivation('users','users_id','{$vo.users_id}','is_activation',this);"{/eq} data-value="0"><i class="fa fa-check-circle"></i>是</span>
  213. {else /}
  214. <span class="no" {eq name="'Member@users_edit'|is_check_access" value="1"}onclick="changeIsActivation('users','users_id','{$vo.users_id}','is_activation',this);"{/eq} data-value="1"><i class="fa fa-ban"></i>否</span>
  215. {/eq}
  216. </div>
  217. </td>
  218. <td>
  219. <div class="w150 tc">
  220. {$vo.reg_time|MyDate='Y-m-d H:i:s',###}
  221. </div>
  222. </td>
  223. <td class="operation">
  224. <div class="w120 tc">
  225. {eq name="'Member@users_edit'|is_check_access" value="1"}
  226. <a href="{:url('Member/users_edit',array('id'=>$vo['users_id']))}" class="btn blue">编辑</a>
  227. {/eq}
  228. {eq name="'Member@users_del'|is_check_access" value="1"}
  229. <i></i>
  230. <a class="btn red" href="javascript:void(0);" data-url="{:url('Member/users_del')}" data-id="{$vo.users_id}" data-admin_id="{$vo.admin_id}" data-username="{$vo.username}" onclick="usersdel(this);">删除</a>
  231. {/eq}
  232. </div>
  233. </td>
  234. </tr>
  235. {/foreach}
  236. {/empty}
  237. </tbody>
  238. </table>
  239. </div>
  240. <div class="iDiv" style="display: none;"></div>
  241. </div>
  242. {notempty name="list"}
  243. <div class="footer-oper">
  244. {eq name="'Member@users_del'|is_check_access" value="1"}
  245. <span class="ml15">
  246. <input type="checkbox" autocomplete="off" class="checkAll">
  247. </span>
  248. <div class="nav-dropup">
  249. <a onclick="batch_del(this, 'ids');" data-url="{:url('Member/users_del')}" class="layui-btn layui-btn-primary">
  250. <div class="add">
  251. <span>批量删除</span>
  252. </div>
  253. </a>
  254. </div>
  255. {/eq}
  256. {include file="public/page" /}
  257. <div style="clear:both"></div>
  258. </div>
  259. {/notempty}
  260. </div>
  261. </div>
  262. <script>
  263. $(function(){
  264. $('input[name*=ids]').click(function(){
  265. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  266. $('.checkAll').prop('checked','checked');
  267. } else {
  268. $('.checkAll').prop('checked', false);
  269. }
  270. });
  271. $('input[type=checkbox].checkAll').click(function(){
  272. $('input[type=checkbox]').prop('checked',this.checked);
  273. });
  274. });
  275. $(document).ready(function(){
  276. // 表格行点击选中切换
  277. $('#flexigrid > table>tbody >tr').click(function(){
  278. $(this).toggleClass('trSelected');
  279. });
  280. // 点击刷新数据
  281. $('.fa-refresh').click(function(){
  282. location.href = location.href;
  283. });
  284. });
  285. // 删除
  286. function usersdel(obj){
  287. var admin_id = $(obj).data('admin_id');
  288. if (0 < admin_id) {
  289. var title = "系统管理员前台ID,删除不可恢复?<br/>包含该会员数据有(订单、投稿、问答、留言等)";
  290. } else {
  291. var title = "是否删除该会员?删除后不可找回。<br/>包含该会员数据有(订单、投稿、问答、留言等)";
  292. }
  293. layer.confirm(title, {
  294. shade: layer_shade,
  295. area: ['480px', '200px'],
  296. move: false,
  297. title: '提示',//$(obj).attr('data-username'),
  298. btnAlign:'r',
  299. closeBtn: 3,
  300. btn: ['确定','取消'], //按钮
  301. success: function () {
  302. $(".layui-layer-content").css('text-align', 'left');
  303. }
  304. }, function(){
  305. layer_loading('正在处理');
  306. // 确定
  307. $.ajax({
  308. type : 'post',
  309. url : $(obj).attr('data-url'),
  310. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  311. dataType : 'json',
  312. success : function(data){
  313. layer.closeAll();
  314. if(data.code == 1){
  315. layer.msg(data.msg, {icon: 1});
  316. window.location.reload();
  317. }else{
  318. layer.alert(data.msg, {icon: 2, title:false});
  319. }
  320. }
  321. })
  322. }, function(index){
  323. layer.close(index);
  324. });
  325. return false;
  326. }
  327. /**
  328. * 批量删除提交
  329. */
  330. function batch_del(obj, name) {
  331. var a = [];
  332. $('input[name^='+name+']').each(function(i,o){
  333. if($(o).is(':checked')){
  334. a.push($(o).val());
  335. }
  336. })
  337. if(a.length == 0){
  338. layer.alert('请至少选择一项', {
  339. shade: layer_shade,
  340. area: ['480px', '190px'],
  341. move: false,
  342. title: '提示',
  343. btnAlign:'r',
  344. closeBtn: 3,
  345. success: function () {
  346. $(".layui-layer-content").css('text-align', 'left');
  347. }
  348. });
  349. return;
  350. }
  351. // 删除按钮
  352. layer.confirm('确认批量彻底删除?<br/>包含该会员数据有(订单、投稿、问答、留言等)', {
  353. shade: layer_shade,
  354. area: ['480px', '190px'],
  355. move: false,
  356. title: '提示',
  357. btnAlign:'r',
  358. closeBtn: 3,
  359. btn: ['确定', '取消'] ,//按钮
  360. success: function () {
  361. $(".layui-layer-content").css('text-align', 'left');
  362. }
  363. }, function () {
  364. layer_loading('正在处理');
  365. $.ajax({
  366. type: "POST",
  367. url: $(obj).attr('data-url'),
  368. data: {del_id:a, _ajax:1},
  369. dataType: 'json',
  370. success: function (data) {
  371. layer.closeAll();
  372. if(data.code == 1){
  373. layer.msg(data.msg, {icon: 1});
  374. window.location.reload();
  375. }else{
  376. layer.alert(data.msg, {icon: 2, title:false});
  377. }
  378. },
  379. error:function(e){
  380. layer.closeAll();
  381. layer.alert(e.responseText, {icon: 2, title:false});
  382. }
  383. });
  384. }, function (index) {
  385. layer.closeAll(index);
  386. });
  387. }
  388. $(document).keydown(function(event){
  389. if(event.keyCode ==13){
  390. OrderQuery();
  391. }
  392. });
  393. // 订单查询
  394. function OrderQuery(isReset) {
  395. if (isReset && 'reset' == isReset) {
  396. window.location.href = "{:url('Member/users_index')}";
  397. } else {
  398. $('#postForm').submit();
  399. }
  400. }
  401. function changeIsActivation(table,id_name,id_value,field,obj) {
  402. var is_activation = $(obj).data('value');
  403. console.log(is_activation)
  404. var title = '';
  405. if (0 == is_activation) {
  406. title = '确认关闭激活吗?关闭后前台该会员将无法登录!';
  407. } else if (1 == is_activation) {
  408. title = '确认激活吗?激活后会员将可以前台登录';
  409. }
  410. // 删除按钮
  411. layer.confirm(title, {
  412. shade: layer_shade,
  413. area: ['480px', '190px'],
  414. move: false,
  415. title: '提示',
  416. btnAlign:'r',
  417. closeBtn: 3,
  418. btn: ['确定', '取消'] ,//按钮
  419. success: function () {
  420. $(".layui-layer-content").css('text-align', 'left');
  421. }
  422. }, function () {
  423. changeTableVal(table,id_name,id_value,field,obj);
  424. layer.closeAll();
  425. }, function (index) {
  426. layer.closeAll();
  427. });
  428. }
  429. </script>
  430. <!-- 日期联动选择js文件 start -->
  431. <script type="text/javascript" src="__PUBLIC__/static/common/js/ey_laydate_time_linkage.js?v={$version}"></script>
  432. <!-- 日期联动选择js文件 end -->
  433. {include file="public/footer" /}