mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
se actualiza el comparador despues de cargar para evitar el mensaje de seleccione papel
This commit is contained in:
@ -40,6 +40,7 @@ class PresupuestoAdminEdit {
|
|||||||
calcularSolapas: this.calcularSolapas.bind(this),
|
calcularSolapas: this.calcularSolapas.bind(this),
|
||||||
});
|
});
|
||||||
this.comparador = new Comparador(this.domItem.find('#accordionDatosPresupuestoClienteTip'),
|
this.comparador = new Comparador(this.domItem.find('#accordionDatosPresupuestoClienteTip'),
|
||||||
|
() => {return this.cargandoPresupuesto},
|
||||||
{
|
{
|
||||||
getDimensionLibro: this.getDimensionLibro,
|
getDimensionLibro: this.getDimensionLibro,
|
||||||
});
|
});
|
||||||
@ -298,6 +299,9 @@ class PresupuestoAdminEdit {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (self.cargandoPresupuesto == false) {
|
if (self.cargandoPresupuesto == false) {
|
||||||
|
|
||||||
|
self.comparador.updateComparador();
|
||||||
|
|
||||||
// Ejecutar los pasos de forma secuencial si están habilitados
|
// Ejecutar los pasos de forma secuencial si están habilitados
|
||||||
if (update_lineas) {
|
if (update_lineas) {
|
||||||
$(document).trigger('update-lineas-presupuesto');
|
$(document).trigger('update-lineas-presupuesto');
|
||||||
|
|||||||
@ -4,10 +4,12 @@ import Ajax from '../../../components/ajax.js';
|
|||||||
|
|
||||||
class Comparador {
|
class Comparador {
|
||||||
|
|
||||||
constructor(domItem, functions = {}) {
|
constructor(domItem, cargando, functions = {}) {
|
||||||
|
|
||||||
this.domItem = domItem;
|
this.domItem = domItem;
|
||||||
|
|
||||||
|
this.cargando = cargando;
|
||||||
|
|
||||||
this.getDimensionLibro = functions.getDimensionLibro;
|
this.getDimensionLibro = functions.getDimensionLibro;
|
||||||
|
|
||||||
this.tipo_impresion_id = parseInt($('#tipo_impresion_id').val());
|
this.tipo_impresion_id = parseInt($('#tipo_impresion_id').val());
|
||||||
@ -267,7 +269,6 @@ class Comparador {
|
|||||||
this.btnInsertarCubierta = $('#insertarCubiertaBtn');
|
this.btnInsertarCubierta = $('#insertarCubiertaBtn');
|
||||||
this.btnInsertarFaja = $('#insertarFajaBtn');
|
this.btnInsertarFaja = $('#insertarFajaBtn');
|
||||||
|
|
||||||
this.cargando = false;
|
|
||||||
this.comparadorPlanaRunning = false;
|
this.comparadorPlanaRunning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,8 +474,6 @@ class Comparador {
|
|||||||
|
|
||||||
cargarDatos(datos) {
|
cargarDatos(datos) {
|
||||||
|
|
||||||
this.cargando = true;
|
|
||||||
|
|
||||||
this.tipo_impresion.val(datos.tipo_impresion).trigger('change');
|
this.tipo_impresion.val(datos.tipo_impresion).trigger('change');
|
||||||
this.updateOpcionesComparador();
|
this.updateOpcionesComparador();
|
||||||
|
|
||||||
@ -544,9 +543,10 @@ class Comparador {
|
|||||||
this.#computarPaginasColor(datos.posPagColor);
|
this.#computarPaginasColor(datos.posPagColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.cargando = false;
|
updateComparador(){
|
||||||
|
|
||||||
if (this.paginasColor.val() > 0) {
|
if (this.paginasColor.val() > 0) {
|
||||||
this.paginasColor.trigger('change');
|
this.paginasColor.trigger('change');
|
||||||
}
|
}
|
||||||
@ -565,7 +565,6 @@ class Comparador {
|
|||||||
this.carasGuardas.trigger('change');
|
this.carasGuardas.trigger('change');
|
||||||
}
|
}
|
||||||
this.faja.trigger('change');
|
this.faja.trigger('change');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1009,6 +1008,9 @@ class Comparador {
|
|||||||
|
|
||||||
getDataForComp(uso = 'interior') {
|
getDataForComp(uso = 'interior') {
|
||||||
|
|
||||||
|
if(this.cargando)
|
||||||
|
return { error: true, data: {} };
|
||||||
|
|
||||||
let ancho = 0;
|
let ancho = 0;
|
||||||
let alto = 0;
|
let alto = 0;
|
||||||
let papel_generico = {};
|
let papel_generico = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user