cargando presupuesto datos generales

This commit is contained in:
2024-10-18 14:33:27 +02:00
parent 8a044d41fe
commit 464e136025
17 changed files with 12250 additions and 469 deletions

View File

@ -212,7 +212,7 @@ class DatosGenerales {
// Get the selected options
const value = $("#paginasColor").val();
if (value.length >= 0 && Number.isInteger(parseInt(value)) && parseInt(value) >= 0) {
if (parseInt(value) % 2 != 0) {
return {
valid: false,
@ -227,14 +227,14 @@ class DatosGenerales {
}
},
paginasNegro: {
validators: {
callback: {
validators: {
callback: {
message: window.translations["validation"].integer_greatherThan_0,
callback: function (input) {
// Get the selected options
const value = $("#paginasNegro").val();
if (value.length >= 0 && Number.isInteger(parseInt(value)) && parseInt(value) >= 0) {
if (parseInt(value) % 2 != 0) {
return {
valid: false,
@ -353,11 +353,28 @@ class DatosGenerales {
this.tirada3.val(parseInt(datos.tirada3));
if (datos.tirada4)
this.tirada4.val(parseInt(datos.tirada4));
if (datos.checkFormatoPersonalizado) {
this.checkFormatoPersonalizado.prop(':checked', datos.checkFormatoPersonalizado);
this.checkFormatoPersonalizado.trigger('change');
this.papel_formato_alto.val(datos.papelFormatoAlto);
this.papel_formato_ancho.val(datos.papelFormatoAncho);
}
else {
this.formatoLibro.setOption(datos.papelFormatoId, datos.papelFormatoNombre);
this.formatoLibro.setVal(datos.papelFormatoId);
}
this.cliente.setOption(datos.clienteId, datos.clienteNombre);
this.cliente.setVal(datos.clienteId);
$(this.cliente).trigger('change');
this.paginas.val(parseInt(datos.paginas));
this.paginasNegro.val(parseInt(datos.paginasNegro));
this.paginasColor.val(parseInt(datos.paginasColor));
this.paginasColor.trigger('change');
this.posPaginasColor.val(datos.posPaginasColor);
/*
@ -423,9 +440,9 @@ class DatosGenerales {
return tiradas;
}
getIsColor() {
if(this.paginasColor.val() > 0) {
if (this.paginasColor.val() > 0) {
return true;
}
return false;
@ -464,11 +481,11 @@ class DatosGenerales {
if (this.fresado.hasClass('selected') || this.cosido.hasClass('selected')) {
$('#tapaDuraLomoRedondo').removeClass('d-none');
if(this.cosido.hasClass('selected')){
if (this.cosido.hasClass('selected')) {
$('#tapaDuraLomoRedondo').addClass('selected');
this.divPaginasCuaderillo.removeClass('d-none');
}
else{
else {
this.divPaginasCuaderillo.addClass('d-none');
}
}
@ -558,7 +575,7 @@ class DatosGenerales {
$(".papel-interior").removeClass('selected');
$(".interior-color").removeClass('d-none');
this.#handleInteriorLayout('mixto');
}
else {
$(".interior-color").addClass('d-none');