| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- @extends('base.base')
- @section('base')
- <!-- 内容区域 -->
- <style type="text/css">
- .table th {
- padding: 0.5375rem;
- vertical-align: top;
- border-top: 1px solid #ebedf2;
- }
- </style>
- <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>
- <form class="well form-inline margin-top-20" method="get" action='/admin/gold/demo_gameconfig'>
- <span style="padding-left: 5px">{{ __('auto.游戏:') }}</span>
- <select class="form-control" name="kind_id" value="{{$kind_id}}" id="select"
- onchange="gradeChange(this.options[this.options.selectedIndex].value)">
- <option value="">{{ __('auto.选择游戏') }}</option>
- @foreach($game_name as $k=>$v)
- <option value="{{$k}}" @if($k==$kind_id) selected @endif >{{$v}}</option>
- @endforeach
- </select>
- <span style="padding-left: 5px">{{ __('auto.房间:') }}</span>
- <select class="form-control" name="game_level" value="" id="game_level">
- <option value="">{{ __('auto.选择房间') }}</option>
- @foreach($room_list as $k=>$v)
- <option value="{{$v->ServerID}}"
- @if($v->ServerID==$game_level) selected @endif>{{$v->ServerName}}</option>
- @endforeach
- </select>
- <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>
- <a href="/admin/gold/demo_gameconfig" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>
- </form>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th width="6%">{{ __('auto.游戏') }}ID</th>
- <th width="6%">{{ __('auto.游戏类型') }}</th>
- <th width="6%">{{ __('auto.游戏名称') }}</th>
- <th width="6%">{{ __('auto.房间累计税收') }}</th>
- <th width="6%">{{ __('auto.游戏房间') }}</th>
- <th width="6%">{{ __('auto.游戏库存') }}</th>
- <th width="6%">{{ __('auto.当前触发概率') }}</th>
- <th width="6%">{{ __('auto.档位基准值') }}</th>
- <th width="6%">{{ __('auto.系统赢初始概率') }}</th>
- <th width="6%">{{ __('auto.系统输初始概率') }}</th>
- <th width="6%">{{ __('auto.系统赢增加概率/档位') }}</th>
- <th width="6%">{{ __('auto.系统赢增加概率上限') }}</th>
- <th width="6%">{{ __('auto.系统输增加概率/档位') }}</th>
- <th width="6%">{{ __('auto.系统输增加概率上限') }}</th>
- <th width="10%">{{ __('auto.操作') }}</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $k=>$v)
- <tr>
- <td>{{ $v->KindID }}</td>
- <td>{{ __('auto.试玩场') }}</td>
- <td>{{ $v->KindName }}</td>
- <td>{{ $v->Revenue}}</td>
- <td>{{ $v->ServerName }}</td>
- <td id="stock">{{ $v->RoomStock }}</td>
- <td>
- @if ($v->RoomStock < 0 and $v->gailv != '')
- {{ __('auto.系统') }} <span style="color: red">{{ __('auto.赢') }}</span> {{ __('auto.玩家') }}
- {{$v->gailv}}%
- @elseif($v->RoomStock > 0 and $v->gailv != '')
- {{ __('auto.系统') }} <span style="color: green">{{ __('auto.输') }}</span> {{ __('auto.玩家') }}
- {{$v->gailv}}%
- @endif
- </td>
- <td>{{ $v->BaseScore}}</td>
- <td>{{ $v->WinInitPercent}}</td>
- <td>{{ $v->LostInitPercent}}</td>
- <td>{{ $v->WinBasePercent}}</td>
- <td>{{ $v->WinMaxPercent}}</td>
- <td>{{ $v->LostBasePercent}}</td>
- <td>{{ $v->LostMaxPercent}}</td>
- <td>
- @if (empty(hidden()) || hidden() == 'general_administrator')
- <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text"
- onclick="edit({{ $v->gi_ServerID }})">
- {{ __('auto.修改') }}
- </button>
- @endif
- <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
- onclick="show({{$v->gi_ServerID}})">
- {{ __('auto.查配置') }}
- </button>
- <button type="button" class="btn btn-sm btn-facebook btn-icon-text"
- onclick="sync_stock(this,{{$v->gi_ServerID}})">
- {{ __('auto.更新库存') }}
- </button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div class="box-footer clearfix">
- {{ __('auto.总共') }} <b>{{ $list->appends(['kind_id'=>$kind_id])->total() }}</b>
- {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
- {!! $list->links() !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- let demo = {{$demo}}
- function edit(id) {
- var page = layer.open({
- type: 2,
- title: '{{ __('auto.配置修改') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['70%', '90%'],
- content: '/admin/gold/gameconfig/update/' + id
- });
- }
- function show(value) {
- var page = layer.open({
- type: 2,
- title: '{{ __('auto.查看配置') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['50%', '60%'],
- content: '/admin/global/show_config/' + value
- });
- }
- function sync_stock(obj, serverID) {
- // 库存
- var stock = $(obj).parents('tr').find('td').eq(5);
- // 税收
- var revenue = $(obj).parents('tr').find('td').eq(3);
- myRequest("/admin/gold/sync_stock/" + serverID, "post", {}, function (res) {
- layer.msg(res.msg)
- if (res.code == 200) {
- stock.text(res.data.data.stock);
- revenue.text(res.data.data.revenue);
- }
- });
- }
- function gradeChange(value) {
- console.log(demo)
- myRequest("/admin/gold/roomlist", "post", {'GameID': value,'demo':demo}, function (res) {
- // layer.msg(res.msg)
- var data = res.data
- var html = ''
- for (var i of data) {
- html += '<option value=' + i['ServerID'] + '>' + i['ServerName'] + '</option>'
- }
- $("#game_level").html(html)
- });
- }
- </script>
- @endsection
|