1066
| <![CDATA[<script type="text/javascript">
$(document).ready(function() {
inicializarExportacoes('#tabela-pareceres-previos', 'pareceres-previos');
$('#tabela-pareceres-previos').DataTable({ dom: 'Bfrtip', "order": [[0, "desc"]], buttons: [ 'copy', 'pdf', 'print' ], pageLength: 20 });
$('#btnPDF').on('click', function() {
$('.buttons-pdf').click();
});
$('#btnPrint').on('click', function() {
$('.buttons-print').click();
});
});
$('#frm-prestacao-de-contas').on('submit', function(event){
$('#modalLoading').modal('show');
var variaveis = {
_token: 'icx1S01ey6ip7aK6bUxu6ACApBmEtGXuAY6KkoM4',
snife: 'IDOELAJKDKLSKkljhLKJHJKLhjkGHOIfgtJHFGjhfrPIYUtgpJGiGutgKJHGFughDCFFsdTREDxcygTCgfxcEDXryXCERTTXerxERxer',
ano : $('#txtAno').val(),
parecer : true,
do_search: true
};
$('#tabela-pareceres-previos').remove();
$('#painel-prestacao').html('<table class="table table-hover table-responsive display no-m-b" id="tabela-pareceres-previos"><thead><tr><th class="col-md-2 text-center">Ano</th><th class="col-md-6 text-left">Tipo</th><th class="col-md-2 text-center">Data</th><th class="col-md-2 text-center">Anexo(s)</th></tr></thead><tbody id="tbody-prestacao"></tbody></table>');
$('#painel-prestacao').hide('fade');
$.post('https://transparencia.amaraji.pe.gov.br/get_prestacaodecontas', variaveis, function(data) {
if (data.result === 'true') {
if (data.dados.length > 0) {
$('#tbody-prestacao').html('');
for (var i = 0; i < data.dados.length; i++) {
$('#tbody-prestacao').append('<tr><td class="text-center">' + data.dados[i].ano + '</td><td class="text-left">' + data.dados[i].tipo + '</td><td class="text-center">' + data.dados[i].data + '</td><td class="text-center"><a href="' + data.dados[i].url + '">Visualizar Anexo(s)</a></td></tr>');
}
}
} else {
$('#tbody-prestacao').html('');
$('#tabela-tfoot').html('');
$('#tbody-prestacao').html('<tr><td class="text-center" colspan="4"><i class="fa fa-archive text-danger"></i> ' + data.mensagem + '</td></tr>');
}
}).done(function(data) {
$('#modalLoading').modal('hide');
$('#painel-prestacao').show('fade');
inicializarExportacoes('#tabela-pareceres-previos', 'pareceres-previos');
$('#tabela-pareceres-previos').DataTable({ dom: 'Bfrtip', "order": [[0, "desc"]], buttons: [ 'copy', 'pdf', 'print' ], pageLength: 20 });
$('#btnPDF').on('click', function() { $('.buttons-pdf').click(); });
$('#btnPrint').on('click', function() { $('.buttons-print').click(); });
$('.buttons-pdf').addClass('hidden');
$('.buttons-print').addClass('hidden');
});
event.preventDefault();
});
</script>]]>
|