var pageCurr; layui.use(['table','laydate', 'form'], function(){ var table = layui.table; var $ = layui.jquery; var layer = layui.layer; var layDate = layui.laydate; var form = layui.form; // 数据渲染 tableIns = table.render({ elem: '#trayCode', headers: {token: localStorage.getItem('token')}, url: baseUrl+'/trayCode/list/auth', page: true, limit: 16, limits: [16, 30, 50, 100, 200, 500], even: true, toolbar: '#toolbar', cellMinWidth: 50, cols: [[ // {type: 'checkbox'} // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} // ,{field: 'id', align: 'center',title: '编号'} {field: 'trayNo', align: 'center',title: '序列号', sort: true} ,{field: 'start', align: 'center',title: '起始', templet:function(row){ var html = " ($(window).height()*0.9)) { height = ($(window).height()*0.8); } layer.style(index, { // top: (($(window).height()-height)/3)+"px", height: height+'px' }); } $('body').keydown(function () { if (event.keyCode === 13) { $("#search").click(); } });