@extends('vip.layouts')
@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="sendTool">
    @{{#if(d.typename=='sign'){ }}
        <a href="/admin/Lottery_money/editSignin?id=@{{d.id}}" class="layui-btn layui-btn-sm ">修改</a>
    @{{#}else if(d.typename=='finance'){ }}
    <a href="/admin/Lottery_money/editFinance?id=@{{d.id}}" class="layui-btn layui-btn-sm ">修改</a>
    @{{#}else if(d.typename=='recommend'){ }}
    <a href="/admin/Lottery_money/editRecommend?id=@{{d.id}}" class="layui-btn layui-btn-sm ">修改</a>
    @{{#}else{ }}
        <a href="/admin/Lottery_money/editPromotion?id=@{{d.id}}" class="layui-btn layui-btn-sm ">修改</a>
    @{{#} }}
    </script>

    <script type="text/html" id="desc">
  </script>

    <div class="layui-row">

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

            <form class="layui-form rewrite" eventType="eventForm" action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('lottery_money.name') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" id="form_name" value="{{ $name }}" autocomplete="off" class="layui-input" eventType=event-query>
                        </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>

                            <a href="/admin/Lottery_money/add" class="layui-btn layui-btn-sm ">添加</a>
                            <a href="/admin/Lottery_money/addFirstRecharge" class="layui-btn layui-btn-sm ">添加首充彩金</a>
                            <a href="/admin/Lottery_money/addPromotion" class="layui-btn layui-btn-sm ">添加晋级彩金</a>
                            <a href="/admin/Lottery_money/addSignin" class="layui-btn layui-btn-sm ">添加签到彩金</a>
                            <a href="/admin/Lottery_money/addBetting" class="layui-btn layui-btn-sm ">添加投注彩金</a>
                            <a href="/admin/Lottery_money/addDraw" class="layui-btn layui-btn-sm ">添加抽奖彩金</a>
                            <a href="/admin/Lottery_money/addLucky" class="layui-btn layui-btn-sm ">添加幸运彩金</a>
                            <a href="/admin/Lottery_money/addRecommend" class="layui-btn layui-btn-sm ">添加推荐彩金</a>
                            <a href="/admin/Lottery_money/addFinance" class="layui-btn layui-btn-sm ">添加理财彩金</a>
                            <a href="javascript:delWin('/admin/Lottery_money/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>
                        </div>

                    </div>
            </form>
        </div>
    </div>
    @push('dataTableJS')
        /*var active = {
        reload: function(){
        //执行重载
        table.reload('{{ $dataId }}', {
        page: {
        curr: 1 //重新从第 1 页开始
        }
        ,where: {
        name:$("#from_name").val(),
        }
        });
        }
        };
        $('.lay-btn-diy').on('click', function(){
        var type = $(this).data('type');
        active[type] ? active[type].call(this) : '';
        });*/

        //重置表单
        $('.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

    @include('vip.datatable')
@endsection
