pcpuma_unam_operador/components/operador/ManualIdPrestamo.vue
2023-01-10 09:56:32 -06:00

44 lines
888 B
Vue

<template>
<div class="column">
<b-field label="Número de Prestamo">
<b-input
type="number"
@keyup.enter.native="llamarPrestamoIdPrestamo()"
v-model="idPrestamo"
/>
</b-field>
<b-field class="has-text-centered">
<b-button
type="is-info"
@click="prestamoIdPrestamo(idPrestamo, idPrestamoReset)"
:disabled="!idPrestamo"
>
Enviar
</b-button>
</b-field>
</div>
</template>
<script>
export default {
props: {
prestamoIdPrestamo: { type: Function, required: true, default: () => {} },
},
data() {
return { idPrestamo: '' }
},
methods: {
idPrestamoReset() {
this.idPrestamo = ''
},
llamarPrestamoIdPrestamo() {
if (this.idPrestamo)
this.prestamoIdPrestamo(this.idPrestamo, this.idPrestamoReset)
},
},
}
</script>
<style></style>