mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en lineas presupuesto eventos
This commit is contained in:
@ -4,6 +4,7 @@ import Ajax from '../../components/ajax.js';
|
||||
import DatosGenerales from './sections/datosGenerales.js';
|
||||
import DatosLibro from './sections/datosLibro.js';
|
||||
import Comparador from './sections/comparador.js';
|
||||
import LineasPresupuesto from './sections/lineasPresupuesto.js';
|
||||
|
||||
class PresupuestoAdminEdit {
|
||||
|
||||
@ -19,6 +20,7 @@ class PresupuestoAdminEdit {
|
||||
this.cosido = $("#isCosido");
|
||||
this.tipo_impresion = $("#tipo_impresion_id");
|
||||
this.cosido = $("#isCosido");
|
||||
this.POD = $("#POD");
|
||||
|
||||
this.datosGenerales = new DatosGenerales(this.domItem.find('#accordionDatosPresupuestoTip'));
|
||||
this.datosLibro = new DatosLibro(this.domItem.find('#accordionDatosLibroTip'),
|
||||
@ -28,6 +30,10 @@ class PresupuestoAdminEdit {
|
||||
checkPaginasPresupuesto: this.checkPaginasPresupuesto,
|
||||
});
|
||||
this.comparador = new Comparador(this.domItem.find('#accordionDatosPresupuestoClienteTip'));
|
||||
this.lineasPresupuesto = new LineasPresupuesto(this.domItem.find('#accordionLineasPresupuestoTip'),
|
||||
{
|
||||
getDimensionLibro: this.getDimensionLibro,
|
||||
});
|
||||
|
||||
this.calcularPresupuesto = false;
|
||||
}
|
||||
@ -42,6 +48,7 @@ class PresupuestoAdminEdit {
|
||||
this.datosGenerales.init();
|
||||
this.datosLibro.init();
|
||||
this.comparador.init();
|
||||
this.lineasPresupuesto.init();
|
||||
|
||||
if (window.location.href.includes("edit")) {
|
||||
|
||||
@ -74,6 +81,7 @@ class PresupuestoAdminEdit {
|
||||
self.lsc.val(parseFloat(response.data.lsc).toFixed(2));
|
||||
self.cosido.val(response.data.cosido);
|
||||
self.tipo_impresion.val(response.data.tipo_impresion);
|
||||
self.POD.val(response.data.POD);
|
||||
|
||||
self.calcularPresupuesto = false;
|
||||
|
||||
@ -164,8 +172,11 @@ class PresupuestoAdminEdit {
|
||||
alto = parseFloat($('#papelFormatoAlto').val());
|
||||
}
|
||||
else {
|
||||
ancho = parseFloat($('#papelFormatoId').getText().trim().split(" x ")[0]);
|
||||
alto = parseFloat($('#papelFormatoId').getText().trim().split(" x ")[1]);
|
||||
const selectedText = $('#papelFormatoId').find('option:selected').text();
|
||||
if (selectedText.length > 0) {
|
||||
ancho = parseFloat(selectedText.trim().split(" x ")[0]);
|
||||
alto = parseFloat(selectedText.trim().split(" x ")[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user