206
| <![CDATA[<script>
$(function () {
var tableLista = $('#lista').DataTable({
"searching": false, "ordering": false, "lengthChange": false, "info": false,
"sAjaxSource": "?acao=listagem",
"columnDefs": [
{ className: 'text-center', targets: [0, 1, 2, 3] }
]
});
$("#lista tbody").on("click","button", function(){
if($(this).attr("id") == "BT_VISUALIZAR"){
reg = $(this).attr("data-reg");
$.ajax({ url: "index", type: "GET", data: { acao: "visualizar", r: reg }, dataType: "json", success: function (resp) {
if(resp.status == '1'){
window.open(resp.link_arquivo,'_blank');
return;
}else{
alert(resp.status);
}
}}).fail(function (jqXHR, textStatus, error) {
console.log(jqXHR.responseText);
});
return;
}
if($(this).attr("id") == "BT_DOWNLOAD"){
reg = $(this).attr("data-reg");
window.open('index?acao=download&r='+reg,'_blank');
return;
}
});
$("#btUltimaEdicao").on("click", function(){
$.ajax({ url: "index", type: "GET", data: { acao: "visualizar", r: '374' }, dataType: "json", success: function (resp) {
if(resp.status == '1'){
window.open(resp.link_arquivo,'_blank');
return;
}else{
alert(resp.status);
}
}}).fail(function (jqXHR, textStatus, error) {
console.log(jqXHR.responseText);
});
return;
});
$('#calendario').datetimepicker({
inline: true,
sideBySide: true,
format: 'DD/MM/YYYY',
//daysOfWeekDisabled: [0, 6],
enabledDates: [
moment("2019-04-26"),moment("2019-04-30"),moment("2019-05-02"),moment("2019-05-07"),moment("2019-05-13"),moment("2019-05-16"),moment("2019-05-21"),moment("2019-05-23"),moment("2019-05-27"),moment("2019-05-31"),moment("2019-06-03"),moment("2019-06-04"),moment("2019-06-06"),moment("2019-06-12"),moment("2019-06-13"),moment("2019-06-17"),moment("2019-06-19"),moment("2019-06-24"),moment("2019-07-01"),moment("2019-07-04"),moment("2019-07-11"),moment("2019-07-15"),moment("2019-07-16"),moment("2019-07-18"),moment("2019-07-26"),moment("2019-07-30"),moment("2019-08-01"),moment("2019-08-09"),moment("2019-08-12"),moment("2019-08-14"),moment("2019-08-22"),moment("2019-08-27"),moment("2019-09-17"),moment("2019-09-20"),moment("2019-09-27"),moment("2019-10-01"),moment("2019-10-02"),moment("2019-10-07"),moment("2019-10-18"),moment("2019-10-22"),moment("2019-10-25"),moment("2019-10-29"),moment("2019-11-04"),moment("2019-11-20"),moment("2019-12-10"),moment("2019-12-18"),moment("2020-01-20"),moment("2020-01-29"),moment("2020-01-31"),moment("2020-02-03"),moment("2020-02-17"),moment("2020-02-18"),moment("2020-02-28"),moment("2020-03-02"),moment("2020-03-09"),moment("2020-03-17"),moment("2020-03-19"),moment("2020-03-20"),moment("2020-03-24"),moment("2020-03-31"),moment("2020-04-02"),moment("2020-04-07"),moment("2020-04-16"),moment("2020-04-20"),moment("2020-04-22"),moment("2020-04-23"),moment("2020-04-28"),moment("2020-05-06"),moment("2020-05-08"),moment("2020-05-12"),moment("2020-05-18"),moment("2020-05-19"),moment("2020-05-26"),moment("2020-06-01"),moment("2020-06-03"),moment("2020-06-10"),moment("2020-06-15"),moment("2020-06-18"),moment("2020-06-24"),moment("2020-07-06"),moment("2020-07-20"),moment("2020-07-27"),moment("2020-07-28"),moment("2020-08-04"),moment("2020-08-05"),moment("2020-08-10"),moment("2020-08-17"),moment("2020-08-26"),moment("2020-09-03"),moment("2020-09-14"),moment("2020-09-21"),moment("2020-09-22"),moment("2020-09-29"),moment("2020-10-06"),moment("2020-10-14"),moment("2020-10-29"),moment("2020-11-06"),moment("2020-11-19"),moment("2020-11-25"),moment("2020-11-26"),moment("2020-12-07"),moment("2020-12-09"),moment("2020-12-11"),moment("2020-12-16"),moment("2020-12-18"),moment("2021-01-01"),moment("2021-01-04"),moment("2021-01-19"),moment("2021-01-20"),moment("2021-01-25"),moment("2021-01-27"),moment("2021-01-29"),moment("2021-02-01"),moment("2021-02-08"),moment("2021-02-09"),moment("2021-02-12"),moment("2021-02-23"),moment("2021-02-26"),moment("2021-03-17"),moment("2021-03-19"),moment("2021-03-23"),moment("2021-03-24"),moment("2021-03-25"),moment("2021-03-27"),moment("2021-03-31"),moment("2021-04-05"),moment("2021-04-07"),moment("2021-04-12"),moment("2021-04-13"),moment("2021-04-26"),moment("2021-05-06"),moment("2021-05-11"),moment("2021-05-17"),moment("2021-05-19"),moment("2021-05-20"),moment("2021-05-24"),moment("2021-05-31"),moment("2021-06-07"),moment("2021-06-21"),moment("2021-06-28"),moment("2021-06-29"),moment("2021-07-05"),moment("2021-07-09"),moment("2021-07-12"),moment("2021-07-16"),moment("2021-07-26"),moment("2021-07-28"),moment("2021-07-29"),moment("2021-08-04"),moment("2021-08-09"),moment("2021-08-16"),moment("2021-08-23"),moment("2021-08-24"),moment("2021-08-30"),moment("2021-09-02"),moment("2021-09-10"),moment("2021-09-13"),moment("2021-09-14"),moment("2021-09-22"),moment("2021-09-27"),moment("2021-09-30"),moment("2021-10-01"),moment("2021-10-07"),moment("2021-10-14"),moment("2021-10-18"),moment("2021-10-27"),moment("2021-11-05"),moment("2021-11-08"),moment("2021-11-09"),moment("2021-11-16"),moment("2021-11-17"),moment("2021-11-22"),moment("2021-11-23"),moment("2021-11-25"),moment("2021-12-02"),moment("2021-12-03"),moment("2021-12-06"),moment("2021-12-07"),moment("2021-12-10"),moment("2021-12-13"),moment("2021-12-15"),moment("2021-12-17"),moment("2022-01-10"),moment("2022-01-13"),moment("2022-01-26"),moment("2022-01-28"),moment("2022-01-31"),moment("2022-02-03"),moment("2022-02-07"),moment("2022-02-08"),moment("2022-02-09"),moment("2022-02-14"),moment("2022-02-17"),moment("2022-02-24"),moment("2022-03-03"),moment("2022-03-07"),moment("2022-03-10"),moment("2022-03-15"),moment("2022-03-16"),moment("2022-03-21"),moment("2022-03-23"),moment("2022-03-24"),moment("2022-04-04"),moment("2022-04-11"),moment("2022-04-12"),moment("2022-04-18"),moment("2022-04-20"),moment("2022-05-03"),moment("2022-05-09"),moment("2022-05-10"),moment("2022-05-12"),moment("2022-05-17"),moment("2022-05-18"),moment("2022-05-19"),moment("2022-05-20"),moment("2022-05-30"),moment("2022-06-02"),moment("2022-06-06"),moment("2022-06-07"),moment("2022-06-09"),moment("2022-06-13"),moment("2022-06-23"),moment("2022-06-24"),moment("2022-06-27"),moment("2022-07-08"),moment("2022-07-12"),moment("2022-07-25"),moment("2022-07-27"),moment("2022-07-28"),moment("2022-07-29"),moment("2022-08-02"),moment("2022-08-03"),moment("2022-08-15"),moment("2022-08-24"),moment("2022-08-26"),moment("2022-08-29"),moment("2022-09-05"),moment("2022-09-08"),moment("2022-09-16"),moment("2022-10-10"),moment("2022-10-11"),moment("2022-10-17"),moment("2022-10-24"),moment("2022-11-01"),moment("2022-11-07"),moment("2022-11-11"),moment("2022-11-16"),moment("2022-11-23"),moment("2022-11-25"),moment("2022-11-30"),moment("2022-12-05"),moment("2022-12-06"),moment("2022-12-07"),moment("2022-12-12"),moment("2022-12-14"),moment("2022-12-20"),moment("2022-12-21"),moment("2023-01-09"),moment("2023-01-10"),moment("2023-01-30"),moment("2023-01-31"),moment("2023-02-01"),moment("2023-02-06"),moment("2023-02-10"),moment("2023-02-14"),moment("2023-02-16"),moment("2023-02-17"),moment("2023-02-23"),moment("2023-02-27"),moment("2023-02-28"),moment("2023-03-01"),moment("2023-03-02"),moment("2023-03-06"),moment("2023-03-07"),moment("2023-03-09"),moment("2023-03-10"),moment("2023-03-16"),moment("2023-03-27"),moment("2023-03-28"),moment("2023-03-30"),moment("2023-04-03"),moment("2023-04-05"),moment("2023-04-11"),moment("2023-04-18"),moment("2023-04-19"),moment("2023-04-20"),moment("2023-05-02"),moment("2023-05-03"),moment("2023-05-05"),moment("2023-05-08"),moment("2023-05-10"),moment("2023-05-15"),moment("2023-05-16"),moment("2023-05-18"),moment("2023-05-24"),moment("2023-05-25"),moment("2023-05-31"),moment("2023-06-02"),moment("2023-06-06"),moment("2023-06-07"),moment("2023-06-13"),moment("2023-06-15"),moment("2023-06-20"),moment("2023-06-22"),moment("2023-06-26"),moment("2023-07-04"),moment("2023-07-07"),moment("2023-07-18"),moment("2023-07-19"),moment("2023-07-20"),moment("2023-07-22"),moment("2023-07-27"),moment("2023-08-01"),moment("2023-08-07"),moment("2023-08-08"),moment("2023-08-10"),moment("2023-08-11"),moment("2023-08-14"),moment("2023-08-16"),moment("2023-08-17"),moment("2023-08-18"),moment("2023-08-22"),moment("2023-08-24"),moment("2023-08-25"),moment("2023-09-04"),moment("2023-09-05"),moment("2023-09-11"),moment("2023-09-14"),moment("2023-09-19"),moment("2023-09-20"),moment("2023-09-22"),moment("2023-09-25"),moment("2023-09-26"),moment("2023-09-28"),moment("2023-09-29"),moment("2023-10-02"), ]
}).on("dp.change", function (e) {
var formatedValue = e.date.format(e.date._f);
tableLista.ajax.url("index?acao=filtrar&p="+formatedValue).load();
//console.log(formatedValue);
});
});
window.onload = function() {
}
</script>]]>
|