@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">{{ trans('nagentGrade.grade_name') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="grade_name"   id="grade_name"  required  lay-verify="" placeholder="请填写等级" autocomplete="off" value="@isset($agentGrade) {{ $agentGrade['grade_name'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('nagentGrade.grade_code') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="grade_code"   id="grade_code"  required  lay-verify="" placeholder="必须位数字" autocomplete="off" value="@isset($agentGrade) {{ $agentGrade['grade_code'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('nagentGrade.water_ratio') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="water_ratio"   id="water_ratio"  required  lay-verify="" placeholder="请填写流水每万元返佣金额" autocomplete="off" value="@isset($agentGrade) {{ $agentGrade['water_ratio'] }} @endisset" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('nagentGrade.first_amount') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="first_amount"   id="first_amount"  required  lay-verify="" placeholder="请填写开始额度" autocomplete="off" value="@isset($agentGrade) {{ $agentGrade['first_amount'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('nagentGrade.last_amount') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="last_amount"   id="last_amount"  required  lay-verify="" placeholder="请填写结束额度" autocomplete="off" value="@isset($agentGrade) {{ $agentGrade['last_amount'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('nagentGrade.sort') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="sort"   id="sort"  required  lay-verify="" placeholder="请填写排序" autocomplete="off" value="@isset($agentGrade) {{ $agentGrade['sort'] }} @endisset" class="layui-input">
                </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-green">重置</button>
    </div>
  </div>
@endif
</form>

<script>
//Demo
layui.use(['form'], function(){
  var form = layui.form;

  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});
lay('.test-item').each(function(){
    laydate.render({
        elem: this
        ,type: 'datetime'
        ,trigger: 'click'
    });
});
</script>
@endsection
