@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-wrench"></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/sign_in/index'>
                                <spen style="padding-left: 10px">{{ __('auto.渠道名称：') }}</spen>

                                <select name="Channel" id="" class="form-control">
                                    <option value="">{{ __('auto.请选择渠道') }}</option>

                                    @foreach($ChannelList as $k => $v)
                                        <option value="{{$v}}" @if ($v == $Channel)
                                        selected
                                            @endif>{{$v}}</option>
                                    @endforeach
                                </select>


                                <span style="padding-left: 10px">{{ __('auto.会员ID：') }}</span>
                                <input class="form-control" type="text" name="GameID" style="width: 10%; "
                                       value="{{$GameID}}" placeholder="{{ __('auto.输入会员') }}ID">
                                <span style="padding-left: 10px">{{ __('auto.昵称：') }}</span>
                                <input class="form-control" type="text" name="NickName" style="width: 10%; "
                                       value="{{$NickName}}" placeholder="{{ __('auto.输入会员昵称') }}">

                                <spen style="padding-left: 10px">{{ __('auto.选择时间：') }}</spen>
                                <input type="datetime-local" step="01" name="start_time" class="form-control" id="start_time" onclick="start_times()"
                                       value="{{$start_time}}"/>&nbsp;&nbsp;
                                <input type="datetime-local" step="01" name="end_time" class="form-control" id="end_time" onclick="end_times()"
                                       value="{{$end_time}}"/>&nbsp;&nbsp;


                                <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
                                <a href="/admin/sign_in/index"
                                   class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.重置') }}</a>&nbsp;&nbsp;

                            </form>
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th>{{ __('auto.领取时间') }}</th>
                                    <th>{{ __('auto.会员') }}ID</th>
                                    <th>{{ __('auto.昵称') }}</th>
                                    <th>{{ __('auto.渠道名称') }}</th>
                                    <th>{{ __('auto.领取金额') }}</th>

                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $k=>$v)
                                    <tr>
                                        <td >{{ $v->UpdateTime }}</td>
                                        <td ><a href="/admin/global/id_find?UserID={{$v->UserID}}">
                                        {{$v->GameID}}
                                        </a></td>

                                        <td >
                                            {{ $v->NickName}}
                                        </td>

                                        <td >{{ $v->Channel}}</td>
                                        <td >{{ $v->ChangeScore}}</td>

                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <div class="box-footer clearfix">
                                {{ __('auto.总共') }}
                                <b>{{ $list->appends([
    'GameID'=>$GameID,
    'start_time'=>$start_time,
    'end_time'=>$end_time,
    'NickName' => $NickName,
    'Channel' => $Channel

])->total() }}</b>
                                {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
                                {!! $list->links() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>

        function start_times() {

            getFormat('00', '00', '00');

            document.getElementById("start_time").value = format
        }

        function end_times() {
            getFormat('23', '59', '59');
            document.getElementById("end_time").value = format
        }

    </script>
@endsection
