mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en servicios acabado
This commit is contained in:
@ -6,6 +6,7 @@ import DatosLibro from './sections/datosLibro.js';
|
||||
import Comparador from './sections/comparador.js';
|
||||
import LineasPresupuesto from './sections/lineasPresupuesto.js';
|
||||
import PreviewFormasAdmin from './sections/previewFormasAdmin.js';
|
||||
import Servicios from './sections/servicios.js';
|
||||
|
||||
class PresupuestoAdminEdit {
|
||||
|
||||
@ -38,6 +39,7 @@ class PresupuestoAdminEdit {
|
||||
});
|
||||
|
||||
this.previewFormasAdmin = null;
|
||||
this.servicios = new Servicios();
|
||||
this.calcularPresupuesto = false;
|
||||
}
|
||||
|
||||
@ -80,6 +82,7 @@ class PresupuestoAdminEdit {
|
||||
}
|
||||
);
|
||||
this.previewFormasAdmin.init();
|
||||
this.servicios.init();
|
||||
|
||||
if (window.location.href.includes("edit")) {
|
||||
|
||||
@ -121,6 +124,8 @@ class PresupuestoAdminEdit {
|
||||
self.datosLibro.cargarDatos(response.data.datosLibro);
|
||||
self.comparador.cargarDatos(response.data.comparador);
|
||||
self.lineasPresupuesto.cargarDatos(response.data.lineasPresupuesto);
|
||||
|
||||
self.servicios.cargar();
|
||||
/*self.direcciones.handleChangeCliente();
|
||||
|
||||
self.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales);
|
||||
|
||||
@ -244,6 +244,8 @@ class Comparador {
|
||||
this.sobrecubierta.on('change', () => {
|
||||
if (this.sobrecubierta.val() == 1) {
|
||||
$('#solapas_sobrecubierta').prop('checked', true);
|
||||
$('#div_solapas_ancho_sobrecubierta').removeClass('d-none');
|
||||
$('#solapas_ancho_sobrecubierta').val(60);
|
||||
$('#compPapelSobrecubierta').prop('disabled', false);
|
||||
$('#compGramajeSobrecubierta').prop('disabled', false);
|
||||
}
|
||||
|
||||
@ -172,8 +172,6 @@ class DatosLibro {
|
||||
|
||||
this.checkPaginasPresupuesto();
|
||||
|
||||
$('.tamanio-personalizado').addClass('d-none');
|
||||
|
||||
$(document).trigger('update-lineas-presupuesto');
|
||||
|
||||
// TO-DO
|
||||
@ -211,10 +209,10 @@ class DatosLibro {
|
||||
changeSolapasCubierta() {
|
||||
|
||||
if (this.solapasCubierta.prop('checked')) {
|
||||
this.divSolapasCubierta.removeClass('d-none');
|
||||
$('#div_solapas_ancho_sobrecubierta').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
this.divSolapasCubierta.addClass('d-none');
|
||||
$('#div_solapas_ancho_sobrecubierta').divSolapasCubierta.addClass('d-none');
|
||||
this.anchoSolapasCubierta.val(0);
|
||||
}
|
||||
$('#serv_default').trigger('click');
|
||||
@ -388,12 +386,12 @@ class DatosLibro {
|
||||
if (datos.solapasCubierta) {
|
||||
this.solapasCubierta.prop('checked', true);
|
||||
this.anchoSolapasCubierta.val(datos.solapasCubiertaAncho);
|
||||
$('#div_solapas_ancho').removeClass('d-none');
|
||||
this.divSolapasSobrecubierta.removeClass('d-none');
|
||||
}
|
||||
else{
|
||||
this.solapasCubierta.prop('checked', false);
|
||||
this.anchoSolapasCubierta.val(0);
|
||||
$('#div_solapas_ancho').addClass('d-none');
|
||||
this.divSolapasSobrecubierta.addClass('d-none');
|
||||
}
|
||||
}
|
||||
if (datos.solapasSobrecubierta) {
|
||||
@ -403,7 +401,7 @@ class DatosLibro {
|
||||
}
|
||||
else{
|
||||
this.solapasSobrecubierta.prop('checked', false);
|
||||
this.anchoSolapasSobrecubierta.val(0);
|
||||
this.anchoSolapasSobrecubierta.val(60);
|
||||
$('#div_solapas_ancho_sobrecubierta').addClass('d-none');
|
||||
}
|
||||
|
||||
|
||||
@ -674,7 +674,7 @@ class LineasPresupuesto {
|
||||
</span>
|
||||
<div class="d-flex flex-column ps-1">
|
||||
<h5 class="alert-heading mb-2">` +
|
||||
window.Presupuestos.errores.paginasLP +
|
||||
window.language.Presupuestos.errores.paginasLP +
|
||||
`</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
@ -1463,7 +1463,7 @@ class LineasPresupuesto {
|
||||
cliente_id: $('#clienteId').find(":selected").val(),
|
||||
};
|
||||
|
||||
if(datos.ancho==0 || datos.alto==0){
|
||||
if(datos.ancho==0 || datos.alto==0 || datos.ancho=='' || datos.alto=='' || isNaN(datos.ancho) || isNaN(datos.alto)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user