@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('label.group_name') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="group_name" id="form_group_name" lay-verify="" autocomplete="off" class="layui-input">
						</div>

						<label class="layui-form-label">{{ trans('label.group_code') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="group_code" id="form_group_code" 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('/{{ S('MODULE') }}/{{ S('CONTROLLER') }}/delete?id=');" class="layui-btn layui-btn-sm layui-btn-danger">{{ trans('common.delete') }}</a></div>

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

		</div>
	</div>

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

		group_name:$("#form_group_name").val(),
		group_code:$("#form_group_code").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
