@extends('vip.layouts')
@section('content')
    <style>
        .layui-laydate-range {
            width: auto;
        }
    </style>
    @push('dataTableJS')
        var active = {
        reload: function(){
        //执行重载
        table.reload('{{ $dataId }}', {
        page: {
        curr: 1 //重新从第 1 页开始
        }
        ,where: {
        name:$('#name').val(),
        }
        });
        }
        };
        $('.lay-btn-diy').on('click', function(){
        var type = $(this).data('type');
        active[type] ? active[type].call(this) : '';
        });

        $(document).on('click','.addTo',function(e){
            var gameName=$(this).attr('game');
            openWin('/admin/Routes/add?game='+gameName)
        })

    @endpush
    <!---注单管理-->
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <form class="layui-form rewrite" eventType="eventForm" action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('routes.name') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" id="name" eventType="event-query"  value="" lay-verify="required" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-sm lay-btn-diy"  eventType="event-query-submit"
                           style="opacity: 1; pointer-events: auto;">提交</a>
                        <a class="layui-btn   layui-btn-sm  layui-btn-normal reset" data-type="reload"
                           style="opacity: 1; pointer-events: auto;">重置</a>
                        <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload"
                           style="opacity: 1; pointer-events: auto;"><i class="layui-icon">ဂ</i></a>
                    </div>
                    <!-- <div class="layui-inline"><a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-danger addTo">添加</a></div> -->
                    <div class="layui-inline"><a href="/admin/Routes/add" class="layui-btn layui-btn-sm  ">添加</a></div>
                    @if(checkRriv('/admin/Routes/delete'))<div class="layui-inline"><a href="javascript:delWin('/admin/Routes/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div>@endif
                </div>
            </form>
        </div>

        @include('vip.datatable')
        <link rel="stylesheet" href="{{ asset('/css/untablelist.css') }}"  />
    </div>
    </div>
    
@endsection

