layui.use(['laydate', 'table', 'jquery'], function () {
    var table = layui.table;
    //监听表格复选框选择
    table.on('checkbox(demo)', function (obj) {
        console.log(obj)
    });

    
    var laydate = layui.laydate;
    //日期时间范围
    laydate.render({
        elem: '#test10'
      , type: 'datetime'
      , range: true
    });




    var $ = layui.$, active = {
        //查询按钮
        reload: function () {
          
            //执行重载
            table.reload('recordtable', {
                page: {
                    curr: 1 //重新从第 1 页开始
                }
              , where: {
                  NowDateTime: new Date(),
                  userName: $("#userName").val(),
                  dateParty: $(".dateParty").val()
                

              }
            });
        }

    };

    $('.searchfilter .layui-btn').on('click', function () {
        var type = $(this).data('type');
        active[type] ? active[type].call(this) : '';
    });
 


});