mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglado carga de cliente
This commit is contained in:
@ -64,7 +64,7 @@ class DatosGenerales {
|
||||
|
||||
// Selects
|
||||
this.formatoLibro.init();
|
||||
if (this.excluirRotativa.length != 0) {
|
||||
if (!$(this.excluirRotativa).prop('hidden')){
|
||||
this.cliente.init();
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ class DatosGenerales {
|
||||
message: window.translations["validation"].cliente,
|
||||
callback: function (input) {
|
||||
// Get the selected options
|
||||
if(this.excluirRotativa.length == 0)
|
||||
if (!$(this.excluirRotativa).prop('hidden'))
|
||||
return true;
|
||||
const options = $("#clienteId").select2('data');
|
||||
const hasValidOption = options.some(option => parseInt(option.id) > 0);
|
||||
@ -386,7 +386,7 @@ class DatosGenerales {
|
||||
this.coleccion.val(datos.coleccion);
|
||||
this.referenciaCliente.val(datos.referenciaCliente);
|
||||
|
||||
if (this.excluirRotativa.length != 0) {
|
||||
if (!$(this.excluirRotativa).prop('hidden')){
|
||||
this.cliente.setOption(datos.clienteId, datos.clienteNombre);
|
||||
this.cliente.setVal(datos.clienteId);
|
||||
$(this.cliente).trigger('change');
|
||||
@ -441,7 +441,7 @@ class DatosGenerales {
|
||||
}
|
||||
|
||||
getCliente(){
|
||||
if (this.excluirRotativa.length == 0)
|
||||
if ($(this.excluirRotativa).prop('hidden'))
|
||||
return $('#clienteId').val();
|
||||
return this.cliente.getVal();
|
||||
}
|
||||
|
||||
@ -599,7 +599,7 @@ class PresupuestoCliente {
|
||||
this.calcularPresupuesto = false;
|
||||
|
||||
this.datosGenerales.cargarDatos(response.data.datosGenerales);
|
||||
if (this.datosGenerales.excluirRotativa.length !== 0) {
|
||||
if (!$(this.datosGenerales.excluirRotativa).prop("hidden")) {
|
||||
this.direcciones.handleChangeCliente();
|
||||
}
|
||||
this.disenioInterior.cargarDatos(response.data.interior, response.data.datosGenerales.papelInteriorDiferente);
|
||||
|
||||
Reference in New Issue
Block a user