terminada validación nueva en diseniocubierta

This commit is contained in:
2025-06-25 11:14:09 +02:00
parent 0b598e14d7
commit c3bce03921
2 changed files with 23 additions and 2 deletions

View File

@ -365,6 +365,7 @@ class Comparador {
popErrorAlert(window.language.Presupuestos.errores.error_sobrecubierta_sin_solapas, 'divAlarmasComparador')
}*/
$('#solapas_sobrecubierta').prop('checked', true);
$('#solapas_sobrecubierta').trigger('change');
$('#div_solapas_ancho_sobrecubierta').removeClass('d-none');
$('#solapas_ancho_sobrecubierta').val(60);
$('#compPapelSobrecubierta').prop('disabled', false);
@ -373,6 +374,8 @@ class Comparador {
else {
this.papelSobrecubierta.setVal(0);
this.gramajeSobrecubierta.setVal(0);
$('#solapas_sobrecubierta').prop('checked', false);
$('#solapas_sobrecubierta').trigger('change')
$('#compPapelSobrecubierta').prop('disabled', true);
$('#compGramajeSobrecubierta').prop('disabled', true);
@ -387,6 +390,7 @@ class Comparador {
popErrorAlert(window.language.Presupuestos.errores.error_faja_sin_solapas, 'divAlarmasComparador');
}
$('#faja').prop('checked', true);
$('#faja').trigger('change');
$('.faja-div').removeClass('d-none');
$('#compPapelFaja').prop('disabled', false);
$('#compGramajeFaja').prop('disabled', false);
@ -394,6 +398,8 @@ class Comparador {
else {
this.papelFaja.setVal(0);
this.gramajeFaja.setVal(0);
$('#faja').prop('checked', false);
$('#faja').trigger('change');
$('#compPapelFaja').prop('disabled', true);
$('#compGramajeFaja').prop('disabled', true);
}

View File

@ -339,9 +339,24 @@ class DisenioCubierta {
div.find('.fv-plugins-message-container').remove();
});
this.papelFaja.item.on('change', () => { this.gramajeFaja.empty(); });
this.papelSobrecubierta.item.on('change', () => {
this.papelSobrecubierta.item.find('option').remove();
this.papelSobrecubierta.item.val(null);
this.papelSobrecubierta.item.trigger('select2:clear');
});
this.papelGuardas.item.on('change', () => { this.gramajeGuardas.empty(); });
this.papelFaja.item.on('change', () => {
this.gramajeFaja.item.find('option').remove();
this.gramajeFaja.item.val(null);
this.gramajeFaja.item.trigger('select2:clear');
});
this.papelGuardas.item.on('change', () => {
this.gramajeGuardas.item.find('option').remove();
this.gramajeGuardas.item.val(null);
this.gramajeGuardas.item.trigger('select2:clear');
});
// Observadores
this.observer.observe(this.tapaBlanda[0], { attributes: true });