register_config.blade.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. @extends('base.base')
  2. @section('base')
  3. <div class="container-fluid">
  4. <div class="row">
  5. <div class="col-12">
  6. <div class="card">
  7. <div class="card-header">
  8. <h3 class="card-title">代理级别配置</h3>
  9. <div class="card-tools">
  10. {{-- <a href="{{ route('admin.extension_new.register_config_add') }}" class="btn btn-primary btn-sm">添加级别</a>--}}
  11. </div>
  12. </div>
  13. <div class="card-body table-responsive p-0">
  14. <table class="table table-hover text-nowrap">
  15. <thead>
  16. <tr>
  17. <th>ID</th>
  18. <th>级别名称</th>
  19. <th>级别序号</th>
  20. <th>所需有效邀请人数</th>
  21. <th>佣金比例(%)</th>
  22. <th>创建时间</th>
  23. <th>更新时间</th>
  24. <th>操作</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. @foreach($list as $item)
  29. <tr>
  30. <td>{{ $item->id }}</td>
  31. <td>{{ $item->level_name }}</td>
  32. <td>{{ $item->level }}</td>
  33. <td>{{ $item->required_referrals }}</td>
  34. <td>{{ $item->commission_rate }}</td>
  35. <td>{{ $item->created_at }}</td>
  36. <td>{{ $item->updated_at }}</td>
  37. <td>
  38. {{-- <a href="{{ route('admin.extension_new.register_config_update', ['id' => $item->id]) }}" class="btn btn-sm btn-info">编辑</a>--}}
  39. {{-- <button type="button" class="btn btn-sm btn-danger" onclick="deleteConfig({{ $item->id }})">删除</button>--}}
  40. </td>
  41. </tr>
  42. @endforeach
  43. </tbody>
  44. </table>
  45. </div>
  46. <div class="card-footer clearfix">
  47. {{ $list->links() }}
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. @endsection
  54. @section('scripts')
  55. <script>
  56. function deleteConfig(id) {
  57. if (!confirm('确定要删除该级别吗?')) {
  58. return;
  59. }
  60. $.post('/admin/extension_new/register_config_delete/' + id, {
  61. _token: '{{ csrf_token() }}'
  62. }, function(res) {
  63. if (res.code === 0) {
  64. alert('删除成功');
  65. location.reload();
  66. } else {
  67. alert(res.msg || '删除失败');
  68. }
  69. });
  70. }
  71. </script>
  72. @endsection