给财务单据的保存增加快捷键
This commit is contained in:
parent
c415f0265f
commit
92a2023bc3
@ -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) {
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
fullscreen
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
:id="prefixNo"
|
||||
style="top:20px;height: 95%;">
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
|
||||
<!--发起多级审核-->
|
||||
<a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
|
||||
</template>
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
fullscreen
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
:id="prefixNo"
|
||||
style="top:20px;height: 95%;">
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
|
||||
<!--发起多级审核-->
|
||||
<a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
|
||||
</template>
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
fullscreen
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
:id="prefixNo"
|
||||
style="top:20px;height: 95%;">
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
|
||||
<!--发起多级审核-->
|
||||
<a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
|
||||
</template>
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
fullscreen
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
:id="prefixNo"
|
||||
style="top:20px;height: 95%;">
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
|
||||
<!--发起多级审核-->
|
||||
<a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
|
||||
</template>
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
fullscreen
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
:id="prefixNo"
|
||||
style="top:20px;height: 95%;">
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
|
||||
<!--发起多级审核-->
|
||||
<a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
|
||||
</template>
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
fullscreen
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
:id="prefixNo"
|
||||
style="top:20px;height: 95%;">
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
|
||||
<!--发起多级审核-->
|
||||
<a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user