mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
primera version del calculo del lomo
This commit is contained in:
@ -799,6 +799,8 @@ class DatosGenerales {
|
||||
this.divPosPaginasColor.removeClass('d-none');
|
||||
}
|
||||
|
||||
$('.calcular-lomo').trigger('change');
|
||||
|
||||
this.checkPaginasMultiplo4();
|
||||
}
|
||||
|
||||
|
||||
@ -105,8 +105,6 @@ class DisenioInterior {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
updatePapeles(papeles = null) {
|
||||
|
||||
const context = this;
|
||||
@ -1034,6 +1032,7 @@ class DisenioInterior {
|
||||
const gramaje = element[0].id;
|
||||
|
||||
this.presupuestoCliente.calcularSolapas(event);
|
||||
this.presupuestoCliente.checkLomoInterior(event);
|
||||
this.presupuestoCliente.checkForm(event);
|
||||
});
|
||||
|
||||
|
||||
@ -113,6 +113,7 @@ class PresupuestoCliente {
|
||||
|
||||
$(".calcular-presupuesto").on('change', this.checkForm.bind(this));
|
||||
$(".calcular-solapas").on('change', this.calcularSolapas.bind(this));
|
||||
$(".calcular-lomo").on('change', this.checkLomoInterior.bind(this));
|
||||
}
|
||||
|
||||
|
||||
@ -180,6 +181,29 @@ class PresupuestoCliente {
|
||||
}
|
||||
}
|
||||
|
||||
checkLomoInterior() {
|
||||
|
||||
/* Limites lomo */
|
||||
this.#getDatos(false, true);
|
||||
if (Object.values(this.datos).every(this.#isValidDataForm)) {
|
||||
new Ajax('/presupuestocliente/checklomo',
|
||||
this.datos,
|
||||
{},
|
||||
(response) => {
|
||||
if (response === null || response === undefined || response === "") {
|
||||
console.log("Error en el calculo del lomo interior.");
|
||||
return;
|
||||
}
|
||||
if(response.errors.status == 1){
|
||||
popErrorAlert('' + response.errors.value, "sk-alert", false);
|
||||
}
|
||||
console.log(response.errors);
|
||||
},
|
||||
() => { }
|
||||
).post();
|
||||
}
|
||||
}
|
||||
|
||||
checkForm(event) {
|
||||
|
||||
this.#processResumenLateral();
|
||||
@ -526,9 +550,6 @@ class PresupuestoCliente {
|
||||
}
|
||||
}
|
||||
|
||||
popAlert2Hide();
|
||||
|
||||
|
||||
if (response.tiradas && response.tiradas.length) {
|
||||
|
||||
let tiradas = { ...response.tiradas };
|
||||
@ -536,6 +557,8 @@ class PresupuestoCliente {
|
||||
tiradas.sort((a, b) => a - b);
|
||||
this.divTiradasPrecios.empty();
|
||||
|
||||
popAlert2Hide();
|
||||
|
||||
for (let i = 0; i < tiradas.length; i++) {
|
||||
new tarjetaTiradasPrecio(
|
||||
this.divTiradasPrecios,
|
||||
@ -550,7 +573,7 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.lc.val(parseFloat(response.info.lomo_cubierta).toFixed(2));
|
||||
this.lsc.val(parseFloat(response.info.lomo_sobrecubierta).toFixed(2));
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user