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

	<div class="layui-row">

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

			<form class="layui-form" action="">
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">{{ trans('grade.name') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="name" id="form_name" lay-verify="" autocomplete="off" class="layui-input">
						</div>

						<label class="layui-form-label">{{ trans('grade.time') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="create_at_start" id="form_create_at_start" lay-verify="" autocomplete="off" class="layui-input test-item">
						</div>
						<div class="layui-form-mid">-</div>
						<div class="layui-input-inline" >
							<input type="text" name="create_at_end" id="form_create_at_end" lay-verify="" autocomplete="off" class="layui-input test-item">
						</div>


						<div class="layui-inline">
							<a class="layui-btn layui-btn-sm lay-btn-diy"   data-type="reload" style="opacity: 1; pointer-events: auto;">提交</a>
						</div>


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

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

		</div>
	</div>

	@push('dataTableJS')
		var active = {
		reload: function(){
		//执行重载
		table.reload('{{ $dataId }}', {
		page: {
		curr: 1 //重新从第 1 页开始
		}
		,where: {

		name:$("#form_name").val(),

		create_at_start:$("#form_create_at_start").val(),
		create_at_end:$("#form_create_at_end").val(),
		rtoken:''

		}
		});
		}
		};
		$('.lay-btn-diy').on('click', function(){
		var type = $(this).data('type');
		active[type] ? active[type].call(this) : '';
		});
	@endpush

	@include('vip.datatable')
@endsection
