mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
quitadas llamadas dobles del comparador al cargar la pagina
This commit is contained in:
@ -556,7 +556,7 @@
|
||||
}catch(e){}
|
||||
}catch(e){}
|
||||
}catch(e){}
|
||||
|
||||
/*
|
||||
var timp = '<?php echo $presupuestoEntity->comp_tipo_impresion; ?>'
|
||||
switch(timp){
|
||||
case 'negro':
|
||||
@ -574,7 +574,7 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
*/
|
||||
computarPaginasColor($('#compPosPaginasColor').val());
|
||||
|
||||
}
|
||||
@ -748,24 +748,7 @@
|
||||
]
|
||||
});
|
||||
|
||||
$('.comp_negro_items').on('change', function (e) {
|
||||
|
||||
checkComparadorInt(false,false);
|
||||
});
|
||||
|
||||
$('.comp_negrohq_items').on('change', function (e) {
|
||||
|
||||
checkComparadorInt(false, true);
|
||||
});
|
||||
|
||||
$('.comp_color_items').on('change', function (e) {
|
||||
|
||||
checkComparadorInt(true, false);
|
||||
});
|
||||
|
||||
$('.comp_colorhq_items').on('change', function (e) {
|
||||
checkComparadorInt(true, true);
|
||||
});
|
||||
|
||||
async function getLineasIntPlana(is_color, is_hq){
|
||||
|
||||
@ -935,22 +918,6 @@
|
||||
});
|
||||
|
||||
|
||||
$('#tipoImpresion').on("change", function () {
|
||||
updatePapelesComparador();
|
||||
|
||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
|
||||
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
|
||||
$('#paginas').change();
|
||||
|
||||
$('#tableCompIntRotativa').DataTable().clear().draw();
|
||||
$('#total_comp_rot').html("0.00");
|
||||
|
||||
$('#tableCompIntPlana').DataTable().clear().draw();
|
||||
$('#total_comp_plana').html("0.00");
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('.comp_negro_items').on('change', function (e) {
|
||||
|
||||
checkComparadorInt(false,false);
|
||||
@ -1078,67 +1045,6 @@
|
||||
}
|
||||
|
||||
|
||||
$('.comp_cubierta_items').on('change', function (){
|
||||
|
||||
if ($('#compCarasCubierta').select2('data').length > 0 &&
|
||||
$('#compPapelCubierta').select2('data').length > 0 &&
|
||||
$('#compGramajeCubierta').select2('data').length > 0 ){
|
||||
|
||||
const dimension = getDimensionLibro();
|
||||
|
||||
let datos = {
|
||||
type: 'cubierta',
|
||||
paginas: parseInt($('#compCarasCubierta').select2('data')[0].id),
|
||||
tirada: parseInt($('#tirada').val()),
|
||||
merma: parseInt($('#mermacubierta').val()),
|
||||
color: 1,
|
||||
ancho: dimension.ancho,
|
||||
alto: dimension.alto,
|
||||
solapas: $('#solapas').is(':checked')?1:0,
|
||||
solapas_ancho: parseInt($('#solapas_ancho').val()),
|
||||
papel_generico_id: $('#compPapelCubierta').select2('data')[0].id,
|
||||
papel_generico: $('#compPapelCubierta').select2('data')[0].text.trim(),
|
||||
gramaje: $('#compGramajeCubierta').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cosidotapablanda/datatable",
|
||||
data: datos,
|
||||
success: function (data) {
|
||||
|
||||
clearCubierta();
|
||||
|
||||
if(data.lineas.length >0){
|
||||
|
||||
fillCubierta(data);
|
||||
selectCubiertaLineas();
|
||||
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>' + ' (' + tableCompCubierta.rows().count() + ')');
|
||||
$('#insertarCubiertaBtn').removeClass('d-none')
|
||||
|
||||
}
|
||||
else{
|
||||
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>');
|
||||
$('#insertarCubiertaBtn').addClass('d-none')
|
||||
$('#total_comp_cubierta').html('0.00')
|
||||
|
||||
}
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
return true;
|
||||
},
|
||||
error: function(e){
|
||||
return false;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
else{
|
||||
clearCubierta();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#tipoImpresion').on("change", function () {
|
||||
updatePapelesComparador();
|
||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
|
||||
|
||||
@ -246,7 +246,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
var theTable = $('#tableOfServiciosAcabado').DataTable( {
|
||||
var theTable = /*$('#tableOfServiciosAcabado').DataTable( {
|
||||
draw: 1,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
@ -261,7 +261,7 @@
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPresupuestoAcabados') ?>',
|
||||
//url: '<?= route_to('dataTableOfPresupuestoAcabados') ?>',
|
||||
data: {
|
||||
id_presupuesto: id,
|
||||
},
|
||||
@ -307,15 +307,16 @@
|
||||
submitHtml: '<i class="ti ti-device-floppy"/>'
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
} );*/
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<!-- Código JS comportamiento tabla servicios encuadernacion. -->
|
||||
<!-------------------------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
/*
|
||||
const lastColNr2 = $('#tableOfServiciosEncuadernacion').find("tr:first th").length - 1;
|
||||
|
||||
editor2 = new $.fn.dataTable.Editor( {
|
||||
@ -395,7 +396,7 @@
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPresupuestoEncuadernaciones') ?>',
|
||||
//url: '<?= route_to('dataTableOfPresupuestoEncuadernaciones') ?>',
|
||||
data: {
|
||||
id_presupuesto: id,
|
||||
tipo_presupuesto: 4,
|
||||
@ -444,14 +445,14 @@
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
|
||||
*/
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<!-------------------------------------------------------------->
|
||||
<!-- Código JS comportamiento tabla servicios manipulados. -->
|
||||
<!-------------------------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
/*
|
||||
const lastColNr3 = $('#tableOfServiciosManipulado').find("tr:first th").length - 1;
|
||||
|
||||
editor3 = new $.fn.dataTable.Editor( {
|
||||
@ -534,7 +535,7 @@
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPresupuestoManipulados') ?>',
|
||||
//url: '<?= route_to('dataTableOfPresupuestoManipulados') ?>',
|
||||
data: {
|
||||
id_presupuesto: id,
|
||||
},
|
||||
@ -581,7 +582,7 @@
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
|
||||
*/
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
@ -589,7 +590,7 @@
|
||||
<!-- Código JS comportamiento tabla servicios preimpresion. -->
|
||||
<!-------------------------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
/*
|
||||
const lastColNr4 = $('#tableOfServiciosPreimpresion').find("tr:first th").length - 1;
|
||||
|
||||
editor4 = new $.fn.dataTable.Editor( {
|
||||
@ -672,7 +673,7 @@
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPresupuestoPreimpresiones') ?>',
|
||||
//url: '<?= route_to('dataTableOfPresupuestoPreimpresiones') ?>',
|
||||
data: {
|
||||
id_presupuesto: id,
|
||||
},
|
||||
@ -719,5 +720,5 @@
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
*/
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
Reference in New Issue
Block a user