source: prototipo_portal_2018/prototipo/static/js/datatable/myDataTable.js @ 5de7549

Last change on this file since 5de7549 was 5de7549, checked in by José Sulbarán <jsulbaran@…>, 7 years ago

Se agrego la funcionalidad para el reporte de la firma

  • Property mode set to 100644
File size: 3.2 KB
Line 
1
2$(document).ready(function () { 
3    var table = $('#Solicitudes_Vacacionales').DataTable({                           
4            "language": {
5                "lengthMenu": "Mostrar _MENU_ registros",
6                "zeroRecords": "No hay resultados - Disculpe",
7                "info": "Mostrando pagina _PAGE_ de _PAGES_",
8                "search": "Buscar:", 
9                "infoEmpty": "No records available",
10                "infoFiltered": "(filtered from _MAX_ total records)"
11            },
12           "columnDefs": [
13                {"className": "dt-center", "targets": "_all"}
14            ],                       
15           order: [[ 1, 'desc' ]],       
16           ajax: {
17             url: "/Reporte_vacaciones",
18             type: 'post',
19             datatype: 'json',                   
20             data:{}
21           },
22           columns: [
23               { data: 'Planilla_pdf'},
24               { data: 'grafico'},
25               { data: 'user'},
26               { data: 'periodo' },
27               { data: 'status' },
28               { data: 'diasadisfrutar' },
29               { data: 'diasdisfrutados' },
30               { data: 'diassolicitados' },
31               { data: 'diaspordisfrutar' },
32               { data: 'nombres_suplente_1'},
33               { data: 'nombres_suplente_2' },
34          ],
35           dom: 'Bfrtip',
36           buttons: [
37                {
38                    extend:    'pageLength',
39                    text:      'Mostrar Filas', 
40                    titleAttr: 'Mostrar Filas',
41                },
42                {
43                    extend:    'print',
44                    text:      'Imprimir',
45                    title:     'Solicitudes Vacacionales',
46                    titleAttr: 'Imprimir',
47                    exportOptions: {
48                       columns: [2,3,4,5,6,7,8,9,10]
49                    } 
50                },
51                {
52                    extend:    'excelHtml5',
53                    text:      'XLXS',
54                    title:     'Solicitudes Vacacionales',
55                    titleAttr: 'Excel',
56                    message: 'Consultar solicitud ',
57                    exportOptions: {
58                       columns: [2,3,4,5,6,7,8,9,10]
59                   
60                    }
61                },
62                {
63                    extend:    'csvHtml5',
64                    text:      'CSV',
65                    title: 'Datos_solicitud',
66                    titleAttr: 'CSV',
67                    message: 'Consultar solicitud',
68                    exportOptions: {
69                       columns: [2,3,4,5,6,7,8,9,10]
70                   
71                    }
72                },
73                {
74                    extend:    'pdfHtml5',
75                    text:      'PDF',
76                    titleAttr: 'PDF',
77                    title: '   Solicitudes Vacacionales',                   
78                    download: 'open',
79                    message: 'Consultar de la solicitud ',
80                    header: true,
81                    footer: true,
82                    pageSize: 'A3',
83                    exportOptions: {
84                       columns: [2,3,4,5,6,7,8,9,10]
85                   
86                    }
87                }               
88          ]           
89
90      });
91 
92});
93
Note: See TracBrowser for help on using the repository browser.