1,效果图
2,代码
{field: 'APPROVALSTATUS', title: '审批状态',rowspan:2, width: 110, align: 'center', halign: 'center',filter:true,sort:true,
templet: function (row) {
switch (row.APPROVALSTATUS) {
case 0:
return '<span style="color: #ffffff;" class="ybh_background">未审</span>'
case 1:
return '<span style="color: #ffffff;" class="sbwc_background">已审</span>'
}
}},
在done中回调渲染显示
done: function (res, curr, count) {
layui.soulTable.render(this)
$(".ybh_background").parent().parent().css("background","#f86846");
$(".sbwc_background").parent().parent().css("background","#41bfc0");
}