prestamo corregido
This commit is contained in:
parent
50b4f791ce
commit
0cf7afe503
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<TablaBuscadorPrestamo
|
||||
:actualizarTabla="actualizarTabla"
|
||||
:updateActualizarTabla="updateActualizarTabla"
|
||||
:operador="operador"
|
||||
activos
|
||||
mostrarSelectModuloA
|
||||
@ -15,9 +16,14 @@ import TablaBuscadorPrestamo from '@/components/tablaBuscador/TablaBuscadorPrest
|
||||
|
||||
export default {
|
||||
components: { TablaBuscadorPrestamo },
|
||||
props: { operador: { type: Object, required: true, default: () => ({}) } },
|
||||
data() {
|
||||
return { actualizarTabla: false }
|
||||
props: {
|
||||
actualizarTabla: { type: Boolean, required: true, default: false },
|
||||
updateActualizarTabla: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
operador: { type: Object, required: true, default: () => ({}) },
|
||||
},
|
||||
mounted() {
|
||||
this.socket = this.$nuxtSocket({
|
||||
@ -26,7 +32,7 @@ export default {
|
||||
})
|
||||
this.socket.on('actualizar-operador', (data) => {
|
||||
if (this.operador.institucion.id_institucion === data.id_institucion)
|
||||
this.actualizarTabla = !this.actualizarTabla
|
||||
this.updateActualizarTabla(true)
|
||||
})
|
||||
},
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
<ManualIdPrestamo :prestamoIdPrestamo="prestamoIdPrestamo" />
|
||||
|
||||
<ManualNumeroInventario
|
||||
:updateActualizarTabla="updateActualizarTabla"
|
||||
:operador="operador"
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
@ -34,6 +35,11 @@ import Scanner from '@/components/operador/Scanner'
|
||||
export default {
|
||||
components: { ManualIdPrestamo, ManualNumeroInventario, Scanner },
|
||||
props: {
|
||||
updateActualizarTabla: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
operador: { type: Object, required: true, default: () => ({}) },
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
},
|
||||
@ -75,6 +81,8 @@ export default {
|
||||
const equipo = res.data
|
||||
|
||||
this.updateVariable()
|
||||
this.updateIsLoading(false)
|
||||
this.updateActualizarTabla(true)
|
||||
this.$alertsGenericos.imprimirMensaje(
|
||||
this.$buefy,
|
||||
`
|
||||
@ -85,7 +93,6 @@ export default {
|
||||
<p class="is-size-4">Número de Inventario: ${equipo.numero_inventario}</p>
|
||||
`
|
||||
)
|
||||
this.updateIsLoading(false)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
@ -117,6 +124,7 @@ export default {
|
||||
.then((res) => {
|
||||
this.updateVariable()
|
||||
this.updateIsLoading(false)
|
||||
this.updateActualizarTabla(true)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -27,6 +27,11 @@ import ModalMultaNumeroInventario from '@/components/operador/ModalMultaNumeroIn
|
||||
|
||||
export default {
|
||||
props: {
|
||||
updateActualizarTabla: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
operador: { type: Object, required: true, default: () => ({}) },
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
},
|
||||
@ -69,8 +74,9 @@ export default {
|
||||
)
|
||||
.then((res) => {
|
||||
this.numeroInventario = ''
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
this.updateIsLoading(false)
|
||||
this.updateActualizarTabla(true)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
|
@ -3,10 +3,16 @@
|
||||
<EntregaRegreso
|
||||
:operador="operador"
|
||||
:updateIsLoading="updateIsLoading"
|
||||
:updateActualizarTabla="updateActualizarTabla"
|
||||
v-if="operador.tipoUsuario.id_tipo_usuario === 4"
|
||||
/>
|
||||
|
||||
<Activos :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
<Activos
|
||||
:actualizarTabla="actualizarTabla"
|
||||
:operador="operador"
|
||||
:updateIsLoading="updateIsLoading"
|
||||
:updateActualizarTabla="updateActualizarTabla"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,6 +26,14 @@ export default {
|
||||
operador: { type: Object, required: true, default: () => ({}) },
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
},
|
||||
data() {
|
||||
return { actualizarTabla: false }
|
||||
},
|
||||
methods: {
|
||||
updateActualizarTabla(valorBooleano) {
|
||||
this.actualizarTabla = valorBooleano
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -250,6 +250,11 @@ export default {
|
||||
mostrarSelectModuloA: { type: Boolean, required: false, default: false },
|
||||
mostrarInputFecha: { type: Boolean, required: false, default: false },
|
||||
mostrarInputSwitch: { type: Boolean, required: false, default: false },
|
||||
updateActualizarTabla: {
|
||||
type: Function,
|
||||
required: false,
|
||||
default: () => {},
|
||||
},
|
||||
operador: { type: Object, required: true, default: () => ({}) },
|
||||
},
|
||||
data() {
|
||||
@ -427,7 +432,10 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
actualizarTabla() {
|
||||
this.obtenerPrestamos()
|
||||
if (this.actualizarTabla) {
|
||||
this.updateActualizarTabla(false)
|
||||
this.obtenerPrestamos()
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user