给单据的新增和编辑界面增加审核按钮

This commit is contained in:
季圣华
2022-05-18 23:16:45 +08:00
parent fa48c8345b
commit 24ee142f55
23 changed files with 164 additions and 21 deletions

View File

@@ -33,11 +33,17 @@ export const FinancialListMixin = {
methods: {
myHandleAdd() {
this.$refs.modalForm.action = "add";
if(this.btnEnableList.indexOf(2)===-1) {
this.$refs.modalForm.isCanCheck = false
}
this.handleAdd();
},
myHandleEdit(record) {
if(record.status === '0') {
this.$refs.modalForm.action = "edit";
if(this.btnEnableList.indexOf(2)===-1) {
this.$refs.modalForm.isCanCheck = false
}
this.handleEdit(record);
} else {
this.$message.warning("抱歉,只有未审核的单据才能编辑!")

View File

@@ -15,6 +15,8 @@ export const FinancialModalMixin = {
organList: [],
personList: [],
accountList: [],
billStatus: '0',
isCanCheck: true,
isTenant: false,
spans: {
labelCol1: {span: 2},
@@ -244,6 +246,11 @@ export const FinancialModalMixin = {
});
typeof success === 'function' ? success(res) : ''
tab.loading = false
}
},
//保存并审核
handleOkAndCheck() {
this.billStatus = '1'
this.handleOk()
},
}
}

View File

@@ -8,10 +8,14 @@
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button @click="handleCancel">取消</a-button>
<a-button v-if="isCanCheck" @click="handleOkAndCheck">保存并审核</a-button>
<a-button type="primary" @click="handleOk">保存</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
@@ -180,6 +184,7 @@
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
this.billStatus = '0'
if (this.action === 'add') {
this.addInit("SYF")
this.fileList = []
@@ -217,6 +222,7 @@
if(this.model.id){
billMain.id = this.model.id
}
billMain.status = this.billStatus
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),

View File

@@ -8,10 +8,14 @@
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button @click="handleCancel">取消</a-button>
<a-button v-if="isCanCheck" @click="handleOkAndCheck">保存并审核</a-button>
<a-button type="primary" @click="handleOk">保存</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
@@ -191,6 +195,7 @@
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
this.billStatus = '0'
if (this.action === 'add') {
this.addInit("ZZ")
this.fileList = []
@@ -229,6 +234,7 @@
if(this.model.id){
billMain.id = this.model.id
}
billMain.status = this.billStatus
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),

View File

@@ -8,10 +8,14 @@
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button @click="handleCancel">取消</a-button>
<a-button v-if="isCanCheck" @click="handleOkAndCheck">保存并审核</a-button>
<a-button type="primary" @click="handleOk">保存</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
@@ -204,6 +208,7 @@
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
this.billStatus = '0'
if (this.action === 'add') {
this.addInit("SR")
this.fileList = []
@@ -242,6 +247,7 @@
if(this.model.id){
billMain.id = this.model.id
}
billMain.status = this.billStatus
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),

View File

@@ -8,10 +8,14 @@
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button @click="handleCancel">取消</a-button>
<a-button v-if="isCanCheck" @click="handleOkAndCheck">保存并审核</a-button>
<a-button type="primary" @click="handleOk">保存</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
@@ -204,6 +208,7 @@
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
this.billStatus = '0'
if (this.action === 'add') {
this.addInit("ZC")
this.fileList = []
@@ -243,6 +248,7 @@
if(this.model.id){
billMain.id = this.model.id
}
billMain.status = this.billStatus
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),

View File

@@ -8,10 +8,14 @@
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button @click="handleCancel">取消</a-button>
<a-button v-if="isCanCheck" @click="handleOkAndCheck">保存并审核</a-button>
<a-button type="primary" @click="handleOk">保存</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
@@ -226,6 +230,7 @@
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
this.billStatus = '0'
if (this.action === 'add') {
this.addInit("SK")
this.fileList = []
@@ -263,6 +268,7 @@
if(this.model.id){
billMain.id = this.model.id
}
billMain.status = this.billStatus
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),

View File

@@ -8,10 +8,14 @@
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button @click="handleCancel">取消</a-button>
<a-button v-if="isCanCheck" @click="handleOkAndCheck">保存并审核</a-button>
<a-button type="primary" @click="handleOk">保存</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
@@ -229,6 +233,7 @@
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
this.billStatus = '0'
if (this.action === 'add') {
this.addInit("FK")
this.fileList = []
@@ -267,6 +272,7 @@
if(this.model.id){
billMain.id = this.model.id
}
billMain.status = this.billStatus
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),