@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: {
            game_no:$('#form_game_no').val(),
        }
      });
    }
  };
$('.lay-btn-diy').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
  });*/

  //重置表单
  $('.reset').on('click',function(){
	  $('input').val('');
	  $('#form_trade_type').val('');
	  //var type = $(this).data('type');
	  //active[type] ? active[type].call(this) : '';
  });
    //刷新表单
    $('.set').on('click',function(){
    //var type = $(this).data('type');
    //active[type] ? active[type].call(this) : '';
    });
    @endpush
    <script type="text/html" id="taked">
        <!-- 这里的 checked 的状态只是演示 -->
		@{{#if(d.status==1){ }}
			<p style="color:green;">{{trans('status.game.status')[1]}}</p>
		@{{#}else{ }}
			@{{#if(d.status==2){ }}
				<p style="color:red;">{{trans('status.game.status')[2]}}</p>
			@{{#}else{ }}
				 <p style="color:#00868B;">{{trans('status.game.status')[3]}}</p>
			@{{#} }}
		@{{#} }}
    </script>
	
    <!---开奖管理-->
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 text">

            <form class="layui-form rewrite" action="" eventType=eventForm>
                <div class="layui-form-item">
                    <div class="layui-inline" style="display: none;">
                            <label class="layui-form-label">游戏</label>
                            <div class="layui-input-inline">
                                <select name="game" id="form_game"  autocomplete="off" eventType="event-query">
                                    @foreach($gameList as $k=>$v):
                                        @if($game==$v['table_name'])
                                            <option value="{{$v['table_name']}}" selected="selected">{{$v['name']}}</option>
                                        @else
                                            <option value="{{$v['table_name']}}">{{$v['name']}}</option>
                                        @endif
                                    @endforeach
                                </select>
                            </div>

                        </div>

                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('gamemenu.game_no') }}</label>
                        <div class="layui-input-inline">
							<select name="game_no" id="form_game_no" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
								@if(is_array($noinfo)))
									@foreach($noinfo as $k=>$v):
										@if($game_no==$v['info_no'])
											<option value="{{$v['info_no']}}" selected="selected">{{$v['info_no']}}</option>
										@else
											<option value="{{$v['info_no']}}">{{$v['info_no']}}</option>
										@endif
									@endforeach
								@else
									<option value="">{{ trans('gamemenu.select_gameno') }}</option>
								@endif
							</select>
                        </div>

                    </div>
                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-sm lay-btn-diy" data-type="reload"
                           style="opacity: 1; pointer-events: auto;" eventType=event-query-submit>提交</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" eventType=event-query-submit>ဂ</i></a>
                    </div>
                </div>
            </form>
            @include('vip.datatable')
        </div>
    </div>
 
<script>
//Demo
layui.use(['form'], function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
  
function cbFormSuccess(data){
	layer.msg(data.msg);
	setTimeout(function(){
		parent.window.location.reload();
	},2500);
}
});
</script>

@endsection
