pcpuma_unam_operador/components/inputs/InputNumeroCuenta.vue
2022-08-29 07:46:09 -05:00

45 lines
997 B
Vue

<template>
<b-field
class="column mb-0 pb-0"
label="Número de cuenta/trabajador"
:class="columnSize"
>
<b-input
icon="account"
maxlength="10"
placeholder="Número de cuenta/trabajador"
type="text"
:has-counter="false"
@keyup.enter.native="ejecutar()"
v-model="numeroCuenta"
rounded
/>
</b-field>
</template>
<script>
export default {
props: {
ejecutar: { typeof: Function, required: true, default: () => {} },
numeroCuentaPadre: { typeof: String, required: true, default: '' },
columnSize: { typeof: String, required: false, default: '' },
},
data: () => {
return { numeroCuenta: '' }
},
watch: {
numeroCuenta() {
this.$emit('numero-cuenta', this.numeroCuenta)
},
numeroCuentaPadre() {
this.numeroCuenta = this.numeroCuentaPadre
},
},
created() {
if (this.numeroCuentaPadre) this.numeroCuenta = this.numeroCuentaPadre
},
}
</script>
<style scoped></style>