index.blade.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-settings"></i>
  10. </span>
  11. {{ __('auto.个人池档位配置') }}
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">{{ __('auto.个人池档位配置') }}</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.个人池档位配置') }}</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. <h4 class="card-title">{{ __('auto.个人池档位配置') }}</h4>
  25. <p class="card-description">
  26. <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text"
  27. onclick="add()">
  28. <i class="mdi mdi-plus btn-icon-prepend"></i>
  29. {{ __('auto.增加个人档位') }}
  30. </button>
  31. </p>
  32. <table class="table table-bordered">
  33. <thead>
  34. <tr>
  35. <th>{{ __('auto.菜单名称') }}</th>
  36. <th>
  37. {{ __('auto.条件') }}1 <br>
  38. {{ __('auto.累计咖啡额度') }}
  39. </th>
  40. <th>
  41. {{ __('auto.条件') }}2 <br>
  42. {{ __('auto.累计输赢之和额度') }}
  43. </th>
  44. <th>{{ __('auto.控制用户输赢') }}</th>
  45. <th>{{ __('auto.档位基准值') }}</th>
  46. <th>{{ __('auto.初始概率') }}</th>
  47. <th>{{ __('auto.每个基准值增加概率') }}</th>
  48. <th>{{ __('auto.增加概率上限') }}</th>
  49. <th>{{ __('auto.操作') }}</th>
  50. <th>{{ __('auto.开关状态') }}</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. @foreach($list as $k=>$v)
  55. <tr>
  56. <td>{{$v->ConfigName}}</td>
  57. <td>{{$v->RechargeMin}} - {{$v->RechargeMax}}</td>
  58. <td>{{ __('auto.固定值:') }}{{ $v->ScoreWin }}</td>
  59. <td>
  60. @if ($v->ControlType == 1)
  61. <span style="color: red">{{ __('auto.输') }}</span>
  62. @else
  63. <span style="color: #0bb20c">{{ __('auto.赢') }}</span>
  64. @endif
  65. </td>
  66. <td>{{$v->ScoreBase}}</td>
  67. <td>{{$v->ProbBase}} %</td>
  68. <td>{{$v->ProbAdd}} %</td>
  69. <td>{{$v->ProbMax}} %</td>
  70. <td>
  71. <button class="btn btn-sm btn-gradient-dark" onclick="update({{$v->ID}})">
  72. {{ __('auto.修改') }}
  73. </button>
  74. </td>
  75. <td>
  76. @if ($v->Status == 1)
  77. <span style="color: #0bb20c"> {{ __('auto.已开启') }}</span>
  78. @elseif ($v->Status == 2)
  79. <span style="color: red">{{ __('auto.已关闭') }}</span>
  80. @endif
  81. @if ($v->Status == 1)
  82. <button type="button" class="btn btn-sm btn-danger"
  83. onclick="switch_control({{$v->ID}},'off')">{{ __('auto.关闭') }}
  84. </button>
  85. @elseif ($v->Status == 2)
  86. <button type="button" class="btn btn-sm btn-primary"
  87. onclick="switch_control({{$v->ID}},'on')">{{ __('auto.开启') }}
  88. </button>
  89. @endif
  90. </td>
  91. </tr>
  92. @endforeach
  93. </tbody>
  94. </table>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <script>
  102. function add() {
  103. layer.open({
  104. type: 2,
  105. title: '{{ __('auto.增加个人档位') }}',
  106. shadeClose: true,
  107. shade: 0.8,
  108. area: ['50%', '70%'],
  109. content: '/admin/recharge_control_config/add'
  110. });
  111. }
  112. function update(id) {
  113. layer.open({
  114. type: 2,
  115. title: '{{ __('auto.修改个人档位') }}',
  116. shadeClose: true,
  117. shade: 0.8,
  118. area: ['50%', '70%'],
  119. content: '/admin/recharge_control_config/update/'+id
  120. });
  121. }
  122. function switch_control(id, type) {
  123. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  124. myRequest("/admin/recharge_control_config/switch/" + id, "post", {type}, function (res) {
  125. layer.msg(res.msg)
  126. setTimeout(function () {
  127. window.location.reload();
  128. }, 1500)
  129. });
  130. });
  131. }
  132. function update_sort(obj, id) {
  133. sort = $(obj).html();
  134. if (sort != '') {
  135. myRequest("/admin/recharge/update_sort/" + id, "post", {sort}, function (res) {
  136. layer.msg(res.msg)
  137. setTimeout(function () {
  138. window.location.reload();
  139. }, 1500)
  140. });
  141. } else {
  142. window.location.reload();
  143. }
  144. }
  145. </script>
  146. @endsection