espiral y wireo

This commit is contained in:
2024-10-22 14:14:52 +02:00
parent 7a3c11c343
commit 0a5f8dee68
7 changed files with 5520 additions and 16 deletions

View File

@ -33,6 +33,8 @@ class DatosGenerales {
this.fresado = $(this.domItem.find("#fresado")[0]);
this.cosido = $(this.domItem.find("#cosido")[0]);
this.grapado = $(this.domItem.find("#grapado")[0]);
this.espiral = $(this.domItem.find("#espiral")[0]);
this.tiposLibro = this.domItem.find(".tipo-libro");
@ -396,7 +398,7 @@ class DatosGenerales {
}
this.prototipo.prop('checked', datos.prototipo);
this.ivaReducido.val(datos.ivaReducido? 1: 0).trigger('change');
this.ivaReducido.val(datos.ivaReducido ? 1 : 0).trigger('change');
}
getDimensionLibro() {
@ -492,6 +494,16 @@ class DatosGenerales {
this.divPaginasCuaderillo.addClass('d-none');
}
if (this.grapado.hasClass('selected') || this.espiral.hasClass('selected')) {
$('#addSobrecubierta').prop('checked', false).trigger('change');
$(".sobrecubierta-items").addClass('d-none');
}
else{
if($('#addSobrecubierta').hasClass('d-none')){
$('#addSobrecubierta').removeClass('d-none');
}
}
// Para recalcular el presupuesto
element.trigger('change');
}

View File

@ -148,7 +148,7 @@ class DisenioCubierta {
this.cabezada.val(datosCubierta.cabezada).trigger('change');
}
else {
this.carasCubierta.val(datosCubierta.caras).trigger('change');
this.carasCubierta.val(datosCubierta.paginas).trigger('change');
if (datosCubierta.solapas) {
this.conSolapas.trigger('click');
this.tamanioSolapasCubierta.val(datosCubierta.solapas_ancho);

View File

@ -273,6 +273,11 @@ class PresupuestoCliente {
$('#loader').modal('hide');
if(response === null || response === undefined || response === ""){
popErrorAlert("No se ha podido calcular el presupuesto para los datos proporcionados. Por favor, póngase en contacto con el departamento comercial."
, "sk-alert-2", false);
return;
}
if (Object.values(response.errors).some((value) => value !== "")) {
if (response.errors.status == 1) {
popErrorAlert("No se ha podido calcular el presupuesto para los datos proporcionados. Por favor, póngase en contacto con el departamento comercial."
@ -462,10 +467,10 @@ class PresupuestoCliente {
setTimeout(() => {
//this.checkForm({ target: { id: 'tirada' } });
/*this.validationStepper.next();
this.validationStepper.next();
this.validationStepper.next();
this.validationStepper.next();
this.validationStepper.next();
this.validationStepper.next();*/
$('#loader').modal('hide');
this.calcularPresupuesto = true;
this.checkForm({ target: { id: 'tirada' } });