index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <a href="{:U('SellerManage/add')}" class="btn btn-primary">新增卖家</a>
  5. </div>
  6. <div class="row">
  7. <div class="col-xs-12">
  8. <div class="table-responsive">
  9. <table class="table table-striped table-bordered table-hover">
  10. <thead>
  11. <tr>
  12. <th>用户名</th>
  13. <th>店铺浏览</th>
  14. <th>店铺名称</th>
  15. <th>手机号码</th>
  16. <th>店铺类型</th>
  17. <th>登录IP</th>
  18. <th>创建时间</th>
  19. <th>最后登录</th>
  20. <th>状态</th>
  21. <th>操作</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <volist name="list" id="m" empty="$empty">
  26. <tr>
  27. <td>{$m.s_uname}</td>
  28. <td><img src="http://qr.topscan.com/api.php?text={$m.seller_view_link}" width="100" /></td>
  29. <td>{$m.s_true_name}</td>
  30. <td>{$m.s_telephone}</td>
  31. <td>
  32. <select class="certif" rel="{$m.s_id}">
  33. <option value="0" <?php if($m['certification'] == 0){echo 'selected';} ?>>普通</option>
  34. <option value="1" <?php if($m['certification'] == 1){echo 'selected';} ?>>个人认证</option>
  35. <option value="2" <?php if($m['certification'] == 2){echo 'selected';} ?>>企业认证</option>
  36. <option value="3" <?php if($m['certification'] == 3){echo 'selected';} ?>>平台自营</option>
  37. </select>
  38. </td>
  39. <td>{$m.s_last_login_ip}</td>
  40. <td><?php echo empty($m['s_create_time'])?'无':date('Y-m-d H:i:s',$m['s_create_time']); ?></td>
  41. <td><?php echo empty($m['s_last_login_time'])?'无':date('Y-m-d H:i:s',$m['s_last_login_time']); ?></td>
  42. <td>
  43. <?php
  44. switch($m['s_status']){
  45. case '1':
  46. echo '<span class="green bold">启用</span>';
  47. break;
  48. case '0':
  49. echo '<span class="red bold">禁用</span>';
  50. break;
  51. }
  52. ?>
  53. </td>
  54. <td>
  55. <a class="btn btn-xs btn-info" href='{:U("SellerManage/info",array("id"=>$m["s_id"]))}'>
  56. <i class="icon-eye-open bigger-120"></i>
  57. </a>
  58. <a class="btn btn-xs btn-info" href='{:U("SellerManage/store_bind_class",array("id"=>$m["s_id"]))}'>
  59. <i class="icon-cogs bigger-120"></i>
  60. <span>经营类目</span>
  61. </a>
  62. </td>
  63. </tr>
  64. </volist>
  65. <tr>
  66. <td colspan="20" class="page">{$page}</td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. </div>
  71. </div>
  72. </div>
  73. </block>
  74. <block name="javascript">
  75. <script>
  76. $(function(){
  77. $('.certif').change(function(){
  78. var s_id = $(this).attr('rel');
  79. var certif = $(this).val();
  80. $.ajax({
  81. url:"{:U('SellerManage/certif_chang')}",
  82. type:'post',
  83. data:{s_id:s_id,certif:certif},
  84. dataType:'json',
  85. success:function(ret){
  86. if(ret.code == 1)
  87. {
  88. alert('更改成功');
  89. return false;
  90. } else {
  91. alert('更改失败');
  92. return false;
  93. }
  94. }
  95. })
  96. })
  97. $("#search").click(function () {
  98. var url = $(this).attr('url');
  99. var query = $('.search-form').find('input,select').serialize();
  100. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  101. query = query.replace(/^&/g, '');
  102. if (url.indexOf('?') > 0) {
  103. url += '&' + query;
  104. } else {
  105. url += '?' + query;
  106. }
  107. window.location.href = url;
  108. });
  109. });
  110. </script>
  111. </block>