{
data: "billNo", bSortable: false, 100, className: 'center',
render: function (data, type, full, meta) {
if(isNull(full.fbsStatus) || full.fbsStatus == 0) {
var html = '';
html += '<button class="layui-btn" data-row="' + meta.row + '" onclick="$genNisReceivable(this)" type="button">' + bt.lang('common.button.select') + '</button>';
return html;
}
}
},
上面是datatable返回的每一行对象,前端html中table的id是appTable,则js中
$shouBillView = function (el) {
var data = layui.jquery("#appTable").DataTable().row(layui.jquery(el).data("row")).data();//获取当前点击行对象,
var row = layui.jquery(el).data("row");、、获取当前行号
var id = data.id;//id
var billId = $("billId"+id);
var url = "/bill/accebill/abvoucherinfoVice/viewBillInfo?billId="+billId;
parent.layer.open({
type: 2,
area: ['850px', '530px'],
maxmin: true,
content: basePath + url,
});
}