mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
resumen lateral terminado
This commit is contained in:
@ -344,7 +344,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<select class="form-select select2bs2 calcular-presupuesto" id="plastificadoSobrecubierta"
|
<select class="form-select select2bs2 calcular-presupuesto" id="plastificadoSobrecubierta"
|
||||||
name="plastificado_sobrecubierta">
|
name="plastificado_sobrecubierta">
|
||||||
<option value="NONE"> - </option>
|
<option value="NONE">Sin plastificar </option>
|
||||||
<option value="BRIL"><?= lang('Presupuestos.brillo') ?></option>
|
<option value="BRIL"><?= lang('Presupuestos.brillo') ?></option>
|
||||||
<option value="MATE"><?= lang('Presupuestos.mate') ?></option>
|
<option value="MATE"><?= lang('Presupuestos.mate') ?></option>
|
||||||
<option value="ANTI"><?= lang('Presupuestos.antirrayado') ?></option>
|
<option value="ANTI"><?= lang('Presupuestos.antirrayado') ?></option>
|
||||||
|
|||||||
@ -87,6 +87,8 @@
|
|||||||
<ul class="list-group list-group-timeline">
|
<ul class="list-group list-group-timeline">
|
||||||
<li id="rl_tipo" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Rustica
|
<li id="rl_tipo" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Rustica
|
||||||
Fresado</li>
|
Fresado</li>
|
||||||
|
<li id="rl_tipo_cubierta" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Tapa
|
||||||
|
dura</li>
|
||||||
<li id="rl_tamanio" class="list-group-item list-group-timeline-primary texto-resumen-lateral">170.0
|
<li id="rl_tamanio" class="list-group-item list-group-timeline-primary texto-resumen-lateral">170.0
|
||||||
x
|
x
|
||||||
240.0</li>
|
240.0</li>
|
||||||
@ -103,9 +105,14 @@
|
|||||||
<div class="row">Interior</div>
|
<div class="row">Interior</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ul class="list-group list-group-timeline">
|
<ul class="list-group list-group-timeline">
|
||||||
<li id="rl_tipo_interior" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Blanco y
|
<li id="rl_tipo_interior" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
|
Blanco y
|
||||||
negro estándar</li>
|
negro estándar</li>
|
||||||
<li id="rl_papel_interior" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Offset
|
<li id="rl_papel_interior" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
|
Offset
|
||||||
|
blanco 90 gr.</li>
|
||||||
|
<li id="rl_papel_interior_color"
|
||||||
|
class="list-group-item list-group-timeline-primary texto-resumen-lateral d-none">Offset
|
||||||
blanco 90 gr.</li>
|
blanco 90 gr.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -115,13 +122,15 @@
|
|||||||
<div class="row">Cubierta</div>
|
<div class="row">Cubierta</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ul class="list-group list-group-timeline">
|
<ul class="list-group list-group-timeline">
|
||||||
<li id="rl_tipo" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Estucado
|
<li id="rl_papel_cubierta" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
|
Estucado
|
||||||
Mate
|
Mate
|
||||||
300 gr.</li>
|
300 gr.</li>
|
||||||
<li id="rl_tamanio" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Impresa
|
<li id="rl_caras_cubierta" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
|
Impresa
|
||||||
1
|
1
|
||||||
cara</li>
|
cara</li>
|
||||||
<li id="rl_tamanio" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
<li id="rl_acabado_cubierta" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
Plastificado brillo</li>
|
Plastificado brillo</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -131,16 +140,29 @@
|
|||||||
<div class="row">Sobrecubierta</div>
|
<div class="row">Sobrecubierta</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ul class="list-group list-group-timeline">
|
<ul class="list-group list-group-timeline">
|
||||||
<li id="rl_tipo" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Faja: No</li>
|
<li id="rl_no_sobrecubierta" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
<li id="rl_tamanio" class="list-group-item list-group-timeline-primary texto-resumen-lateral">Impresa
|
No</li>
|
||||||
1
|
<li id="rl_papel_sobrecubierta"
|
||||||
cara</li>
|
class="list-group-item list-group-timeline-primary texto-resumen-lateral">Estucado mate 170 gr</li>
|
||||||
<li id="rl_tamanio" class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
<li id="rl_tamanio_sobrecubierta"
|
||||||
|
class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
|
60mm</li>
|
||||||
|
<li id="rl_acabado_sobrecubierta"
|
||||||
|
class="list-group-item list-group-timeline-primary texto-resumen-lateral">
|
||||||
Plastificado brillo</li>
|
Plastificado brillo</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="rl-servicios-extra rl-item d-none">
|
||||||
|
<div class="row">Servicios extra</div>
|
||||||
|
<div class="row">
|
||||||
|
<ul class="list-group list-group-timeline">
|
||||||
|
<li id="rl_prototipo" class="list-group-item list-group-timeline-primary texto-resumen-lateral d-none">
|
||||||
|
Prototipo</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -58,10 +58,14 @@ class DatosGenerales {
|
|||||||
|
|
||||||
this.rl_datos_generales = $(".rl-datos-generales");
|
this.rl_datos_generales = $(".rl-datos-generales");
|
||||||
this.rl_tipo = $("#rl_tipo");
|
this.rl_tipo = $("#rl_tipo");
|
||||||
|
this.rl_tipo_cubierta = $('#rl_tipo_cubierta');
|
||||||
this.rl_tamanio = $("#rl_tamanio");
|
this.rl_tamanio = $("#rl_tamanio");
|
||||||
this.rl_tiradas = $("#rl_tiradas");
|
this.rl_tiradas = $("#rl_tiradas");
|
||||||
this.rl_paginas = $("#rl_paginas");
|
this.rl_paginas = $("#rl_paginas");
|
||||||
|
|
||||||
|
this.rl_servicios_extra = $(".rl-servicios-extra");
|
||||||
|
this.rl_prototipo = $("#rl_prototipo");
|
||||||
|
|
||||||
this.initValidation();
|
this.initValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,7 +392,6 @@ class DatosGenerales {
|
|||||||
processMenuLateral() {
|
processMenuLateral() {
|
||||||
|
|
||||||
let menu_off = true;
|
let menu_off = true;
|
||||||
this.rl_datos_generales.removeClass('d-none');
|
|
||||||
|
|
||||||
if (this.tiposLibro.filter('.selected').length > 0) {
|
if (this.tiposLibro.filter('.selected').length > 0) {
|
||||||
let tipo = String(this.tiposLibro.filter('.selected').attr('id'));
|
let tipo = String(this.tiposLibro.filter('.selected').attr('id'));
|
||||||
@ -400,6 +403,13 @@ class DatosGenerales {
|
|||||||
else {
|
else {
|
||||||
this.rl_tipo.addClass('d-none');
|
this.rl_tipo.addClass('d-none');
|
||||||
}
|
}
|
||||||
|
if($('.tipo-cubierta.selected').length>0){
|
||||||
|
this.rl_tipo_cubierta.text($($('.tipo-cubierta.selected').find('.form-label')).text());
|
||||||
|
this.rl_tipo_cubierta.removeClass('d-none');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_tipo_cubierta.addClass('d-none');
|
||||||
|
}
|
||||||
if (this.checkFormatoPersonalizado.is(':checked')) {
|
if (this.checkFormatoPersonalizado.is(':checked')) {
|
||||||
let ancho = parseFloat(this.anchoPersonalizado.val());
|
let ancho = parseFloat(this.anchoPersonalizado.val());
|
||||||
let alto = parseFloat(this.altoPersonalizado.val());
|
let alto = parseFloat(this.altoPersonalizado.val());
|
||||||
@ -441,6 +451,25 @@ class DatosGenerales {
|
|||||||
|
|
||||||
if (!menu_off)
|
if (!menu_off)
|
||||||
this.rl_datos_generales.removeClass('d-none');
|
this.rl_datos_generales.removeClass('d-none');
|
||||||
|
else
|
||||||
|
this.rl_datos_generales.addClass('d-none');
|
||||||
|
|
||||||
|
// servicios extra
|
||||||
|
menu_off = true;
|
||||||
|
if(this.prototipo.is(':checked')){
|
||||||
|
this.rl_prototipo.removeClass("d-none");
|
||||||
|
menu_off = false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_prototipo.addClass('d-none');
|
||||||
|
}
|
||||||
|
if(!menu_off){
|
||||||
|
this.rl_servicios_extra.removeClass('d-none');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_servicios_extra.addClass('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,17 @@ class DisenioCubierta {
|
|||||||
this.fresado = $(this.domItem.find("#fresado")[0]);
|
this.fresado = $(this.domItem.find("#fresado")[0]);
|
||||||
this.cosido = $(this.domItem.find("#cosido")[0]);
|
this.cosido = $(this.domItem.find("#cosido")[0]);
|
||||||
|
|
||||||
|
this.rl_cubierta = $(".rl-cubierta");
|
||||||
|
this.rl_papel_cubierta = $("#rl_papel_cubierta");
|
||||||
|
this.rl_caras_cubierta = $("#rl_caras_cubierta");
|
||||||
|
this.rl_acabado_cubierta = $("#rl_acabado_cubierta");
|
||||||
|
|
||||||
|
this.rl_sobrecubierta = $(".rl-sobrecubierta");
|
||||||
|
this.rl_no_sobrecubierta = $("#rl_no_sobrecubierta");
|
||||||
|
this.rl_papel_sobrecubierta = $('#rl_papel_sobrecubierta');
|
||||||
|
this.rl_tamanio_sobrecubierta = $('#rl_tamanio_sobrecubierta');
|
||||||
|
this.rl_acabado_sobrecubierta = $("#rl_acabado_sobrecubierta");
|
||||||
|
|
||||||
this.initValidation();
|
this.initValidation();
|
||||||
|
|
||||||
// Creamos un nuevo observador que detecta cambios en los atributos
|
// Creamos un nuevo observador que detecta cambios en los atributos
|
||||||
@ -324,6 +335,69 @@ class DisenioCubierta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
processMenuLateral() {
|
||||||
|
|
||||||
|
let menu_off = true;
|
||||||
|
|
||||||
|
if($('.papel-cubierta.selected').length>0 && this.getGramaje() != null){
|
||||||
|
this.rl_papel_cubierta.text($($('.papel-cubierta.selected').find('.form-label')).text() + " " +
|
||||||
|
this.getGramaje() + " gr");
|
||||||
|
this.rl_acabado_cubierta.text(this.domItem.find("#plastificado").children("option:selected").text());
|
||||||
|
this.rl_papel_cubierta.removeClass('d-none');
|
||||||
|
this.rl_acabado_cubierta.removeClass('d-none');
|
||||||
|
|
||||||
|
if(this.carasCubierta.find('option:selected').length>0){
|
||||||
|
this.rl_caras_cubierta.text("Impresa " + this.carasCubierta.find('option:selected').text());
|
||||||
|
this.rl_caras_cubierta.removeClass('d-none');
|
||||||
|
menu_off = false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_caras_cubierta.addClass('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
|
menu_off = false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_papel_cubierta.addClass('d-none');
|
||||||
|
this.rl_acabado_cubierta.addClass('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!menu_off)
|
||||||
|
this.rl_cubierta.removeClass('d-none');
|
||||||
|
else
|
||||||
|
this.rl_cubierta.addClass('d-none');
|
||||||
|
|
||||||
|
// Sobrecubierta solo se muestra si cubierta ok
|
||||||
|
if(!this.rl_cubierta.hasClass('d-none')){
|
||||||
|
this.rl_sobrecubierta.removeClass('d-none');
|
||||||
|
if(!this.sobrecubierta.is(":checked")){
|
||||||
|
this.rl_no_sobrecubierta.removeClass('d-none');
|
||||||
|
this.rl_papel_sobrecubierta.addClass('d-none');
|
||||||
|
this.rl_tamanio_sobrecubierta.addClass('d-none');
|
||||||
|
this.rl_acabado_sobrecubierta.addClass('d-none');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_no_sobrecubierta.addClass('d-none');
|
||||||
|
this.rl_papel_sobrecubierta.removeClass('d-none');
|
||||||
|
this.rl_tamanio_sobrecubierta.removeClass('d-none');
|
||||||
|
this.rl_acabado_sobrecubierta.removeClass('d-none');
|
||||||
|
|
||||||
|
const sobrecubierta = this.getSobrecubierta(true);
|
||||||
|
this.rl_papel_sobrecubierta.text(sobrecubierta.papel + " " + sobrecubierta.gramaje + " gr")
|
||||||
|
this.rl_tamanio_sobrecubierta.text("Solapas: " + sobrecubierta.solapas + " mm")
|
||||||
|
let acabado_text = sobrecubierta.plastificado;
|
||||||
|
if(acabado_text.includes("Sin plastificar"))
|
||||||
|
acabado_text = "Sin plastificar";
|
||||||
|
this.rl_acabado_sobrecubierta.text(acabado_text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.rl_sobrecubierta.addClass('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getSolapasCubierta() {
|
getSolapasCubierta() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -59,6 +59,11 @@ class DisenioInterior {
|
|||||||
|
|
||||||
this.checksGramaje = $('.gramaje-interior');
|
this.checksGramaje = $('.gramaje-interior');
|
||||||
|
|
||||||
|
this.rl_interior = $(".rl-interior");
|
||||||
|
this.rl_tipo_interior = $("#rl_tipo_interior");
|
||||||
|
this.rl_papel_interior = $("#rl_papel_interior");
|
||||||
|
this.rl_papel_interior_color = $("#rl_papel_interior_color");
|
||||||
|
|
||||||
this.initValidation();
|
this.initValidation();
|
||||||
|
|
||||||
// Creamos un nuevo observador que detecta cambios en los atributos
|
// Creamos un nuevo observador que detecta cambios en los atributos
|
||||||
@ -371,8 +376,6 @@ class DisenioInterior {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getIsHq() {
|
getIsHq() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -394,6 +397,43 @@ class DisenioInterior {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processMenuLateral() {
|
||||||
|
|
||||||
|
let menu_off = true;
|
||||||
|
this.rl_tipo_interior.removeClass('d-none');
|
||||||
|
|
||||||
|
const HQ = this.getIsHq();
|
||||||
|
const color = $("#paginasColor").val()>0?true:false;
|
||||||
|
const papelInterior = this.getPapel(true);
|
||||||
|
const gramajeInterior = this.getGramaje();
|
||||||
|
if (HQ != null && papelInterior != null && gramajeInterior != null) {
|
||||||
|
|
||||||
|
menu_off = false;
|
||||||
|
if ($(".interior-color").hasClass('d-none')) {
|
||||||
|
if (!this.rl_papel_interior_color.hasClass('d-none')) {
|
||||||
|
this.rl_papel_interior_color.addClass('d-none');
|
||||||
|
}
|
||||||
|
const impInterior = (color ? "Color " : "Blanco y Negro ") + (HQ ? "Premium" : "Estándar");
|
||||||
|
this.rl_tipo_interior.text(impInterior);
|
||||||
|
this.rl_papel_interior.text(papelInterior + " " + gramajeInterior + "gr");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.rl_papel_interior_color.removeClass('d-none');
|
||||||
|
|
||||||
|
const impInterior = ("Negro " + (HQ.negro ? "Premium" : "Estándar") + " / Color " + (HQ.color ? "Premium" : "Estándar"));
|
||||||
|
this.rl_tipo_interior.text(impInterior);
|
||||||
|
this.rl_papel_interior.text(papelInterior.negro + " " + gramajeInterior.negro + "gr");
|
||||||
|
this.rl_papel_interior_color.text(papelInterior.color + " " + gramajeInterior.color + "gr");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!menu_off)
|
||||||
|
this.rl_interior.removeClass('d-none');
|
||||||
|
else
|
||||||
|
this.rl_interior.addClass('d-none');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
getPapel(forResumen = false) {
|
getPapel(forResumen = false) {
|
||||||
|
|
||||||
|
|||||||
@ -113,8 +113,8 @@ class PresupuestoCliente {
|
|||||||
#processResumenLateral() {
|
#processResumenLateral() {
|
||||||
|
|
||||||
this.datosGenerales.processMenuLateral();
|
this.datosGenerales.processMenuLateral();
|
||||||
|
this.disenioInterior.processMenuLateral();
|
||||||
|
this.disenioCubierta.processMenuLateral();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -225,7 +225,11 @@ class PresupuestoCliente {
|
|||||||
else {
|
else {
|
||||||
this.#goToForm(nextElement);
|
this.#goToForm(nextElement);
|
||||||
}
|
}
|
||||||
this.#processResumenLateral();
|
if(!nextElement.includes('resumen-libro'))
|
||||||
|
this.#processResumenLateral();
|
||||||
|
else{
|
||||||
|
$(".rl-item").addClass('d-none');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#goToForm(form) {
|
#goToForm(form) {
|
||||||
|
|||||||
@ -246,7 +246,7 @@ class Resumen {
|
|||||||
if ($(".interior-color").hasClass('d-none')) {
|
if ($(".interior-color").hasClass('d-none')) {
|
||||||
this.domItem.find(".mismoInterior").removeClass('d-none');
|
this.domItem.find(".mismoInterior").removeClass('d-none');
|
||||||
this.domItem.find(".diferenteInterior").addClass('d-none');
|
this.domItem.find(".diferenteInterior").addClass('d-none');
|
||||||
const impInterior = (color ? "Color " : "Blanco y Negro") + (HQ ? "Premium" : "Estándar");
|
const impInterior = (color ? "Color " : "Blanco y Negro ") + (HQ ? "Premium" : "Estándar");
|
||||||
this.impresionInterior.text(impInterior);
|
this.impresionInterior.text(impInterior);
|
||||||
this.papelInterior.text(papelInterior);
|
this.papelInterior.text(papelInterior);
|
||||||
this.gramajeInterior.text(gramajeInterior);
|
this.gramajeInterior.text(gramajeInterior);
|
||||||
@ -254,7 +254,7 @@ class Resumen {
|
|||||||
else {
|
else {
|
||||||
this.domItem.find(".mismoInterior").addClass('d-none');
|
this.domItem.find(".mismoInterior").addClass('d-none');
|
||||||
this.domItem.find(".diferenteInterior").removeClass('d-none');
|
this.domItem.find(".diferenteInterior").removeClass('d-none');
|
||||||
const impInterior = ("Negro " + (HQ.negro ? "Premium" : "Estándar") + " / Color" + (HQ.color ? "Premium" : "Estándar"));
|
const impInterior = ("Negro " + (HQ.negro ? "Premium" : "Estándar") + " / Color " + (HQ.color ? "Premium" : "Estándar"));
|
||||||
this.impresionInterior.text(impInterior);
|
this.impresionInterior.text(impInterior);
|
||||||
this.papelInteriorNegro.text(papelInterior.negro);
|
this.papelInteriorNegro.text(papelInterior.negro);
|
||||||
this.papelInteriorColor.text(papelInterior.color);
|
this.papelInteriorColor.text(papelInterior.color);
|
||||||
|
|||||||
Reference in New Issue
Block a user