From 586dfa7343e082e45bf20d6f6f5eb24cec2b8240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Sun, 15 Dec 2024 21:13:25 +0100 Subject: [PATCH] trabajando en datoslibro --- ci4/app/Config/Routes.php | 1 + .../Presupuestos/Presupuestoadmin.php | 119 +++++++++++++ .../presupuestos/admin/_datosLibroItems.php | 145 ++++++---------- .../admin/_datosPresupuestoItems.php | 48 ++---- .../admin/viewPresupuestoadminForm.php | 106 ++---------- .../presupuestoAdmin/presupuestoAdminEdit.js | 162 ++++++++++++++++++ .../sections/datosGenerales.js | 56 ++++++ .../presupuestoAdmin/sections/datosLibro.js | 55 ++++++ 8 files changed, 478 insertions(+), 214 deletions(-) create mode 100644 httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js create mode 100644 httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js create mode 100644 httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php index bcbf0798..0974fafd 100644 --- a/ci4/app/Config/Routes.php +++ b/ci4/app/Config/Routes.php @@ -570,6 +570,7 @@ $routes->group('presupuestoadmin', ['namespace' => 'App\Controllers\Presupuestos $routes->get('list/(:num)', 'Presupuestoadmin::list/$1', ['as' => 'presupuestoAdminList']); // HOMOGENIZAR CON ARGS DINAMICOS!!! $routes->get('add/(:num)', 'Presupuestoadmin::add/$1', ['as' => 'newPresupuestoAdmin']); $routes->get('edit/(:any)', 'Presupuestoadmin::edit/$1', ['as' => 'editarPresupuestoAdmin']); + $routes->get('cargar/(:any)', 'Presupuestoadmin::cargar/$1'); $routes->post('add/(:num)', 'Presupuestoadmin::add/$1', ['as' => 'createPresupuestoAdmin']); $routes->post('create', 'Presupuestoadmin::create', ['as' => 'ajaxCreatePresupuestoAdmin']); $routes->put('(:num)/update', 'Presupuestoadmin::update/$1', ['as' => 'ajaxUpdatePresupuestoAdmin']); diff --git a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php index 36c8a103..79b805b3 100644 --- a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php @@ -6,6 +6,8 @@ use App\Entities\Presupuestos\PresupuestoEntity; use App\Models\Collection; use App\Models\Configuracion\MaquinaModel; use App\Models\Configuracion\PapelGenericoModel; +use App\Models\Configuracion\PapelFormatoModel; +use App\Models\Clientes\ClienteModel; use App\Models\Configuracion\PapelImpresionModel; use App\Models\Configuracion\TipoPresupuestoModel; use App\Models\Presupuestos\PresupuestoAcabadosModel; @@ -468,6 +470,123 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController return $response; } + public function cargar($id){ + if ($this->request->isAJAX()) { + + $modelPapelFormato = new PapelFormatoModel(); + $modelCliente = new ClienteModel(); + + + $presupuesto = $this->model->find($id); + $data = []; + if ($presupuesto) { + + $data['lc'] = $presupuesto->lomo_cubierta; + $data['lsc'] = $presupuesto->lomo_sobrecubierta; + $data['tipo_impresion'] = $presupuesto->tipo_impresion_id; + $data['cosido'] = $presupuesto->cosido; + + $data['datosGenerales']['id'] = $presupuesto->id; + $data['datosGenerales']['state'] = intval($presupuesto->estado_id); + $data['datosGenerales']['updated_at'] = date('d/m/Y', strtotime($presupuesto->updated_at)); + $data['datosGenerales']['created_at'] = date('d/m/Y', strtotime($presupuesto->created_at)); + $data['datosGenerales']['inc_rei'] = $presupuesto->inc_rei == null ? 0 : $presupuesto->inc_rei; + $data['datosGenerales']['titulo'] = $presupuesto->titulo; + $data['datosGenerales']['autor'] = $presupuesto->autor; + $data['datosGenerales']['coleccion'] = $presupuesto->coleccion; + $data['datosGenerales']['numero_edicion'] = $presupuesto->numero_edicion; + $data['datosGenerales']['isbn'] = $presupuesto->isbn; + $data['datosGenerales']['pais'] = $presupuesto->pais_id; + $data['datosGenerales']['cliente']['id'] = $presupuesto->cliente_id; + $data['datosGenerales']['cliente']['nombre'] = $modelCliente->getNombre($presupuesto->cliente_id); + $data['datosGenerales']['referenciaCliente'] = $presupuesto->referencia_cliente; + + /* + model('App\Models\Clientes\ClienteModel') + ->find($presupuesto->cliente_id)->nombre; + $data['datosGenerales']['papelFormatoId'] = $presupuesto->papel_formato_id; + $data['datosGenerales']['papelFormatoNombre'] = $modelPapelFormato->getNombre($presupuesto->papel_formato_id); + $data['datosGenerales']['papelFormatoPersonalizado'] = $presupuesto->papel_formato_personalizado; + $data['datosGenerales']['papelFormatoAncho'] = $presupuesto->papel_formato_ancho; + $data['datosGenerales']['papelFormatoAlto'] = $presupuesto->papel_formato_alto; + + $data['datosGenerales']['posPaginasColor'] = $presupuesto->comp_pos_paginas_color; + $data['datosGenerales']['papelInteriorDiferente'] = $presupuesto->papel_interior_diferente; + $data['datosGenerales']['paginasColorConsecutivas'] = $presupuesto->paginas_color_consecutivas; + + $data['datosGenerales']['tipo'] = $this->getTipoLibro($presupuesto->tipo_impresion_id ?? null); + $data['datosGenerales']['prototipo'] = $presupuesto->prototipo; + $data['datosGenerales']['ferro'] = $presupuesto->ferro; + $data['datosGenerales']['ferroDigital'] = $presupuesto->ferro_digital; + $data['datosGenerales']['marcapaginas'] = $presupuesto->marcapaginas; + $data['datosGenerales']['retractilado'] = $presupuesto->retractilado; + $data['datosGenerales']['retractilado5'] = $presupuesto->retractilado5; + + $datos_papel = $this->obtenerDatosPapel($presupuesto->id); + $data['interior'] = $datos_papel['interior'] ? $datos_papel['interior'] : []; + + $data['cubierta'] = $datos_papel['cubierta'] ? $datos_papel['cubierta'] : []; + $data['cubierta']['tapa'] = $this->obtenerTipoTapa($presupuesto->tipo_impresion_id ?? null); + $data['cubierta']['lomoRedondo'] = $presupuesto->lomo_redondo ? 1 : 0; + $data['cubierta']['solapas'] = $presupuesto->solapas ? 1 : 0; + $data['cubierta']['solapas_ancho'] = $presupuesto->solapas_ancho; + $data['cubierta']['cabezada'] = $presupuesto->cabezada; + $modelAcabado = model("App\Models\Tarifas\Acabados\TarifaAcabadoModel"); + $data['cubierta']['acabado']['id'] = $presupuesto->acabado_cubierta_id; + if ($presupuesto->acabado_cubierta_id == 0) { + $data['cubierta']['acabado']['text'] = "Ninguno"; + } else { + $data['cubierta']['acabado']['text'] = $modelAcabado->find($presupuesto->acabado_cubierta_id)->nombre; + } + $data['cubierta']['retractilado'] = $presupuesto->retractilado ? 1 : 0; + + $data['sobrecubierta'] = array_key_exists('sobrecubierta', $datos_papel) ? $datos_papel['sobrecubierta'] : []; + $data['sobrecubierta']['solapas'] = $presupuesto->solapas_sobrecubierta ? 1 : 0; + $data['sobrecubierta']['solapas_ancho'] = $presupuesto->solapas_ancho_sobrecubierta; + $data['sobrecubierta']['acabado']['id'] = $presupuesto->acabado_sobrecubierta_id; + if ($presupuesto->acabado_sobrecubierta_id == 0) { + $data['sobrecubierta']['acabado']['text'] = "Ninguno"; + } else { + $data['sobrecubierta']['acabado']['text'] = $modelAcabado->find($presupuesto->acabado_sobrecubierta_id)->nombre; + } + + $data['guardas'] = array_key_exists('guardas', $datos_papel) ? $datos_papel['guardas'] : []; + + $modelLinea = new PresupuestoLineaModel(); + $lineas = $modelLinea->where('presupuesto_id', $id)->findAll(); + + [$data['datosGenerales']['paginasNegro'], $data['datosGenerales']['paginasColor']] = + $this->getPaginas($lineas); + + if (intval($presupuesto->envios_recoge_cliente) == 1) { + $data['direcciones']['entrega_taller'] = 1; + } else { + $data['direcciones']['entrega_taller'] = 0; + $data['direcciones'] = $this->obtenerDireccionesEnvio($id, $presupuesto->cliente_id); + } + + if (intval($presupuesto->estado_id) == 2) { + $data['resumen']['base'] = $presupuesto->total_aceptado; + $data['resumen']['precio_unidad'] = $presupuesto->total_precio_unidad; + } + + $tiradas_alternativas = json_decode($presupuesto->tirada_alternativa_json_data); + if (!is_null($tiradas_alternativas)) { + for ($i = 0; $i < count($tiradas_alternativas); $i++) { + $tirada = $tiradas_alternativas[$i]; + $data['datosGenerales']['tirada' . ($i + 2)] = $tirada->tirada; + } + }*/ + + return $this->respond([ + 'status' => 1, + 'data' => $data + ]); + } + } else { + return $this->failUnauthorized('Invalid request', 403); + } + } public function datatable() { diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php index bd524b58..aaea7f7b 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php @@ -19,7 +19,7 @@ - > + > @@ -30,7 +30,7 @@ - + @@ -42,27 +42,19 @@ * -
- papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control formato_libro" value="papel_formato_ancho) ?>"> +
- papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control formato_libro" value="papel_formato_alto) ?>"> +
@@ -76,7 +68,7 @@ - + @@ -85,7 +77,7 @@ - + @@ -96,37 +88,33 @@
- -
+
- solapas == true ? 'checked' : ''; ?>> +
-
- -
-
-
- solapas_sobrecubierta == true ? 'checked' : ''; ?>> - -
-
-
- +
+
+
+ + +
+
+
- papel_formato_personalizado == true ? 'checked' : ''; ?>> +
@@ -136,35 +124,24 @@
-
- - solapas == true): ?> -
- - - -
- - solapas_sobrecubierta == true): ?> -
- - - +
+ + +
+
+ +
+
+ + +
+
@@ -187,44 +164,24 @@ *
- -
-
- - -
+
+
+ +
- -
- - - +
+
+
- -
@@ -237,7 +194,7 @@
@@ -248,7 +205,7 @@
@@ -260,7 +217,7 @@
@@ -271,7 +228,7 @@
@@ -291,7 +248,7 @@
@@ -303,7 +260,7 @@
@@ -314,7 +271,7 @@
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php index f4410468..31e708a0 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php @@ -16,7 +16,7 @@ - +
@@ -26,9 +26,9 @@ - "> + - "> +
@@ -38,11 +38,11 @@ - + - @@ -54,15 +54,11 @@ - + + + +
@@ -77,7 +73,7 @@ - +
@@ -87,7 +83,7 @@ - +
@@ -101,7 +97,7 @@ - +
@@ -110,7 +106,7 @@ - + @@ -119,7 +115,7 @@ - + @@ -131,7 +127,7 @@ - - $v) : ?> - - @@ -167,7 +155,7 @@ - + diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php index 9dfc18c8..1a27ea3f 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php @@ -10,21 +10,27 @@

+ + + + getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?> - - + + + + + @@ -168,98 +174,13 @@ } } }); - - $('#clienteId').select2({ - allowClear: false, - ajax: { - url: '', - type: 'post', - dataType: 'json', - - data: function(params) { - return { - id: 'id', - text: 'nombre', - searchTerm: params.term, - : v - }; - }, - delay: 60, - processResults: function(response) { - yeniden(response.); - return { - results: response.menu - }; - }, - cache: true - } - }); - - /******************************* - * Inicialización de los Select2 - *******************************/ - $('#incRei').select2({ - allowClear: false, - }); - - $('#paisId').select2({ - allowClear: false, - }); + endSection() ?> - - - -section("additionalInlineJs") ?> -$(window).on('load', function() { - - // Detectar cambios en inputs de texto - $('input[type="text"]').on('input', function() { - showBreadCrumbSaveButton(true); - }); - - // Detectar cambios en inputs de texto - $('input[type="number"]').on('input', function() { - showBreadCrumbSaveButton(true); - }); - - // Detectar cambios en select - $('select').change(function() { - showBreadCrumbSaveButton(true); - }); - - // Detectar cambios en checkboxes - $('input[type="checkbox"]').change(function() { - showBreadCrumbSaveButton(true); - }); - - // Detectar cambios en textareas - $('textarea').on('input', function() { - showBreadCrumbSaveButton(true); - }); - - // Detectar cambios en otros tipos de input - $('input[type="radio"]').change(function() { - showBreadCrumbSaveButton(true); - }); - - // Detectar cambios en otros tipos de input - $('input:not([type])').on('input', function() { - showBreadCrumbSaveButton(true); - }); - -}); - -$('#bc-save').on( "click", function() { - showBreadCrumbSaveButton(false); - $('#saveForm').click() -} ); - -endSection() ?> @@ -370,6 +291,7 @@ $('#bc-save').on( "click", function() { "> + endSection() ?> section('additionalExternalJs') ?> @@ -393,5 +315,9 @@ $('#bc-save').on( "click", function() { + + + + endSection() ?> diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js new file mode 100644 index 00000000..7e78df1c --- /dev/null +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js @@ -0,0 +1,162 @@ +import { getToken } from '../../common/common.js'; +import Ajax from '../../components/ajax.js'; + +import DatosGenerales from './sections/datosGenerales.js'; +import DatosLibro from './sections/datosLibro.js'; + +class PresupuestoAdminEdit { + + constructor() { + + this.domItem = $('#presupuestoForm'); + + this.csrf_token = getToken(); + this.csrf_hash = $('#presupuestoForm').find('input[name="' + this.csrf_token + '"]').val(); + + this.lc = $("#lomo_cubierta"); + this.lsc = $("#lomo_sobrecubierta"); + this.cosido = $("#isCosido"); + this.tipo_impresion = $("#tipo_impresion_id"); + this.cosido = $("#isCosido"); + + this.datosGenerales = new DatosGenerales(this.domItem.find('#accordionDatosPresupuestoTip')); + this.datosLibro = new DatosLibro(this.domItem.find('#accordionDatosPresupuestoTip')); + + this.calcularPresupuesto = false; + } + + init() { + + // Fuerza el foco en el campo de búsqueda de select2 + $(document).on('select2:open', () => { + document.querySelector('.select2-search__field').focus(); + }); + + this.datosGenerales.init(); + + if (window.location.href.includes("edit")) { + + setTimeout(() => { + this.#cargarPresupuesto(); + }, 0); + + const successMessage = sessionStorage.getItem('message'); + if (successMessage) { + popSuccessAlert(successMessage); + sessionStorage.removeItem('message'); + } + } + } + + #cargarPresupuesto() { + + const self = this; + + $('#loader').modal('show'); + let id = window.location.href.split("/").pop() + new Ajax('/presupuestoadmin/cargar/' + id, + {}, + {}, + (response) => { + + if (response.status === 1) { + + 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.tipo_impresion.val(response.data.tipo_impresion); + + self.calcularPresupuesto = false; + + self.datosGenerales.cargarDatos(response.data.datosGenerales); + + /*self.direcciones.handleChangeCliente(); + + self.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales); + + self.disenioInterior.cargarDatos(response.data.interior, response.data.datosGenerales.papelInteriorDiferente); + self.disenioCubierta.cargarDatos(response.data.cubierta, response.data.guardas, response.data.sobrecubierta); + */ + setTimeout(() => { + + $('#loader').modal('hide'); + + if (response.data.state != 2) { + + self.calcularPresupuesto = true; + } + + }, 0); + + // Funciones para detectar cambios en el formulario + this.#checkChangesPresupuesto(); + $('#bc-save').on("click", function () { + showBreadCrumbSaveButton(false); + $('#saveForm').trigger('click'); + }); + } + }, + () => { + $('#loader').modal('hide'); + this.calcularPresupuesto = true; + } + ).get(); + } + + #checkChangesPresupuesto() { + // Detectar cambios en inputs de texto + $('input[type="text"]').on('change', function () { + showBreadCrumbSaveButton(true); + }); + + // Detectar cambios en inputs de texto + $('input[type="number"]').on('change', function () { + showBreadCrumbSaveButton(true); + }); + + // Detectar cambios en select + $('select').on('change', function () { + showBreadCrumbSaveButton(true); + }); + + $('.select2bs').on('change', function (e) { + showBreadCrumbSaveButton(true); + }); + + // Detectar cambios en checkboxes + $('input[type="checkbox"]').change(function () { + showBreadCrumbSaveButton(true); + }); + + // Detectar cambios en textareas + $('textarea').on('input', function () { + showBreadCrumbSaveButton(true); + }); + + // Detectar cambios en otros tipos de input + $('input[type="radio"]').change(function () { + showBreadCrumbSaveButton(true); + }); + + // Detectar cambios en otros tipos de input + $('input:not([type])').on('input', function () { + showBreadCrumbSaveButton(true); + }); + } + +} + +document.addEventListener('DOMContentLoaded', function () { + + const locale = document.querySelector('meta[name="locale"]').getAttribute('content'); + + new Ajax('/translate/getTranslation', { locale: locale, translationFile: ['Maquinas'] }, {}, + function (translations) { + window.language = JSON.parse(translations); + new PresupuestoAdminEdit().init(); + }, + function (error) { + console.log("Error getting translations:", error); + } + ).post(); +}); \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js new file mode 100644 index 00000000..9b39ff91 --- /dev/null +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js @@ -0,0 +1,56 @@ +import ClassSelect from '../../../components/select2.js'; + +class DatosGenerales{ + + constructor(domItem){ + + this.domItem = domItem; + + this.id = this.domItem.find('#id'); + this.fecha = this.domItem.find('#updated_at'); + this.estado = this.domItem.find('#estado_id'); + this.inc_rei = this.domItem.find('#incRei'); + this.titulo = this.domItem.find('#titulo'); + this.autor = this.domItem.find('#autor'); + this.coleccion = this.domItem.find('#coleccion'); + this.numeroEdicion = this.domItem.find('#numeroEdicion'); + this.isbn = this.domItem.find('#isbn'); + this.pais = this.domItem.find('#paisId'); + + this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente'); + this.referenciaCliente = this.domItem.find('#referenciaCliente'); + + } + + init(){ + + this.cliente.init(); + + this.inc_rei.select2({ + allowClear: false, + }); + + this.pais.select2({ + allowClear: false, + }); + } + + cargarDatos(datos){ + + this.id.val(datos.id); + this.fecha.val(datos.updated_at); + this.estado.val(datos.state); + this.inc_rei.val(datos.inc_rei).trigger('change'); + this.titulo.val(datos.titulo); + this.autor.val(datos.autor); + this.coleccion.val(datos.coleccion); + this.numeroEdicion.val(datos.numero_edicion); + this.isbn.val(datos.isbn); + this.pais.val(datos.pais).trigger('change'); + + this.cliente.setOption(datos.cliente.id, datos.cliente.nombre); + this.referenciaCliente.val(datos.referenciaCliente); + } +} + +export default DatosGenerales; \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js new file mode 100644 index 00000000..2f280aae --- /dev/null +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js @@ -0,0 +1,55 @@ +class DatosLibro { + + constructor(domItem) { + + this.domItem = domItem; + + this.paginas = this.domItem.find('#paginas'); + this.tirada = this.domItem.find('#tirada'); + this.tamanio = this.domItem.find('#papelFormatoId'); + this.tamanioPersonalizado = this.domItem.find('#papelFormatoPersonalizado'); + this.anchoPersonalizado = this.domItem.find('#papelFormatoAncho'); + this.altoPersonalizado = this.domItem.find('#papelFormatoAlto'); + this.merma = this.domItem.find('#merma'); + this.mermaCubierta = this.domItem.find('#mermaCubierta'); + this.solapasCubierta = this.domItem.find('#solapas'); + this.solapasSobrecubierta = this.domItem.find('#solapas_sobrecubierta'); + this.anchoSolapasCubierta = this.domItem.find('#anchoSolapasCubierta'); + this.anchoSolapasSobrecubierta = this.domItem.find('#anchoSolapasSobrecubierta'); + + this.divSolapasCubierta = this.domItem.find('#div_solapas_ancho'); + this.divSolapasSobrecubierta = this.domItem.find('#div_solapas_ancho_sobrecubierta'); + + this.acabadoCubierta = this.domItem.find('#acabado_cubierta_id'); + this.acabadoSobrecubierta = this.domItem.find('#acabado_sobrecubierta_id'); + + this.retractilado = this.domItem.find('#retractilado'); + this.retractilado5 = this.domItem.find('#retractilado5'); + this.imprimirFajaColor = this.domItem.find('#imprimirFajaColor'); + this.prototipo = this.domItem.find('#prototipo'); + this.ferro = this.domItem.find('#ferro'); + this.ferroDigital = this.domItem.find('#ferroDigital'); + this.marcapaginas = this.domItem.find('#marcapaginas'); + + } + + init() { + + } + + cargarDatos(datos) { + + if ($('#tipo_impresion_id').val() == 1 || $('#tipo_impresion_id').val() == 3 || + $('#tipo_impresion_id').val() == 5 || $('#tipo_impresion_id').val() == 7) { + $(".impresion-con-solapas").addClass('d-none'); + } + + if ($('#tipo_impresion_id').val() == 5 || $('#tipo_impresion_id').val() == 6 || + $('#tipo_impresion_id').val() == 7 || $('#tipo_impresion_id').val() == 8 + || $('#tipo_impresion_id').val() == 21) { + $(".impresion-con-sobrecubierta").addClass('d-none'); + } + } +} + +export default DatosLibro; \ No newline at end of file