@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-gift"></i>
                    </span>
                    Superball 奖励记录
                </h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="#">活动管理</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Superball 奖励记录</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="/admin/superball/prizes">
                                <div>
                                    <span style="padding-left: 10px">结算日期：</span>
                                    <input type="date" name="date" class="form-control" value="{{ $date ?? '' }}" />
                                    <span style="padding-left: 10px">会员ID：</span>
                                    <input type="text" name="game_id" class="form-control" style="width: 100px;" value="{{ $gameId ?: '' }}" placeholder="GameID" />
                                </div>
                                <div style="margin-top: 10px;">
                                    <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="查询"/>&nbsp;&nbsp;
                                    <a href="/admin/superball/prizes" class="btn btn-sm btn-gradient-warning btn-icon-text">清空</a>
                                </div>
                            </form>
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>用户ID</th>
                                    <th>会员ID</th>
                                    <th>昵称</th>
                                    <th>结算日期</th>
                                    <th>基础奖励(展示)</th>
                                    <th>幸运奖励(展示)</th>
                                    <th>系数</th>
                                    <th>总奖励(展示)</th>
                                    <th>领取时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $v)
                                    <tr>
                                        <td>{{ $v->id }}</td>
                                        <td>{{ $v->user_id }}</td>
                                        <td>{{ $v->GameID ?? '-' }}</td>
                                        <td>{{ $v->NickName ?? '-' }}</td>
                                        <td>{{ $v->settle_date }}</td>
                                        <td>{{ $v->base_amount_display ?? number_float($v->base_amount / 100) }}</td>
                                        <td>{{ $v->lucky_amount_display ?? number_float($v->lucky_amount / 100) }}</td>
                                        <td>{{ $v->multiplier }}</td>
                                        <td>{{ $v->total_amount_display ?? number_float($v->total_amount / 100) }}</td>
                                        <td>{{ $v->created_at }}</td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <div class="box-footer clearfix">
                                共 <b>{{ $list->total() }}</b> 条，共 <b>{{ $list->lastPage() }}</b> 页
                                {!! $list->appends(['date' => $date, 'game_id' => $gameId])->links() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
