@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>
                    用户数据详情
                </h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="#">User Game Data</a></li>
                        <li class="breadcrumb-item active" aria-current="page">用户数据详情</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">用户数据详情</h4>
                            <form class="well form-inline margin-top-20" method="get" action="">
                                <span style="padding-left: 10px">用户ID：</span>
                                <input type="text" name="user_id" class="form-control" value="{{ $user_id }}" placeholder="请输入用户ID" required>
                                <span style="padding-left: 10px">开始日期：</span>
                                <input type="date" name="start_date" class="form-control" value="{{ $start_date }}">
                                <span style="padding-left: 10px">结束日期：</span>
                                <input type="date" name="end_date" class="form-control" value="{{ $end_date }}">
                                <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="查询"/>&nbsp;&nbsp;
                            </form>
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="7%">日期</th>
                                    <th width="7%">{{ __('auto.用户') }}ID</th>
                                    <th width="10%">{{ __('auto.游戏昵称') }}</th>
                                    <th width="10%">{{ __('auto.玩家渠道') }}</th>
                                    <th width="10%">Win</th>
                                    <th width="10%">MaxWinScore</th>
                                    <th width="10%">MaxDrawBase</th>
                                    <th width="10%">TotalBet</th>
                                    <th width="10%">Revenue</th>
                                    <th width="10%">Recharge</th>
                                    <th width="10%">Withdraw</th>
                                    <th width="10%">{{ __('auto.最后登录时间') }}</th>
                                    <th width="10%">{{ __('auto.注册时间') }}</th>
                                </tr>
                                </thead>
                                <tbody>
                                @if($list && count($list))
                                    @foreach($list as $v)
                                        <tr>
                                            <td>{{ date('Y-m-d', strtotime($v->DateID)) }}</td>
                                            <td>{{ $v->GameID }}</td>
                                            <td>{{ $v->NickName }}</td>
                                            <td>{{ $v->Channel }}</td>
                                            <td>{{ $v->Score/100 }}</td>
                                            <td>{{ $v->MaxWinScore/100 }}</td>
                                            <td>{{ $v->MaxDrawBase/100 }}</td>
                                            <td>{{ $v->TotalBet/100 }}</td>
                                            <td>{{ $v->Revenue/100 }}</td>
                                            <td>{{ $v->Recharge }}</td>
                                            <td>{{ $v->Withdraw/100 }}</td>
                                            <td>{{ $v->LastLogonDate }}</td>
                                            <td>{{ $v->RegisterDate }}</td>
                                        </tr>
                                    @endforeach
                                @else
                                    <tr><td colspan="13" style="text-align:center;">暂无数据</td></tr>
                                @endif
                                </tbody>
                            </table>
                            @if($list)
                                <div class="box-footer clearfix">
                                    {{ __('auto.总共') }}
                                    <b>{{ $list->appends([
                                        'user_id'=>$user_id,
                                        'start_date'=>$start_date,
                                        'end_date'=>$end_date,
                                    ])->total() }}</b>
                                    {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
                                    {!! $list->links() !!}
                                </div>
                            @endif
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection 