corregidas direfencias en totales presupuestos. tiradas alternativas ok. corregido calculo envio base

This commit is contained in:
2025-02-04 20:31:04 +01:00
parent 430cf0fd6c
commit 2149796cbb
18 changed files with 568 additions and 431 deletions

View File

@ -3,7 +3,7 @@ import { getToken } from '../../../common/common.js';
class DatosLibro {
constructor(domItem, functions = {}) {
constructor(domItem, cargando, functions = {}) {
this.domItem = domItem;
@ -70,7 +70,7 @@ class DatosLibro {
this.fajaSolapasAncho = this.domItem.find('#faja_solapas_ancho');
this.div_faja = this.domItem.find('.faja-div');
this.cargando = false;
this.cargando = cargando;
}
@ -182,6 +182,9 @@ class DatosLibro {
checkMinMaxInput(event) {
if(this.cargando)
return;
const el = event.target;
if (el.value != "") {
if (parseInt(el.value) < parseInt(el.min)) {
@ -380,7 +383,8 @@ class DatosLibro {
// para que se actualice el comparador
$('#compSobrecubierta').trigger('change');
if($('#compGramajeSobrecubierta').select2('data').length > 0)
$('#compGramajeSobrecubierta').trigger('change');
if(this.cargando)
return;
@ -569,8 +573,6 @@ class DatosLibro {
cargarDatos(datos) {
this.cargando = true;
this.paginas.val(datos.paginas);
this.tirada.val(datos.tirada);
this.calcular_mermas();
@ -646,8 +648,6 @@ class DatosLibro {
this.ferro.prop('checked', datos.ferro);
this.ferroDigital.prop('checked', datos.ferroDigital);
this.marcapaginas.prop('checked', datos.marcapaginas);
this.cargando = false;
}
}