añadiro recoger en taller en direcciones presupuesto cliente

This commit is contained in:
2024-12-14 13:53:24 +01:00
parent bef0c95a4f
commit 6cb70f1a79
10 changed files with 97 additions and 1300 deletions

View File

@ -45,7 +45,7 @@ class PresupuestoCliente {
this.datos = {};
this.ajax_calcular = new Ajax('/presupuestocliente/calcular',
this.datos,
{},
{},
this.#procesarPresupuesto.bind(this),
() => { $('#loader').modal('hide'); });
@ -157,7 +157,7 @@ class PresupuestoCliente {
return !(noPOD && siPOD);
}
calcularSolapas(){
calcularSolapas() {
/* Solapas Max */
this.#getDatos(false, true);
@ -175,7 +175,7 @@ class PresupuestoCliente {
this.disenioCubierta.textoSolapasCubierta.text("Entre 60 y " + response + " mm");
this.disenioCubierta.textoSolapasSobrecubierta.text("Entre 60 y " + response + " mm");
},
() => { }
() => { }
).post();
}
}
@ -188,7 +188,7 @@ class PresupuestoCliente {
return;
}
if (this.calcularPresupuesto) {
if (event.target.id === 'divDirecciones') {
@ -686,13 +686,16 @@ class PresupuestoCliente {
this.datos.cubierta.solapas = 0;
}
if (this.direcciones.direcciones.length > 0) {
this.datos.direcciones = [];
for (let i = 0; i < this.direcciones.direcciones.length; i++) {
this.datos.direcciones.push(this.direcciones.direcciones[i].getFormData());
};
}
this.datos.entrega_taller = this.direcciones.recogidaTaller.is(':checked') ? 1 : 0;
if (!this.direcciones.recogidaTaller.is(':checked')) {
if (this.direcciones.direcciones.length > 0) {
this.datos.direcciones = [];
for (let i = 0; i < this.direcciones.direcciones.length; i++) {
this.datos.direcciones.push(this.direcciones.direcciones[i].getFormData());
};
}
}
if (save) {
this.datos.datosCabecera = {
titulo: this.datosGenerales.titulo.val(),