mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
revisando cubierta (solapas)
This commit is contained in:
@ -252,6 +252,8 @@ $('#papelInterior').on('change', function () {
|
||||
|
||||
if (valInterior != undefined)
|
||||
$('#gramajeInterior option[value=' + valInterior + ']').prop('selected', true).trigger('change');
|
||||
else
|
||||
$('#gramajeInterior').val('').trigger('change');
|
||||
|
||||
}
|
||||
});
|
||||
@ -289,6 +291,8 @@ $('#papelCubierta').on('change', function () {
|
||||
|
||||
if (valCubierta != undefined)
|
||||
$('#gramajeCubierta option[value=' + valCubierta + ']').prop('selected', true).trigger('change');
|
||||
else
|
||||
$('#gramajeCubierta').val('').trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -325,6 +329,8 @@ $('#papelSobrecubierta').on('change', function () {
|
||||
|
||||
if (valSobrecubierta != undefined)
|
||||
$('#gramajeSobrecubierta option[value=' + valCubierta + ']').prop('selected', true).trigger('change');
|
||||
else
|
||||
$('#gramajeSobrecubierta').val('').trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -359,7 +365,11 @@ function checkValues() {
|
||||
const gramajeCubierta = $('#gramajeCubierta option:selected').text();
|
||||
const papelFormatoAlto = $('#altoLibro').val();
|
||||
const papelFormatoAncho = $('#anchoLibro').val();
|
||||
const clienteId = $('#clienteId').val();
|
||||
|
||||
if(clienteId == '' || isNaN(clienteId) || parseInt(clienteId) <= 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tirada == '' || isNaN(tirada) || parseInt(tirada) <= 0) {
|
||||
return false;
|
||||
@ -576,7 +586,7 @@ async function calcularPresupuesto() {
|
||||
papelInterior: $('#papelInterior option:selected').val(),
|
||||
papelInteriorNombre: $('#papelInterior option:selected').text(),
|
||||
gramajeInterior: $('#gramajeInterior option:selected').text(),
|
||||
excluirRotativa: $('#excluirRotativa').is(':checked'),
|
||||
excluirRotativa: $('#excluirRotativa').is(':checked')? 1 : 0,
|
||||
papelCubierta: $('#papelCubierta option:selected').val(),
|
||||
papelCubiertaNombre: $('#papelCubierta option:selected').text(),
|
||||
gramajeCubierta: $('#gramajeCubierta option:selected').text(),
|
||||
@ -611,12 +621,19 @@ async function calcularPresupuesto() {
|
||||
|
||||
datos = Object.assign(datos, window.token_ajax)
|
||||
|
||||
|
||||
$('#loader').show();
|
||||
|
||||
$.ajax({
|
||||
url: window.routes_disenio_libro.presupuestoCliente,
|
||||
type: 'POST',
|
||||
data: datos,
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
$('#loader').hide();
|
||||
},
|
||||
error: function (error) {
|
||||
$('#loader').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<div id="loader" style="display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 9999;">
|
||||
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">
|
||||
<img src="<?= site_url("assets/img/loader.gif") ?>" alt="Loading..."/>
|
||||
</div>
|
||||
</div>
|
||||
@ -11,8 +11,10 @@
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
<?= csrf_field() ?>
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/loader") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
|
||||
|
||||
<!-- Create Deal Wizard -->
|
||||
<div id="wizard-presupuesto-cliente" class="bs-stepper vertical mt-2 linear">
|
||||
<div class="bs-stepper-header">
|
||||
|
||||
Reference in New Issue
Block a user