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

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

					<label class="layui-form-label">{{ trans('priv_code.remark') }}</label>
					<div class="layui-input-inline">
						<input type="text" name="remark" id="form_remark" lay-verify="" autocomplete="off"   eventType="event-query"  value="{{ $remark }}"  class="layui-input">
					</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/Priv_code/add'))
					<div class="layui-inline">
						<a href="/{{ S('MODULE') }}/{{ S('CONTROLLER') }}/add" class="layui-btn layui-btn-sm ">添加</a>
					</div>@endif @if(checkRriv('/admin/Priv_code/delete'))
					<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>@endif

				</div>
			</div>
		</form>
	</div>
</div>
@push('dataTableJS') 
 var active = {
 reload: function () { //执行重载 
    table.reload('{{ $dataId }}', { page: { curr: 1 //重新从第 1 页开始
 }, where: {
     priv_name: $("#form_priv_name").val(),
     priv_code: $("#form_priv_code").val(),
     remark: $("#form_remark").val(),
     rtoken: ''
 }
 });
 }
 };
 $('.lay-btn-diy').on('click', function () {
     var type = $(this).data('type');
     active[type] ? active[type].call(this) : '';
 }); 
 
 //重置表单 
 $('.reset').on('click',function(){ $('input').val(''); $('#trade_type').val(''); var type = $(this).data('type');
 active[type] ? active[type].call(this) : '';
 }); 

 //刷新表单 
 $('.set').on('click',function(){ $('input').val(''); $('#type').val('');
 var type = $(this).data('type');
 active[type] ? active[type].call(this) : '';
 });

@endpush
 @include('vip.datatable')
<link rel="stylesheet" href="{{ asset('/css/untablelist.css') }}" /> @endsection