diff --git a/src/components/ADempiere/Form/VPOS/Options/index.vue b/src/components/ADempiere/Form/VPOS/Options/index.vue index 3feb0148..bf14a880 100644 --- a/src/components/ADempiere/Form/VPOS/Options/index.vue +++ b/src/components/ADempiere/Form/VPOS/Options/index.vue @@ -311,12 +311,12 @@ - + { - // this.focusPin() - // }, 500) - // } else { - // this.$store.dispatch('changePopoverOverdrawnInvoice', { visible: value }) - // } - // } - // }, + watch: { + visible(value) { + if (value && !this.isEmptyValue(this.$refs)) { + setTimeout(() => { + this.focusPin() + }, 300) + } + } + }, created() { this.findProcess(this.posProcess) }, methods: { + theAction(event) { + switch (event.srcKey) { + case 'enter': + this.openPin(this.pin) + break + case 'close': + this.closePin() + break + } + }, closePin() { this.visible = false this.$store.dispatch('changePopoverOverdrawnInvoice', { visible: false }) @@ -501,6 +509,7 @@ export default { this.$refs.pin.focus() }, openPin(pin) { + this.focusPin() validatePin({ posUuid: this.currentPointOfSales.uuid, pin @@ -526,6 +535,7 @@ export default { this.pin = '' }) .finally(() => { + this.pin = '' this.visible = false }) }, diff --git a/src/components/ADempiere/Form/VPOS/Order/index.vue b/src/components/ADempiere/Form/VPOS/Order/index.vue index eadd1c44..e4381c98 100644 --- a/src/components/ADempiere/Form/VPOS/Order/index.vue +++ b/src/components/ADempiere/Form/VPOS/Order/index.vue @@ -21,7 +21,7 @@ id="headerContainer" style="display: -webkit-box; height: 100%" > - + - + { this.visible = false + this.pin = '' }) }, pinAction(action) { @@ -309,6 +320,7 @@ export default { }, closePin() { this.visible = false + this.pin = '' this.$store.dispatch('changePopoverOverdrawnInvoice', { visible: false }) this.setDocumentType(this.currentOrder.documentType) },