@extends('vip.layouts') @section('content')
@if(checkRriv('/admin/Priv_code/add')) @endif @if(checkRriv('/admin/Priv_code/delete')) @endif
@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') @endsection