@extends('vip.layouts')
@section('content')
<script type="text/html" id="openTool">
        <!-- 这里的 checked 的状态只是演示 -->
      <a href="/admin/SixlotteryMoney/edit?identity=@{{d.identity}}&game={{$game}}" class="layui-btn layui-btn-sm">{{trans('sixlottery.setmoney')}}</a>
      <a href="javascript:deleteList('@{{d.identity}}')" id="isfirst" data-id="1" class="layui-btn layui-btn-sm">{{trans('sixlottery.delete')}}</a>
  </script>
    <!---开奖信息管理-->
    <div class="layui-row">

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

            <form class="layui-form" action="">
                <div class="layui-form-item">
                    <div class="layui-inline"><a href="/admin/SixlotteryMoney/add?game={{$game}}" class="layui-btn layui-btn-sm  ">添加</a></div>
                    <div class="layui-inline">
                        <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('sixlottery.play_type') }}</label>
                        <div class="layui-input-inline">
                            <select name="play_type" id="play_type" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
                            <option value="">{{ trans('sixlottery.select_playtype') }}</option>
                            @foreach(trans('sixlottery.playtype_list') as $k=>$v):
                              @if($play_type==$k))
                                <option value="{{$k}}" selected="selected">{{$v}}</option>
                              @else
                                <option value="{{$k}}">{{$v}}</option>
                              @endif
                            @endforeach
                          </select>
                        </div>

                    </div>

                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="demo1" data-form-sbm="1512375219284.209" style="opacity: 1; pointer-events: auto;">提交</button>
                        <button type="reset" class="layui-btn   layui-btn-sm  layui-btn-normal">重置</button>
                    </div>

                </div>
            </form>
        </div>
    </div>

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

function deleteList(id){
  layer.confirm('确定删除吗？', {
      btn: ['确定','取消'] //按钮
  }, function(){
      var url = '/admin/SixlotteryMoney/DeletePlaymoney?identity='+id;
      $.ajax({
         type: "GET",
         url: url,
         dataType: "json",
         success: function(data){
           layer.msg(data.msg);
          setTimeout(function(){
            window.location.reload();
          },2500);
         }
       });
  }); 
}

</script>
@endsection