done: function (res, curr, count) {
var suborders_data_arr = res.data;
for (let suborders_key in suborders_data_arr) {
if (suborders_data_arr[suborders_key]['checkStatus'] == 0) {
let index = suborders_data_arr[suborders_key]['LAY_TABLE_INDEX'];
$('tr[data-index=' + index + '] input[type="checkbox"]').prop('disabled', true).attr("name","layTableCheckboxDisabled"); // 禁止部分选择
$('tr[data-index=' + index + '] input[type="checkbox"]').prop('checked', false); // 取消选中
}
};
form.render('checkbox');
}
全部代码块
//渲染发票tab表格
table.render({
elem: '#overdueTable',
data: invoce,
cols: [[
{type: 'checkbox',width: 60},
{field: 'number',type: 'numbers',title: '序号',width: 60},
{field: 'checkedState',title: '勾选状态',width: 100,
templet: function (data) {
if (data.checkedState == '0') {
return '未勾选';
} else if (data.checkedState == '1') {
return '已勾选';
} else {
return ''
}
}
},
{field: 'invoiceFrom',title: '发票来源',width: 160,
templet: function (data) {
if (data.invoiceFrom == '0') {
return '增值税发票管理系统';
} else if (data.invoiceFrom == '1') {
return '电子发票服务平台';
} else {
return ''
}
}
},
{field: 'sdpNumber',title: '数电票号码',width: 160},
{field: 'invoiceCode',title: '发票代码',width: 160},
{field: 'invoiceNumber',title: '发票号码',width: 160},
{field: 'invoiceDate',title: '开票日期',width: 120},
{field: 'amountMoney',title: '金额',width: 100},
{field: 'faceTaxAmount',title: '票面税额',width: 100},
{field: 'deductionTaxAmount',title: '有效抵扣税额',width: 120},
{field: 'taxpayerName',title: '销售方纳税人名称',width: 160},
{field: 'taxpayerNumber',title: '销售方纳税人识别号',width: 160},
{field: 'ticketType',title: '票种',width: 120,
templet: function (data) {
if (data.ticketType == '0') {
return '数电票(增值税专用发票)';
} else if (data.ticketType == '1') {
return '数电票(普通发票)';
} else if (data.ticketType == '2') {
return '数电票纸质发票(增值税专用发票)';
} else if (data.ticketType == '3') {
return '数电票纸质发票(普通发票)';
} else if (data.ticketType == '4') {
return '数电票(机动车销售统一发票)';
} else if (data.ticketType == '5') {
return '数电纸质发票(机动车销售统一发票)';
} else if (data.ticketType == '6') {
return '数电票(航空运输电子客行程单)';
} else if (data.ticketType == '7') {
return '数电票(铁路电子客票)';
} else if (data.ticketType == '8') {
return '机动车销售统一发票';
} else if (data.ticketType == '9') {
return '增值税专用发票';
} else if (data.ticketType == '10') {
return '增值税通发票';
} else if (data.ticketType == '11') {
return '增值税电子专用发票';
} else if (data.ticketType == '12') {
return '增值税电子普通发票';
} else {
return ''
}
}
},
{field: 'invoiceStatus',title: '发票状态',width: 120,
templet: function (data) {
if (data.invoiceStatus == '0') {
return '正常';
} else if (data.invoiceStatus == '1') {
return '作废';
} else if (data.invoiceStatus == '2') {
return '已红冲-部分';
} else if (data.invoiceStatus == '3') {
return '已红冲-全额';
} else {
return ''
}
}
},
{field: 'redFontLockFlag',title: '红字锁定标志',width: 120,
templet: function (data) {
if (data.redFontLockFlag == '0') {
return '未锁定';
} else if (data.redFontLockFlag == '1') {
return '已锁定';
} else {
return ''
}
}
},
{field: 'checkDate',title: '勾选时间',width: 120},
{field: 'invoiceRiskLevel',title: '发票风险等级',width: 120,fixed: 'right',
templet: function (data) {
var str = ""
if (data.invoiceRiskLevel == '0') {
str = '正常';
} else if (data.invoiceRiskLevel == '1') {
str = '疑点发票';
} else if (data.invoiceRiskLevel == '2') {
str = '异常凭证';
} else {
str = '';
}
return '<div><span style="color:#00A870; background: #DCF5ED;padding: 6px 8px;">' + str + '</span></div>'
}
},
{field: 'redFontLockFlag',title: '红字锁定',width: 120,fixed: 'right',
templet: function (data) {
if (data.redFontLockFlag == '0') {
return '未锁定';
} else if (data.redFontLockFlag == '1') {
return '已锁定';
} else {
return ''
}
}
}
]],
page: true,
id: 'invoiceTable',
limit: 10,
limits: [5, 10, 15],
done: function (res, curr, count) {
var suborders_data_arr = res.data;
for (let suborders_key in suborders_data_arr) {
if (suborders_data_arr[suborders_key]['checkStatus'] == 0) {
let index = suborders_data_arr[suborders_key]['LAY_TABLE_INDEX'];
$('tr[data-index=' + index + '] input[type="checkbox"]').prop('disabled', true).attr("name","layTableCheckboxDisabled"); // 禁止部分选择
$('tr[data-index=' + index + '] input[type="checkbox"]').prop('checked', false); // 取消选中
}
};
form.render('checkbox');
}
})