center_list.blade.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. @extends('layouts.base')
  2. @section('title', '招商中心管理')
  3. @section('content')
  4. <link href="{{static_url('yunshop/css/member.css')}}" media="all" rel="stylesheet" type="text/css"/>
  5. <div class="w1200 m0a">
  6. <div class="rightlist">
  7. <div class="right-titpos">
  8. <ul class="add-snav">
  9. <li class="active">招商中心管理 </li>
  10. <a class='btn btn-primary' href="{{yzWebUrl('plugin.merchant.backend.operation-merchant.add-center')}}" style="margin-bottom:5px;"><i class='fa fa-plus'></i> 添加招商中心</a>
  11. </ul>
  12. </div>
  13. <!-- 新增加右侧顶部三级菜单结束 -->
  14. <div class="panel panel-info"><!--
  15. <div class="panel-heading">筛选</div>-->
  16. <div class="panel-body">
  17. <form action="" method="post" class="form-horizontal" role="form" id="form1">
  18. <input type="hidden" name="route" value="plugin.merchant.backend.merchant-list.center" id="route" />
  19. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  20. <div class="">
  21. <input type="text" class="form-control" name="search[member]" value="{{$request['member']}}" placeholder="可搜索昵称/姓名/手机号"/>
  22. </div>
  23. </div>
  24. <div class="form-group col-xs-12 col-sm-2 col-md-2 col-lg-2">
  25. <div class="">
  26. <select name='search[level_id]' class='form-control'>
  27. <option value=''>等级不限</option>
  28. @foreach($levels as $level)
  29. <option value='{{$level->id}}'
  30. @if($request['level_id'] == $level->id)
  31. selected
  32. @endif
  33. >{{$level->level_name}}</option>
  34. @endforeach
  35. </select>
  36. </div>
  37. </div>
  38. <div class="form-group col-xs-12 col-sm-7 col-lg-4">
  39. <!--<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label"></label>-->
  40. <div class="">
  41. <button type="button" name="export" value="1" id="export" class="btn btn-default excel back ">导出 Excel</button>
  42. <input type="hidden" name="token" value="{{$var['token']}}" />
  43. <button class="btn btn-success "><i class="fa fa-search"></i> 搜索</button>
  44. </div>
  45. </div>
  46. </form>
  47. </div>
  48. </div><div class="clearfix">
  49. <div class="panel panel-default">
  50. <div class="panel-heading">总数:{{$list->total()}} </div>
  51. <div class="panel-body" style="margin-bottom:200px">
  52. <table class="table table-hover" style="overflow:visible">
  53. <thead class="navbar-inner">
  54. <tr>
  55. <th style='width:4%;text-align: center;'>ID</th>
  56. <th style='width:12%;text-align: center;'>会员</th>
  57. <th style='width:10%;text-align: center;'>姓名<br>手机号</th>
  58. <th style='width:14%;text-align: center;'>成为时间</th>
  59. <th style='width:10%;text-align: center;'>等级</th>
  60. <th style='width:8%;text-align: center;'>分红比例</th>
  61. <th style='width:10%;'>操作</th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. @foreach($list as $row)
  66. <tr>
  67. <td style="text-align: center;">
  68. {{$row->id}}
  69. </td>
  70. <td style="text-align: center;">
  71. <img src='{{$row->hasOneMember->avatar}}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' />
  72. <br/>
  73. <a href="{!! yzWebUrl('member.member.detail',['id' => $row->hasOneMember->uid])!!}">@if ($row->hasOneMember->nickname) {{$row->hasOneMember->nickname}} @else {{$row->hasOneMember->mobile}} @endif</a>
  74. </td>
  75. <td style="text-align: center;">
  76. {{$row->realname}}<br>
  77. {{$row->mobile}}
  78. </td>
  79. @if($row->change_time == '')
  80. <td style="text-align: center;">{{$row->created_at}}</td>
  81. @else
  82. <td style="text-align: center;">{{$row['change_time']}}</td>
  83. @endif
  84. <td style="text-align: center;">
  85. {{$row->hasOneLevel->level_name}}
  86. </td>
  87. <td style="text-align: center;">
  88. <label class="label label-info">{{$row->hasOneLevel->bonus_ratio}}%</label>
  89. </td>
  90. <td style="overflow:visible;">
  91. <div class="btn-group btn-group-sm" >
  92. <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="javascript:;">操作 <span class="caret"></span></a>
  93. <ul class="dropdown-menu dropdown-menu-left" role="menu" style='z-index: 9999'>
  94. <li><a href="{{yzWebUrl('plugin.merchant.backend.center.index', ['id' => $row->id])}}" title='编辑'><i class='fa fa-pencil'></i> 编辑</a></li>
  95. <li><a href="{{yzWebUrl('plugin.merchant.backend.updatePassword.center', ['id' => $row->id])}}" title='修改密码'><i class='fa fa-eraser'></i> 修改密码</a></li>
  96. @if(!$row->hasOneBlack)
  97. <li><a href="{!! yzWebUrl('plugin.merchant.backend.merchant-list.black', ['id' => $row->id, 'is_center' => 1]) !!}"><i class="fa fa-minus-circle">设置黑名单</i></a></li>
  98. @else
  99. <li><a href="{!! yzWebUrl('plugin.merchant.backend.merchant-list.del-black', ['id' => $row->id, 'is_center' => 1]) !!}" class="btn btn-success btn-sm"><i class="fa fa-plus-circle">取消黑名单</i></a></li>
  100. @endif
  101. </ul>
  102. </div>
  103. </td>
  104. </tr>
  105. @endforeach
  106. </tbody>
  107. </table>
  108. {!!$pager!!}
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <script language='javascript'>
  115. function fastChange(id, type, value) {
  116. $.ajax({
  117. url: "{!! yzWebUrl('plugin.merchant.backend.merchant-list.change') !!}",
  118. type: "post",
  119. data: {id: id, type: type, value: value},
  120. cache: false,
  121. success: function ($data) {
  122. location.reload();
  123. }
  124. })
  125. }
  126. $('.tdedit input').keydown(function (event) {
  127. if (event.keyCode == 13) {
  128. var group = $(this).closest('.input-group');
  129. var type = group.find('button').data('type');
  130. var staffid = group.find('button').data('staffid');
  131. var val = $.trim($(this).val());
  132. if (type == 'title' && val == '') {
  133. return;
  134. }
  135. group.prev().show().find('span').html(val);
  136. group.hide();
  137. fastChange(staffid, type, val);
  138. }
  139. })
  140. $('.tdedit').mouseover(function () {
  141. $(this).find('.fa-pencil').show();
  142. }).mouseout(function () {
  143. $(this).find('.fa-pencil').hide();
  144. });
  145. $('.fa-edit-item').click(function () {
  146. var group = $(this).closest('span').hide().next();
  147. group.show().find('button').unbind('click').click(function () {
  148. var type = $(this).data('type');
  149. var staffid = $(this).data('staffid');
  150. var val = $.trim(group.find(':input').val());
  151. if (type == 'title' && val == '') {
  152. Tip.show(group.find(':input'), '请输入名称!');
  153. return;
  154. }
  155. group.prev().show().find('span').html(val);
  156. group.hide();
  157. fastChange(staffid, type, val);
  158. });
  159. })
  160. $('.umphp').hover(function () {
  161. var url = $(this).attr('data-url');
  162. $(this).addClass("selected");
  163. },
  164. function () {
  165. $(this).removeClass("selected");
  166. })
  167. $('.js-clip').each(function () {
  168. util.clip(this, $(this).attr('data-url'));
  169. });
  170. $(function () {
  171. $('#export').click(function(){
  172. $('#route').val("plugin.merchant.backend.merchant-list.center-export");
  173. $('#form1').submit();
  174. $('#route').val("plugin.merchant.backend.merchant-list.center");
  175. });
  176. });
  177. </script>
  178. @endsection