diff --git a/ci4/app/Views/themes/vuexy/form/facturas/viewFacturasList.php b/ci4/app/Views/themes/vuexy/form/facturas/viewFacturasList.php index 6e277b1f..ca774db6 100644 --- a/ci4/app/Views/themes/vuexy/form/facturas/viewFacturasList.php +++ b/ci4/app/Views/themes/vuexy/form/facturas/viewFacturasList.php @@ -78,11 +78,60 @@ pageLength: 250, lengthChange: true, "dom": 'lfBrtip', - "buttons": [ - 'copy', 'csv', 'excel', 'print', { - extend: 'pdfHtml5', - orientation: 'landscape', - pageSize: 'A4' + buttons: [ + { + text: 'Exportar Excel Contaplus', + action: function (e, dt, button, config) { + var searchValue = theTable.search(); // Captura el valor del campo de búsqueda + var ajaxParams = theTable.ajax.params(); // Captura otros parámetros de la tabla + + console.log(searchValue); + + /* + $.ajax({ + url: '/ruta/exportarExcel', // URL del servidor para manejar la exportación + type: 'POST', + data: { + search: searchValue, + extraParams: ajaxParams + }, + xhrFields: { + responseType: 'blob' // Para manejar la descarga del archivo + }, + success: function(blob, status, xhr) { + // Crear un enlace temporal para descargar el archivo + var link = document.createElement('a'); + var url = window.URL.createObjectURL(blob); + link.href = url; + link.download = 'datos_personalizados.xlsx'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + window.URL.revokeObjectURL(url); + } + }); + */ + } + }, + { + text: 'Exportar Lineas a Excel', + action: function (e, dt, button, config) { + var searchValue = theTable.search(); // Captura el valor del campo de búsqueda + var ajaxParams = theTable.ajax.params(); // Captura otros parámetros de la tabla + + console.log(searchValue); + + } + }, + { + text: 'Exportar Girosgit ', + action: function (e, dt, button, config) { + var searchValue = theTable.search(); // Captura el valor del campo de búsqueda + var ajaxParams = theTable.ajax.params(); // Captura otros parámetros de la tabla + + console.log(searchValue); + + } } ], stateSave: true,