@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/user/spreader/everyday/{{$user_id}}'>
                                <spen style="padding-left: 10px" >{{ __('auto.选择时间：') }}</spen>
                                <input type="date"  step="01" name="start_time" class="form-control" value="{{$start_time}}" />&nbsp;&nbsp;
                                <input type="date"  step="01" name="end_time" class="form-control" 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/user/spreader/everyday/{{$user_id}}" 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.今日新增') }}</th>
                                    <th>{{ __('auto.今日流失') }}</th>
                                    <th>{{ __('auto.今日收益') }}</th>
                                    <th>{{ __('auto.新增次日留存') }}</th>
                                </tr>
                                </thead>
                                <tbody>
                                <input style="width:20%;float:left;" class="form-control" type="text" value="{{$user_info->NickName}}" disabled="disabled">
                                <input style="width:10%;float:left;" class="form-control" type="text" value="{{$user_info->GameID}}" disabled="disabled">
                                @foreach($list as $k=>$v)
                                    <tr>
                                        <td style="width: 13%">{{ $v['date'] }}</td>
                                        <td style="width: 10%">{{ $v['count']}}</td>
                                        <td style="width: 10%">{{ $v['sleep']}}</td>
                                        <td style="width: 12%">{{ $v['revenue_sum']}}</td>
                                        <td style="width: 10%">{{ $v['retain']}}</td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
