addMember.vue
1.7 KB
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
<template>
<div class="app-container">
<div class="lr-bg pd20">
<h1 style="text-align: center;">添 加 会 员</h1>
<el-row justify="center">
<el-col :span="12" class="form-box" style="min-width: 680px">
<el-tabs
v-model="btn"
>
<el-tab-pane label="身份证添加" name="one" />
<el-tab-pane label="证件照录入" name="two" />
<el-tab-pane label="批量添加" name="three" />
</el-tabs>
<br>
<addMemberManual v-if="btn==='one'" ref="addMemberManualRef" @add-audit="addAudit" />
<addMemberVoluntarily v-if="btn==='two'" ref="addMemberVoluntarilyRef" @add-audit="addAudit" />
<addMemberBatch v-if="btn==='three'" />
</el-col>
</el-row>
</div>
<SubmitAudit ref="SubmitAuditRef" @success="successFn" />
</div>
</template>
<script setup>
import { ref, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
// 导入模块
import addMemberVoluntarily from '@/views/member/addMemberVoluntarily.vue'
import addMemberManual from '@/views/member/addMemberManual.vue'
import addMemberBatch from '@/views/member/addMemberBatch.vue'
import SubmitAudit from '@/views/member/addMember/submitAudit.vue'
const btn = ref('one')
function addAudit(row) {
proxy.$refs['SubmitAuditRef'].open(row)
}
function successFn() {
if (btn.value === 'one') proxy.$refs['addMemberManualRef'].formRest()
if (btn.value === 'two') proxy.$refs['addMemberVoluntarilyRef'].formRest()
}
</script>
<style lang="scss" scoped>
.form-box{
max-width: 1000px;
padding: 100px;
padding-top: 0;
border-radius: 20px;
background-color: #fff;
min-height: 1100px;
}
</style>