获取数据表中相等epf的总和 [英] Get sum of the equal epf in data table
本文介绍了获取数据表中相等epf的总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个数据表有值
I have a datatable having values
EPF value
123 100
123 10
123 700
143 40
143 30
145 40
我希望数据表为< br $>
I want the datatable as
EPF value
123 100
123 10
123 700
total 810
143 40
143 30
total 70
145 40
total 40
我尝试了什么:
What I have tried:
function medical_claim_list_tables() {
medical_claim_list_table = js('#medical_claim_list_table').DataTable({
"destroy": true,
"processing": true,
"serverSide": true,
"scrollX": false,
language: {
searchPlaceholder: "EPF No"
},
"ajax": {
"url": site_url + "/Finance_balance_log_c/get_finance_balance_log",
"type": "POST"
// "data": function (d) {
// return js.extend({}, d, {
// "date_from": js('#date_from').val(),
// "date_to": js('#date_to').val(),
// "claim_category": js('#claim_category').val(),
// "claim_type": js('#claim_type').val(),
// "posted": posted
// });
// }
},
"columns": [
{"data": "emp_no"},
{"data": "name_short"},
{"data": "claim_type"},
{"data": "claim_type_balance"}
],
"lengthMenu": [[99999999], ["All"]],
"createdRow": function (data, type, full, meta) {
if(full['emp_no'])
if (data[3].replace(/[\$,]/g, '') * 1 > 150000) {
js('td', row).eq(5).addClass('highlight');
}
}
推荐答案
,] / g,' ')* 1 > 150000 ){
js(' td' ,row).eq(5 )。addClass(' 突出显示跨度>);
}
}
,]/g, '') * 1 > 150000) { js('td', row).eq(5).addClass('highlight'); } }
这篇关于获取数据表中相等epf的总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文