From 043eb7119f7fcab64cbe614cf6c42bbf761a144d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 10 Jan 2024 15:00:20 +0800
Subject: [PATCH] 审核调整
---
src/views/place/components/auditBase.vue | 94 +++++++++++++++++++---------------------------
1 files changed, 39 insertions(+), 55 deletions(-)
diff --git a/src/views/place/components/auditBase.vue b/src/views/place/components/auditBase.vue
index 4181e69..f672861 100644
--- a/src/views/place/components/auditBase.vue
+++ b/src/views/place/components/auditBase.vue
@@ -1,18 +1,13 @@
<template>
<div class="cur-container-box">
- <div class="content-box">
- 审核当前项
- </div>
- <div class="footer-btn-box">
- <el-button type="primary" size="small" @click="auditPass">通 过</el-button>
- <el-button size="small" @click="auditTurnDown">驳 回</el-button>
- </div>
+ <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
- <el-dialog append-to-body :visible.sync="auditTurnDownPopup" width="30%" :close-on-click-modal="false"
- @close="popupClose" :show-close="false">
- <avue-form ref="replyForm" :option="option" v-model="form" @submit="handleSubmit" @reset-change="handleReset">
- </avue-form>
- </el-dialog>
+ <template slot-scope="{size}" slot="menuForm">
+ <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
+ <el-button :size="size" @click="handleReset">驳 回</el-button>
+ </template>
+
+ </avue-form>
</div>
</template>
@@ -26,27 +21,20 @@
data () {
return {
- auditTurnDownPopup: false,
-
form: {},
option: {
- submitBtn: true,
- submitText: '确定',
- emptyBtn: true,
- emptyText: '取消',
+ submitBtn: false,
+ emptyBtn: false,
column: [
{
- span: 24,
- label: "驳回原因",
+ span: 23,
+ row: true,
+ label: "审批意见",
prop: "confirmNotion",
type: 'textarea',
minRows: 3,
maxRows: 5,
- rules: [{
- required: true,
- message: "请输入驳回原因",
- trigger: "blur",
- }],
+ rules: [],
}
]
},
@@ -54,50 +42,46 @@
},
methods: {
- popupClose () {
- this.$refs.replyForm && this.$refs.replyForm.resetForm()
- },
-
- auditPass () {
+ handleSubmit () {
setCheckPlaceExt({
confirmFlag: 2,
- id: this.placeElement.curAuditRow.placeExtId
- }).then(() => {
- this.placeElement.auditBasePopup = false
- this.$message({
- type: "success",
- message: "操作成功!",
- })
-
- this.placeElement.onLoad(this.placeElement.page)
- })
- },
-
- auditTurnDown () {
- this.placeElement.auditBasePopup = false
- this.auditTurnDownPopup = true
- },
-
- handleSubmit (form, done) {
- setCheckPlaceExt({
- confirmFlag: 3,
id: this.placeElement.curAuditRow.placeExtId,
- confirmNotion: form.confirmNotion
+ confirmNotion: this.form.confirmNotion
}).then(() => {
- this.auditTurnDownPopup = false
this.$message({
type: "success",
message: "操作成功!",
})
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.placeElement.auditBasePopup = false
this.placeElement.onLoad(this.placeElement.page)
- done()
})
},
handleReset () {
- this.auditTurnDownPopup = false
- }
+ if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
+ this.$message({
+ type: 'warning',
+ message: "请输入审批意见!",
+ })
+ }
+
+ setCheckPlaceExt({
+ confirmFlag: 3,
+ id: this.placeElement.curAuditRow.placeExtId,
+ confirmNotion: this.form.confirmNotion
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.placeElement.auditBasePopup = false
+
+ this.placeElement.onLoad(this.placeElement.page)
+ })
+ },
}
}
</script>
--
Gitblit v1.9.3