<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<title>测试</title>
</head>
<body>
<# include ../common/link >
<div>
<form action="" class="parent">
<input type="text" class="search" placeholder="搜索">
<input type="button" name="" id="" class="btn">
<button type="button" autofocus="autofocus">搜索</button>
</form>
</div>
<table class="layui-hide" id="record" lay-filter="test"></table>
<# include ../common/footer >
<script >
layui.use('table', function (){
var table = layui.table;
// 初始化表格
table.render({
id:record,
elem:'#record',
url: baseServer+"/baobiao/RecordInit",
filter: { cache: true },
method:"post",
autoRowHeight: true,
queryParams: function (data) {
// 这里会把你收集的表单数据作为查询条件,适用于表格的查询,不仅仅导出excel适用
nebula.form.toObject('form-query', data);
},
cols: [[
{field: 'id', width: 150, title: 'ID'}
, {field: 'data', width: 300, title: '日期'}
, {field: 'quality_assurance_id', width: 140, title: 'QA工号'}
, {field: 'quality_assurance_name', title: 'QA姓名', templet: function (obj) {
if (obj.status === STATUS_ENABLE) {
return '<span class="color-green">启用</span>';
} else {
return '<span class="color-grey">停用</span>';
}
},
}
, {templet: '#operationTpl', width: 110, align: 'center', title: '操作', fixed: 'right'}
]]
});
})
</script>
</body>
</html>
<html lang="en" >
<head>
<meta charset="utf-8">
<title>测试</title>
</head>
<body>
<# include ../common/link >
<div>
<form action="" class="parent">
<input type="text" class="search" placeholder="搜索">
<input type="button" name="" id="" class="btn">
<button type="button" autofocus="autofocus">搜索</button>
</form>
</div>
<table class="layui-hide" id="record" lay-filter="test"></table>
<# include ../common/footer >
<script >
layui.use('table', function (){
var table = layui.table;
// 初始化表格
table.render({
id:record,
elem:'#record',
url: baseServer+"/baobiao/RecordInit",
filter: { cache: true },
method:"post",
autoRowHeight: true,
queryParams: function (data) {
// 这里会把你收集的表单数据作为查询条件,适用于表格的查询,不仅仅导出excel适用
nebula.form.toObject('form-query', data);
},
cols: [[
{field: 'id', width: 150, title: 'ID'}
, {field: 'data', width: 300, title: '日期'}
, {field: 'quality_assurance_id', width: 140, title: 'QA工号'}
, {field: 'quality_assurance_name', title: 'QA姓名', templet: function (obj) {
if (obj.status === STATUS_ENABLE) {
return '<span class="color-green">启用</span>';
} else {
return '<span class="color-grey">停用</span>';
}
},
}
, {templet: '#operationTpl', width: 110, align: 'center', title: '操作', fixed: 'right'}
]]
});
})
</script>
</body>
</html>