mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en los mensajes de error
This commit is contained in:
@ -632,6 +632,11 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
|||||||
->findTipologiasForPapelImpresion($papel->id, $parametrosRotativa->colorPages>0?'color':'negro')
|
->findTipologiasForPapelImpresion($papel->id, $parametrosRotativa->colorPages>0?'color':'negro')
|
||||||
->get()->getResultObject();
|
->get()->getResultObject();
|
||||||
|
|
||||||
|
|
||||||
|
if(count($datosTipologias)==0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$parametrosRotativa->rotativa_gota_negro = $datosTipologias[0]->gota_negro;
|
$parametrosRotativa->rotativa_gota_negro = $datosTipologias[0]->gota_negro;
|
||||||
$parametrosRotativa->rotativa_gota_color = $datosTipologias[0]->gota_color;
|
$parametrosRotativa->rotativa_gota_color = $datosTipologias[0]->gota_color;
|
||||||
$parametrosRotativa->rotativa_negro = $datosTipologias[0]->negro;
|
$parametrosRotativa->rotativa_negro = $datosTipologias[0]->negro;
|
||||||
|
|||||||
@ -166,6 +166,12 @@ return [
|
|||||||
'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.',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'errores' => [
|
||||||
|
'paginas' => 'El campo páginas tiene que ser mayor que cero',
|
||||||
|
'tiradas' => 'El campo tiradas tiene que ser mayor que cero',
|
||||||
|
'dimension' => 'La dimensión del libro tiene que ser mayor que 60mm',
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
/* '4x0' => '4x0',
|
/* '4x0' => '4x0',
|
||||||
'4x4' => '4x4',
|
'4x4' => '4x4',
|
||||||
|
|||||||
@ -19,7 +19,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="11" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
|
<input type="number" id="paginas" name="paginas" tabindex="1" maxLength="11" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
<input class="form-check-input" type="checkbox" id="solapas" name="solapas" value="1" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
|
<input class="form-check-input" type="checkbox" id="solapas" name="solapas" tabindex="6" value="1" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
|
||||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.solapasCubierta') ?></label>
|
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.solapasCubierta') ?></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<label for="tirada" class="form-label">
|
<label for="tirada" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?>*
|
<?= lang('Presupuestos.tirada') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="tirada" name="tirada" maxLength="11" class="form-control" value="<?= old('tirada', $presupuestoEntity->tirada) ?>">
|
<input type="number" id="tirada" name="tirada" tabindex="2" maxLength="11" class="form-control" value="<?= old('tirada', $presupuestoEntity->tirada) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<?= lang('Presupuestos.papelFormatoId') ?>*
|
<?= lang('Presupuestos.papelFormatoId') ?>*
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<select id="papelFormatoId" name="papel_formato_id" class="form-control select2bs2" style="width: 100%;">
|
<select id="papelFormatoId" name="papel_formato_id" tabindex="3" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
|
||||||
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
|
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
|
||||||
foreach ($papelFormatoList as $formato) : ?>
|
foreach ($papelFormatoList as $formato) : ?>
|
||||||
@ -95,7 +95,7 @@
|
|||||||
<label for="merma" class="form-label">
|
<label for="merma" class="form-label">
|
||||||
<?= lang('Presupuestos.merma') ?>*
|
<?= lang('Presupuestos.merma') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="merma" name="merma" maxLength="8" step="1" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
|
<input type="number" id="merma" name="merma" maxLength="8" tabindex="4" step="1" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<label for="mermacubierta" class="form-label">
|
<label for="mermacubierta" class="form-label">
|
||||||
<?= lang('Presupuestos.mermacubierta') ?>*
|
<?= lang('Presupuestos.mermacubierta') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="mermacubierta" name="merma_cubierta" placeholder="10" maxLength="8" step="1" class="form-control" value="<?= old('merma_cubierta', $presupuestoEntity->merma_cubierta) ?>">
|
<input type="number" id="mermacubierta" name="merma_cubierta" tabindex="5" placeholder="10" maxLength="8" step="1" class="form-control" value="<?= old('merma_cubierta', $presupuestoEntity->merma_cubierta) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,9 @@
|
|||||||
<div id="accordionDatosPresupuestoClienteTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosPresupuestoCliente">
|
<div id="accordionDatosPresupuestoClienteTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosPresupuestoCliente">
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
|
|
||||||
|
<!----------------------------------------------------------------------------->
|
||||||
|
<div id="divAlarmasComparador"></div>
|
||||||
|
<!----------------------------------------------------------------------------->
|
||||||
|
|
||||||
<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">
|
||||||
|
|||||||
@ -212,15 +212,6 @@ function getRowFromLineaRot(linea) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkDatosPedidoForComp() {
|
|
||||||
|
|
||||||
if (parseInt($('#paginas').val()) > 0 &&
|
|
||||||
parseInt($('#tirada').val()) > 0 &&
|
|
||||||
($('#papelFormatoId').select2('data').length > 0 ||
|
|
||||||
(parseInt($('#papelFormatoAncho').val()) > 0 && parseInt($('#papelFormatoAlto').val()) > 0)))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -487,11 +478,19 @@ function getDimensionLibro(){
|
|||||||
var ancho = 0;
|
var ancho = 0;
|
||||||
var alto = 0;
|
var alto = 0;
|
||||||
|
|
||||||
|
|
||||||
if($('#papelFormatoId').select2('data').length > 0){
|
if($('#papelFormatoId').select2('data').length > 0){
|
||||||
ancho = parseFloat($('#papelFormatoId').select2('data')[0].text.trim().split(" x ")[0]);
|
if($('#papelFormatoId').select2('data')[0].id.length > 0){
|
||||||
alto = parseFloat($('#papelFormatoId').select2('data')[0].text.trim().split(" x ")[1]);
|
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{
|
|
||||||
|
else if(document.getElementById('papelFormatoPersonalizado').checked){
|
||||||
ancho = parseFloat(document.getElementById('papelFormatoAncho').value);
|
ancho = parseFloat(document.getElementById('papelFormatoAncho').value);
|
||||||
alto = parseFloat(document.getElementById('papelFormatoAlto').value);
|
alto = parseFloat(document.getElementById('papelFormatoAlto').value);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -486,7 +486,6 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('.comp_cubierta_items').on('change', function (){
|
$('.comp_cubierta_items').on('change', function (){
|
||||||
|
|
||||||
if ($('#compCarasCubierta').select2('data').length > 0 &&
|
if ($('#compCarasCubierta').select2('data').length > 0 &&
|
||||||
@ -591,7 +590,6 @@
|
|||||||
|
|
||||||
if ($(''+ elementos.papel).select2('data').length > 0 &&
|
if ($(''+ elementos.papel).select2('data').length > 0 &&
|
||||||
$(''+ elementos.gramaje).select2('data').length > 0 &&
|
$(''+ elementos.gramaje).select2('data').length > 0 &&
|
||||||
parseInt($(''+ elementos.paginas).val()) > 0 &&
|
|
||||||
checkDatosPedidoForComp()) {
|
checkDatosPedidoForComp()) {
|
||||||
|
|
||||||
getLineasIntPlana(is_color, is_hq).then((result) =>{
|
getLineasIntPlana(is_color, is_hq).then((result) =>{
|
||||||
@ -838,7 +836,6 @@
|
|||||||
|
|
||||||
if ($(''+ elementos.papel).select2('data').length > 0 &&
|
if ($(''+ elementos.papel).select2('data').length > 0 &&
|
||||||
$(''+ elementos.gramaje).select2('data').length > 0 &&
|
$(''+ elementos.gramaje).select2('data').length > 0 &&
|
||||||
parseInt($(''+ elementos.paginas).val()) > 0 &&
|
|
||||||
checkDatosPedidoForComp()) {
|
checkDatosPedidoForComp()) {
|
||||||
|
|
||||||
getLineasIntPlana(is_color, is_hq).then((result) =>{
|
getLineasIntPlana(is_color, is_hq).then((result) =>{
|
||||||
@ -1069,6 +1066,33 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function checkDatosPedidoForComp() {
|
||||||
|
|
||||||
|
const dimension = getDimensionLibro();
|
||||||
|
|
||||||
|
if (parseInt($('#paginas').val()) <= 0){
|
||||||
|
popErrorAlert('<?=lang('Presupuestos.errores.paginas') ?>', 'divAlarmasComparador');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (parseInt($('#tirada').val()) <= 0){
|
||||||
|
popErrorAlert('<?=lang('Presupuestos.errores.tiradas') ?>', 'divAlarmasComparador');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if('ancho' in dimension && 'alto' in dimension){
|
||||||
|
|
||||||
|
if(dimension.alto < 60 || dimension.ancho < 60 || isNaN(dimension.alto) || isNaN(dimension.ancho) ){
|
||||||
|
popErrorAlert('<?=lang('Presupuestos.errores.dimension') ?>', 'divAlarmasComparador');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
popErrorAlert('<?=lang('Presupuestos.errores.dimension') ?>', 'divAlarmasComparador');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
@ -1090,5 +1114,4 @@
|
|||||||
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
||||||
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/comparadorCosidoTapaBlanda_js') ?>"></script>
|
<script src="<?= site_url('js_loader/comparadorCosidoTapaBlanda_js') ?>"></script>
|
||||||
|
|
||||||
<?=$this->endSection() ?>
|
<?=$this->endSection() ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user