@extends('base.base')
@section('base')
    <style>
        th.tab {
            font-weight: bold;
            font-size: 20px;
        }
    </style>
    <!-- 内容区域 -->
    <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>
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}1</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type1 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type1_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}2</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type2 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type2_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}3</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type3 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type3_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <td>{{ __('auto.所有') }}VIP</td>
                                    <td>{{$allVip}}</td>
                                </tr>

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}4</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type4 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type4_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <td>{{ __('auto.所有对局过的用户') }}</td>
                                    <td>{{$allMatchUp}}</td>
                                </tr>

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}5</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type5 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type5_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <td>{{ __('auto.所有茶叶成功用户') }}</td>
                                    <td>{{$allCash}}</td>
                                </tr>

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}6</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type6 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type6_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <td>{{ __('auto.所有代理') }}</td>
                                    <td>{{$allAgent}}</td>
                                </tr>

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}7</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type7 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type7_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}8</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type8 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type8_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}9</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type9 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type9_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}10</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type10 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type10_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif
                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <td>{{ __('auto.所有TP对局过的玩家') }}</td>
                                    <td>{{$allTp}}</td>
                                </tr>

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}11</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type11 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type11_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif

                                        </td>
                                    </tr>
                                @endforeach
                                <tr>
                                    <td>{{ __('auto.所有RM对局过的玩家') }}</td>
                                    <td>{{$allRm}}</td>
                                </tr>

                                <tr>
                                    <th class="tab">{{ __('auto.用户类型') }}12</th>
                                    <th class="tab">{{ __('auto.人数') }}</th>
                                </tr>
                                @foreach($type12 as $k=>$v)
                                    <tr>
                                        <td>{{$v['TypeName']}}</td>
                                        <td>
                                            @if ($v['TotalCount'] > 0)
                                                <a href="/admin/global/userlist?user_tab=type12_{{$v['TabID']}}">
                                                    {{$v['TotalCount']}}
                                                </a>
                                            @else
                                                {{$v['TotalCount']}}
                                            @endif

                                        </td>
                                    </tr>
                                @endforeach

                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function mail(id) {
            var page = layer.open({
                type: 2,
                title: '{{ __('auto.新增邮件') }}',
                shadeClose: true,
                shade: 0.8,
                area: ['70%', '90%'],
                content: '/admin/mail/add'
            });
        }
    </script>
@endsection
