mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
modificados todos los buscadores de papeles y gramajes para ver el alto y el ancho (admin y cliente)
This commit is contained in:
@ -4,10 +4,12 @@ import Ajax from '../../../components/ajax.js';
|
||||
|
||||
class Comparador {
|
||||
|
||||
constructor(domItem) {
|
||||
constructor(domItem, functions = {}) {
|
||||
|
||||
this.domItem = domItem;
|
||||
|
||||
this.getDimensionLibro = functions.getDimensionLibro;
|
||||
|
||||
this.tipo_impresion_id = parseInt($('#tipo_impresion_id').val());
|
||||
|
||||
this.csrf_token = getToken();
|
||||
@ -23,6 +25,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'negro',
|
||||
});
|
||||
|
||||
@ -33,6 +39,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelNegro.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'negro',
|
||||
});
|
||||
this.paginasColor = $('#compPaginasColor');
|
||||
@ -42,6 +52,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'color',
|
||||
});
|
||||
|
||||
@ -52,6 +66,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelColor.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'color',
|
||||
});
|
||||
|
||||
@ -62,6 +80,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'negrohq',
|
||||
});
|
||||
|
||||
@ -72,6 +94,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelNegrohq.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'negrohq',
|
||||
});
|
||||
|
||||
@ -82,6 +108,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'colorhq',
|
||||
});
|
||||
|
||||
@ -92,6 +122,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelColorhq.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'colorhq',
|
||||
});
|
||||
|
||||
@ -102,6 +136,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: () => $('#solapas').prop('checked') ? $('#solapas_ancho').val() : 0,
|
||||
lomo: () => $('#lomo_cubierta').val(),
|
||||
tipo: 'colorhq',
|
||||
uso: 'cubierta',
|
||||
});
|
||||
@ -112,6 +150,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelCubierta.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: () => $('#solapas').prop('checked') ? $('#solapas_ancho').val() : 0,
|
||||
lomo: () => $('#lomo_cubierta').val(),
|
||||
tipo: 'colorhq',
|
||||
uso: 'cubierta',
|
||||
});
|
||||
@ -123,6 +165,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: () => $('#solapas').prop('checked') ? $('#solapas_ancho').val() : 0,
|
||||
lomo: () => $('#lomo_sobrecubierta').val(),
|
||||
tipo: 'colorhq',
|
||||
uso: 'sobrecubierta',
|
||||
});
|
||||
@ -133,6 +179,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelSobrecubierta.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: () => $('#solapas').prop('checked') ? $('#solapas_ancho').val() : 0,
|
||||
lomo: () => $('#lomo_sobrecubierta').val(),
|
||||
tipo: 'colorhq',
|
||||
uso: 'sobrecubierta',
|
||||
});
|
||||
@ -145,6 +195,10 @@ class Comparador {
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'colorhq',
|
||||
uso: 'guardas',
|
||||
});
|
||||
@ -155,6 +209,10 @@ class Comparador {
|
||||
papel_generico: () => this.papelCubierta.getVal(),
|
||||
tipo_impresion: this.tipo_impresion_id,
|
||||
tirada: () => $('#tirada').val(),
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: 'colorhq',
|
||||
uso: 'guardas',
|
||||
});
|
||||
@ -245,7 +303,7 @@ class Comparador {
|
||||
this.papelSobrecubierta.onChange(() => self.gramajeSobrecubierta.empty());
|
||||
this.sobrecubierta.on('change', () => {
|
||||
if (this.sobrecubierta.select2('data')[0].id == 1) {
|
||||
if($('#solapas_sobrecubierta').prop('checked') == false){
|
||||
if ($('#solapas_sobrecubierta').prop('checked') == false) {
|
||||
this.sobrecubierta.val(0);
|
||||
popErrorAlert(window.language.Presupuestos.errores.error_sobrecubierta_sin_solapas, 'divAlarmasComparador')
|
||||
}
|
||||
@ -1492,7 +1550,7 @@ class Comparador {
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
|
||||
}
|
||||
$.extend(data, bn_obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user