mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
empezando a enviar los datos al controlador
This commit is contained in:
@ -161,6 +161,15 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController
|
|||||||
$datosPresupuesto->papelInteriorColor = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('color', false, false);
|
$datosPresupuesto->papelInteriorColor = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('color', false, false);
|
||||||
$datosPresupuesto->papelInteriorColorHq = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false);
|
$datosPresupuesto->papelInteriorColorHq = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false);
|
||||||
|
|
||||||
|
$datosPresupuesto->papelCubierta = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', true, false);
|
||||||
|
$datosPresupuesto->papelSobrecubierta = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, true);
|
||||||
|
$datosPresupuesto->papelGuardas = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false, false, true);
|
||||||
|
|
||||||
|
$datosPresupuesto->acabadosCubierta = $this->getAcabadosCubierta();
|
||||||
|
$datosPresupuesto->acabadosSobrecubierta = $this->getAcabadosSobrecubierta();
|
||||||
|
|
||||||
|
$datosPresupuesto->clienteList = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||||
|
|
||||||
$this->viewData['formAction'] = route_to('crearPresupuestoCliente');
|
$this->viewData['formAction'] = route_to('crearPresupuestoCliente');
|
||||||
|
|
||||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||||
@ -602,5 +611,35 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController
|
|||||||
array_shift($data);
|
array_shift($data);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getAcabadosCubierta()
|
||||||
|
{
|
||||||
|
$model = model('App\Models\Tarifas\TarifaacabadoModel');
|
||||||
|
$data = $model->getServiciosAcabadoCubierta();
|
||||||
|
array_unshift($data, (object)['id' => '', 'label' => lang('Basic.global.None')]);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getAcabadosSobrecubierta()
|
||||||
|
{
|
||||||
|
$model = model('App\Models\Tarifas\TarifaacabadoModel');
|
||||||
|
$data = $model->getServiciosAcabadoSobrecubierta();
|
||||||
|
array_unshift($data, (object)['id' => '', 'label' => lang('Basic.global.None')]);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getClienteListItems($selId = null)
|
||||||
|
{
|
||||||
|
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Clientes.cliente'))])];
|
||||||
|
if (!empty($selId)) :
|
||||||
|
$clienteModel = model('App\Models\Clientes\ClienteModel');
|
||||||
|
|
||||||
|
$selOption = $clienteModel->where('id', $selId)->findColumn('nombre');
|
||||||
|
if (!empty($selOption)) :
|
||||||
|
$data[$selId] = $selOption[0];
|
||||||
|
endif;
|
||||||
|
endif;
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,9 +275,15 @@ return [
|
|||||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||||
'integer' => 'El campo {field} debe contener un número entero.',
|
'integer' => 'El campo {field} debe contener un número entero.',
|
||||||
'requerido' => 'El campo {field} es obligatorio.',
|
'requerido' => 'El campo {field} es obligatorio.',
|
||||||
|
'requerido_short' => 'Campo obligatorio',
|
||||||
'max_length' => 'El campo {field} no puede exceder los {param} caracteres de longitud.',
|
'max_length' => 'El campo {field} no puede exceder los {param} caracteres de longitud.',
|
||||||
'no_lp_for_merma' => 'Inserte líneas de presupuesto para calcular la merma',
|
'no_lp_for_merma' => 'Inserte líneas de presupuesto para calcular la merma',
|
||||||
'ejemplares_envio' => 'El número de ejemplares enviados no coincide con la tirada',
|
'ejemplares_envio' => 'El número de ejemplares enviados no coincide con la tirada',
|
||||||
|
'cliente' => 'Debe seleccionar un cliente',
|
||||||
|
'pais' => 'Debe seleccionar un país',
|
||||||
|
'integer_greatherThan_0' => 'Número entero > 0 requerido',
|
||||||
|
'tirada_no_valida' => "Tirada no valida",
|
||||||
|
'sin_gramaje' => "Seleccione gramaje",
|
||||||
],
|
],
|
||||||
|
|
||||||
'errores' => [
|
'errores' => [
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<input hidden readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
|
<input hidden readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
|
||||||
|
|
||||||
<div class="row g-2">
|
<div class="row g-2">
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
<div class="col-sm-6 mb-3">
|
||||||
<label for="titulo" class="form-label">
|
<label for="titulo" class="form-label">
|
||||||
@ -52,7 +52,6 @@
|
|||||||
<?=lang('Presupuestos.paisId') ?>*
|
<?=lang('Presupuestos.paisId') ?>*
|
||||||
</label>
|
</label>
|
||||||
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;" >
|
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;" >
|
||||||
<option value=""><?=lang('Basic.global.pleaseSelectA', [lang('Presupuestos.paisId')]) ?></option>
|
|
||||||
<?php foreach ($datosPresupuesto->paisList as $item) : ?>
|
<?php foreach ($datosPresupuesto->paisList as $item) : ?>
|
||||||
<option value="<?=$item->id ?>"<?=$item->id==$presupuestoEntity->pais_id ? ' selected':'' ?>>
|
<option value="<?=$item->id ?>"<?=$item->id==$presupuestoEntity->pais_id ? ' selected':'' ?>>
|
||||||
<?=$item->nombre ?>
|
<?=$item->nombre ?>
|
||||||
@ -68,10 +67,10 @@
|
|||||||
<label for="clienteId" class="form-label">
|
<label for="clienteId" class="form-label">
|
||||||
<?= lang('Presupuestos.clienteId') ?>*
|
<?= lang('Presupuestos.clienteId') ?>*
|
||||||
</label>
|
</label>
|
||||||
<select id="clienteId" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
|
<select id="clienteId" name="clienteId" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
|
||||||
<?php if (isset($clienteList) && is_array($clienteList) && !empty($clienteList)) :
|
<?php if (isset($datosPresupuesto->clienteList) && is_array($datosPresupuesto->clienteList) && !empty($datosPresupuesto->clienteList)) :
|
||||||
foreach ($clienteList as $k => $v) : ?>
|
foreach ($datosPresupuesto->clienteList as $k => $v) : ?>
|
||||||
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
|
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
|
||||||
<?= $v ?>
|
<?= $v ?>
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@ -4,22 +4,24 @@
|
|||||||
|
|
||||||
<div class="row g-2">
|
<div class="row g-2">
|
||||||
|
|
||||||
|
<h3 id="tituloDisenioLibro">Fresado</h3>
|
||||||
|
|
||||||
<div id="tapaDiv" class="row">
|
<div id="tapaDiv" class="row">
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2">
|
<div class="col-sm-3 mb-md-0 mb-2" id="tapaBlandaDiv">
|
||||||
<div id="tapaBlandaDiv" class="form-check custom-option custom-option-tapa custom-option-basic checked">
|
<div id="tapaBlandaInnerDiv" class="form-check custom-option custom-option-tapa custom-option-basic checked">
|
||||||
<label class="form-check-label custom-option-content" for="tapaBlanda">
|
<label class="form-check-label custom-option-content" for="tapaBlanda">
|
||||||
<input name="tapaBlanda" class="form-check-input" type="radio" value="" id="tapaBlanda" checked="">
|
<input name="tapaBlanda" class="form-check-input elementos-libro" type="radio" value="" id="tapaBlanda" checked="">
|
||||||
<span class="custom-option-header">
|
<span class="custom-option-header">
|
||||||
<span class="h6 mb-0">Tapa blanda</span>
|
<span class="h6 mb-0">Tapa blanda</span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div id="tapaDuraDiv" class="col-sm-3 mb-md-0 mb-2">
|
||||||
<div id="tapaDuraDiv" class="form-check custom-option custom-option-tapa custom-option-basic">
|
<div class="form-check custom-option custom-option-tapa custom-option-basic">
|
||||||
<label class="form-check-label custom-option-content" for="tapaDura">
|
<label class="form-check-label custom-option-content" for="tapaDura">
|
||||||
<input name="tapaDura" class="form-check-input" type="radio" value="" id="tapaDura">
|
<input name="tapaDura" class="form-check-input elementos-libro" type="radio" value="" id="tapaDura">
|
||||||
<span class="custom-option-header">
|
<span class="custom-option-header">
|
||||||
<span class="h6 mb-0">Tapa Dura</span>
|
<span class="h6 mb-0">Tapa Dura</span>
|
||||||
</span>
|
</span>
|
||||||
@ -40,28 +42,28 @@
|
|||||||
<label for="tirada" class="form-label">
|
<label for="tirada" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 1
|
<?= lang('Presupuestos.tirada') ?> 1
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="tirada" name="tirada" maxLength="8" step="1" class="form-control" value="<?= old('tirada', $presupuestoEntity->tirada) ?>">
|
<input type="number" id="tirada" name="tirada" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="tirada2" class="form-label">
|
<label for="tirada2" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 2
|
<?= lang('Presupuestos.tirada') ?> 2
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="tirada2" name="tirada2" maxLength="8" step="1" class="form-control" value="<?= old('tirada2', $presupuestoEntity->tirada2) ?>">
|
<input type="number" id="tirada2" name="tirada2" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada2) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="tirada3" class="form-label">
|
<label for="tirada3" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 3
|
<?= lang('Presupuestos.tirada') ?> 3
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="tirada3" name="tirada3" maxLength="8" step="1" class="form-control" value="<?= old('tirada3', $presupuestoEntity->tirada3) ?>">
|
<input type="number" id="tirada3" name="tirada3" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada3) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="tirada4" class="form-label">
|
<label for="tirada4" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 4
|
<?= lang('Presupuestos.tirada') ?> 4
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="tirada4" name="tirada4" maxLength="8" step="1" class="form-control" value="<?= old('tirada4', $presupuestoEntity->tirada4) ?>">
|
<input type="number" id="tirada4" name="tirada4" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada4) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
@ -73,7 +75,7 @@
|
|||||||
<label for="paginas" class="form-label">
|
<label for="paginas" class="form-label">
|
||||||
<?= lang('Presupuestos.paginas') ?>
|
<?= lang('Presupuestos.paginas') ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="paginas" name="paginas" maxLength="8" step="1" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
|
<input type="number" id="paginas" name="paginas" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->paginas) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
@ -130,7 +132,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col col-sm-1 d-flex justify-content-center">
|
<div class="col col-sm-1 d-flex justify-content-center">
|
||||||
<div id="colorNegroDiv" class="form-check change-papel-interior custom-option-color custom-option custom-option-image custom-option-image-radio">
|
<div id="colorNegroDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="colorNegro">
|
<label class="form-check-label custom-option-content" for="colorNegro">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img style="height:32px;width:32px" src="<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_bn.png") ?>" alt="">
|
<img style="height:32px;width:32px" src="<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_bn.png") ?>" alt="">
|
||||||
@ -141,7 +143,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-sm-1 d-flex justify-content-center">
|
<div class="col col-sm-1 d-flex justify-content-center">
|
||||||
<div id="colorColorDiv" class="form-check change-papel-interior custom-option-color custom-option custom-option-image custom-option-image-radio">
|
<div id="colorColorDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="colorColor">
|
<label class="form-check-label custom-option-content" for="colorColor">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img style="height:32px;width:32px" src="<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_color.png") ?>" alt="">
|
<img style="height:32px;width:32px" src="<?= site_url("themes/vuexy/img/safekat/presupuestos/icon_color.png") ?>" alt="">
|
||||||
@ -153,7 +155,7 @@
|
|||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
|
|
||||||
<div class="row">
|
<div id="pagColorDiv" class="row">
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="paginasColor" class="form-label">
|
<label for="paginasColor" class="form-label">
|
||||||
Páginas a color
|
Páginas a color
|
||||||
@ -166,7 +168,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2">
|
<div class="col-sm-3 mb-md-0 mb-2">
|
||||||
<div id="calidadEstandarDiv" class="form-check change-papel-interior custom-option custom-option-calidad custom-option-basic checked">
|
<div id="calidadEstandarDiv" class="form-check change-tipo-impresion custom-option custom-option-calidad custom-option-basic checked">
|
||||||
<label class="form-check-label custom-option-content" for="calidadEstandar">
|
<label class="form-check-label custom-option-content" for="calidadEstandar">
|
||||||
<input name="calidadEstandar" class="form-check-input" type="radio" value="" id="calidadEstandar" checked="">
|
<input name="calidadEstandar" class="form-check-input" type="radio" value="" id="calidadEstandar" checked="">
|
||||||
<span class="custom-option-header">
|
<span class="custom-option-header">
|
||||||
@ -176,7 +178,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div id="calidadPremiumDiv" class="form-check change-papel-interior custom-option custom-option-calidad custom-option-basic">
|
<div id="calidadPremiumDiv" class="form-check change-tipo-impresion custom-option custom-option-calidad custom-option-basic">
|
||||||
<label class="form-check-label custom-option-content" for="calidadPremium">
|
<label class="form-check-label custom-option-content" for="calidadPremium">
|
||||||
<input name="calidadPremium" class="form-check-input" type="radio" value="" id="calidadPremium">
|
<input name="calidadPremium" class="form-check-input" type="radio" value="" id="calidadPremium">
|
||||||
<span class="custom-option-header">
|
<span class="custom-option-header">
|
||||||
@ -215,6 +217,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--SECCION DE CUBIERTA -->
|
||||||
<div class="divider divider-dark text-start mb-1">
|
<div class="divider divider-dark text-start mb-1">
|
||||||
<div class="divider-text">
|
<div class="divider-text">
|
||||||
<h5>Cubierta</h5>
|
<h5>Cubierta</h5>
|
||||||
@ -226,7 +229,15 @@
|
|||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
<label for="papelCubierta" class="form-label">Tipo de papel</label>
|
<label for="papelCubierta" class="form-label">Tipo de papel</label>
|
||||||
<select id="papelCubierta" name="papelCubierta" class="form-control select2bs2" style="width: 100%;"></select>
|
<select id="papelCubierta" name="papelCubierta" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<?php if (isset($datosPresupuesto->papelCubierta) && is_array($datosPresupuesto->papelCubierta) && !empty($datosPresupuesto->papelCubierta)) :
|
||||||
|
foreach ($datosPresupuesto->papelCubierta as $k => $v) : ?>
|
||||||
|
<option value="<?= $v->id ?>">
|
||||||
|
<?= $v->nombre ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-2 mb-md-0 mb-2">
|
<div class="col-sm-2 mb-md-0 mb-2">
|
||||||
@ -237,63 +248,275 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="carasCubierta" class="form-label">Caras impresas cubierta</label>
|
|
||||||
<select id="carasCubierta" name="carasCubierta" class="form-control select2bs2" style="width: 100%;">
|
|
||||||
<option value="2">
|
|
||||||
<p><?= lang('Presupuestos.unaCara') ?></p>
|
|
||||||
</option>
|
|
||||||
<option value="4">
|
|
||||||
<p><?= lang('Presupuestos.dosCaras') ?></p>
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h6> Opciones extra </h6>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2">
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
|
<label for="carasCubierta" class="form-label">Caras impresas cubierta</label>
|
||||||
|
<select id="carasCubierta" name="carasCubierta" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<option value="2">
|
||||||
|
<p><?= lang('Presupuestos.unaCara') ?></p>
|
||||||
|
</option>
|
||||||
|
<option value="4">
|
||||||
|
<p><?= lang('Presupuestos.dosCaras') ?></p>
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h6 class='solapas-cubierta'> Opciones extra </h6>
|
||||||
|
|
||||||
|
<div class="row solapas-cubierta">
|
||||||
|
|
||||||
|
<div class="col-sm-3 mb-md-0 mb-2 d-flex align-items-end">
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
<input class="form-check-input" type="checkbox" id="solapasCubiertas" name="solapasCubiertas" value="0" >
|
<input class="form-check-input" type="checkbox" id="solapasCubierta" name="solapasCubierta" value="0">
|
||||||
<label class="form-check-label" for="solapasCubiertas">Solapas cubierta</label>
|
<label class="form-check-label" for="solapasCubierta">Solapas cubierta</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2" style="display: none;">
|
<div id="tamanioSolapasCubierta" class="col-sm-3 mb-md-0 mb-2" style="display: none;">
|
||||||
<label for="anchoSolapasCubierta" class="form-label">Tamaño</label>
|
<label for="anchoSolapasCubierta" class="form-label">Tamaño</label>
|
||||||
<input type="number" id="anchoSolapasCubierta" name="anchoSolapasCubierta" maxLength="8" step="1" class="form-control" value="">
|
<input type="number" id="anchoSolapasCubierta" name="anchoSolapasCubierta" maxLength="8" step="1" class="form-control" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="acabadoCubierta" class="form-label">Acabado cubierta</label>
|
|
||||||
<select id="acabadoCubierta" name="acabadoCubierta" class="form-control select2bs2" style="width: 100%;">
|
|
||||||
<option value="2">
|
|
||||||
<p><?= lang('Presupuestos.unaCara') ?></p>
|
|
||||||
</option>
|
|
||||||
<option value="4">
|
|
||||||
<p><?= lang('Presupuestos.dosCaras') ?></p>
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
<div class="divider divider-dark text-start mb-1">
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
|
<label for="acabadosCubierta" class="form-label">Acabados cubierta</label>
|
||||||
|
<select id="acabadosCubierta" name="acabadosCubierta" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<?php if (isset($datosPresupuesto->acabadosCubierta) && is_array($datosPresupuesto->acabadosCubierta) && !empty($datosPresupuesto->acabadosCubierta)) :
|
||||||
|
foreach ($datosPresupuesto->acabadosCubierta as $acabado) : ?>
|
||||||
|
<option value="<?= $acabado->id ?>" <?= $acabado->id == $presupuestoEntity->acabado_sobrecubierta_id ? ' selected' : '' ?>>
|
||||||
|
<?= $acabado->label ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--SECCION DE SOBRECUBIERTA -->
|
||||||
|
<div class="divider divider-dark text-start mb-1 sobrecubierta">
|
||||||
<div class="divider-text">
|
<div class="divider-text">
|
||||||
<h5>Sobrecubierta</h5>
|
<h5>Sobrecubierta</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row sobrecubierta">
|
||||||
|
<div class="col-sm-3 mb-md-0 mb-2 d-flex align-items-end">
|
||||||
|
<div class="form-check form-switch mb-2">
|
||||||
|
<input class="form-check-input" type="checkbox" id="enableSobrecubierta" name="enableSobrecubierta" value="0">
|
||||||
|
<label class="form-check-label" for="enableSobrecubierta">Añadir sobrecubierta</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6 class="sobrecubierta enable-sobrecubierta"> Papel </h6>
|
||||||
|
<div class="row sobrecubierta enable-sobrecubierta">
|
||||||
|
|
||||||
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
|
<label for="papelSobrecubierta" class="form-label">Tipo de papel</label>
|
||||||
|
<select id="papelSobrecubierta" name="papelSobrecubierta" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<?php if (isset($datosPresupuesto->papelSobrecubierta) && is_array($datosPresupuesto->papelSobrecubierta) && !empty($datosPresupuesto->papelSobrecubierta)) :
|
||||||
|
foreach ($datosPresupuesto->papelSobrecubierta as $k => $v) : ?>
|
||||||
|
<option value="<?= $v->id ?>">
|
||||||
|
<?= $v->nombre ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-2 mb-md-0 mb-2">
|
||||||
|
<label for="gramajeSobrecubierta" class="form-label">Gramaje (g/m2)</label>
|
||||||
|
<select id="gramajeSobrecubierta" name="gramajeSobrecubierta" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6 class="sobrecubierta enable-sobrecubierta"> Opciones extra </h6>
|
||||||
|
|
||||||
|
<div class="row sobrecubierta enable-sobrecubierta">
|
||||||
|
|
||||||
|
<div class="col-sm-3 mb-md-0 mb-2">
|
||||||
|
<div class="form-check form-switch mb-2">
|
||||||
|
<input class="form-check-input" type="checkbox" id="solapasSobrecubierta" name="solapasSobrecubierta" value="0">
|
||||||
|
<label class="form-check-label" for="solapasSobrecubierta">Solapas sobrecubierta</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tamanioSolapasSobrecubierta" class="col-sm-3 mb-md-0 mb-2" style="display: none;">
|
||||||
|
<label for="anchoSolapasSobrecubierta" class="form-label">Tamaño</label>
|
||||||
|
<input type="number" id="anchoSolapasSobrecubierta" name="anchoSolapasSobrecubierta" maxLength="8" step="1" class="form-control" value="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row sobrecubierta enable-sobrecubierta">
|
||||||
|
|
||||||
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
|
<label for="acabadosSobrecubierta" class="form-label">Acabados cubierta</label>
|
||||||
|
<select id="acabadosSobrecubierta" name="acabadosSobrecubierta" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<?php if (isset($datosPresupuesto->acabadosSobrecubierta) && is_array($datosPresupuesto->acabadosSobrecubierta) && !empty($datosPresupuesto->acabadosSobrecubierta)) :
|
||||||
|
foreach ($datosPresupuesto->acabadosSobrecubierta as $acabado) : ?>
|
||||||
|
<option value="<?= $acabado->id ?>" <?= $acabado->id == $presupuestoEntity->acabado_sobrecubierta_id ? ' selected' : '' ?>>
|
||||||
|
<?= $acabado->label ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--SECCION DE GUARDAS -->
|
||||||
|
<div class="divider divider-dark text-start mb-1 guardas">
|
||||||
|
<div class="divider-text">
|
||||||
|
<h5>Guardas</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row guardas">
|
||||||
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
|
<label for="impresionGuardas" class="form-label">Impresión de guardas</label>
|
||||||
|
<select id="impresionGuardas" name="impresionGuardas" class="form-control select2bs2 comp_guardas_items" style="width: 100%;">
|
||||||
|
<option value="0">
|
||||||
|
<p><?= lang('Presupuestos.sinImpresion') ?></p>
|
||||||
|
</option>
|
||||||
|
<option value="4">
|
||||||
|
<p><?= lang('Presupuestos.unaCara') ?></p>
|
||||||
|
</option>
|
||||||
|
<option value="8">
|
||||||
|
<p><?= lang('Presupuestos.dosCaras') ?></p>
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row guardas">
|
||||||
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
|
<label for="papelGuardas" class="form-label">Tipo de papel</label>
|
||||||
|
<select id="papelGuardas" name="papelGuardas" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<?php if (isset($datosPresupuesto->papelGuardas) && is_array($datosPresupuesto->papelGuardas) && !empty($datosPresupuesto->papelGuardas)) :
|
||||||
|
foreach ($datosPresupuesto->papelGuardas as $k => $v) : ?>
|
||||||
|
<option value="<?= $v->id ?>">
|
||||||
|
<?= $v->nombre ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--SECCION DE SERVICIOS EXTRA -->
|
||||||
|
<div class="divider divider-dark text-start mb-1">
|
||||||
|
<div class="divider-text">
|
||||||
|
<h5>Servicios Extra</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="retractilado" class="form-check-label">
|
||||||
|
<input type="checkbox" id="retractilado" name="retractilado" value="1" class="form-check-input" <?= $presupuestoEntity->retractilado == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.retractilado') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="retractilado5" class="form-check-label">
|
||||||
|
<input type="checkbox" id="retractilado5" name="retractilado_5" value="1" class="form-check-input" <?= $presupuestoEntity->retractilado5 == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.retractilado5') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="fajaColor" class="form-check-label">
|
||||||
|
<input type="checkbox" id="fajaColor" name="faja_color" value="1" class="form-check-input" <?= $presupuestoEntity->faja_color == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.fajaColor') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="prototipo" class="form-check-label">
|
||||||
|
<input type="checkbox" id="prototipo" name="prototipo" value="1" class="form-check-input" <?= $presupuestoEntity->prototipo == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.prototipo') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="ferro" class="form-check-label">
|
||||||
|
<input type="checkbox" id="ferro" name="ferro" value="1" class="form-check-input" <?= $presupuestoEntity->ferro == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.ferro') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="ferroDigital" class="form-check-label">
|
||||||
|
<input type="checkbox" id="ferroDigital" name="ferro_digital" value="1" class="form-check-input" <?= $presupuestoEntity->ferro_digital == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.ferroDigital') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
<label for="marcapaginas" class="form-check-label">
|
||||||
|
<input type="checkbox" id="marcapaginas" name="marcapaginas" value="1" class="form-check-input" <?= $presupuestoEntity->marcapaginas == true ? 'checked' : ''; ?>>
|
||||||
|
<?= lang('Presupuestos.marcapaginas') ?>
|
||||||
|
</label>
|
||||||
|
</div><!--//.form-check -->
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
</div><!--//.row -->
|
||||||
|
|
||||||
|
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
<?= $this->section("additionalInlineJs") ?>
|
||||||
|
|
||||||
window.routes_disenio_libro = {
|
window.routes_disenio_libro = {
|
||||||
obtenerGramaje: "<?=route_to('obtenerGramaje') ?>",
|
obtenerGramaje: "<?= route_to('obtenerGramaje') ?>",
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
@ -2,25 +2,25 @@
|
|||||||
<div class="row g-2 d-flex justify-content-center">
|
<div class="row g-2 d-flex justify-content-center">
|
||||||
|
|
||||||
<div class="col-md-4 mb-md-0 mb-2">
|
<div class="col-md-4 mb-md-0 mb-2">
|
||||||
<div class="form-check checked custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
<div id="cosidoDiv" class="form-check checked custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="tipoCosido">
|
<label class="form-check-label custom-option-content" for="tipoCosido">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img src="<?= site_url("assets/img/libro_cosido.jpeg") ?>" alt="radioImg">
|
<img src="<?= site_url("assets/img/libro_cosido.jpeg") ?>" alt="radioImg">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="cosido" class="form-check-input" type="radio" value="tipoCosido" id="tipoCosido" checked="checked">
|
<input name="cosido" class="form-check-input elementos-libro" type="radio" value="tipoCosido" id="tipoCosido" checked="">
|
||||||
</div>
|
</div>
|
||||||
<h5 class="text-center">Libro cosido</h5>
|
<h5 class="text-center">Libro cosido</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 mb-md-0 mb-2">
|
<div class="col-md-4 mb-md-0 mb-2">
|
||||||
<div class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
<div id="fresadoDiv" class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="tipoFresado">
|
<label class="form-check-label custom-option-content" for="tipoFresado">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img src="<?= site_url("assets/img/libro_fresado.jpeg") ?>" alt="radioImg2">
|
<img src="<?= site_url("assets/img/libro_fresado.jpeg") ?>" alt="radioImg2">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="fresado" class="form-check-input" type="radio" value="tipoFresado" id="tipoFresado" checked="">
|
<input name="fresado" class="form-check-input elementos-libro" type="radio" value="tipoFresado" id="tipoFresado" >
|
||||||
</div>
|
</div>
|
||||||
<h5 class="text-center">Libro fresado</h5>
|
<h5 class="text-center">Libro fresado</h5>
|
||||||
</div>
|
</div>
|
||||||
@ -32,31 +32,31 @@
|
|||||||
<img src="<?= site_url("assets/img/libro_grapado.jpeg") ?>" alt="radioImg3">
|
<img src="<?= site_url("assets/img/libro_grapado.jpeg") ?>" alt="radioImg3">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="grapado" class="form-check-input" type="radio" value="tipoGrapado" id="tipoGrapado" checked="">
|
<input name="grapado" class="form-check-input elementos-libro" type="radio" value="tipoGrapado" id="tipoGrapado" >
|
||||||
</div>
|
</div>
|
||||||
<h5 class="text-center">Libro grapado</h5>
|
<h5 class="text-center">Libro grapado</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 mb-md-0 mb-2">
|
<div class="col-md-4 mb-md-0 mb-2">
|
||||||
<div class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
<div id="espiralDiv" class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="tipoEspiral">
|
<label class="form-check-label custom-option-content" for="tipoEspiral">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img src="<?= site_url("assets/img/libro_espiral.jpeg") ?>" alt="radioImg4">
|
<img src="<?= site_url("assets/img/libro_espiral.jpeg") ?>" alt="radioImg4">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="espiral" class="form-check-input" type="radio" value="tipoEspiral" id="tipoEspiral" checked="">
|
<input name="espiral" class="form-check-input elementos-libro" type="radio" value="tipoEspiral" id="tipoEspiral" >
|
||||||
</div>
|
</div>
|
||||||
<h5 class="text-center">Libro espiral</h5>
|
<h5 class="text-center">Libro espiral</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 mb-md-0 mb-2">
|
<div class="col-md-4 mb-md-0 mb-2">
|
||||||
<div class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
<div id="wireoDiv" class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="tipoWireO">
|
<label class="form-check-label custom-option-content" for="tipoWireO">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img src="<?= site_url("assets/img/libro_wire-o.jpeg") ?>" alt="radioImg5">
|
<img src="<?= site_url("assets/img/libro_wire-o.jpeg") ?>" alt="radioImg5">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="wireo" class="form-check-input" type="radio" value="tipoWireO" id="tipoWireO" checked="">
|
<input name="wireo" class="form-check-input elementos-libro" type="radio" value="tipoWireO" id="tipoWireO">
|
||||||
</div>
|
</div>
|
||||||
<h5 class="text-center">Libro espiral</h5>
|
<h5 class="text-center">Libro espiral</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -40,7 +40,7 @@ function updateTapaCheck(el)
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
el.closest('.custom-option-tapa').classList.add('checked')
|
el.closest('.custom-option-tapa').classList.add('checked')
|
||||||
if(el.closest('.custom-option-tapa').id == 'tapaBlandaDiv') {
|
if(el.closest('.custom-option-tapa').id == 'tapaBlandaInnerDiv') {
|
||||||
$('#tapaBlanda').prop('checked', true);
|
$('#tapaBlanda').prop('checked', true);
|
||||||
$('#tapaDura').prop('checked', false);
|
$('#tapaDura').prop('checked', false);
|
||||||
}
|
}
|
||||||
@ -136,22 +136,42 @@ function updateCalidadCheck(el)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#enableSobrecubierta').on('change', function() {
|
||||||
|
if ($(this).is(":checked")) {
|
||||||
|
$('.enable-sobrecubierta').show();
|
||||||
|
} else {
|
||||||
|
$('.enable-sobrecubierta').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function initDisenioLibro(){
|
function initDisenioLibro(){
|
||||||
initTapaCheck();
|
initTapaCheck();
|
||||||
initColorCheck();
|
initColorCheck();
|
||||||
initCalidadCheck();
|
initCalidadCheck();
|
||||||
|
|
||||||
updatePapelInterior();
|
$('.elementos-libro').trigger('change');
|
||||||
|
$('.change-tipo-impresion').trigger('change');
|
||||||
|
|
||||||
|
$('#papelInterior').trigger('change');
|
||||||
|
$('#papelCubierta').trigger('change');
|
||||||
|
if($('#enableSobrecubierta').prop('checked')){
|
||||||
|
$('#papelSobrecubierta').trigger('change');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.change-papel-interior ').on('change', updatePapelInterior)
|
$('.change-tipo-impresion').on('change', function () {
|
||||||
|
|
||||||
function updatePapelInterior() {
|
|
||||||
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
|
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
|
||||||
isHq = $('#calidadEstandarDiv').hasClass('checked') ? false : true;
|
isHq = $('#calidadEstandarDiv').hasClass('checked') ? false : true;
|
||||||
|
|
||||||
|
//si es color hay que mostrar el numero de paginas a color
|
||||||
|
if(isColor){
|
||||||
|
$('#pagColorDiv').show();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#pagColorDiv').hide();
|
||||||
|
}
|
||||||
|
|
||||||
var data = [];
|
var data = [];
|
||||||
|
|
||||||
if(!isColor && !isHq) {
|
if(!isColor && !isHq) {
|
||||||
@ -173,9 +193,22 @@ function updatePapelInterior() {
|
|||||||
dropdown.append($("<option />").val(this.id).text(this.nombre));
|
dropdown.append($("<option />").val(this.id).text(this.nombre));
|
||||||
});
|
});
|
||||||
//Se quita la seleccion del dropdown
|
//Se quita la seleccion del dropdown
|
||||||
dropdown.val('').trigger('change');
|
//dropdown.val('').trigger('change');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#tirada').on('change', function() {
|
||||||
|
|
||||||
|
const valInterior = $('#gramajeInterior option:selected').val();
|
||||||
|
const valCubierta = $('#gramajeCubierta option:selected').val();
|
||||||
|
const valSobrecubierta = $('#gramajeSobrecubierta option:selected').val();
|
||||||
|
|
||||||
|
|
||||||
|
$('#papelInterior').trigger('change');
|
||||||
|
$('#papelCubierta').trigger('change');
|
||||||
|
$('#papelSobrecubierta').trigger('change');
|
||||||
|
});
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#papelInterior').on('change', function() {
|
$('#papelInterior').on('change', function() {
|
||||||
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
|
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
|
||||||
@ -196,7 +229,6 @@ $('#papelInterior').on('change', function() {
|
|||||||
else if(isColor && isHq) {
|
else if(isColor && isHq) {
|
||||||
uso = 'colorhq';
|
uso = 'colorhq';
|
||||||
}
|
}
|
||||||
merma = calcular_mermas();
|
|
||||||
datos = {
|
datos = {
|
||||||
tirada: $('#tirada').val(),
|
tirada: $('#tirada').val(),
|
||||||
merma: calcular_mermas(),
|
merma: calcular_mermas(),
|
||||||
@ -205,17 +237,113 @@ $('#papelInterior').on('change', function() {
|
|||||||
};
|
};
|
||||||
datos = Object.assign(datos, window.token_ajax)
|
datos = Object.assign(datos, window.token_ajax)
|
||||||
|
|
||||||
|
const valInterior = $('#gramajeInterior option:selected').val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: window.routes_disenio_libro.obtenerGramaje,
|
url: window.routes_disenio_libro.obtenerGramaje,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: datos,
|
data: datos,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
|
||||||
var data = JSON.parse(response);
|
|
||||||
|
|
||||||
//$('#papelInteriorGramaje').val(data.gramaje);
|
$('#gramajeInterior').empty();
|
||||||
|
$(response.menu).each(function( index, element ) {
|
||||||
|
|
||||||
|
$('#gramajeInterior').append($("<option />").val(element.id).text(element.text));
|
||||||
|
});
|
||||||
|
|
||||||
|
if(valInterior != undefined)
|
||||||
|
$('#gramajeInterior option[value='+valInterior + ']').prop('selected', true).trigger('change');
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#papelCubierta').on('change', function() {
|
||||||
|
isColor = true;
|
||||||
|
isHq = true;
|
||||||
|
|
||||||
|
if($('#papelCubierta option:selected').val() != undefined){
|
||||||
|
var uso = 'colorhq';
|
||||||
|
|
||||||
|
datos = {
|
||||||
|
tirada: $('#tirada').val(),
|
||||||
|
merma: calcular_mermas(),
|
||||||
|
uso: uso,
|
||||||
|
papel: $('#papelCubierta option:selected').text()
|
||||||
|
};
|
||||||
|
datos = Object.assign(datos, window.token_ajax)
|
||||||
|
|
||||||
|
const valCubierta = $('#gramajeCubierta option:selected').val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: window.routes_disenio_libro.obtenerGramaje,
|
||||||
|
type: 'POST',
|
||||||
|
data: datos,
|
||||||
|
success: function(response) {
|
||||||
|
|
||||||
|
$('#gramajeCubierta').empty();
|
||||||
|
$(response.menu).each(function( index, element ) {
|
||||||
|
$('#gramajeCubierta').append($("<option />").val(element.id).text(element.text));
|
||||||
|
});
|
||||||
|
|
||||||
|
if(valCubierta != undefined)
|
||||||
|
$('#gramajeCubierta option[value='+ valCubierta + ']').prop('selected', true).trigger('change');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#papelSobrecubierta').on('change', function() {
|
||||||
|
isColor = true;
|
||||||
|
isHq = true;
|
||||||
|
|
||||||
|
if($('#papelSobrecubierta option:selected').val() != undefined){
|
||||||
|
var uso = 'colorhq';
|
||||||
|
|
||||||
|
datos = {
|
||||||
|
tirada: $('#tirada').val(),
|
||||||
|
merma: calcular_mermas(),
|
||||||
|
uso: uso,
|
||||||
|
papel: $('#papelSobrecubierta option:selected').text()
|
||||||
|
};
|
||||||
|
datos = Object.assign(datos, window.token_ajax)
|
||||||
|
|
||||||
|
const valSobrecubierta = $('#gramajeSobrecubierta option:selected').val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: window.routes_disenio_libro.obtenerGramaje,
|
||||||
|
type: 'POST',
|
||||||
|
data: datos,
|
||||||
|
success: function(response) {
|
||||||
|
|
||||||
|
$('#gramajeSobrecubierta').empty();
|
||||||
|
$(response.menu).each(function( index, element ) {
|
||||||
|
$('#gramajeSobrecubierta').append($("<option />").val(element.id).text(element.text));
|
||||||
|
});
|
||||||
|
|
||||||
|
if(valSobrecubierta != undefined)
|
||||||
|
$('#gramajeSobrecubierta option[value='+ valCubierta + ']').prop('selected', true).trigger('change');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#solapasCubierta').on('change', function() {
|
||||||
|
if ($(this).is(":checked")) {
|
||||||
|
$('#tamanioSolapasCubierta').show();
|
||||||
|
} else {
|
||||||
|
$('#tamanioSolapasCubierta').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#solapasSobrecubierta').on('change', function() {
|
||||||
|
if ($(this).is(":checked")) {
|
||||||
|
$('#tamanioSolapasSobrecubierta').show();
|
||||||
|
} else {
|
||||||
|
$('#tamanioSolapasSobrecubierta').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -5,7 +5,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
|
|
||||||
// Init custom option check
|
// Init custom option check
|
||||||
//window.Helpers.initCustomOptionCheck();
|
//window.Helpers.initCustomOptionCheck();
|
||||||
@ -32,24 +32,28 @@
|
|||||||
|
|
||||||
// Deal Type
|
// Deal Type
|
||||||
const FormValidation1 = FormValidation.formValidation(clientePresupuestoWizardFormStep1, {
|
const FormValidation1 = FormValidation.formValidation(clientePresupuestoWizardFormStep1, {
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
dealAmount: {
|
titulo: {
|
||||||
validators: {
|
validators: {
|
||||||
notEmpty: {
|
notEmpty: {
|
||||||
message: 'Please enter amount'
|
message: window.Presupuestos.validation.requerido_short
|
||||||
},
|
},
|
||||||
numeric: {
|
}
|
||||||
message: 'The amount must be a number'
|
},
|
||||||
|
clienteId: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.cliente,
|
||||||
|
callback: function (input) {
|
||||||
|
// Get the selected options
|
||||||
|
const options = $("#clienteId").select2('data');
|
||||||
|
const hasValidOption = options.some(option => parseInt(option.id) > 0);
|
||||||
|
return options !== null && options.length > 0 && hasValidOption;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dealRegion: {
|
|
||||||
validators: {
|
|
||||||
notEmpty: {
|
|
||||||
message: 'Please select region'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: {
|
plugins: {
|
||||||
@ -68,48 +72,16 @@
|
|||||||
validationStepper.next();
|
validationStepper.next();
|
||||||
});
|
});
|
||||||
|
|
||||||
// select2 (Region)
|
// select2 (clienteId)
|
||||||
const dealRegion = $('#dealRegion');
|
const clienteId = $('#clienteId');
|
||||||
if (dealRegion.length) {
|
clienteId.on('change.select2', function () {
|
||||||
dealRegion.wrap('<div class="position-relative"></div>');
|
// Revalidate the clienteId field when an option is chosen
|
||||||
dealRegion
|
FormValidation1.revalidateField('clienteId');
|
||||||
.select2({
|
});
|
||||||
placeholder: 'Select an region',
|
|
||||||
dropdownParent: dealRegion.parent()
|
|
||||||
})
|
|
||||||
.on('change.select2', function () {
|
|
||||||
// Revalidate the region field when an option is chosen
|
|
||||||
FormValidation1.revalidateField('dealRegion');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deal Details
|
// Deal Details
|
||||||
const FormValidation2 = FormValidation.formValidation(clientePresupuestoWizardFormStep2, {
|
const FormValidation2 = FormValidation.formValidation(clientePresupuestoWizardFormStep2, {
|
||||||
fields: {
|
fields: {
|
||||||
// * Validate the fields here based on your requirements
|
|
||||||
dealTitle: {
|
|
||||||
validators: {
|
|
||||||
notEmpty: {
|
|
||||||
message: 'Please enter deal title'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dealCode: {
|
|
||||||
validators: {
|
|
||||||
notEmpty: {
|
|
||||||
message: 'Please enter deal code'
|
|
||||||
},
|
|
||||||
stringLength: {
|
|
||||||
min: 4,
|
|
||||||
max: 10,
|
|
||||||
message: 'The deal code must be more than 4 and less than 10 characters long'
|
|
||||||
},
|
|
||||||
regexp: {
|
|
||||||
regexp: /^[A-Z0-9]+$/,
|
|
||||||
message: 'The deal code can only consist of capital alphabetical and number'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
trigger: new FormValidation.plugins.Trigger(),
|
trigger: new FormValidation.plugins.Trigger(),
|
||||||
@ -117,7 +89,7 @@
|
|||||||
// Use this for enabling/changing valid/invalid class
|
// Use this for enabling/changing valid/invalid class
|
||||||
// eleInvalidClass: '',
|
// eleInvalidClass: '',
|
||||||
eleValidClass: '',
|
eleValidClass: '',
|
||||||
rowSelector: '.col-sm-6'
|
rowSelector: '.col-sm-3'
|
||||||
}),
|
}),
|
||||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
autoFocus: new FormValidation.plugins.AutoFocus(),
|
||||||
submitButton: new FormValidation.plugins.SubmitButton()
|
submitButton: new FormValidation.plugins.SubmitButton()
|
||||||
@ -127,25 +99,106 @@
|
|||||||
validationStepper.next();
|
validationStepper.next();
|
||||||
});
|
});
|
||||||
|
|
||||||
// select2 (Offered Item)
|
|
||||||
const dealOfferedItem = $('#dealOfferedItem');
|
|
||||||
if (dealOfferedItem.length) {
|
|
||||||
dealOfferedItem.wrap('<div class="position-relative"></div>');
|
|
||||||
dealOfferedItem
|
|
||||||
.select2({
|
|
||||||
placeholder: 'Select an offered item',
|
|
||||||
dropdownParent: dealOfferedItem.parent()
|
|
||||||
})
|
|
||||||
.on('change.select2', function () {
|
|
||||||
// Revalidate the field if needed when an option is chosen
|
|
||||||
// FormValidation2.revalidateField('dealOfferedItem');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deal Usage
|
// Deal Usage
|
||||||
const FormValidation3 = FormValidation.formValidation(clientePresupuestoWizardFormStep3, {
|
const FormValidation3 = FormValidation.formValidation(clientePresupuestoWizardFormStep3, {
|
||||||
fields: {
|
fields: {
|
||||||
// * Validate the fields here based on your requirements
|
tirada: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.integer_greatherThan_0,
|
||||||
|
callback: function (input) {
|
||||||
|
const value = $("#tirada").val();
|
||||||
|
return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
paginas: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.integer_greatherThan_0,
|
||||||
|
callback: function (input) {
|
||||||
|
const value = $("#paginas").val();
|
||||||
|
return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
paginasColor: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.integer_greatherThan_0,
|
||||||
|
callback: function (input) {
|
||||||
|
if ($('#pagColorDiv').is(':hidden'))
|
||||||
|
return true;
|
||||||
|
else {
|
||||||
|
const value = $("#paginasColor").val();
|
||||||
|
return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gramajeInterior: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.tirada_no_valida,
|
||||||
|
callback: function (input) {
|
||||||
|
const value = $("#tirada").val();
|
||||||
|
if ($('#gramajeInterior option:selected').text().length == 0) {
|
||||||
|
return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.sin_gramaje,
|
||||||
|
callback: function (input) {
|
||||||
|
if ($('#gramajeInterior option:selected').text().length == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gramajeCubierta: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.tirada_no_valida,
|
||||||
|
callback: function (input) {
|
||||||
|
const value = $("#tirada").val();
|
||||||
|
if ($('#gramajeCubierta option:selected').text().length == 0) {
|
||||||
|
return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.sin_gramaje,
|
||||||
|
callback: function (input) {
|
||||||
|
if ($('#gramajeCubierta option:selected').text().length == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gramajeSobrecubierta: {
|
||||||
|
validators: {
|
||||||
|
callback: {
|
||||||
|
message: window.Presupuestos.validation.tirada_no_valida,
|
||||||
|
callback: function (input) {
|
||||||
|
const value = $("#tirada").val();
|
||||||
|
if ($('#gramajeSobrecubierta option:selected').text().length == 0) {
|
||||||
|
return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
trigger: new FormValidation.plugins.Trigger(),
|
trigger: new FormValidation.plugins.Trigger(),
|
||||||
@ -153,7 +206,19 @@
|
|||||||
// Use this for enabling/changing valid/invalid class
|
// Use this for enabling/changing valid/invalid class
|
||||||
// eleInvalidClass: '',
|
// eleInvalidClass: '',
|
||||||
eleValidClass: '',
|
eleValidClass: '',
|
||||||
rowSelector: '.col-sm-6'
|
rowSelector: function (field, ele) {
|
||||||
|
// field is the field name
|
||||||
|
// ele is the field element
|
||||||
|
switch (field) {
|
||||||
|
case 'gramajeInterior':
|
||||||
|
case 'gramajeCubierta':
|
||||||
|
case 'gramajeSobrecubierta':
|
||||||
|
return '.col-sm-2';
|
||||||
|
|
||||||
|
default:
|
||||||
|
return '.col-sm-3';
|
||||||
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
autoFocus: new FormValidation.plugins.AutoFocus(),
|
||||||
submitButton: new FormValidation.plugins.SubmitButton()
|
submitButton: new FormValidation.plugins.SubmitButton()
|
||||||
@ -162,10 +227,18 @@
|
|||||||
validationStepper.next();
|
validationStepper.next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const tirada = $('#tirada');
|
||||||
|
tirada.on('change', function () {
|
||||||
|
// Revalidate the clienteId field when an option is chosen
|
||||||
|
FormValidation1.revalidateField('gramajeInterior');
|
||||||
|
FormValidation1.revalidateField('gramajeCubierta');
|
||||||
|
FormValidation1.revalidateField('gramajeSobrecubierta');
|
||||||
|
});
|
||||||
|
|
||||||
// Deal Usage
|
// Deal Usage
|
||||||
const FormValidation4 = FormValidation.formValidation(clientePresupuestoWizardFormStep4, {
|
const FormValidation4 = FormValidation.formValidation(clientePresupuestoWizardFormStep4, {
|
||||||
fields: {
|
fields: {
|
||||||
// * Validate the fields here based on your requirements
|
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
trigger: new FormValidation.plugins.Trigger(),
|
trigger: new FormValidation.plugins.Trigger(),
|
||||||
@ -179,11 +252,7 @@
|
|||||||
submitButton: new FormValidation.plugins.SubmitButton()
|
submitButton: new FormValidation.plugins.SubmitButton()
|
||||||
}
|
}
|
||||||
}).on('core.form.valid', function () {
|
}).on('core.form.valid', function () {
|
||||||
// You can submit the form
|
validationStepper.next();
|
||||||
// clientePresupuestoWizardForm.submit()
|
|
||||||
// or send the form data to server via an Ajax request
|
|
||||||
// To make the demo simple, I just placed an alert
|
|
||||||
alert('Submitted..!!');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deal Usage
|
// Deal Usage
|
||||||
@ -243,6 +312,10 @@
|
|||||||
clientePresupuestoWizardPrev.forEach(item => {
|
clientePresupuestoWizardPrev.forEach(item => {
|
||||||
item.addEventListener('click', event => {
|
item.addEventListener('click', event => {
|
||||||
switch (validationStepper._currentIndex) {
|
switch (validationStepper._currentIndex) {
|
||||||
|
case 4:
|
||||||
|
validationStepper.previous();
|
||||||
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
validationStepper.previous();
|
validationStepper.previous();
|
||||||
break;
|
break;
|
||||||
@ -265,50 +338,232 @@
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
function calcular_mermas(){
|
|
||||||
|
$('.elementos-libro').on('change', function () {
|
||||||
|
// Libro cosido
|
||||||
|
if ($('#cosidoDiv').hasClass('checked')) {
|
||||||
|
$('#tituloDisenioLibro').text("Libro cosido");
|
||||||
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
|
// Cosido tapa blanda
|
||||||
|
$('.guardas').hide();
|
||||||
|
$('.solapas-cubierta').show();
|
||||||
|
$('.sobrecubierta').show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Cosido tapa dura
|
||||||
|
$('.guardas').show();
|
||||||
|
numCarasGuardas(2);
|
||||||
|
$('.solapas-cubierta').hide();
|
||||||
|
$('.sobrecubierta').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Libro fresado
|
||||||
|
else if ($('#fresadoDiv').hasClass('checked')) {
|
||||||
|
$('#tituloDisenioLibro').text("Libro fresado");
|
||||||
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
|
// fresado tapa blanda
|
||||||
|
$('.guardas').hide();
|
||||||
|
$('.solapas-cubierta').show();
|
||||||
|
$('.sobrecubierta').show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// fresado tapa dura
|
||||||
|
$('.guardas').show();
|
||||||
|
numCarasGuardas(2);
|
||||||
|
$('.solapas-cubierta').hide();
|
||||||
|
$('.sobrecubierta').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Libro grapado
|
||||||
|
else if ($('#grapadoDiv').hasClass('checked')) {
|
||||||
|
$('#tituloDisenioLibro').text("Libro grapado");
|
||||||
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
|
// grapado tapa blanda
|
||||||
|
$('.guardas').hide();
|
||||||
|
$('.solapas-cubierta').show();
|
||||||
|
$('.sobrecubierta').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Libro wire-o
|
||||||
|
else if ($('#wireoDiv').hasClass('checked')) {
|
||||||
|
$('#tituloDisenioLibro').text("Libro Wire-O");
|
||||||
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
|
// wire-o tapa blanda
|
||||||
|
$('.guardas').hide();
|
||||||
|
$('.solapas-cubierta').show();
|
||||||
|
$('.sobrecubierta').hide();
|
||||||
|
$('#enableSobrecubierta').prop('checked', false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// wire-o tapa dura
|
||||||
|
$('.guardas').show();
|
||||||
|
numCarasGuardas(1);
|
||||||
|
$('.solapas-cubierta').hide();
|
||||||
|
$('.sobrecubierta').hide();
|
||||||
|
$('#enableSobrecubierta').prop('checked', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Libro espiral
|
||||||
|
else if ($('#espiralDiv').hasClass('checked')) {
|
||||||
|
$('#tituloDisenioLibro').text("Libro espiral");
|
||||||
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
|
// espiral tapa blanda
|
||||||
|
$('.guardas').hide();
|
||||||
|
$('.solapas-cubierta').show();
|
||||||
|
$('.sobrecubierta').hide();
|
||||||
|
$('#enableSobrecubierta').prop('checked', false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// espiral tapa dura
|
||||||
|
$('.espiral').show();
|
||||||
|
numCarasGuardas(1);
|
||||||
|
$('.solapas-cubierta').hide();
|
||||||
|
$('.sobrecubierta').hide();
|
||||||
|
$('#enableSobrecubierta').prop('checked', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function numCarasGuardas(numCaras) {
|
||||||
|
if (numCaras == 1) {
|
||||||
|
$("#impresionGuardas option[value='8']").remove();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($("#impresionGuardas option[value='8']").length == 0)
|
||||||
|
$("#impresionGuardas").append('<option value="8">' + window.Presupuestos.dosCaras + '</option>');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function calcular_mermas() {
|
||||||
|
|
||||||
const tirada = parseInt($('#tirada').val())
|
const tirada = parseInt($('#tirada').val())
|
||||||
var merma = 0
|
var merma = 0
|
||||||
|
|
||||||
if(tirada> window.datosPresupuesto.POD ){
|
if (tirada > window.datosPresupuesto.POD) {
|
||||||
merma = tirada*0.1<=30 ? tirada*0.1 : 30
|
merma = tirada * 0.1 <= 30 ? tirada * 0.1 : 30
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
/*merma_lineas = []
|
/*merma_lineas = []
|
||||||
tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||||
var rowData = this.data();
|
var rowData = this.data();
|
||||||
if(rowData.row_id != 'lp_guardas' && rowData.row_id != 'lp_cubierta' && rowData.row_id != 'lp_sobrecubierta'){
|
if(rowData.row_id != 'lp_guardas' && rowData.row_id != 'lp_cubierta' && rowData.row_id != 'lp_sobrecubierta'){
|
||||||
const formas_linea = parseInt($('#isCosido').val())==0?parseInt(rowData.formas):parseInt(rowData.formas)/2
|
const formas_linea = parseInt($('#isCosido').val())==0?parseInt(rowData.formas):parseInt(rowData.formas)/2
|
||||||
if(formas_linea > tirada)
|
if(formas_linea > tirada)
|
||||||
merma_lineas.push(formas_linea-tirada)
|
merma_lineas.push(formas_linea-tirada)
|
||||||
else
|
else
|
||||||
merma_lineas.push(tirada%formas_linea)
|
merma_lineas.push(tirada%formas_linea)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if(merma_lineas.length>0)
|
||||||
|
merma = Math.max(...merma_lineas)
|
||||||
|
|
||||||
|
else{
|
||||||
if(merma_lineas.length>0)
|
htmlString = `
|
||||||
merma = Math.max(...merma_lineas)
|
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
|
||||||
|
<span class="alert-icon alert-icon-lg text-primary me-2">
|
||||||
|
<i class="ti ti-bell ti-sm"></i>
|
||||||
|
</span>
|
||||||
|
<div class="d-flex flex-column ps-1">
|
||||||
|
<h5 class="alert-heading mb-2">` +
|
||||||
|
window.Presupuestos.validation.no_lp_for_merma +
|
||||||
|
`</h5>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
else{
|
|
||||||
htmlString = `
|
|
||||||
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
|
|
||||||
<span class="alert-icon alert-icon-lg text-primary me-2">
|
|
||||||
<i class="ti ti-bell ti-sm"></i>
|
|
||||||
</span>
|
|
||||||
<div class="d-flex flex-column ps-1">
|
|
||||||
<h5 class="alert-heading mb-2">` +
|
|
||||||
window.Presupuestos.validation.no_lp_for_merma +
|
|
||||||
`</h5>
|
|
||||||
</div>
|
|
||||||
</div>`;
|
|
||||||
|
|
||||||
|
|
||||||
merma = 0
|
merma = 0
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
return merma;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDimensionLibro() {
|
||||||
|
var ancho = 0;
|
||||||
|
var alto = 0;
|
||||||
|
|
||||||
|
|
||||||
|
if ($('#papelFormatoId').select2('data').length > 0) {
|
||||||
|
if ($('#papelFormatoId').select2('data')[0].id.length > 0) {
|
||||||
|
ancho = parseFloat($('#papelFormatoId').select2('data')[0].text.trim().split(" x ")[0]);
|
||||||
|
alto = parseFloat($('#papelFormatoId').select2('data')[0].text.trim().split(" x ")[1]);
|
||||||
|
}
|
||||||
|
else if (document.getElementById('papelFormatoPersonalizado').checked) {
|
||||||
|
ancho = parseFloat(document.getElementById('papelFormatoAncho').value);
|
||||||
|
alto = parseFloat(document.getElementById('papelFormatoAlto').value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (document.getElementById('papelFormatoPersonalizado').checked) {
|
||||||
|
ancho = parseFloat(document.getElementById('papelFormatoAncho').value);
|
||||||
|
alto = parseFloat(document.getElementById('papelFormatoAlto').value);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
ancho: ancho,
|
||||||
|
alto: alto
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTiradas() {
|
||||||
|
let tiradas = [];
|
||||||
|
tiradas.push(parseInt($('#tirada').val()));
|
||||||
|
if($('#tirada2').val().length > 0 && parseInt($('#tirada2').val()) > 0)
|
||||||
|
tiradas.push(parseInt($('#tirada2').val()));
|
||||||
|
if($('#tirada3').val().length > 0 && parseInt($('#tirada3').val()) > 0)
|
||||||
|
tiradas.push(parseInt($('#tirada3').val()));
|
||||||
|
if($('#tirada4').val().length > 0 && parseInt($('#tirada4').val()) > 0)
|
||||||
|
tiradas.push(parseInt($('#tirada4').val()));
|
||||||
|
return tiradas;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkPresupuestoData(){
|
||||||
|
if(
|
||||||
|
$('#clienteId').val().length > 0 &&
|
||||||
|
$('#paginas').val().length > 0 &&
|
||||||
|
$('#tirada').val().length > 0 &&
|
||||||
|
$('#papelInterior').val().length > 0 &&
|
||||||
|
$('#gramajeInterior').val().length > 0 &&
|
||||||
|
$('#papelCubierta').val().length > 0 &&
|
||||||
|
$('#gramajeCubierta').val().length > 0
|
||||||
|
){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function obtenerDatos() {
|
||||||
|
|
||||||
|
if(!checkPresupuestoData()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
libro = getDimensionLibro();
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
clienteId: $('#clienteId').val(),
|
||||||
|
ancho: libro.ancho,
|
||||||
|
alto: libro.alto,
|
||||||
|
paginas: parseInt($('#paginas').val()),
|
||||||
|
tiradas: getTiradas(),
|
||||||
|
papelInterior: $('#papelInterior').val(),
|
||||||
|
gramajeInterior: $('#gramajeInterior').val(),
|
||||||
|
papelCubierta: $('#papelCubierta').val(),
|
||||||
|
gramajeCubierta: $('#gramajeCubierta').val(),
|
||||||
|
carasCubierta: $('#carasCubierta').val(),
|
||||||
|
acabadoCubierta: $('#acabadoCubiertaId').val(),
|
||||||
|
solapasCubierta: $('#solapasCubierta').is(':checked'),
|
||||||
|
tamanioSolapasCubierta: $('#anchoSolapasCubierta').val(),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -27,10 +27,11 @@ function updateTipoLibroCheck(el)
|
|||||||
}
|
}
|
||||||
el.closest('.custom-option-tipo').classList.add('checked')
|
el.closest('.custom-option-tipo').classList.add('checked')
|
||||||
if(el.closest('.custom-option-tipo').id == 'grapadoDiv') {
|
if(el.closest('.custom-option-tipo').id == 'grapadoDiv') {
|
||||||
$('#tapaDiv').hide();
|
$('#tapaDuraDiv').hide();
|
||||||
|
$('#tapaBlanda').prop('checked', true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#tapaDiv').show();
|
$('#tapaDuraDiv').show();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
el.closest('.custom-option-tipo').classList.remove('checked')
|
el.closest('.custom-option-tipo').classList.remove('checked')
|
||||||
@ -49,5 +50,3 @@ function getUpdatePapelInterior() {
|
|||||||
$('#colorInteriorDiv').hide();
|
$('#colorInteriorDiv').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<div id="wizard-presupuesto-cliente" class="bs-stepper vertical mt-2 linear">
|
<div id="wizard-presupuesto-cliente" class="bs-stepper vertical mt-2 linear">
|
||||||
<div class="bs-stepper-header">
|
<div class="bs-stepper-header">
|
||||||
|
|
||||||
<div class="step" data-target="#datos-generales">
|
<div class="step active" data-target="#datos-generales">
|
||||||
<button type="button" class="step-trigger" aria-selected="true">
|
<button type="button" class="step-trigger" aria-selected="true">
|
||||||
<span class="bs-stepper-circle"><i class="ti ti-list-details ti-sm"></i></span>
|
<span class="bs-stepper-circle"><i class="ti ti-list-details ti-sm"></i></span>
|
||||||
<span class="bs-stepper-label">
|
<span class="bs-stepper-label">
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
||||||
<div class="step active" data-target="#disenio-libro">
|
<div class="step" data-target="#disenio-libro">
|
||||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||||
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
||||||
<span class="bs-stepper-label">
|
<span class="bs-stepper-label">
|
||||||
@ -75,11 +75,11 @@
|
|||||||
<form id="presupuesto-cliente-form" onsubmit="return false">
|
<form id="presupuesto-cliente-form" onsubmit="return false">
|
||||||
|
|
||||||
<!-- Datos Generales -->
|
<!-- Datos Generales -->
|
||||||
<div id="datos-generales" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
<div id="datos-generales" class="content active dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
|
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_datosLibroItems") ?>
|
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_datosLibroItems") ?>
|
||||||
|
|
||||||
<div class="col-12 d-flex justify-content-end mt-4">
|
<div class="col-12 d-flex justify-content-end mt-4">
|
||||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||||
@ -90,10 +90,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Deal Details -->
|
<!-- Tipo Libro -->
|
||||||
<div id="tipo-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
<div id="tipo-libro" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
|
|
||||||
|
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_tipoLibroItems") ?>
|
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_tipoLibroItems") ?>
|
||||||
|
|
||||||
<div class="col-12 d-flex justify-content-between mt-4">
|
<div class="col-12 d-flex justify-content-between mt-4">
|
||||||
@ -110,11 +111,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Diseño Libro -->
|
<!-- Diseño Libro -->
|
||||||
<div id="disenio-libro" class="content active fv-plugins-bootstrap5 fv-plugins-framework">
|
<div id="disenio-libro" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
|
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_disenioLibroItems") ?>
|
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_disenioLibroItems") ?>
|
||||||
|
|
||||||
<div class="col-12 d-flex justify-content-between mt-4">
|
<div class="col-12 d-flex justify-content-between mt-4">
|
||||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||||
@ -131,58 +132,9 @@
|
|||||||
<!-- Deal Usage -->
|
<!-- Deal Usage -->
|
||||||
<div id="direcciones-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
<div id="direcciones-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-sm-6">
|
|
||||||
<label class="form-label" for="dealUserType">User Type</label>
|
|
||||||
<select id="dealUserType" name="dealUserType" class="form-select">
|
|
||||||
<option selected="" disabled="" value="">Select user type</option>
|
|
||||||
<option value="all">All</option>
|
|
||||||
<option value="registered">Registered</option>
|
|
||||||
<option value="unregistered">Unregistered</option>
|
|
||||||
<option value="prime-members">Prime members</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<label class="form-label" for="dealMaxUsers">Max Users</label>
|
|
||||||
<input type="number" id="dealMaxUsers" name="dealMaxUsers" class="form-control" placeholder="500">
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<label class="form-label" for="dealMinimumCartAmount">Minimum Cart Amount</label>
|
|
||||||
<input type="number" id="dealMinimumCartAmount" name="dealMinimumCartAmount" class="form-control" placeholder="$99">
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<label class="form-label" for="dealPromotionalFee">Promotional Fee</label>
|
|
||||||
<input type="number" id="dealPromotionalFee" name="dealPromotionalFee" class="form-control" placeholder="$9">
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<label class="form-label" for="dealPaymentMethod">Payment Method</label>
|
|
||||||
<select id="dealPaymentMethod" name="dealPaymentMethod" class="form-select">
|
|
||||||
<option selected="" disabled="" value="">Select payment method</option>
|
|
||||||
<option value="any">Any</option>
|
|
||||||
<option value="credit-card">Credit Card</option>
|
|
||||||
<option value="net-banking">Net Banking</option>
|
|
||||||
<option value="wallet">Wallet</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<label class="form-label" for="dealStatus">Deal Status</label>
|
|
||||||
<select id="dealStatus" name="dealStatus" class="form-select">
|
|
||||||
<option selected="" disabled="" value="">Select status</option>
|
|
||||||
<option value="active">Active</option>
|
|
||||||
<option value="inactive">Inactive</option>
|
|
||||||
<option value="suspend">Suspend</option>
|
|
||||||
<option value="abandon">Abandone</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<label class="switch">
|
|
||||||
<input type="checkbox" class="switch-input" id="dealLimitUser" name="dealLimitUser">
|
|
||||||
<span class="switch-toggle-slider">
|
|
||||||
<span class="switch-on"></span>
|
|
||||||
<span class="switch-off"></span>
|
|
||||||
</span>
|
|
||||||
<span class="switch-label"> Limit this discount to a single-use per customer?</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 d-flex justify-content-between mt-4">
|
<div class="col-12 d-flex justify-content-between mt-4">
|
||||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||||
@ -195,83 +147,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Review & Complete -->
|
<!-- Review & Complete -->
|
||||||
<div id="resumen-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
<div id="resumen-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="col-12 mb-0">
|
<div class="col-12 d-flex justify-content-between mt-4">
|
||||||
<h3>Almost done! 🚀</h3>
|
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||||
<p>Confirm your deal details information and submit to create it.</p>
|
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||||
</div>
|
<span class="align-middle d-sm-inline-block d-none">Anterior</span>
|
||||||
<div class="col-12 mb-0">
|
</button>
|
||||||
<table class="table table-borderless">
|
<button class="btn btn-success btn-submit btn-next waves-effect waves-light">
|
||||||
<tbody>
|
<span class="align-middle d-sm-inline-block d-none me-sm-1">Submit</span><i class="ti ti-check ti-xs"></i>
|
||||||
<tr>
|
</button>
|
||||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Type</strong></td>
|
|
||||||
<td class="px-0 py-1">Percentage</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Amount</strong></td>
|
|
||||||
<td class="px-0 py-1">25%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Code</strong></td>
|
|
||||||
<td class="px-0 py-1">
|
|
||||||
<div class="badge bg-label-warning">25PEROFF</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Title</strong></td>
|
|
||||||
<td class="px-0 py-1">Black friday sale, 25% OFF</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Duration</strong></td>
|
|
||||||
<td class="px-0 py-1">
|
|
||||||
<span class="fw-semibold">2021-07-14</span> to
|
|
||||||
<span class="fw-semibold">2021-07-30</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xl-6 col-lg-5 d-flex justify-content-center border rounded pt-3">
|
|
||||||
<img class="img-fluid" src="../../assets/img/illustrations/wizard-create-deal-confirm.png" alt="deal image cap">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<label class="switch">
|
|
||||||
<input type="checkbox" class="switch-input" id="dealConfirmed" name="dealConfirmed">
|
|
||||||
<span class="switch-toggle-slider">
|
|
||||||
<span class="switch-on"></span>
|
|
||||||
<span class="switch-off"></span>
|
|
||||||
</span>
|
|
||||||
<span class="switch-label"> I have confirmed the deal details.</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 d-flex justify-content-between mt-4">
|
|
||||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
|
||||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
|
||||||
<span class="align-middle d-sm-inline-block d-none">Anterior</span>
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-success btn-submit btn-next waves-effect waves-light">
|
|
||||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Submit</span><i class="ti ti-check ti-xs"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
<input type="submit" class="btn btn-primary float-start me-sm-3 me-1" name="save" id="saveForm" value="<?= lang("Basic.global.Save") ?>" />
|
<input type="submit" class="btn btn-primary float-start me-sm-3 me-1" name="save" id="saveForm" value="<?= lang("Basic.global.Save") ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div><!--//.row -->
|
</div><!--//.row -->
|
||||||
<?= view("themes/_commonPartialsBs/_modalConfirmDialog") ?>
|
<?= view("themes/_commonPartialsBs/_modalConfirmDialog") ?>
|
||||||
<?= view("themes/_commonPartialsBs/_modalMessageDialog") ?>
|
<?= view("themes/_commonPartialsBs/_modalMessageDialog") ?>
|
||||||
@ -279,10 +183,40 @@
|
|||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
<?= $this->section("additionalInlineJs") ?>
|
||||||
window.datosPresupuesto = <?= json_encode($datosPresupuesto) ?>;
|
|
||||||
window.token_ajax= {<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v};
|
window.datosPresupuesto = <?= json_encode($datosPresupuesto) ?>;
|
||||||
initDisenioLibro();
|
window.token_ajax= {<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v};
|
||||||
|
|
||||||
|
$('#clienteId').select2({
|
||||||
|
allowClear: false,
|
||||||
|
ajax: {
|
||||||
|
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||||
|
type: 'post',
|
||||||
|
dataType: 'json',
|
||||||
|
|
||||||
|
data: function(params) {
|
||||||
|
return {
|
||||||
|
id: 'id',
|
||||||
|
text: 'nombre',
|
||||||
|
searchTerm: params.term,
|
||||||
|
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||||
|
};
|
||||||
|
},
|
||||||
|
delay: 60,
|
||||||
|
processResults: function(response) {
|
||||||
|
yeniden(response.<?= csrf_token() ?>);
|
||||||
|
return {
|
||||||
|
results: response.menu
|
||||||
|
};
|
||||||
|
},
|
||||||
|
cache: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
initDisenioLibro();
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
@ -290,13 +224,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<?= $this->section('css') ?>
|
<?= $this->section('css') ?>
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
|
||||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
|
||||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/sk-datatables.css') ?>">
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/bs-stepper/bs-stepper.css') ?>" />
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/bs-stepper/bs-stepper.css') ?>" />
|
||||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>" />
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>" />
|
||||||
|
|
||||||
|
|||||||
50766
xdebug.log
50766
xdebug.log
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user