@extends('vip.layouts')
@section('seo_title')
    {{ trans('menu.deductions') }}
@endsection
@section('content')
    <style>
        .layui-laydate-range {
            width: auto;
        }

        .layui-form-switch em {
            width: auto;
        }

        .layui-form-switch {
            width: 44px;
            line-height: 23px;
        }

        .layui-form-item .checkbox {
            width: auto;
        }
    </style>

    <script type="text/html" id="userRegulation">
        <a href="/admin/fund/usermoneyRecord?account_name=@{{d.account_name}}">@{{
            d.account_name}}</a>
    </script>
    {{--<script type="text/html" id="add_money">--}}
        {{--<a href="/admin/Regulation/Edit?id=@{{d.id}}&type=1"--}}
           {{--class="layui-btn layui-btn-sm">{{trans('common.add_money')}}</a>--}}
    {{--</script>--}}
    {{--<script type="text/html" id="cut_money">--}}
        {{--<a href="/admin/Regulation/Edit?id=@{{d.id}}&type=2"--}}
           {{--class="layui-btn layui-btn-sm">{{trans('common.cut_money')}}</a>--}}
    {{--</script>--}}
    <div class="layui-row">

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

            <div class="layui-form-item">

                <form class="layui-form rewrite" action="" eventType=eventForm>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('money.account_name') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="account_name" id="form_account_name" lay-verify="required"
                                   autocomplete="off" class="layui-input" eventType=event-query value="{{$account_name}}">
                        </div>
                        {{--<div class="layui-input-inline checkbox">--}}
                            {{--<input type="checkbox" name="sureblur" id="sureblur" lay-skin="switch" lay-text="精确|模糊"--}}
                                   {{--checked>--}}
                        {{--</div>--}}

                    </div>

                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-sm" 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-laydate-range set" data-type="reload"
                           style="opacity: 1; pointer-events: auto;" href="javascript:window.location.reload()"><i class="layui-icon">ဂ</i></a>
                    </div>


                </form>
            </div>
        </div>
    </div>
    @push('dataTableJS')


        //重置表单
        $('.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 type="text/javascript">
         //回车绑定
        // $(document).keyup(function(event){
        //     if(event.keyCode ==13){
        //         try{
        //             $('.lay-btn-diy').trigger('click');
        //         }catch(ex){}
                

        //     }
        // });
        function  dataTableLoadFinished(res,curr,count){
            var data=res.data;
            if(data==''){
                return;
            }
            var id=data[0].id;
            if(id==undefined||id==''||id==null){
                return;
            }
            var url='/admin/Regulation/Edit?id=';
            url+=id;
            str='<iframe id="ifadd" src='+url+' style="width: 100%;height: 100% ;border:0;"></iframe>';
            $('#content_iframe').html(str);
        }
    </script>

    @include('vip.datatable')
    <div id="content_iframe" style="width: 1000px;height: 500px">

    </div>
@endsection
