mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglado merma pod
This commit is contained in:
@ -49,14 +49,14 @@ class DatosLibro {
|
||||
}
|
||||
);
|
||||
this.acabadoFaja = new ClassSelect($("#acabado_faja_id"),
|
||||
'/serviciosacabados/getacabados',
|
||||
'/serviciosacabados/getacabados',
|
||||
'',
|
||||
false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
"sobrecubierta": 1
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
this.retractilado = this.domItem.find('#retractilado');
|
||||
this.retractilado5 = this.domItem.find('#retractilado5');
|
||||
@ -85,37 +85,37 @@ class DatosLibro {
|
||||
|
||||
this.acabadoCubierta.item.on('select2:select', function () {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if(self.acabadoCubierta.getVal() == 0){
|
||||
if (self.acabadoCubierta.getVal() == 0) {
|
||||
$(document).trigger('remove-servicio-lineas', 'acabadoCubierta');
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$(document).trigger('add-servicio-lineas', 'acabadoCubierta');
|
||||
}
|
||||
});
|
||||
this.acabadoSobrecubierta.item.on('select2:select', function () {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if(self.acabadoCubierta.getVal() == 0){
|
||||
if (self.acabadoCubierta.getVal() == 0) {
|
||||
$(document).trigger('remove-servicio-lineas', 'acabadoSobrecubierta');
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$(document).trigger('add-servicio-lineas', 'acabadoSobrecubierta');
|
||||
}
|
||||
});
|
||||
this.acabadoFaja.item.on('select2:select', function () {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if(self.acabadoFaja.getVal() == 0){
|
||||
if (self.acabadoFaja.getVal() == 0) {
|
||||
$(document).trigger('remove-servicio-lineas', 'acabadoFaja');
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$(document).trigger('add-servicio-lineas', 'acabadoFaja');
|
||||
}
|
||||
});
|
||||
@ -158,8 +158,8 @@ class DatosLibro {
|
||||
if (this.faja.prop('checked')) {
|
||||
this.div_faja.removeClass('d-none');
|
||||
$('#compFaja').val(1).trigger('change');
|
||||
|
||||
if(this.cargando)
|
||||
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
$(document).trigger('add-servicio-lineas', 'solapas_faja');
|
||||
@ -169,8 +169,8 @@ class DatosLibro {
|
||||
this.div_faja.addClass('d-none');
|
||||
$('#compFaja').val(0).trigger('change');
|
||||
$('.acabado-faja').addClass('d-none');
|
||||
|
||||
if(this.cargando)
|
||||
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
$(document).trigger('remove-servicio-lineas', 'acabadoFaja');
|
||||
@ -182,7 +182,7 @@ class DatosLibro {
|
||||
|
||||
checkMinMaxInput(event) {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
const el = event.target;
|
||||
@ -194,7 +194,7 @@ class DatosLibro {
|
||||
el.value = el.max;
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
el.value = el.min;
|
||||
}
|
||||
}
|
||||
@ -202,7 +202,7 @@ class DatosLibro {
|
||||
|
||||
changeFerro() {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if (this.ferro.prop('checked')) {
|
||||
@ -215,7 +215,7 @@ class DatosLibro {
|
||||
|
||||
changePrototipo() {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if (this.prototipo.prop('checked')) {
|
||||
@ -229,7 +229,7 @@ class DatosLibro {
|
||||
|
||||
checkRetractilado(event) {
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
switch (event.currentTarget.id) {
|
||||
@ -323,13 +323,13 @@ class DatosLibro {
|
||||
setTimeout(() => {
|
||||
if (this.solapasCubierta.prop('checked')) {
|
||||
$('#div_solapas_ancho').removeClass('d-none');
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
$(document).trigger('add-servicio-lineas', 'solapas_cubierta');
|
||||
}
|
||||
else {
|
||||
$('#div_solapas_ancho').addClass('d-none');
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
$(document).trigger('remove-servicio-lineas', 'solapas_cubierta');
|
||||
$(document).trigger('remove-servicio-lineas', 'solapas_grandes_cubierta');
|
||||
@ -345,14 +345,14 @@ class DatosLibro {
|
||||
// para que se actualice el comparador
|
||||
$('#compCarasCubierta').trigger('change');
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if (this.checkSolapasGrandes('cubierta')) {
|
||||
$(document).trigger('add-servicio-lineas', 'solapas_grandes_cubierta');
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
$(document).trigger('remove-servicio-lineas', 'solapas_grandes_cubierta');
|
||||
}
|
||||
}
|
||||
@ -362,7 +362,7 @@ class DatosLibro {
|
||||
|
||||
if (this.solapasSobrecubierta.prop('checked')) {
|
||||
this.divSolapasSobrecubierta.removeClass('d-none');
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
$(document).trigger('add-servicio-lineas', 'solapas_sobrecubierta');
|
||||
}
|
||||
@ -371,7 +371,7 @@ class DatosLibro {
|
||||
if ($('#compSobrecubierta').length) {
|
||||
$('#compSobrecubierta').val(0).trigger('change');
|
||||
}
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
$(document).trigger('remove-servicio-lineas', 'solapas_sobrecubierta');
|
||||
$(document).trigger('remove-servicio-lineas', 'solapas_grandes_sobrecubierta');
|
||||
@ -380,13 +380,13 @@ class DatosLibro {
|
||||
|
||||
|
||||
changeAnchoSolapasSobrecubierta() {
|
||||
|
||||
|
||||
|
||||
|
||||
// para que se actualice el comparador
|
||||
if($('#compGramajeSobrecubierta').select2('data').length > 0)
|
||||
if ($('#compGramajeSobrecubierta').select2('data').length > 0)
|
||||
$('#compGramajeSobrecubierta').trigger('change');
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if (this.checkSolapasGrandes('sobrecubierta')) {
|
||||
@ -401,11 +401,11 @@ class DatosLibro {
|
||||
changeAnchoSolapasFaja() {
|
||||
|
||||
// para que se actualice el comparador
|
||||
if($('#compGramajeFaja').select2('data').length > 0){
|
||||
if ($('#compGramajeFaja').select2('data').length > 0) {
|
||||
$('#compGramajeFaja').trigger('change');
|
||||
}
|
||||
|
||||
if(this.cargando)
|
||||
if (this.cargando)
|
||||
return;
|
||||
|
||||
if (this.checkSolapasGrandes('faja')) {
|
||||
@ -539,8 +539,12 @@ class DatosLibro {
|
||||
const formas_linea = parseInt($('#isCosido').val()) == 0 ? parseInt(rowData.formas) : parseInt(rowData.formas) / 2;
|
||||
if (formas_linea > tirada)
|
||||
merma_lineas.push(formas_linea - tirada);
|
||||
else
|
||||
merma_lineas.push(tirada % formas_linea);
|
||||
else {
|
||||
var total_pliegos = Math.ceil(1.0 * tirada / formas_linea);
|
||||
var total_formas = total_pliegos * formas_linea;
|
||||
merma_lineas.push(total_formas - formas_linea);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -621,7 +625,7 @@ class DatosLibro {
|
||||
}
|
||||
|
||||
this.faja.prop('checked', datos.fajaColor);
|
||||
if(datos.fajaColor){
|
||||
if (datos.fajaColor) {
|
||||
this.div_faja.removeClass('d-none');
|
||||
this.fajaAlto.val(datos.fajaColorAlto).trigger('change');
|
||||
this.fajaSolapasAncho.val(datos.fajaColorSolapasAncho).trigger('change');
|
||||
|
||||
Reference in New Issue
Block a user