450
| <![CDATA[<script>
let table;
$(document).ready(function () {
table = $('#datatable').DataTable({
"processing": true,
"stateSave": true,
"serverSide": true,
"scrollX": true,
"language": {"url": 'https://cdn.datatables.net/plug-ins/1.10.19/i18n/Portuguese-Brasil.json'},
"ajax": "https://itambacuri.mg.gov.br/licitacoes/todas/1",
"columns": [
{"data": "numero"},
{"data": "ano"},
{"data": "modalidade"},
{"data": "status"},
// {"data": "numero_modalidade"},
{"data": "objeto", class: "text_table"},
{"data": "data_abertura"},
{"data": "action", name: "action", orderable: false, searchable: false, class: "text-center"},
],
"dom": 'Bfrtip',
"buttons": [
{
extend:'excelHtml5',
text: 'Excel',
action: function ( e, dt, node, config ) {
let url ='https://itambacuri.mg.gov.br/licitacoes/1/export?format=xlsx&status=1'
window.open(url);
}
},
{
extend:'excelHtml5',
text: 'ODS',
action: function ( e, dt, node, config ) {
let url ='https://itambacuri.mg.gov.br/licitacoes/1/export?format=ods&status=1'
window.open(url);
}
},
//
//
//
//
//
//
//
{
extend: 'csvHtml5',
action: function ( e, dt, node, config ) {
let url ='https://itambacuri.mg.gov.br/licitacoes/1/export?format=csv&status=1'
window.open(url);
}
},
]
});
});
$("#abertas").on('click',function () {
status = 1;
localStorage['status'] = '1';
table.ajax.url('https://itambacuri.mg.gov.br/licitacoes/todas/1/1').load();
});
$("#fechadas").on('click',function () {
localStorage['status'] = '2';
table.ajax.url('https://itambacuri.mg.gov.br/licitacoes/todas/1/2').load();
});
$("#todas").on('click',function () {
localStorage['status'] = null;
table.ajax.url('https://itambacuri.mg.gov.br/licitacoes/todas/1').load();
});
</script>]]>
|