@extends('vip.layouts')
@section('content')
    <style>
        .layui-laydate-range {
            width: auto;
        }

        .layui-form-switch em {
            width: auto;
        }

        .layui-form-switch {
            width: 44px;
            line-height: 23px;
        }

        .layui-form-item .checkbox {
            width: auto;
        }
    </style>

    <script type="text/html" id="action">
        <a class="layui-btns" href="/admin/Setstartcode/edit?id=@{{ d.id }}" >修改</a>
    </script>

    <script type="text/html" id="changeStatus">
        @{{#if(d.status==1){ }}
            <div style="color:green;">启用</div>
        @{{#}else{ }}
            <div style="color:red;">禁用</div>
        @{{#} }}
    </script>
    <!---起始号码管理-->
    <div class="layui-row">

        <div class="layui-col-xs12">

            <form class="layui-form rewrite" action="" eventType=eventForm>
                <div class="layui-form-item">
                    <div class="layui-inline"><a href="javascript:openWin('/admin/Setstartcode/add','{{ trans("menu.menu_add")}}','600px','800px','')"
                     class="layui-btn layui-btn-sm">添加</a></div>

                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('gamemenu.name') }}：</label>
                        <div class="layui-input-inline" style="width: 250px;">
                            <select name="game" id="form_game" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
                                <option value="">{{ trans('gamemenu.select_game') }}</option>
                                @foreach($gameList as $k=>$v):
                                    @if($game==$v['gameCode'])
                                        <option value="{{$v['gameCode']}}" selected="selected">{{$v['name']}}</option>
                                    @else
                                        <option value="{{$v['gameCode']}}">{{$v['name']}}</option>
                                    @endif
                                @endforeach
                            </select>
                        </div>
                    </div>

                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-sm lay-btn-diy" eventType=event-query-submit  data-type="reload" 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>
            </form>
        </div>
    </div>
@push('dataTableJS')

  //重置表单
  $('.reset').on('click',function(){
	  $('input').val('');
	  $('#grade').val('');
	  $('#type').val('');
	  $('#status').val('');
  });

@endpush
<script>
    function Vertity(url) {
        layer.confirm('是否确认操作？', {
            btn: ['确认', '取消'] //按钮
        }, function() {
            $.getJSON(url, function(data, textStatus) {
                if (data.status == '1') {
                    layer.msg('操作成功');
                    reloadDataTable();
                } else {
                    layer.msg(data.msg);
                }
            });
        }, function() {
        });
    }

    layui.use('laydate', function(){
      var laydate = layui.laydate;
      
      //时间选择器
      laydate.render({
        elem: '#form_counttime'
        ,type: 'date'
      });
    });

</script>
    @include('vip.datatable')
@endsection
