@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">
                            <div>
                                <a href="#" onclick="javascript:history.back(-1);">{{ __('auto.返回到上一页') }}</a>
                            </div>


                            <div class="row" style="margin:8px 8px">
                                {{ __('auto.会员ID：') }}{{$gameId}}
                                &nbsp;&nbsp;<button class="btn btn-gradient-danger btn-sm" onclick="click_down('{{$UniqueCode}}')">{{ __('auto.点击查看对局信息') }}</button>
                            </div>

                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="5%">{{ __('auto.对局编码') }}</th>
                                    <th width="5%">{{ __('auto.游戏') }}ID</th>
                                    <th width="5%">{{ __('auto.游戏场次') }}-{{ __('auto.桌') }}</th>
                                    <th width="6%">{{ __('auto.开始时间') }}</th>
                                    <th width="6%">{{ __('auto.结束时间') }}</th>
                                    <th width="8%">{{ __('auto.个人本局税收') }}</th>
                                    <th width="8%">{{ __('auto.总输赢（含税）') }}</th>
                                    <th width="6%">{{ __('auto.当局结束剩余金豆') }}</th>
                                    <th width="6%">{{ __('auto.当局是否主动放弃') }}</th>
                                    <th width="6%">{{ __('auto.本局是否当庄') }}</th>
                                    <th width="6%">{{ __('auto.当局大赢家') }}</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $value)
                                <tr>
                                    <td>
                                        {{$value->UniqueCode}}
                                    </td>
                                    <td>
                                        <a href="/admin/global/id_find?UserID={{$value->UserID}}">
                                            {{$value->GameID}}
                                        </a>
                                    </td>
                                    <td>{{$value->ServerName}}</td>
                                    <td>{{$value->UpdateTime}}</td>
                                    <td>{{$value->UpdateTime}}</td>
                                    <td>{{$value->Revenue}}</td>
                                    <td>{{$value->ChangeScore}} </td>
                                    <td>{{$value->AfterScore}}</td>
                                    <td></td>
                                    <td></td>
                                    <td></td>

                                </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <div class="box-footer clearfix" id = "pages">
                                {{ __('auto.总共') }} <b>{{ $list->appends([
                                        'list'=>$list,
                                        'gameId' => $gameId,
                                        'UniqueCode' => $UniqueCode,

                                    ])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
                                {!! $list->links() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
       function click_down(UniqueCode){
           var page = layer.open({
               type: 2,
               title: '{{ __('auto.查看对局信息') }}'+ '    ' +UniqueCode,
               shadeClose: true,
               shade: 0.8,
               offset: 't',
               scrollbar:false,
               area: ['70%', '72%'],
               content: '/admin/global/match_information/'+UniqueCode
           });
       }

    </script>

@endsection

