mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
hecho lo de proximos envios
This commit is contained in:
@ -20,6 +20,7 @@ class EnvioEdit {
|
||||
];
|
||||
|
||||
this.table = null;
|
||||
this.tableProximosEnvios = null;
|
||||
|
||||
this.buscarPedidos = new ClassSelect($("#buscadorPedidos"), '/logistica/selectAddLinea', "", true, { 'envio': $("#id").val() });
|
||||
|
||||
@ -43,12 +44,6 @@ class EnvioEdit {
|
||||
this.proveedor.init();
|
||||
}
|
||||
|
||||
if ($("#proximosEnvios").length) {
|
||||
new PerfectScrollbar(document.getElementById('proximosEnvios'), {
|
||||
wheelPropagation: false
|
||||
});
|
||||
}
|
||||
|
||||
this.table = $('#tableLineasEnvio').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
@ -101,6 +96,46 @@ class EnvioEdit {
|
||||
]
|
||||
});
|
||||
|
||||
this.tableProximosEnvios = $('#tableProximosEnvios').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
orderCellsTop: true,
|
||||
orderable: false,
|
||||
order: [[1, 'asc']],
|
||||
lengthMenu: [5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500],
|
||||
pageLength: 5,
|
||||
"dom": 'tp',
|
||||
"ajax": {
|
||||
"url": "/logistica/datatableProximosEnvios/" + $('#id').val(),
|
||||
},
|
||||
"columns": [
|
||||
{data: 'ot'},
|
||||
{data: 'fechaEncuadernado'}
|
||||
],
|
||||
"language": {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [0, 1],
|
||||
"className": "text-center",
|
||||
},
|
||||
],
|
||||
drawCallback: function(){
|
||||
$(this.api().table().container()).find('table').css('width', '100%');
|
||||
this.api().columns.adjust();
|
||||
}
|
||||
});
|
||||
|
||||
$('#proximosEnviosTip' + this.id).on('shown.bs.collapse', () => {
|
||||
if (this.tableProximosEnvios) {
|
||||
this.tableProximosEnvios.columns.adjust().draw(false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#btnImprimirEtiquetas').on('click', () => {
|
||||
const table = this.table;
|
||||
const selectedRows = table.rows({ page: 'current' }).nodes().filter((node) => {
|
||||
|
||||
Reference in New Issue
Block a user