mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando
This commit is contained in:
@ -440,6 +440,37 @@ class AlbaranComponent {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#tablaAlbaran' + this.id).on('change', '.input-albaran-linea', (e) => {
|
||||
|
||||
const fieldName = $(e.currentTarget).attr('data-field');
|
||||
const fieldValue = $(e.currentTarget).val();
|
||||
const albaranId = this.id;
|
||||
const lineaId = $(e.currentTarget).attr('data-id');
|
||||
|
||||
$.post('/albaranes/updateAlbaranLinea', {
|
||||
fieldName: fieldName,
|
||||
fieldValue: fieldValue,
|
||||
lineaId: lineaId
|
||||
}, (response) => {
|
||||
if (response.success) {
|
||||
this.table.ajax.reload(null, false);
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error',
|
||||
text: 'No se ha podido actualizar el albarán',
|
||||
icon: 'error',
|
||||
showCancelButton: false,
|
||||
confirmButtonColor: '#3085d6',
|
||||
confirmButtonText: 'Ok',
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-primary me-1',
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
_initAutoNumericInputs() {
|
||||
|
||||
Reference in New Issue
Block a user