index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. </div>
  5. <table class="table table-striped table-bordered table-hover search-form">
  6. <thead>
  7. <th><input name="name" type="text" placeholder="输入用户名" value="{:I('name')}" /></th>
  8. <th><input name="tel" type="text" placeholder="输入手机号码" value="{:I('tel')}" /></th>
  9. <th>
  10. <a class="btn btn-primary" href="javascript:;" id="search" url="{:U('Member/index')}">查询</a>
  11. <button type="submit" name="subtype" id="export" url="{:U('Member/export')}" class="btn btn-white btn-exp"> <i class="icon-cloud-upload"></i> 导 出 </button>
  12. </th>
  13. </thead>
  14. </table>
  15. <div class="row">
  16. <div class="col-xs-12">
  17. <div class="table-responsive">
  18. <table class="table table-striped table-bordered table-hover">
  19. <thead>
  20. <tr>
  21. <th>用户名</th>
  22. <th>手机号码</th>
  23. <th>是否分销</th>
  24. <th>上级</th>
  25. <th>创建时间</th>
  26. <th>最后登录</th>
  27. <th>状态</th>
  28. <th>操作</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <volist name="list" id="m" empty="$empty">
  33. <tr>
  34. <td>{$m.uname}</td>
  35. <td>{$m.telephone}</td>
  36. <td>
  37. <?php if($m['comsiss_flag'] == 1){ ?>
  38. <span class="red">分销商</span>
  39. <?php
  40. }else{ ?>
  41. 普通会员
  42. <?php } ?>
  43. </td>
  44. <td>
  45. <?php if($m['share_id'] == 0){ ?>
  46. 平台推荐
  47. <?php }else { ?>
  48. <?php $member_info = M('member')->field('name')->where( array('member_id' => $m['share_id']) )->find(); ?>
  49. <span class="blue"><?php echo $member_info['name']; ?></span>
  50. <?php } ?>
  51. </td>
  52. <td><?php echo empty($m['create_time'])?'无':date('Y-m-d H:i:s',$m['create_time']); ?></td>
  53. <td><?php echo empty($m['last_login_time'])?'无':date('Y-m-d H:i:s',$m['last_login_time']); ?></td>
  54. <td>
  55. <?php
  56. switch($m['status']){
  57. case '1':
  58. echo '<span class="green bold">启用</span>';
  59. break;
  60. case '0':
  61. echo '<span class="red bold">禁用</span>';
  62. break;
  63. }
  64. ?>
  65. </td>
  66. <td>
  67. <a class="btn btn-xs btn-info" href='{:U("Member/info",array("id"=>$m["member_id"]))}'>
  68. <i class="icon-eye-open bigger-120"></i>查看详情
  69. </a>
  70. <?php if($m['comsiss_flag'] == 0){ ?>
  71. <a class="delete btn btn-xs btn-danger" href='{:U("Member/fencommiss",array("id"=>$m["member_id"]))}' >
  72. 升级为分销商
  73. </a>
  74. <?php } ?>
  75. </td>
  76. </tr>
  77. </volist>
  78. <tr>
  79. <td colspan="20" class="page">{$page}</td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </div>
  84. </div>
  85. </div>
  86. </block>
  87. <block name="javascript">
  88. <script>
  89. $(function(){
  90. $("#export").click(function(){
  91. var url = $(this).attr('url');
  92. var query = $('.search-form').find('input,select').serialize();
  93. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  94. query = query.replace(/^&/g, '');
  95. if (url.indexOf('?') > 0) {
  96. url += '&' + query;
  97. } else {
  98. url += '?' + query;
  99. }
  100. window.open(url);
  101. })
  102. $("#search").click(function () {
  103. var url = $(this).attr('url');
  104. var query = $('.search-form').find('input,select').serialize();
  105. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  106. query = query.replace(/^&/g, '');
  107. if (url.indexOf('?') > 0) {
  108. url += '&' + query;
  109. } else {
  110. url += '?' + query;
  111. }
  112. window.location.href = url;
  113. });
  114. });
  115. </script>
  116. </block>