guanqb
2024-02-21 ea3eaea9b6ef359e6a9ef81dc829e3fc4a2baec4
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
<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>
export default {
    name: 'auditBase',
 
    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 () {
            this.form.status = 1
            this.$emit('handleSubmit', this.form)
        },
 
        handleReset () {
            if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
                this.$message({
                    type: 'warning',
                    message: "请输入审批意见!",
                })
 
                return
            }
            this.form.status = 2
            this.$emit('handleSubmit', this.form)
        },
    }
}
</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>