mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Iniciada implementacion de recuperacion de historicos erp antiguo
This commit is contained in:
@ -295,6 +295,7 @@ class Catalogo {
|
||||
this.selectGramajeSobrecubiertaPod.init();
|
||||
this.acabadosSobrecubierta.init();
|
||||
|
||||
this.initPedidosTable();
|
||||
|
||||
// Al cargar la página
|
||||
this.toggleSobrecubiertaFields();
|
||||
@ -327,6 +328,62 @@ class Catalogo {
|
||||
});
|
||||
}
|
||||
|
||||
initPedidosTable() {
|
||||
|
||||
const lastColPedidos = $('#tablaPedidosAntiguos').find("tr:first th").length - 1;
|
||||
const catalogoId = $('#catalogo_id').val(); // Asegúrate que este valor exista
|
||||
|
||||
const tablaPedidosAntiguos = $('#tablaPedidosAntiguos').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
orderCellsTop: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [5, 10, 25, 50, 75, 100],
|
||||
pageLength: 10,
|
||||
lengthChange: true,
|
||||
dom: 'lfBrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
order: [[1, 'desc']],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
ajax: {
|
||||
url: '/catalogo/libros/pedidosAntiguos',
|
||||
method: 'GET',
|
||||
data: {
|
||||
catalogo_id: catalogoId
|
||||
}
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColPedidos]
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{ data: 'id' },
|
||||
{ data: 'created_at' },
|
||||
{ data: 'titulo' },
|
||||
{ data: 'paginas' },
|
||||
{ data: 'tirada' },
|
||||
{ data: 'total' },
|
||||
{ data: 'estado' },
|
||||
{ data: 'actionBtns' }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
actualizarDesdeColor() {
|
||||
const total = parseInt(this.total.val(), 10) || 0;
|
||||
const color = parseInt(this.color.val(), 10) || 0;
|
||||
|
||||
Reference in New Issue
Block a user