mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en previews. falta probar rotativa, y terminar cubierta
This commit is contained in:
@ -22,6 +22,8 @@ class PresupuestoAdminEdit {
|
||||
this.tipo_impresion = $("#tipo_impresion_id");
|
||||
this.POD = $("#POD");
|
||||
|
||||
this.tipoTapa = $('.card-title').text().toLowerCase().includes('dura') ? 'dura' : 'blanda';
|
||||
|
||||
this.datosGenerales = new DatosGenerales(this.domItem.find('#accordionDatosPresupuestoTip'));
|
||||
this.datosLibro = new DatosLibro(this.domItem.find('#accordionDatosLibroTip'),
|
||||
{
|
||||
@ -68,20 +70,15 @@ class PresupuestoAdminEdit {
|
||||
|
||||
this.previewFormasAdmin = new PreviewFormasAdmin(tipoLibro, this.tipoTapa,
|
||||
{
|
||||
ancho: ()=>{return this.getDimensionLibro().ancho},
|
||||
alto: ()=>{return this.getDimensionLibro().alto},
|
||||
lomo: ()=>{$('#lc').val() === '' ? parseFloat('0.0') : parseFloat($('#lc').val())},
|
||||
solapas: ()=>{
|
||||
$('#solapas').prop('checked')?parseFloat($('#solapas_ancho').val()):0
|
||||
},
|
||||
solapas_sobrecubierta: ()=>{
|
||||
$('#solapas_sobrecubierta').prop('checked')?parseFloat($('#solapas_ancho_sobrecubierta').val()):0
|
||||
},
|
||||
lomoRedondo: ()=>{
|
||||
(self.tipo_impresion == 1 || $self.tipo_impresion == 3)?parseFloat($('#compLomoRedondo').val()):0
|
||||
},
|
||||
ancho: () => this.getDimensionLibro().ancho,
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
lomo: () => $('#lc').val() === '' ? parseFloat('0.0') : parseFloat($('#lc').val()),
|
||||
solapas: () => $('#solapas').prop('checked') ? parseFloat($('#solapas_ancho').val()) : 0,
|
||||
solapas_sobrecubierta: () => $('#solapas_sobrecubierta').prop('checked') ? parseFloat($('#solapas_ancho_sobrecubierta').val()) : 0,
|
||||
lomoRedondo: () => (this.tipo_impresion == 1 || this.tipo_impresion == 3) ? parseFloat($('#compLomoRedondo').val()) : 0,
|
||||
}
|
||||
);
|
||||
this.previewFormasAdmin.init();
|
||||
|
||||
if (window.location.href.includes("edit")) {
|
||||
|
||||
@ -112,7 +109,7 @@ class PresupuestoAdminEdit {
|
||||
|
||||
self.lc.val(parseFloat(response.data.lc).toFixed(2));
|
||||
self.lsc.val(parseFloat(response.data.lsc).toFixed(2));
|
||||
self.cosido.val(response.data.cosido);
|
||||
self.cosido.val(response.data.cosido?1:0);
|
||||
self.tipo_impresion.val(response.data.tipo_impresion);
|
||||
self.POD.val(response.data.POD);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user