diff --git a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js index e03756102..00208309e 100644 --- a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js +++ b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js @@ -46,12 +46,27 @@ export const FinancialModalMixin = { this.width = realScreenWidth<1500?'1200px':'1550px' this.minWidth = realScreenWidth<1500?1150:1500 }, + mounted() { + document.getElementById(this.prefixNo).addEventListener('keydown', this.handleOkKey) + }, + beforeDestroy() { + document.getElementById(this.prefixNo).removeEventListener('keydown', this.handleOkKey) + }, computed: { readOnly: function() { return this.action !== "add" && this.action !== "edit"; } }, methods: { + // 快捷键 + handleOkKey(e) { + const key = window.event.keyCode ? window.event.keyCode : window.event.which + if (key === 83 && e.ctrlKey) { + //保存 CTRL+S + this.handleOk() + e.preventDefault() + } + }, addInit(amountNum) { getAction('/sequence/buildNumber').then((res) => { if (res && res.code === 200) { diff --git a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue index 91db22ac0..84905c3a2 100644 --- a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue +++ b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue @@ -9,11 +9,12 @@ fullscreen switchFullscreen @cancel="handleCancel" + :id="prefixNo" style="top:20px;height: 95%;"> diff --git a/jshERP-web/src/views/financial/modules/GiroModal.vue b/jshERP-web/src/views/financial/modules/GiroModal.vue index 558c9770d..4574e5b6c 100644 --- a/jshERP-web/src/views/financial/modules/GiroModal.vue +++ b/jshERP-web/src/views/financial/modules/GiroModal.vue @@ -9,11 +9,12 @@ fullscreen switchFullscreen @cancel="handleCancel" + :id="prefixNo" style="top:20px;height: 95%;"> diff --git a/jshERP-web/src/views/financial/modules/ItemInModal.vue b/jshERP-web/src/views/financial/modules/ItemInModal.vue index edbfad183..1f0e6977d 100644 --- a/jshERP-web/src/views/financial/modules/ItemInModal.vue +++ b/jshERP-web/src/views/financial/modules/ItemInModal.vue @@ -9,11 +9,12 @@ fullscreen switchFullscreen @cancel="handleCancel" + :id="prefixNo" style="top:20px;height: 95%;"> diff --git a/jshERP-web/src/views/financial/modules/ItemOutModal.vue b/jshERP-web/src/views/financial/modules/ItemOutModal.vue index f3f9659f0..1f91b5629 100644 --- a/jshERP-web/src/views/financial/modules/ItemOutModal.vue +++ b/jshERP-web/src/views/financial/modules/ItemOutModal.vue @@ -9,11 +9,12 @@ fullscreen switchFullscreen @cancel="handleCancel" + :id="prefixNo" style="top:20px;height: 95%;"> diff --git a/jshERP-web/src/views/financial/modules/MoneyInModal.vue b/jshERP-web/src/views/financial/modules/MoneyInModal.vue index eeabcaab6..99ff3e659 100644 --- a/jshERP-web/src/views/financial/modules/MoneyInModal.vue +++ b/jshERP-web/src/views/financial/modules/MoneyInModal.vue @@ -9,11 +9,12 @@ fullscreen switchFullscreen @cancel="handleCancel" + :id="prefixNo" style="top:20px;height: 95%;"> diff --git a/jshERP-web/src/views/financial/modules/MoneyOutModal.vue b/jshERP-web/src/views/financial/modules/MoneyOutModal.vue index aa45c9508..ee6074b9a 100644 --- a/jshERP-web/src/views/financial/modules/MoneyOutModal.vue +++ b/jshERP-web/src/views/financial/modules/MoneyOutModal.vue @@ -9,11 +9,12 @@ fullscreen switchFullscreen @cancel="handleCancel" + :id="prefixNo" style="top:20px;height: 95%;">