@extends('vip.layouts')
@section('content')
<form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType=eventAjaxForm>
{!! csrf_field() !!}
  <div class="layui-form-item">
    <label class="layui-form-label">赔率玩法代码</label>
    <div class="layui-input-block">
    <input type="text" name="odds_code"   lay-verify="" placeholder="请输入客队名称" autocomplete="off" class="layui-input"  value="{{ isset($data['odds_code'])?$data['odds_code']:'' }}" >
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">赔率名称</label>
    <div class="layui-input-block">
    <input type="text" name="odds_name"   lay-verify="" placeholder="请输入客队让球数" autocomplete="off" class="layui-input"  value="{{ isset($data['odds_name'])?$data['odds_name']:'' }}" >
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('matchcode.game_code') }}:</label>
      <div class="layui-input-block">
        <select name="game_code"  id="game_code" lay-filter = 'sect'  lay-verify="" autocomplete="off" class="layui-input"  eventType=event-query>
          <option value="@if($data['game_code']) {{$data['game_code']}} @else 0 @endif "> {{ trans('matchcode.choice') }}</option>
            @foreach(trans('matchcode.choice_onlyt') as $k=>$v):
              @if($data['game_code']==$k)
                <option value={{$v}} selected>{{$v}}</option>
              @else
                <option value="{{$k}}">{{$v}}</option>
              @endif
            @endforeach
        </select>
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('matchcode.p_id') }}:</label>
      <div class="layui-input-block">
        <select name="p_id"  id="p_id" lay-filter = 'sect'  lay-verify="" autocomplete="off" class="layui-input"  eventType=event-query>
          <option value="@if($data['p_id']) {{$data['p_id']}} @else 0 @endif "> {{ trans('matchcode.choice') }}</option>
            @foreach($djid as $k=>$v)
              <option value="{{$v['id']}}">{{$v['odds_name']}}</option>
            @endforeach
        </select>
    </div>
  </div>

@if(S('ACTION')!='view')
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
@endif
</form>

<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
