| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- @extends('base.base')
- @section('base')
- <!-- 内容区域 -->
- <div class="main-panel">
- <div class="content-wrapper">
- <div class="page-header">
- <h3 class="page-title">
- <span class="page-title-icon bg-gradient-primary text-white mr-2">
- <i class="mdi mdi-settings"></i>
- </span>
- {{ __('auto.个人池档位配置') }}
- </h3>
- <nav aria-label="breadcrumb">
- <ol class="breadcrumb">
- <li class="breadcrumb-item"><a href="#">{{ __('auto.个人池档位配置') }}</a></li>
- <li class="breadcrumb-item active" aria-current="page">{{ __('auto.个人池档位配置') }}</li>
- </ol>
- </nav>
- </div>
- <div class="row">
- <div class="col-lg-12 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">{{ __('auto.个人池档位配置') }}</h4>
- <p class="card-description">
- <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text"
- onclick="add()">
- <i class="mdi mdi-plus btn-icon-prepend"></i>
- {{ __('auto.增加个人档位') }}
- </button>
- </p>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>{{ __('auto.菜单名称') }}</th>
- <th>
- {{ __('auto.条件') }}1 <br>
- {{ __('auto.累计咖啡额度') }}
- </th>
- <th>
- {{ __('auto.条件') }}2 <br>
- {{ __('auto.累计输赢之和额度') }}
- </th>
- <th>{{ __('auto.控制用户输赢') }}</th>
- <th>{{ __('auto.档位基准值') }}</th>
- <th>{{ __('auto.初始概率') }}</th>
- <th>{{ __('auto.每个基准值增加概率') }}</th>
- <th>{{ __('auto.增加概率上限') }}</th>
- <th>{{ __('auto.操作') }}</th>
- <th>{{ __('auto.开关状态') }}</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $k=>$v)
- <tr>
- <td>{{$v->ConfigName}}</td>
- <td>{{$v->RechargeMin}} - {{$v->RechargeMax}}</td>
- <td>{{ __('auto.固定值:') }}{{ $v->ScoreWin }}</td>
- <td>
- @if ($v->ControlType == 1)
- <span style="color: red">{{ __('auto.输') }}</span>
- @else
- <span style="color: #0bb20c">{{ __('auto.赢') }}</span>
- @endif
- </td>
- <td>{{$v->ScoreBase}}</td>
- <td>{{$v->ProbBase}} %</td>
- <td>{{$v->ProbAdd}} %</td>
- <td>{{$v->ProbMax}} %</td>
- <td>
- <button class="btn btn-sm btn-gradient-dark" onclick="update({{$v->ID}})">
- {{ __('auto.修改') }}
- </button>
- </td>
- <td>
- @if ($v->Status == 1)
- <span style="color: #0bb20c"> {{ __('auto.已开启') }}</span>
- @elseif ($v->Status == 2)
- <span style="color: red">{{ __('auto.已关闭') }}</span>
- @endif
- @if ($v->Status == 1)
- <button type="button" class="btn btn-sm btn-danger"
- onclick="switch_control({{$v->ID}},'off')">{{ __('auto.关闭') }}
- </button>
- @elseif ($v->Status == 2)
- <button type="button" class="btn btn-sm btn-primary"
- onclick="switch_control({{$v->ID}},'on')">{{ __('auto.开启') }}
- </button>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- function add() {
- layer.open({
- type: 2,
- title: '{{ __('auto.增加个人档位') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['50%', '70%'],
- content: '/admin/recharge_control_config/add'
- });
- }
- function update(id) {
- layer.open({
- type: 2,
- title: '{{ __('auto.修改个人档位') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['50%', '70%'],
- content: '/admin/recharge_control_config/update/'+id
- });
- }
- function switch_control(id, type) {
- myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
- myRequest("/admin/recharge_control_config/switch/" + id, "post", {type}, function (res) {
- layer.msg(res.msg)
- setTimeout(function () {
- window.location.reload();
- }, 1500)
- });
- });
- }
- function update_sort(obj, id) {
- sort = $(obj).html();
- if (sort != '') {
- myRequest("/admin/recharge/update_sort/" + id, "post", {sort}, function (res) {
- layer.msg(res.msg)
- setTimeout(function () {
- window.location.reload();
- }, 1500)
- });
- } else {
- window.location.reload();
- }
- }
- </script>
- @endsection
|