@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">
                            <h4 class="card-title">{{ __('auto.打点数据统计') }}</h4>
                            <form class="well form-inline margin-top-20" method="get" action='/admin/gold/operate'>
                                <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/gold/operate" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>&nbsp;&nbsp;
                                <a href="/admin/gold/operate?excel=1&start_time={{$start_time}}&end_time={{$end_time}}" class="btn btn-sm btn-gradient-light btn-icon-text">{{ __('auto.导出') }}</a>
                            </form>
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th width="6%">{{ __('auto.名称') }}</th>
                                    <th width="4%">{{ __('auto.展现次数') }}</th>
                                    <th width="6%">{{ __('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 $k=>$v)
                                    <tr>
                                        <td>{{ $v['name'] }}</td>
                                        <td>{{ $v['count0'] }}</td>
                                        <td>{{ $v['rate1'] }}</td>
                                        <td>{{ $v['count1'] }}</td>
                                        <td>{{ $v['rate2'] }}</td>
                                        <td>{{ $v['count2'] }}</td>
                                        <td><a href="/admin/gold/operate_detail/{{$v['group_id']}}" class="btn btn-sm btn-gradient-info btn-icon-text">{{ __('auto.查看') }}</a></td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(function(){
            cutStr(50);
        });
        function update(id){
            myConfirm("{{ __('auto.处理操作不可逆,是否继续') }}?",function(){
                myRequest("/admin/accusation/edit/"+id,"post",{},function(res){
                    layer.msg(res.msg)
                    setTimeout(function(){
                        window.location.reload();
                    },1500)
                });
            });
        }
        
    </script>
@endsection
