mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
realizados cambios a petición de jm
This commit is contained in:
@ -156,14 +156,14 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController
|
|||||||
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
|
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
|
||||||
$datosPresupuesto->papelFormatoList = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
$datosPresupuesto->papelFormatoList = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||||
|
|
||||||
$datosPresupuesto->papelInteriorNegro = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('negro', false, false);
|
$datosPresupuesto->papelInteriorNegro = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('negro', false, false, false, false, true);
|
||||||
$datosPresupuesto->papelInteriorNegroHq = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('negrohq', false, false);
|
$datosPresupuesto->papelInteriorNegroHq = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('negrohq', false, false, false, false, true);
|
||||||
$datosPresupuesto->papelInteriorColor = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('color', false, false);
|
$datosPresupuesto->papelInteriorColor = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('color', false, false, false, false, true);
|
||||||
$datosPresupuesto->papelInteriorColorHq = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false);
|
$datosPresupuesto->papelInteriorColorHq = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false, false, false, true);
|
||||||
|
|
||||||
$datosPresupuesto->papelCubierta = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', true, false);
|
$datosPresupuesto->papelCubierta = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', true, false, false, false, true);
|
||||||
$datosPresupuesto->papelSobrecubierta = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, true);
|
$datosPresupuesto->papelSobrecubierta = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, true, false, false, true);
|
||||||
$datosPresupuesto->papelGuardas = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false, false, true);
|
$datosPresupuesto->papelGuardas = model('App\Models\Configuracion\PapelGenericoModel')->getPapelForComparador('colorhq', false, false, false, true, false);
|
||||||
|
|
||||||
$datosPresupuesto->acabadosCubierta = $this->getAcabadosCubierta();
|
$datosPresupuesto->acabadosCubierta = $this->getAcabadosCubierta();
|
||||||
$datosPresupuesto->acabadosSobrecubierta = $this->getAcabadosSobrecubierta();
|
$datosPresupuesto->acabadosSobrecubierta = $this->getAcabadosSobrecubierta();
|
||||||
|
|||||||
@ -93,7 +93,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getPapelForComparador($tipo, $is_cubierta = false, $is_sobrecubierta = false, $rotativa = false, $is_guardas = false)
|
public function getPapelForComparador($tipo, $is_cubierta = false, $is_sobrecubierta = false, $rotativa = false, $is_guardas = false, $mostrar_cliente = null)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
1.-> Tipo impresion
|
1.-> Tipo impresion
|
||||||
@ -145,6 +145,10 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
|
|||||||
$builder->where("t2.rotativa", 1);
|
$builder->where("t2.rotativa", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($mostrar_cliente!=null){
|
||||||
|
$builder->where("t1.show_in_client", $mostrar_cliente);
|
||||||
|
}
|
||||||
|
|
||||||
$data = $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
|
$data = $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
|
||||||
//var_dump($this->db->getLastQuery());
|
//var_dump($this->db->getLastQuery());
|
||||||
return $data;
|
return $data;
|
||||||
|
|||||||
@ -6,7 +6,42 @@
|
|||||||
|
|
||||||
<h3 id="tituloDisenioLibro">Fresado</h3>
|
<h3 id="tituloDisenioLibro">Fresado</h3>
|
||||||
|
|
||||||
<div id="tapaDiv" class="row">
|
<div class="row">
|
||||||
|
<div class="col-sm-12 mb-3">
|
||||||
|
<label for="titulo" class="form-label">
|
||||||
|
<?= lang('Presupuestos.titulo') ?>*
|
||||||
|
</label>
|
||||||
|
<input type="text" id="titulo" name="titulo" maxLength="300" class="form-control" value="<?= old('titulo', $presupuestoEntity->titulo) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 mb-3">
|
||||||
|
<label for="clienteId" class="form-label">
|
||||||
|
<?= lang('Presupuestos.clienteId') ?>*
|
||||||
|
</label>
|
||||||
|
<select id="clienteId" name="clienteId" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
|
||||||
|
<?php if (isset($datosPresupuesto->clienteList) && is_array($datosPresupuesto->clienteList) && !empty($datosPresupuesto->clienteList)) :
|
||||||
|
foreach ($datosPresupuesto->clienteList as $k => $v) : ?>
|
||||||
|
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
|
||||||
|
<?= $v ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-sm-6 mb-3">
|
||||||
|
<label for="referenciaCliente" class="form-label">
|
||||||
|
<?= lang('Presupuestos.referenciaCliente') ?>
|
||||||
|
</label>
|
||||||
|
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?= old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tapaDiv" class="row mt-3">
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2" id="tapaBlandaDiv">
|
<div class="col-sm-3 mb-md-0 mb-2" id="tapaBlandaDiv">
|
||||||
<div id="tapaBlandaInnerDiv" 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">
|
||||||
@ -131,22 +166,22 @@
|
|||||||
<h6> Color del interior </h6>
|
<h6> Color del interior </h6>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col col-sm-1 d-flex justify-content-center">
|
<div class="col col-sm-2 d-flex justify-content-center">
|
||||||
<div id="colorNegroDiv" class="form-check change-tipo-impresion 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:120px;width:120px" src="<?= site_url("assets/img/grises.png") ?>" alt="">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="colorNegro" class="form-check-input" type="radio" value="colorNegro" id="colorNegro" checked="">
|
<input name="colorNegro" class="form-check-input" type="radio" value="colorNegro" id="colorNegro" checked="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-sm-1 d-flex justify-content-center">
|
<div class="col col-sm-2 d-flex justify-content-center">
|
||||||
<div id="colorColorDiv" class="form-check change-tipo-impresion 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:120px;width:120px" src="<?= site_url("assets/img//gamacolor.png") ?>" alt="">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="colorColor" class="form-check-input" type="radio" value="colorColor" id="colorColor">
|
<input name="colorColor" class="form-check-input" type="radio" value="colorColor" id="colorColor">
|
||||||
@ -317,7 +352,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h6 class="sobrecubierta enable-sobrecubierta"> Papel </h6>
|
<h6 class="sobrecubierta enable-sobrecubierta" style="display: none;"> Papel </h6>
|
||||||
<div class="row sobrecubierta enable-sobrecubierta">
|
<div class="row sobrecubierta enable-sobrecubierta">
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
@ -341,9 +376,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h6 class="sobrecubierta enable-sobrecubierta"> Opciones extra </h6>
|
<h6 class="sobrecubierta enable-sobrecubierta" style="display: none;"> Opciones extra </h6>
|
||||||
|
|
||||||
<div class="row sobrecubierta enable-sobrecubierta">
|
<div class="row sobrecubierta enable-sobrecubierta" style="display: none;">
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2">
|
<div class="col-sm-3 mb-md-0 mb-2">
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
@ -359,7 +394,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row sobrecubierta enable-sobrecubierta">
|
<div class="row sobrecubierta enable-sobrecubierta" style="display: none;">
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
<div class="col-sm-4 mb-md-0 mb-2">
|
||||||
<label for="acabadosSobrecubierta" class="form-label">Acabados cubierta</label>
|
<label for="acabadosSobrecubierta" class="form-label">Acabados cubierta</label>
|
||||||
@ -425,7 +460,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
@ -509,6 +544,28 @@
|
|||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
</div><!--//.row -->
|
</div><!--//.row -->
|
||||||
|
|
||||||
|
<!--SECCION DE SERVICIOS EXTRA -->
|
||||||
|
<div class="divider divider-dark text-start mb-1">
|
||||||
|
<div class="divider-text">
|
||||||
|
<h5>Otras opciones</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2 mb-md-0 mb-2">
|
||||||
|
<label for="ivaReducido" class="form-label">I.V.A. reducido</label>
|
||||||
|
<select id="ivaReducido" name="ivaReducido" class="form-control select2bs2 comp_guardas_items" style="width: 100%;">
|
||||||
|
<option value="1">
|
||||||
|
<p><?= lang('SI') ?></p>
|
||||||
|
</option>
|
||||||
|
<option value="0">
|
||||||
|
<p><?= lang('NO') ?></p>
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="mt-2">Se verificará que el pedido cumpla con los requisitos establecidos en el Artículo 91 de la Ley 37/1992, sobre inserción de publicidad, antes de proceder con su producción, lo que garantiza la aplicación del IVA reducido del 4%.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="cosido" class="form-check-input elementos-libro" type="radio" value="tipoCosido" id="tipoCosido" checked="">
|
<input name="cosido" class="form-check-input elementos-libro" type="radio" value="tipoCosido" id="tipoCosido" checked="">
|
||||||
<h5 class="text-center">Libro cosido</h5>
|
<h4 class="text-center">Rústica cosido</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="fresado" class="form-check-input elementos-libro" type="radio" value="tipoFresado" id="tipoFresado">
|
<input name="fresado" class="form-check-input elementos-libro" type="radio" value="tipoFresado" id="tipoFresado">
|
||||||
<h5 class="text-center">Libro fresado</h5>
|
<h4 class="text-center">Rústica fresado</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="grapado" class="form-check-input elementos-libro" type="radio" value="tipoGrapado" id="tipoGrapado">
|
<input name="grapado" class="form-check-input elementos-libro" type="radio" value="tipoGrapado" id="tipoGrapado">
|
||||||
<h5 class="text-center">Libro grapado</h5>
|
<h4 class="text-center">Cosido con grapas</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -49,7 +49,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="espiral" class="form-check-input elementos-libro" type="radio" value="tipoEspiral" id="tipoEspiral">
|
<input name="espiral" class="form-check-input elementos-libro" type="radio" value="tipoEspiral" id="tipoEspiral">
|
||||||
<h5 class="text-center">Libro espiral</h5>
|
<h4 class="text-center">Espiral</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -61,7 +61,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="wireo" class="form-check-input elementos-libro" type="radio" value="tipoWireO" id="tipoWireO">
|
<input name="wireo" class="form-check-input elementos-libro" type="radio" value="tipoWireO" id="tipoWireO">
|
||||||
<h5 class="text-center">Libro wire-o</h5>
|
<h4 class="text-center">Wire-o</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -155,9 +155,9 @@ function initDisenioLibro(){
|
|||||||
|
|
||||||
$('#papelInterior').trigger('change');
|
$('#papelInterior').trigger('change');
|
||||||
$('#papelCubierta').trigger('change');
|
$('#papelCubierta').trigger('change');
|
||||||
if($('#enableSobrecubierta').prop('checked')){
|
$('#papelSobrecubierta').trigger('change');
|
||||||
$('#papelSobrecubierta').trigger('change');
|
|
||||||
}
|
$('#enableSobrecubierta').trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.change-tipo-impresion').on('change', function () {
|
$('.change-tipo-impresion').on('change', function () {
|
||||||
@ -193,7 +193,8 @@ $('.change-tipo-impresion').on('change', function () {
|
|||||||
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');
|
||||||
|
$('#gramajeInterior').val('').trigger('change');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -231,7 +232,7 @@ $('#papelInterior').on('change', function() {
|
|||||||
}
|
}
|
||||||
datos = {
|
datos = {
|
||||||
tirada: $('#tirada').val(),
|
tirada: $('#tirada').val(),
|
||||||
merma: calcular_mermas(),
|
merma: 0,
|
||||||
uso: uso,
|
uso: uso,
|
||||||
papel: $('#papelInterior option:selected').text()
|
papel: $('#papelInterior option:selected').text()
|
||||||
};
|
};
|
||||||
@ -269,9 +270,9 @@ $('#papelCubierta').on('change', function() {
|
|||||||
|
|
||||||
datos = {
|
datos = {
|
||||||
tirada: $('#tirada').val(),
|
tirada: $('#tirada').val(),
|
||||||
merma: calcular_mermas(),
|
merma: 0,
|
||||||
uso: uso,
|
uso: uso,
|
||||||
papel: $('#papelCubierta option:selected').text()
|
papel: $('#papelCubierta option:selected').text().trim()
|
||||||
};
|
};
|
||||||
datos = Object.assign(datos, window.token_ajax)
|
datos = Object.assign(datos, window.token_ajax)
|
||||||
|
|
||||||
@ -305,9 +306,9 @@ $('#papelSobrecubierta').on('change', function() {
|
|||||||
|
|
||||||
datos = {
|
datos = {
|
||||||
tirada: $('#tirada').val(),
|
tirada: $('#tirada').val(),
|
||||||
merma: calcular_mermas(),
|
merma: 0,
|
||||||
uso: uso,
|
uso: uso,
|
||||||
papel: $('#papelSobrecubierta option:selected').text()
|
papel: $('#papelSobrecubierta option:selected').text().trim()
|
||||||
};
|
};
|
||||||
datos = Object.assign(datos, window.token_ajax)
|
datos = Object.assign(datos, window.token_ajax)
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
// Wizard form
|
// Wizard form
|
||||||
const clientePresupuestoWizardForm = clientePresupuestoWizard.querySelector('#presupuesto-cliente-form');
|
const clientePresupuestoWizardForm = clientePresupuestoWizard.querySelector('#presupuesto-cliente-form');
|
||||||
// Wizard steps
|
// Wizard steps
|
||||||
const clientePresupuestoWizardFormStep1 = clientePresupuestoWizardForm.querySelector('#datos-generales');
|
|
||||||
const clientePresupuestoWizardFormStep2 = clientePresupuestoWizardForm.querySelector('#tipo-libro');
|
const clientePresupuestoWizardFormStep2 = clientePresupuestoWizardForm.querySelector('#tipo-libro');
|
||||||
const clientePresupuestoWizardFormStep3 = clientePresupuestoWizardForm.querySelector('#disenio-libro');
|
const clientePresupuestoWizardFormStep3 = clientePresupuestoWizardForm.querySelector('#disenio-libro');
|
||||||
const clientePresupuestoWizardFormStep4 = clientePresupuestoWizardForm.querySelector('#direcciones-libro');
|
const clientePresupuestoWizardFormStep4 = clientePresupuestoWizardForm.querySelector('#direcciones-libro');
|
||||||
@ -30,53 +29,12 @@
|
|||||||
linear: true
|
linear: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deal Type
|
|
||||||
const FormValidation1 = FormValidation.formValidation(clientePresupuestoWizardFormStep1, {
|
|
||||||
|
|
||||||
fields: {
|
|
||||||
titulo: {
|
|
||||||
validators: {
|
|
||||||
notEmpty: {
|
|
||||||
message: window.Presupuestos.validation.requerido_short
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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;
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
plugins: {
|
|
||||||
trigger: new FormValidation.plugins.Trigger(),
|
|
||||||
bootstrap5: new FormValidation.plugins.Bootstrap5({
|
|
||||||
// Use this for enabling/changing valid/invalid class
|
|
||||||
// eleInvalidClass: '',
|
|
||||||
eleValidClass: '',
|
|
||||||
rowSelector: '.col-sm-6'
|
|
||||||
}),
|
|
||||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
|
||||||
submitButton: new FormValidation.plugins.SubmitButton()
|
|
||||||
}
|
|
||||||
}).on('core.form.valid', function () {
|
|
||||||
// Jump to the next step when all fields in the current step are valid
|
|
||||||
validationStepper.next();
|
|
||||||
});
|
|
||||||
|
|
||||||
// select2 (clienteId)
|
// select2 (clienteId)
|
||||||
const clienteId = $('#clienteId');
|
const clienteId = $('#clienteId');
|
||||||
|
|
||||||
clienteId.on('change.select2', function () {
|
clienteId.on('change.select2', function () {
|
||||||
// Revalidate the clienteId field when an option is chosen
|
// Revalidate the clienteId field when an option is chosen
|
||||||
FormValidation1.revalidateField('clienteId');
|
FormValidation2.revalidateField('clienteId');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deal Details
|
// Deal Details
|
||||||
@ -102,6 +60,26 @@
|
|||||||
// Deal Usage
|
// Deal Usage
|
||||||
const FormValidation3 = FormValidation.formValidation(clientePresupuestoWizardFormStep3, {
|
const FormValidation3 = FormValidation.formValidation(clientePresupuestoWizardFormStep3, {
|
||||||
fields: {
|
fields: {
|
||||||
|
titulo: {
|
||||||
|
validators: {
|
||||||
|
notEmpty: {
|
||||||
|
message: window.Presupuestos.validation.requerido_short
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
tirada: {
|
tirada: {
|
||||||
validators: {
|
validators: {
|
||||||
callback: {
|
callback: {
|
||||||
@ -215,6 +193,12 @@
|
|||||||
case 'gramajeSobrecubierta':
|
case 'gramajeSobrecubierta':
|
||||||
return '.col-sm-2';
|
return '.col-sm-2';
|
||||||
|
|
||||||
|
case 'titulo':
|
||||||
|
return '.col-sm-12';
|
||||||
|
|
||||||
|
case 'clienteId':
|
||||||
|
return '.col-sm-6';
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return '.col-sm-3';
|
return '.col-sm-3';
|
||||||
}
|
}
|
||||||
@ -230,9 +214,9 @@
|
|||||||
const tirada = $('#tirada');
|
const tirada = $('#tirada');
|
||||||
tirada.on('change', function () {
|
tirada.on('change', function () {
|
||||||
// Revalidate the clienteId field when an option is chosen
|
// Revalidate the clienteId field when an option is chosen
|
||||||
FormValidation1.revalidateField('gramajeInterior');
|
FormValidation2.revalidateField('gramajeInterior');
|
||||||
FormValidation1.revalidateField('gramajeCubierta');
|
FormValidation2.revalidateField('gramajeCubierta');
|
||||||
FormValidation1.revalidateField('gramajeSobrecubierta');
|
FormValidation2.revalidateField('gramajeSobrecubierta');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Deal Usage
|
// Deal Usage
|
||||||
@ -284,22 +268,18 @@
|
|||||||
// When click the Next button, we will validate the current step
|
// When click the Next button, we will validate the current step
|
||||||
switch (validationStepper._currentIndex) {
|
switch (validationStepper._currentIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
FormValidation1.validate();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
FormValidation2.validate();
|
FormValidation2.validate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 1:
|
||||||
FormValidation3.validate();
|
FormValidation3.validate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 2:
|
||||||
FormValidation4.validate();
|
FormValidation4.validate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 3:
|
||||||
FormValidation5.validate();
|
FormValidation5.validate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -342,7 +322,7 @@
|
|||||||
$('.elementos-libro').on('change', function () {
|
$('.elementos-libro').on('change', function () {
|
||||||
// Libro cosido
|
// Libro cosido
|
||||||
if ($('#cosidoDiv').hasClass('checked')) {
|
if ($('#cosidoDiv').hasClass('checked')) {
|
||||||
$('#tituloDisenioLibro').text("Libro cosido");
|
$('#tituloDisenioLibro').text("Rústica cosido");
|
||||||
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
// Cosido tapa blanda
|
// Cosido tapa blanda
|
||||||
$('.guardas').hide();
|
$('.guardas').hide();
|
||||||
@ -359,7 +339,7 @@ $('.elementos-libro').on('change', function () {
|
|||||||
}
|
}
|
||||||
// Libro fresado
|
// Libro fresado
|
||||||
else if ($('#fresadoDiv').hasClass('checked')) {
|
else if ($('#fresadoDiv').hasClass('checked')) {
|
||||||
$('#tituloDisenioLibro').text("Libro fresado");
|
$('#tituloDisenioLibro').text("Rústica fresado");
|
||||||
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
// fresado tapa blanda
|
// fresado tapa blanda
|
||||||
$('.guardas').hide();
|
$('.guardas').hide();
|
||||||
@ -376,7 +356,7 @@ $('.elementos-libro').on('change', function () {
|
|||||||
}
|
}
|
||||||
// Libro grapado
|
// Libro grapado
|
||||||
else if ($('#grapadoDiv').hasClass('checked')) {
|
else if ($('#grapadoDiv').hasClass('checked')) {
|
||||||
$('#tituloDisenioLibro').text("Libro grapado");
|
$('#tituloDisenioLibro').text("Cosido con grapas");
|
||||||
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
// grapado tapa blanda
|
// grapado tapa blanda
|
||||||
$('.guardas').hide();
|
$('.guardas').hide();
|
||||||
@ -386,7 +366,7 @@ $('.elementos-libro').on('change', function () {
|
|||||||
}
|
}
|
||||||
// Libro wire-o
|
// Libro wire-o
|
||||||
else if ($('#wireoDiv').hasClass('checked')) {
|
else if ($('#wireoDiv').hasClass('checked')) {
|
||||||
$('#tituloDisenioLibro').text("Libro Wire-O");
|
$('#tituloDisenioLibro').text("Wire-O");
|
||||||
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
// wire-o tapa blanda
|
// wire-o tapa blanda
|
||||||
$('.guardas').hide();
|
$('.guardas').hide();
|
||||||
@ -405,7 +385,7 @@ $('.elementos-libro').on('change', function () {
|
|||||||
}
|
}
|
||||||
// Libro espiral
|
// Libro espiral
|
||||||
else if ($('#espiralDiv').hasClass('checked')) {
|
else if ($('#espiralDiv').hasClass('checked')) {
|
||||||
$('#tituloDisenioLibro').text("Libro espiral");
|
$('#tituloDisenioLibro').text("Espiral");
|
||||||
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
|
||||||
// espiral tapa blanda
|
// espiral tapa blanda
|
||||||
$('.guardas').hide();
|
$('.guardas').hide();
|
||||||
|
|||||||
@ -17,18 +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 active" data-target="#datos-generales">
|
<div class="step active" data-target="#tipo-libro">
|
||||||
<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-label">
|
|
||||||
<span class="bs-stepper-title">Datos generales</span>
|
|
||||||
<span class="bs-stepper-subtitle">Información del libro</span>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="line"></div>
|
|
||||||
|
|
||||||
<div class="step" data-target="#tipo-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">
|
||||||
@ -74,24 +63,9 @@
|
|||||||
<div class="bs-stepper-content">
|
<div class="bs-stepper-content">
|
||||||
<form id="presupuesto-cliente-form" onsubmit="return false">
|
<form id="presupuesto-cliente-form" onsubmit="return false">
|
||||||
|
|
||||||
<!-- Datos Generales -->
|
|
||||||
<div id="datos-generales" class="content active dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
|
||||||
<div class="row g-3">
|
|
||||||
|
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_datosLibroItems") ?>
|
|
||||||
|
|
||||||
<div class="col-12 d-flex justify-content-end mt-4">
|
|
||||||
<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>
|
|
||||||
<i class="ti ti-arrow-right ti-xs"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Tipo Libro -->
|
<!-- Tipo Libro -->
|
||||||
<div id="tipo-libro" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
<div id="tipo-libro" class="content active dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
httpdocs/assets/img/gamacolor.png
Normal file
BIN
httpdocs/assets/img/gamacolor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
BIN
httpdocs/assets/img/grises.png
Normal file
BIN
httpdocs/assets/img/grises.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
11480
xdebug.log
11480
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user