index.html 3.7 KB

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