<form id="provincialCompanySearch"
class="layui-form form-conmon form-conmon-more"
data-params='{"dataName":"provincialCompanyTable", "action":"list", "ajax":true, "bind":true}'>
<div class="layui-inline" style="float: right">
<button class="layui-btn layui-btn-primary layui-border-red" id="searchBtn" jq-submit
jq-filter="search"
style="background-color: red;color: white;">查询
</button>
</div>
//数据加载到这个表格里
<div class="layui-form">
<table class="layui-table jq-even" id="provincialCompanyTable"
lay-filter="provincialCompanyTable"></table>
</div>
</form>
<script type="text/javascript">
layui
.use(
['jqfrm', 'jqbind', 'upload', 'laydate'],
function () {
var jqbind = layui.jqbind, form = layui.jqform, $ = layui.jquery, frm = layui.jqfrm,
ctx = top.global.ctx, table = layui.table;
var upload = layui.upload, laydate = layui.laydate;
var $ax = layui.jqajax;
form.init({
"form": "#provincialCompanySearch"
});
var tableIns = table
.render({
elem: '#provincialCompanyTable',
url: ctx + '/cadre/A/list',
where: {
"employeeNumber": $("#employeeNumber").val(),
"lastName": $("#lastName").val(),
"psex": $("#psex").val(),
"zfPositionFlag": $("#zfPositionFlag").val(),
"ageStart": $("#ageStart").val(),
"ageEnd": $("#ageEnd").val(),
"topDegree": $("#topDegree").val(),
"justAnInputBox": $("#justAnInputBox").val()
},
cols: [[
{
type: 'checkbox',
fixed: 'id',
width: "4%",
align: 'center'
}, {
field: 'all_order',
title: '序号',
width: "10%",
align: 'center',
fixed: 'left'
}, {
field: 'org_order',
title: '单位内排序',
width: "10%",
align: 'center',
fixed: 'left'
}, {
field: 'organization_name',
title: '单位',
width: "10%",
align: 'center',
fixed: 'left'
}, {
field: 'zf_position_flag',
title: '正副职标记',
width: "5%",
align: 'center',
fixed: 'left'
}, {
field: 'last_name',
title: '姓名',
width: "10%",
align: 'center',
fixed: 'left'
}, {
field: 'employee_number',
title: '员工编号',
width: "10%",
align: 'center',
fixed: 'left'
}
{fixed: 'right', title: '操作', width: '10%', align: 'center', toolbar: '#barDemo'}]],
id: 'provincialCompanyTable',
page: true,
done: function (res, curr, count) {
jqbind.init();
tableIns.config.datas = table.cache['provincialCompanyTable'];
top.global['provincialCompanyTable'] = tableIns;
}
});
});
点完查询按钮不走 /list路径
只走这个 /cadre/A
你在查询的时候在render加载一次就可以了