añadidos lomos en resumen lateral y final. Arreglado tb alto de preview en presupuesto admin

This commit is contained in:
2025-02-09 15:20:31 +01:00
parent e8145888c9
commit 7b7e386ffd
5 changed files with 45 additions and 17 deletions

View File

@ -500,7 +500,7 @@ class previewFormas {
anchoSangrado = 350; // px
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 750; // px
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
@ -515,7 +515,7 @@ class previewFormas {
anchoSangrado = 350; // px
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 750; // px
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
altoLibro = altoSangrado * 0.95;
@ -710,7 +710,7 @@ class previewFormas {
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.647 > 650) ? 650 : anchoSangrado * 0.647; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
altoLibro = altoSangrado * 0.88;
anchoLibro = anchoSangrado * 0.39;
@ -851,8 +851,8 @@ class previewFormas {
anchoSangrado = 350; // px
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 750; // px
altoSangrado = (anchoSangrado * 0.647 > 650) ? 650 : anchoSangrado * 0.647; // px
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
altoLibro = altoSangrado * 0.95;
anchoLibro = anchoSangrado * 0.28;
@ -866,8 +866,8 @@ class previewFormas {
anchoSangrado = 350; // px
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 750; // px
altoSangrado = (anchoSangrado * 0.647 > 650) ? 650 : anchoSangrado * 0.647; // px
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
altoLibro = (isTapaDura) ? altoSangrado * 0.88 : altoSangrado * 0.9;
anchoLibro = (isTapaDura) ? anchoSangrado * 0.39 : anchoSangrado * 0.44;
@ -1068,8 +1068,8 @@ class previewFormas {
anchoSangrado = 350; // px
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 750; // px
altoSangrado = (anchoSangrado * 0.647 > 650) ? 650 : anchoSangrado * 0.647; // px
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
altoLibro = altoSangrado * 0.97;
anchoLibro = anchoSangrado * 0.48;
@ -1082,8 +1082,8 @@ class previewFormas {
anchoSangrado = 350; // px
altoSangrado = (anchoSangrado * 0.647 > 300) ? 300 : anchoSangrado * 0.647; // px
} else {
anchoSangrado = 750; // px
altoSangrado = (anchoSangrado * 0.647 > 650) ? 650 : anchoSangrado * 0.647; // px
anchoSangrado = 800; // px
altoSangrado = (anchoSangrado * 0.6 > 650) ? 650 : anchoSangrado * 0.6; // px
}
altoLibro = altoSangrado * 0.95;
anchoLibro = anchoSangrado * 0.3;

View File

@ -205,6 +205,7 @@ class DisenioCubierta {
this.rl_papel_sobrecubierta = $('#rl_papel_sobrecubierta');
this.rl_tamanio_sobrecubierta = $('#rl_tamanio_sobrecubierta');
this.rl_acabado_sobrecubierta = $("#rl_acabado_sobrecubierta");
this.rl_lomo_cubierta = $("#rl_lomo_cubierta");
this.acabadoCubierta = new ClassSelect($("#acabadoCubierta"),
'/serviciosacabados/getacabados',
@ -621,6 +622,21 @@ class DisenioCubierta {
});
}
getLomoCubierta() {
const lomoRedondo = this.tapaDuraLomoRedondo.hasClass("selected");
const tapaBlanda = this.tapaBlanda.hasClass("selected");
let anchoCarton = parseFloat(6);
let lomoVal = parseFloat($('#lc').val());
if (lomoRedondo)
anchoCarton += 6; // ancho carton
if (!tapaBlanda)
lomoVal += anchoCarton;
return lomoVal;
}
processMenuLateral() {
@ -633,8 +649,11 @@ class DisenioCubierta {
this.rl_papel_cubierta.text(papel + " " + gramaje + " gr");
this.rl_acabado_cubierta.text("Acabado: " + this.acabadoCubierta.getText());
this.rl_lomo_cubierta.text("Lomo: " + (this.getLomoCubierta().toFixed(0) + " mm"));
this.rl_papel_cubierta.removeClass('d-none');
this.rl_acabado_cubierta.removeClass('d-none');
this.rl_lomo_cubierta.removeClass('d-none');
if (this.carasCubierta.find('option:selected').length > 0) {
this.rl_caras_cubierta.text("Impresa " + this.carasCubierta.find('option:selected').text());
@ -650,6 +669,7 @@ class DisenioCubierta {
else {
this.rl_papel_cubierta.addClass('d-none');
this.rl_acabado_cubierta.addClass('d-none');
this.rl_lomo_cubierta.addClass('d-none');
}
if (!menu_off)
@ -872,7 +892,7 @@ class DisenioCubierta {
#handleCarasCubierta() {
// Si es a dos caras
}

View File

@ -33,6 +33,7 @@ class Resumen {
this.carasCubierta = $(this.domItem.find("#resumenCarasCubierta"));
this.papelCubierta = $(this.domItem.find("#resumenPapelCubierta"));
this.gramajeCubierta = $(this.domItem.find("#resumenGramajeCubierta"));
this.lomoCubierta = $(this.domItem.find("#resumenLomoCubierta"));
this.solapasCubierta = $(this.domItem.find("#resumenSolapasCubierta"));
this.papelGuardas = $(this.domItem.find("#resumenPapelGuardas"));
this.guardasImpresas = $(this.domItem.find("#resumenGuardasImpresas"));
@ -226,11 +227,11 @@ class Resumen {
this.disenioCubierta.disenioCubierta.filter('.selected').attr('id'),
"resumen",
{
ancho: ancho,
alto: alto,
lomo: $('#lc').val() === '' ? parseFloat('0.0') : parseFloat($('#lc').val()),
solapas: this.disenioCubierta.getSolapasCubierta(),
lomoRedondo: this.disenioCubierta.tapaDuraLomoRedondo.hasClass('selected'),
ancho: () => {return ancho},
alto: () => {return alto},
lomo: () => {return $('#lc').val() === '' ? parseFloat('0.0') : parseFloat($('#lc').val())},
solapas: () => {return this.disenioCubierta.getSolapasCubierta()},
lomoRedondo: ()=> {return this.disenioCubierta.tapaDuraLomoRedondo.hasClass('selected')? 1: 0},
}
).previewEsquemaCubierta();
@ -282,6 +283,7 @@ class Resumen {
}
this.papelCubierta.text(this.disenioCubierta.getPapel(true));
this.gramajeCubierta.text(this.disenioCubierta.getGramaje());
this.lomoCubierta.text(this.disenioCubierta.getLomoCubierta().toFixed(0) + " mm");
this.cubiertaAcabados.text(this.disenioCubierta.getAcabados(true));
if (this.disenioCubierta.getSobrecubierta()) {