Lou
2024-04-08 3aceaa16063d39b6f1ff7dc11d268fde85ee63a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<template>
    <div class="cur-container-box">
        <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
 
            <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>
 
<script>
import {
    setCheckPlaceExt
} from "@/api/place/place"
 
export default {
    inject: ["placeElement"],
 
    data () {
        return {
            form: {},
            option: {
                submitBtn: false,
                emptyBtn: false,
                column: [
                    {
                        span: 23,
                        row: true,
                        label: "审批意见",
                        prop: "confirmNotion",
                        type: 'textarea',
                        minRows: 3,
                        maxRows: 5,
                        rules: [],
                    }
                ]
            },
        }
    },
 
    methods: {
        handleSubmit () {
            setCheckPlaceExt({
                confirmFlag: 2,
                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)
            })
        },
 
        handleReset () {
            if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
                this.$message({
                    type: 'warning',
                    message: "请输入审批意见!",
                })
 
                return
            }
 
            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>
 
<style lang="scss" scoped>
.cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
 
    .content-box {
        margin: 0 4px;
        padding: 0 16px;
        height: 0;
        flex: 1;
        overflow: hidden;
        overflow-y: auto;
    }
 
    .footer-btn-box {
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
}
</style>