mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-27 21:29:13 +00:00
Merge branch 'fix/guardas' into 'main'
arreglado See merge request jjimenez/erp-imprimelibros!49
This commit is contained in:
@ -361,7 +361,16 @@ public class PresupuestoService {
|
||||
body.put("paginasCuadernillo", SK_PAGINAS_CUADERNILLO);
|
||||
body.put("interior", interior);
|
||||
body.put("cubierta", cubierta);
|
||||
if(presupuesto.getTipoCubierta() != Presupuesto.TipoCubierta.tapaBlanda) {
|
||||
Map<String, Object> guardas = new HashMap<>();
|
||||
guardas.put("papel", presupuesto.getPapelGuardasId());
|
||||
guardas.put("gramaje", presupuesto.getGramajeGuardas());
|
||||
guardas.put("caras", presupuesto.getGuardasImpresas());
|
||||
body.put("guardas", guardas);
|
||||
}
|
||||
else{
|
||||
body.put("guardas", null);
|
||||
}
|
||||
// Para las reimpresiones
|
||||
if (presupuesto.getIsReimpresion() != null && presupuesto.getIsReimpresion()) {
|
||||
body.put("reimpresion", 1);
|
||||
|
||||
@ -1143,37 +1143,7 @@ export default class PresupuestoWizard {
|
||||
******************************/
|
||||
#initCubierta() {
|
||||
|
||||
this.btn_plantilla_cubierta.on('click', () => {
|
||||
let url = `/presupuesto/api/plantilla-cubierta.png
|
||||
?tipo=${this.formData.datosGenerales.tipoEncuadernacion}
|
||||
&tapa=${this.formData.cubierta.tipoCubierta}
|
||||
&ancho=${this.formData.datosGenerales.ancho}
|
||||
&alto=${this.formData.datosGenerales.alto}
|
||||
&lomo=${Math.round(this.formData.lomo) || 0}
|
||||
&solapas=${this.formData.cubierta.solapasCubierta == 1 ? this.formData.cubierta.tamanioSolapasCubierta : 0}`;
|
||||
url = url.trim().replace(/\s+/g, '');
|
||||
Swal.fire({
|
||||
position: 'top-end',
|
||||
icon: 'info',
|
||||
title: window.languageBundle.get('presupuesto.plantilla-cubierta'),
|
||||
html: `
|
||||
<div class="text-center p-4">
|
||||
<img src="${url}" class="img-fluid" alt="" />
|
||||
</div>
|
||||
<div class="acitivity-timeline p-4">
|
||||
${window.languageBundle.get('presupuesto.plantilla-cubierta-text')}
|
||||
</div>
|
||||
`,
|
||||
confirmButtonClass: 'btn btn-primary w-xs mt-2',
|
||||
showConfirmButton: false,
|
||||
showCloseButton: true,
|
||||
buttonsStyling: false,
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-secondary me-2', // clases para el botón confirmar
|
||||
cancelButton: 'btn btn-light' // clases para cancelar
|
||||
},
|
||||
});
|
||||
});
|
||||
$('#btn-plantilla-cubierta').on('click', this.#obtener_plantilla_cubierta.bind(this));
|
||||
|
||||
this.btn_impresion_cubierta_help.on('click', () => {
|
||||
Swal.fire({
|
||||
@ -1928,6 +1898,7 @@ export default class PresupuestoWizard {
|
||||
#initResumen() {
|
||||
const $row = $('#presupuesto-row');
|
||||
|
||||
$('#btn-plantilla-cubierta2').on('click', this.#obtener_plantilla_cubierta.bind(this));
|
||||
// 1) Transición al cambiar de pestaña (click o programático)
|
||||
$(document).on('shown.bs.tab', '.custom-nav .nav-link', (e) => {
|
||||
const targetSelector = $(e.target).data('bs-target'); // ej: "#pills-resumen"
|
||||
@ -2013,6 +1984,37 @@ export default class PresupuestoWizard {
|
||||
/******************************
|
||||
* END RESUMEN
|
||||
******************************/
|
||||
#obtener_plantilla_cubierta() {
|
||||
let url = `/presupuesto/api/plantilla-cubierta.png
|
||||
?tipo=${this.formData.datosGenerales.tipoEncuadernacion}
|
||||
&tapa=${this.formData.cubierta.tipoCubierta}
|
||||
&ancho=${this.formData.datosGenerales.ancho}
|
||||
&alto=${this.formData.datosGenerales.alto}
|
||||
&lomo=${Math.round(this.formData.lomo) || 0}
|
||||
&solapas=${this.formData.cubierta.solapasCubierta == 1 ? this.formData.cubierta.tamanioSolapasCubierta : 0}`;
|
||||
url = url.trim().replace(/\s+/g, '');
|
||||
Swal.fire({
|
||||
position: 'top-end',
|
||||
icon: 'info',
|
||||
title: window.languageBundle.get('presupuesto.plantilla-cubierta'),
|
||||
html: `
|
||||
<div class="text-center p-4">
|
||||
<img src="${url}" class="img-fluid" alt="" />
|
||||
</div>
|
||||
<div class="acitivity-timeline p-4">
|
||||
${window.languageBundle.get('presupuesto.plantilla-cubierta-text')}
|
||||
</div>
|
||||
`,
|
||||
confirmButtonClass: 'btn btn-primary w-xs mt-2',
|
||||
showConfirmButton: false,
|
||||
showCloseButton: true,
|
||||
buttonsStyling: false,
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-secondary me-2', // clases para el botón confirmar
|
||||
cancelButton: 'btn btn-light' // clases para cancelar
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-auto">
|
||||
<button type="button" id="btn-plantilla-cubierta" class="btn btn-outline-primary btn-border">
|
||||
<button type="button" id="btn-plantilla-cubierta2" class="btn btn-outline-primary btn-border">
|
||||
<i class="ri-questionnaire-line label-icon align-middle fs-16 me-2"></i>
|
||||
<span th:text="#{presupuesto.plantilla-cubierta}">
|
||||
Plantilla de cubierta
|
||||
|
||||
Reference in New Issue
Block a user