mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-13 00:48:49 +00:00
terminado acabados cubierta
This commit is contained in:
@ -543,7 +543,7 @@ class PresupuestoCliente {
|
|||||||
this.divAcabadoCubierta.empty();
|
this.divAcabadoCubierta.empty();
|
||||||
for (const opcion of data.opciones_acabados_cubierta) {
|
for (const opcion of data.opciones_acabados_cubierta) {
|
||||||
const item = `
|
const item = `
|
||||||
<input type="radio" class="btn-check" id="acabado-cubierta-${opcion['sk-id']}" name="acabado-cubierta" sk-id="${opcion['sk-id']}">
|
<input type="radio" class="btn-check acabado-cubierta-check" id="acabado-cubierta-${opcion['sk-id']}" name="acabado-cubierta" sk-id="${opcion['sk-id']}">
|
||||||
<label class="btn btn-outline-primary material-shadow" for="acabado-cubierta-${opcion['sk-id']}">
|
<label class="btn btn-outline-primary material-shadow" for="acabado-cubierta-${opcion['sk-id']}">
|
||||||
${opcion.name}
|
${opcion.name}
|
||||||
</label>
|
</label>
|
||||||
@ -770,6 +770,12 @@ class PresupuestoCliente {
|
|||||||
this.#cacheFormData();
|
this.#cacheFormData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('change', '.acabado-cubierta-check', (e) => {
|
||||||
|
|
||||||
|
this.formData.cubierta.acabado = parseInt($(e.currentTarget).attr('sk-id')) || 1;
|
||||||
|
this.#cacheFormData();
|
||||||
|
});
|
||||||
|
|
||||||
$('.btn-change-tab-cubierta').on('click', () => {
|
$('.btn-change-tab-cubierta').on('click', () => {
|
||||||
this.#changeTab('pills-inside');
|
this.#changeTab('pills-inside');
|
||||||
/*const data = this.#getPresupuestoData();
|
/*const data = this.#getPresupuestoData();
|
||||||
@ -866,7 +872,7 @@ class PresupuestoCliente {
|
|||||||
const cabezada = this.cabezada.val() || 'WHI';
|
const cabezada = this.cabezada.val() || 'WHI';
|
||||||
const papelCubiertaId = $('#div-papel-cubierta .image-container.selected').data('sk-id') || 3;
|
const papelCubiertaId = $('#div-papel-cubierta .image-container.selected').data('sk-id') || 3;
|
||||||
const gramajeCubierta = $('input[name="gramaje-cubierta"]:checked').data('gramaje') || 240;
|
const gramajeCubierta = $('input[name="gramaje-cubierta"]:checked').data('gramaje') || 240;
|
||||||
const acabado = parseInt($('.acabado-cubierta.selected').data('sk-id')) || 1;
|
const acabado = parseInt($(`input[name="acabado-cubierta"]:checked`).attr('sk-id')) || 1;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tipoCubierta: tipoCubierta,
|
tipoCubierta: tipoCubierta,
|
||||||
@ -934,7 +940,7 @@ class PresupuestoCliente {
|
|||||||
this.formData.cubierta.guardasGramaje + '"]').prop('selected', true).trigger('change');
|
this.formData.cubierta.guardasGramaje + '"]').prop('selected', true).trigger('change');
|
||||||
this.guardasImpresas.val(this.formData.cubierta.guardasImpresas);
|
this.guardasImpresas.val(this.formData.cubierta.guardasImpresas);
|
||||||
this.cabezada.val(this.formData.cubierta.cabezada);
|
this.cabezada.val(this.formData.cubierta.cabezada);
|
||||||
|
$(`input[type="radio"][name="acabado-cubierta"][sk-id="${this.formData.cubierta.acabado}"]`).prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(`#${this.formData.cubierta.tipoCubierta}`).trigger('click');
|
$(`#${this.formData.cubierta.tipoCubierta}`).trigger('click');
|
||||||
@ -953,6 +959,8 @@ class PresupuestoCliente {
|
|||||||
|
|
||||||
this.carasImpresionCubierta.val(this.formData.cubierta.cubiertaCaras);
|
this.carasImpresionCubierta.val(this.formData.cubierta.cubiertaCaras);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/******************************
|
/******************************
|
||||||
* END CUBIERTA
|
* END CUBIERTA
|
||||||
|
|||||||
Reference in New Issue
Block a user