mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminado a falta de pruebas
This commit is contained in:
@ -32,6 +32,8 @@ class EnvioEdit {
|
||||
if (!$("#empresaMensajeriaInput").length) {
|
||||
this.proveedor = new ClassSelect($("#empresaMensajeria"), '/compras/proveedores/getProveedores', "", true, { 'tipo_id': 2 });
|
||||
}
|
||||
|
||||
this.impresoraEtiquetas = $("#impresoraEtiquetas");
|
||||
}
|
||||
|
||||
init() {
|
||||
@ -492,7 +494,9 @@ class EnvioEdit {
|
||||
|
||||
envio_id: envio_id,
|
||||
envio_lineas: ids,
|
||||
cajas: num_cajas
|
||||
cajas: num_cajas,
|
||||
printer_id: this.impresoraEtiquetas.val(),
|
||||
|
||||
}, function (response) {
|
||||
if (response.status) {
|
||||
Swal.fire({
|
||||
@ -506,7 +510,18 @@ class EnvioEdit {
|
||||
},
|
||||
buttonsStyling: false
|
||||
}).then(() => {
|
||||
|
||||
if(response.data){
|
||||
// show xml in a new tab
|
||||
const blob = new Blob([response.data], { type: 'application/xml' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = 'etiquetas.xml';
|
||||
a.click();
|
||||
URL.revokeObjectURL(url);
|
||||
a.remove();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user