mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-27 21:29:13 +00:00
arreglado
This commit is contained in:
@ -361,7 +361,16 @@ public class PresupuestoService {
|
|||||||
body.put("paginasCuadernillo", SK_PAGINAS_CUADERNILLO);
|
body.put("paginasCuadernillo", SK_PAGINAS_CUADERNILLO);
|
||||||
body.put("interior", interior);
|
body.put("interior", interior);
|
||||||
body.put("cubierta", cubierta);
|
body.put("cubierta", cubierta);
|
||||||
body.put("guardas", null);
|
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
|
// Para las reimpresiones
|
||||||
if (presupuesto.getIsReimpresion() != null && presupuesto.getIsReimpresion()) {
|
if (presupuesto.getIsReimpresion() != null && presupuesto.getIsReimpresion()) {
|
||||||
body.put("reimpresion", 1);
|
body.put("reimpresion", 1);
|
||||||
|
|||||||
@ -1143,37 +1143,7 @@ export default class PresupuestoWizard {
|
|||||||
******************************/
|
******************************/
|
||||||
#initCubierta() {
|
#initCubierta() {
|
||||||
|
|
||||||
this.btn_plantilla_cubierta.on('click', () => {
|
$('#btn-plantilla-cubierta').on('click', this.#obtener_plantilla_cubierta.bind(this));
|
||||||
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
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
this.btn_impresion_cubierta_help.on('click', () => {
|
this.btn_impresion_cubierta_help.on('click', () => {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -1928,6 +1898,7 @@ export default class PresupuestoWizard {
|
|||||||
#initResumen() {
|
#initResumen() {
|
||||||
const $row = $('#presupuesto-row');
|
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)
|
// 1) Transición al cambiar de pestaña (click o programático)
|
||||||
$(document).on('shown.bs.tab', '.custom-nav .nav-link', (e) => {
|
$(document).on('shown.bs.tab', '.custom-nav .nav-link', (e) => {
|
||||||
const targetSelector = $(e.target).data('bs-target'); // ej: "#pills-resumen"
|
const targetSelector = $(e.target).data('bs-target'); // ej: "#pills-resumen"
|
||||||
@ -2013,6 +1984,37 @@ export default class PresupuestoWizard {
|
|||||||
/******************************
|
/******************************
|
||||||
* END RESUMEN
|
* 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="row justify-content-center mb-3">
|
||||||
<div class="col-auto">
|
<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>
|
<i class="ri-questionnaire-line label-icon align-middle fs-16 me-2"></i>
|
||||||
<span th:text="#{presupuesto.plantilla-cubierta}">
|
<span th:text="#{presupuesto.plantilla-cubierta}">
|
||||||
Plantilla de cubierta
|
Plantilla de cubierta
|
||||||
|
|||||||
Reference in New Issue
Block a user