@extends('vip.layouts')
@section('seo_title')
    篮球赛事
@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>

<!-- 样式 -->
<style type="text/css">
    /* 弹窗 (background) */
    .modal {
        display: none; /* 默认隐藏 */
        /*生成绝对定位的元素，相对于浏览器窗口进行定位。*/
        position: fixed; 
        z-index: 1; 
        left: 0;
        top: 0;
        /*设置弹窗位置*/
        padding-top: 100px;
        padding-bottom: 200px;
        /*浮在全屏上*/
        width: 100%; 
        height:  100%; 
        /*overflow：auto；如果内容被修剪，则浏览器会显示滚动条，以便查看其余内容。*/
        overflow: auto; 
        background-color: rgb(0,0,0); 
        background-color: rgba(0,0,0,0.4);
        text-align: right;
    }

    /* 弹窗内容 */
    .modal-content {
        /*position: relative;*/
        /*弹窗背景色设置*/
        background-color: #fefefe;
        margin: auto;
        padding: 260px auto;
        width: 600px;
        box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
        -webkit-animation-name: animatetop;
        -webkit-animation-duration: 0.4s;
        animation-name: animatetop;
        animation-duration: 0.4s;
        border-radius: 10px;
       }

    /* 添加动画 */
    @-webkit-keyframes animatetop {
        from {top:-200px; opacity:0} 
        to {top:0; opacity:1}
    }

    @keyframes animatetop {
        from {top:-200px; opacity:0}
        to {top:0; opacity:1}
    }

    /* 关闭按钮 */
    .close {
        color: white;
        float: right;
        font-size: 28px;
        font-weight: bold;
    }

    .close:hover, .close:focus {
        color: #000;
        text-decoration: none;
        cursor: pointer;
    }

    .modal-header {
        display: block;
        line-height: 30px;
        padding: 2px 10px;
        background-color: #AEAEAE;
        color: white;
        text-align: left;
        border-radius: 5px 5px 0 0;
    }

    .modal-body {
        padding: 2px 16px;
        font-size: 18px;
        /*height: 200px;*/
    }

    .modal-footer {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 520px;
        padding: 0 40px;
        height: 50px;
       border-radius:0 0 5px 5px;
        display: block;
        line-height: 39px;
        background-color: #AEAEAE;
        color: white;
    }
    .ok,.no{
        width: 100px;
        height: 40px;
    }
</style>

    <script type="text/html" id="liansai">
      @{{#if(d.match_id!=null){ }}
        <span>@{{ d.match_id}}</span>
      @{{#} }}<br>
      @{{#if(d.name_chinese!=null){ }}
        <span>@{{ d.name_chinese}}</span>
      @{{#} }}
    </script>

    <script type="text/html" id="dsnum">
        <span><a href="/admin/SoccerNoteList/notelist?type=lq&match_id=@{{d.match_id}}"> 单式</a></span>
    </script>

    <script type="text/html" id="matchstatus">
      @{{#if(d.status==0){ }}
        <span>未开始</span>
      @{{#} }}
      @{{#if(d.status==1){ }}
        <span>进行中</span>
      @{{#} }}
      @{{#if(d.status==2){ }}
        <span>已结束</span>
      @{{#} }}
      @{{#if(d.status==3){ }}
        <span>已结算</span>
      @{{#} }}
      @{{#if(d.status==4){ }}
        <span>已作废</span>
      @{{#} }}
    </script>

    <script type="text/html" id="operation">
        
        <!-- <button onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm layui-btn-green set">赛事结果</button> -->

        @{{#if(d.status==2 || d.status==3){ }}
            @{{#if(d.status==2){ }}
                <span><li class="layui-btn layui-btn-sm layui-btn-green set" onclick="lqsettlement(@{{d.match_id}},1)">结算</li></span>
            @{{#} }}
            @{{#if(d.status==3){ }}
                <span><li class="layui-btn   layui-btn-sm layui-btn-normal reset" onclick="lqsettlement(@{{d.match_id}},2)">再结算</li></span>
            @{{#} }}
        @{{#} }}
        @{{#if(d.status!=4 && d.status!=3){ }}
        <span><li class="layui-btn layui-btn-sm  layui-btn-danger" onclick="lqrevoke(@{{d.match_id}})">作废</li></span>
        @{{#} }}
        @{{#if(d.status==4){ }}
        <span><li class="layui-btn layui-btn-sm  layui-btn-danger" onclick="lqrevoke(@{{d.match_id}})">已作废</li></span>
        @{{#} }}
        <button onclick="resultLog(@{{d.match_id}})" class="layui-btn layui-btn-sm layui-btn-green set">赛事结果比分记录</button>
    </script>
    
    <script type="text/html" id="sectionone_two">
        <input type="text" style="width:30px;heigth:20px" id="ozteamscore@{{d.match_id}}" name="ozteamscore" value="@{{d.ozteamscore}}">
        <input type="text" style="width:30px;heigth:20px" id="okteamscore@{{d.match_id}}" name="okteamscore" value="@{{d.okteamscore}}"> / 
        <input type="text" style="width:30px;heigth:20px" id="tzteamscore@{{d.match_id}}" name="tzteamscore" value="@{{d.tzteamscore}}">
        <input type="text" style="width:30px;heigth:20px" id="tkteamscore@{{d.match_id}}" name="tkteamscore" value="@{{d.tkteamscore}}">
    </script>

    <script type="text/html" id="sectionthere_four">
        <input type="text" style="width:30px;heigth:20px" id="szteamscore@{{d.match_id}}" name="szteamscore" value="@{{d.szteamscore}}">
        <input type="text" style="width:30px;heigth:20px" id="skteamscore@{{d.match_id}}" name="skteamscore" value="@{{d.skteamscore}}"> / 
        <input type="text" style="width:30px;heigth:20px" id="azteamscore@{{d.match_id}}" name="azteamscore" value="@{{d.azteamscore}}">
        <input type="text" style="width:30px;heigth:20px" id="akteamscore@{{d.match_id}}" name="akteamscore" value="@{{d.akteamscore}}">
        <button class="layui-icon" onclick="teamscore(@{{d.match_id}})"><h6>提交</h6></button>
    </script>

    <script type="text/html" id="status">
        @if(checkRriv('/admin/sportsbk/index'))<input type="checkbox" name="status" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
    </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('sportsbk.sousuo') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="home_team" id="home_team" eventType="event-query"  value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input" placeholder="输入赛事id,主队,客队名">
                        </div>
                        <div class="layui-input-inline checkbox">
                            <input type="checkbox" name="sureblur" id="form_sureblur" lay-skin="switch" lay-text="精确|模糊" @if(!isset($sureblurs) || $sureblurs=='on') checked @endif  class="layui-input" eventType=event-query>
                            <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $sureblurs }}">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('sportsbk.status') }}</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <select name="status"  id="form_status"  lay-verify="" autocomplete="off" class="layui-input"  eventType=event-query>
                                <option value="-1">{{ trans('sportsbk.select_status') }}</option>
                                @foreach(trans('status.match_operation.status') as $k=>$v):
                                    @if($status==$k))
                                        <option value="{{$k}}" selected="selected">{{$v}}</option>
                                    @else
                                        <option value="{{$k}}">{{$v}}</option>
                                    @endif
                                @endforeach
                            </select>
                        </div>
                   </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('sportsfoot.star_time') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="star_time" value="{{ $star_time }}" id="star_time" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('sportsfoot.end_time') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="end_time"  value="{{$end_time}}" id="end_time" placeholder=" - " word-break: break-all; lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
                        </div>
                    </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-xs" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon" onclick="refreshall('lq')">刷新赛事</i></a>
                        <!-- @if(checkRriv('/admin/sportsbk/addoutcome'))<a href="/admin/sportsbk/addoutcome" class="layui-btn layui-btn-sm ">添加</a>@endif -->
                        @if(checkRriv('/admin/sportsbk/deleteoutcome'))<a href="javascript:delWin('/admin/sportsbk/deleteoutcome?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif
                        @if(checkRriv('/admin/sportsbk/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbk/Settlementlq?allhalf=1&id=');" class="layui-btn layui-btn-sm layui-btn-green set">结算全场</a>@endif
                        @if(checkRriv('/admin/sportsbk/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbk/Settlementlq?allhalf=2&id=');" class="layui-btn layui-btn-xs">结算上半场</a>@endif
                        @if(checkRriv('/admin/sportsbk/Settlementlq'))<a href="javascript:allbalance('/admin/sportsbk/Settlementlq?allhalf=2&id=');" class="layui-btn layui-btn-sm layui-btn-green set">重新结算上半场</a>@endif
                    </div>
                </div>
            </form>
        </div>
    </div>

    <!-- 弹窗隐藏区域 -->
    <div id="myModal" class="modal">
            <input type="hidden" id="match_id" name="match_id" value="@{{d.match_id}}">
            <div class="modal-content">
                <div class="modal-header">
                    <span class="close">&times;</span>
                    <h2>赛事结果添加</h2>
                </div>
                <div class="modal-body">
                    <p style="text-align:left;color:#5f7788;">请认真填写赛事结果,将会按照改结果结算</p><br>
                    <div style="text-align:left;">
                        <div style="display: flex;">
                            <li>最先进球球队：</li><input type="text" id="firstscore" name="firstscore" value="">
                        </div>
                        <div style="display: flex;">
                            <li>最后进球球队：</li><input type="text" id="lastscore" name="lastscore" value="">
                        </div>
                        <div style="display: flex;">
                            <li> 获 &nbsp;胜&nbsp; 球&nbsp; 队&nbsp;：</li><input type="text" id="matchwiner" name="matchwiner" value="">
                        </div>
                        <div style="display: flex;">
                            <li>上主队进球数：</li><input type="text" id="uhomescore" AUTOCOMPLETE="off" name="uhomescore" value="">
                        </div>
                        <div style="display: flex;">
                            <li>上客队进球数：</li><input type="text" id="uguestscore" AUTOCOMPLETE="off" name="uguestscore" value="">
                        </div>
                        <div style="display: flex;">
                            <li>主队全场角球：</li><input type="text" id="homeallcard" AUTOCOMPLETE="off" name="homeallcard" value="">
                        </div>
                        <div style="display: flex;">
                            <li>客队全场角球：</li><input type="text" id="guestallcard" AUTOCOMPLETE="off" name="guestallcard" value="">
                        </div>
                        <div style="display: flex;">
                            <li>主队半场角球：</li><input type="text" id="homehalfcard" AUTOCOMPLETE="off" name="homehalfcard" value="">
                        </div>
                        <div style="display: flex;">
                            <li>客队半场角球：</li><input type="text" id="guesthalfcard" AUTOCOMPLETE="off" name="guesthalfcard" value="">
                        </div>
                        <div style="display: flex;">
                            <li>主队全场罚牌：</li><input type="text" id="homeallcorner" AUTOCOMPLETE="off" name="homeallcorner" value="">
                        </div>
                        <div style="display: flex;">
                            <li>客队全场罚牌：</li><input type="text" id="guestallcorner" AUTOCOMPLETE="off" name="guestallcorner" value="">
                        </div>
                        <div style="display: flex;">
                            <li>主队半场罚牌：</li><input type="text" id="homehalfcorner" AUTOCOMPLETE="off" name="homehalfcorner" value="">
                        </div>
                        <div style="display: flex;">
                            <li>客队半场罚牌：</li><input type="text" id="guesthalfcorner" AUTOCOMPLETE="off" name="guesthalfcorner" value="">
                        </div><br>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="ok" onchange="buttonClick()"><h3>确定</h3></button>&nbsp;<button class="no"><h3>取消</h3></button>
                </div>
            </div>
    </div>

    <style>

        .layui-btn{
            margin: 1px 0px;
        }

        .log_title{

        }

        .log_head_div{
            font-size: 17px;
            margin-bottom: 5px;
        }
        .log_content_div td{
            padding: 10px;
            border: 1px solid #888888;
        }

        hr{
            margin: 14px 0;
        }
    </style>

	<script type="text/javascript">
        $(function () {
            $('body').on('click', 'a[eventtype="event-delete"]', function () {
                var span = $(this).prev();
                var id = span.attr('data-id');
                // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
            })
            $('body').on('click','#form_sureblur~.layui-form-switch',function(){
            	var sus = $('#form_sureblur').next().text();
            	if(sus=='精确'){
            		$('#form_sureblurs').val('on');
            	}else{
            		$('#form_sureblurs').val('off');
            	}
            })
        })

        function addResult($match_id){
            document.getElementById("firstscore").value='';
                    document.getElementById("lastscore").value='';
                    document.getElementById("matchwiner").value='';
                    document.getElementById("uhomescore").value='';
                    document.getElementById("uguestscore").value='';
                    document.getElementById("homeallcard").value='';
                    document.getElementById("guestallcard").value='';
                    document.getElementById("homehalfcard").value='';
                    document.getElementById("guesthalfcard").value='';
                    document.getElementById("homeallcorner").value='';
                    document.getElementById("guestallcorner").value='';
                    document.getElementById("homehalfcorner").value='';
                    document.getElementById("guesthalfcorner").value='';
            var match_id = $match_id;
            document.getElementById("match_id").value=$match_id;//赋值个弹窗
            $(":input").val("");
            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/admin/Sportsbk/Matchresult',
                data: {match_id:match_id},
                success: function(data) {

                    if(data){
                    document.getElementById("firstscore").value=data.newapp.first_score;
                    document.getElementById("lastscore").value=data.newapp.last_score;
                    document.getElementById("matchwiner").value=data.newapp.match_winer;
                    document.getElementById("uhomescore").value=data.newapp.u_home_score;
                    document.getElementById("uguestscore").value=data.newapp.u_guest_score;
                    document.getElementById("homeallcard").value=data.corner_ball.home;
                    document.getElementById("guestallcard").value=data.corner_ball.guest;
                    document.getElementById("homehalfcard").value=data.corner_ball.home_half;
                    document.getElementById("guesthalfcard").value=data.corner_ball.guest_half;
                    document.getElementById("homeallcorner").value=data.penalty_card.home;
                    document.getElementById("guestallcorner").value=data.penalty_card.guest;
                    document.getElementById("homehalfcorner").value=data.penalty_card.home_half;
                    document.getElementById("guesthalfcorner").value=data.penalty_card.guest_half;
                    }
                }
            })

            //获取弹窗得div
            var modal = document.getElementById('myModal');
            // 获取 <span> 元素，用于关闭弹窗 （X）
            var span = document.getElementsByClassName("close")[0];
            //获取弹窗中得确定按钮
            var ok=document.getElementsByClassName("ok")[0];
            //获取弹窗中得取消按钮
            var no=document.getElementsByClassName("no")[0];
            //窗体弹出
            modal.style.display = "block";
            //点击窗体ok
            ok.onclick=function(){
                //执行弹出窗体得确定后得操作
                alert("执行确定按钮点击得操作");
                //关闭窗口
                modal.style.display = "none";
                buttonClick();
            }
            //点击窗体取消按钮
            no.onclick=function(){
                //直接关闭窗口
                modal.style.display = "none";
            }
            // 点击 <span> (x), 关闭弹窗
            span.onclick = function() {
                //直接关闭窗口
                modal.style.display = "none";
            }
            // 在用户点击其他地方时，关闭弹窗
            window.onclick = function(event) {
                //点击窗口外内容，关闭窗口
                if (event.target == modal) modal.style.display = "none";
            }
        }

        function buttonClick(){
            var match_id = $("#match_id").val();
            var firstscore = $("#firstscore").val();
            var lastscore = $("#lastscore").val();
            var matchwiner = $("#matchwiner").val();
            var uhomescore = $("#uhomescore").val();
            var uguestscore = $("#uguestscore").val();
            var homeallcard = $("#homeallcard").val();
            var guestallcard = $("#guestallcard").val();
            var homehalfcard = $("#homehalfcard").val();
            var guesthalfcard = $("#guesthalfcard").val();
            var homeallcorner = $("#homeallcorner").val();
            var guestallcorner = $("#guestallcorner").val();
            var homehalfcorner = $("#homehalfcorner").val();
            var guesthalfcorner = $("#guesthalfcorner").val();

            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/admin/Sportsbk/addend',
                data: {match_id:match_id,firstscore:firstscore,lastscore:lastscore,matchwiner:matchwiner,uhomescore:uhomescore,uguestscore:uguestscore,homeallcard:homeallcard,guestallcard:guestallcard,homehalfcard:homehalfcard,guesthalfcard:guesthalfcard,homeallcorner:homeallcorner,guestallcorner:guestallcorner,homehalfcorner:homehalfcorner,guesthalfcorner:guesthalfcorner},
                success: function(data) {
                    
                    if(data.status==1){
                        layer.msg(data.msg);
                        location. reload()//刷新当前页面
                    }
                }
            })
        }

        //篮球作废
        function lqrevoke(match_id){
            var match_id = match_id;
            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/admin/Sportsbk/revoke',
                data: {match_id:match_id},
                success: function(data) {
                    if(data.status==1){
                        layer.msg(data.msg);
                        location. reload()//刷新当前页面
                    }
                }
            })
        }

        //篮球结算 
        function lqsettlement(match_id,type){
            var match_id = match_id;
            var type = type;

            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/admin/Sportsbk/Settlementlq',
                data: {match_id:match_id,type:type},
                success: function(data) {
                    if(data.status==1){
                        layer.msg(data.msg);
                        location. reload()//刷新当前页面
                    }else if(data.status==2){
                        layer.msg(data.msg);
                        reloadDataTable();return;
                    }else if(data.status==4){
                        layer.msg(data.msg);
                        reloadDataTable();return;
                    }else{
                        layer.msg(data.msg);
                        reloadDataTable();return;
                    }
                }
            })
        }

        //修改赛事比分  only:唯一 num:inputval match_id:match_id 
        function teamscore(match_id){
            var match_id = match_id;
            // var reg = /^[0-99]\d*$/;
            var okteamscore = $("#okteamscore"+match_id).val();
            var ozteamscore = $("#ozteamscore"+match_id).val();
            var tkteamscore = $("#tkteamscore"+match_id).val();
            var tzteamscore = $("#tzteamscore"+match_id).val();
            var skteamscore = $("#skteamscore"+match_id).val();
            var szteamscore = $("#szteamscore"+match_id).val();
            var akteamscore = $("#akteamscore"+match_id).val();
            var azteamscore = $("#azteamscore"+match_id).val();

            // if(reg.test(num)==false){ 
            //     layer.msg('不能为空值');
            //     reloadDataTable();return;
            // }

            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/admin/Sportsbk/updatascore',
                data: {match_id:match_id,okteamscore:okteamscore,ozteamscore:ozteamscore,tkteamscore:tkteamscore,tzteamscore:tzteamscore,skteamscore:skteamscore,szteamscore:szteamscore,akteamscore:akteamscore,azteamscore:azteamscore},
                success: function(data) {
                    if(data.status==1){
                        layer.msg(data.msg);
                        location. reload()//刷新当前页面
                    }
                }
            })
        }

        //刷新赛事数据
        function refreshall(game_code){ 
            var game_code = game_code;
            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/setSports',
                data: {game_code:game_code},
                success: function(data) {
                    // alert(data);
                    if(data.status==1){
                        layer.msg(data.msg);
                        location. reload()//刷新当前页面
                    }
                }
            })
        }

        //layer弹窗开始
        let resultLogOpen = '';
        function resultLog(match_id){
            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: '/admin/Sportsbk/resultLog',
                data: {match_id:match_id},
                success: function(data) {
                    let length = data.list.length;
                    if(length <= 0){
                        layer.alert('该赛事还没有赛事结果比分记录');
                        return false;
                    }

                    let html = '';
                    let info = '';
                    for(let i=0; i<length; i++){
                        info = data['list'][i];
                        if(info.type == 2){ //比分

                            html +='<div style="margin-left: 20px;"><div class="log_head_div"><span class="log_title">修改人</span>：'+info['loginname']+'&nbsp;&nbsp;&nbsp;<span class="log_title">添加时间：</span>'+info['create_at']+'&nbsp;&nbsp;&nbsp;<span class="log_title">添加类型</span>：赛事结果</div>'
                                +'<div class="log_content_div"><table><tr>' +
                                '<td>第一节比分(主/客)</td>' +
                                '<td>第二节比分(主/客)</td>' +
                                '<td>第三节比分(主/客)</td>' +
                                '<td>第四节比分(主/客)</td>' +
                                '</tr><tr>' +
                                '<td>'+info['home_score'][1]+'&nbsp;/&nbsp;'+info['guest_score'][1]+'</td>' +
                                '<td>'+info['home_score'][2]+'&nbsp;/&nbsp;'+info['guest_score'][2]+'</td>' +
                                '<td>'+info['home_score'][3]+'&nbsp;/&nbsp;'+info['guest_score'][3]+'</td>' +
                                '<td>'+info['home_score'][4]+'&nbsp;/&nbsp;'+info['guest_score'][4]+'</td>' +
                                '</tr></table></div></div><hr>';
                        }else{ //结果

                        }
                    }

                    html += '<br><div style="margin:0px auto 10px;width: 112px;"><button class="layui-btn layui-btn-sm layui-btn-green set" id="buttonClick" onclick="rlClick()"><h3>确定</h3></button>&nbsp;<button onclick="rlClick()" class="layui-btn layui-btn-sm layui-btn-danger" id="reset"><h3>取消</h3></button></div></div>';

                    resultLogOpen = layer.open({
                        type: 1 //Page层类型
                        ,area: ['640px', '500px']
                        ,title: '<h2>赛事结果比分记录<h2>'
                        ,shade: 0.6 //遮罩透明度
                        ,maxmin: true //允许全屏最小化
                        ,anim: 1 //0-6的动画形式，-1不开启
                        ,content:html
                    });
                }
            })
        }

        function rlClick() {
            layer.close(resultLogOpen)
        }

	</script>
@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            account:$("#form_account").val(),
            register_ip:$('#form_register_ip').val(),
            last_ip:$('#form_last_ip').val(),
            register_url:$('#form_register_url').val(),
            last_url:$('#form_last_url').val(),
            regist_startime:$('#form_regist_startime').val(),
            regist_endtime:$('#form_regist_endtime').val(),
            statuss:$('#form_statuss').val(),
            cash_small:$('#form_cash_small').val(),
            cash_big:$('#form_cash_big').val(),
            sureblur:$('.layui-form-switch').text(),
        }
      });
    }
  };
$('.lay-btn-diy').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
  });*/

  //重置表单
  $('.reset').on('click',function(){
      $('input').val('');
      $('#form_statuss').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
