@extends('vip.layouts')
@section('content')


<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">
                    <label class="layui-form-label">{{ trans('nagentGrade.grade_name') }}</label>
                    <div class="layui-input-inline">
                        <input type="text" name="grade_name"  id="grade_name"  lay-verify="" autocomplete="off" eventType="event-query"  value='{{$grade_name}}' class="layui-input">
                    </div>
                </div>

                <div class="layui-inline">
                <label class="layui-form-label">{{ trans('nagentGrade.grade_code') }}</label>
                      <div class="layui-input-inline">
                        <input type="text" name="grade_code" id="grade_code" lay-verify="required" autocomplete="off" eventType="event-query"  value="{{$grade_code}}" class="layui-input">
                      </div>
                </div>

                <div class="layui-inline">
                <label class="layui-form-label">{{ trans('nagentGrade.water_ratio') }}</label>
                      <div class="layui-input-inline">
                        <input type="text" name="water_ratio" id="water_ratio" lay-verify="required" autocomplete="off" eventType="event-query"  value="{{$water_ratio}}" class="layui-input">
                      </div>
                </div>

                <div class="layui-inline">
                <label class="layui-form-label">{{ trans('nagentGrade.profit_ratio') }}</label>
                      <div class="layui-input-inline">
                        <input type="text" name="profit_ratio" id="profit_ratio" lay-verify="required" autocomplete="off" eventType="event-query"  value="{{$profit_ratio}}" class="layui-input">
                      </div>
                </div>

                <div class="layui-inline">
                <label class="layui-form-label">{{ trans('nagentGrade.first_amount') }}</label>
                      <div class="layui-input-inline">
                        <input type="text" name="first_amount" id="first_amount" lay-verify="required" autocomplete="off" eventType="event-query"  value="{{$first_amount}}" class="layui-input">
                      </div>
                </div>

                <div class="layui-inline">
                <label class="layui-form-label">{{ trans('nagentGrade.last_amount') }}</label>
                      <div class="layui-input-inline">
                        <input type="text" name="last_amount" id="last_amount" lay-verify="required" autocomplete="off" eventType="event-query"  value="{{$last_amount}}" class="layui-input">
                      </div>
                </div>

                <div class="layui-inline">
                <a class="layui-btn layui-btn-sm lay-btn-diy"   data-type="reload" eventType="event-query-submit" 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>


                  @if(checkRriv('/admin/NagentGrade/add'))   <div class="layui-inline"><a href="/admin/NagentGrade/add" class="layui-btn layui-btn-sm  ">添加</a> @endif
        </div>
         @if(checkRriv('/admin/NagentGrade/delete'))  <div class="layui-inline"><a href="javascript:delWin('/admin/NagentGrade/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div> @endif 
        </div>
        </form>
    </div>
    </div>

@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            name:$("#name").val(),
            level:$('#level').val(),
            money_small:$('#money_small').val(),
            money_big:$('#money_big').val(),
        }
      });
    }
  };
$('.lay-btn-diy').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
  });*/

  //重置表单
  $('.reset').on('click',function(){
      $('input').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>
  $(document).on('click','[eventType=event-priv_role]',function(){
    var url='/admin/priv_role/index?role_id=';
    var pid=$(this).attr('pid');
    var id=$(this).parent().find('span').attr('data-'+pid);
    openWin(url+id,'权限信息');
  });
</script> -->
@include('vip.datatable')
<link rel="stylesheet" href="{{ asset('/css/untablelist.css') }}"  />
@endsection

