pyaHistory.vue
3.58 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
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
<template>
<div>
<el-dialog v-model="dialogVisible" destroy-on-close title="缴费历史" width="70%">
<el-table v-loading="loading" :data="list" border>
<el-table-column type="expand">
<template #default="scope">
<el-card style="width: 90%;margin: 0 auto;">
<el-table :data="scope.row.auditLogs" border>
<el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column align="center" label="状态" prop="" show-overflow-tooltip width="100px">
<template #default="{row}">
<span v-if="row.auditResult==='0'" class="text-danger">审核拒绝</span>
<span v-if="row.auditResult==='1'" class="text-success">审核通过</span>
<span v-if="row.auditResult==='9'">审核中</span>
</template>
</el-table-column>
<el-table-column
align="center" label="操作者" min-width="120px" prop="auditBy"
show-overflow-tooltip
/>
<el-table-column align="center" label="操作时间" min-width="120" prop="">
<template #default="{row}">
<span>{{ row.auditTime? parseTime(row.auditTime, '{y}-{m}-{d}'):'--' }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="备注" min-width="100" prop="auditMsg" />
</el-table>
</el-card>
</template>
</el-table-column>
<el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column align="center" label="缴费年限" prop="renewYear" width="120" />
<el-table-column align="center" label="缴费编号" min-width="120" prop="wfCode" show-overflow-tooltip />
<el-table-column align="center" label="状态" prop="provinceStr" show-overflow-tooltip width="100px">
<template #default="{row}">
<div v-if="row.auditStatus==='0'"> 待提交</div>
<div v-if="row.auditStatus==='1'"> 审核中</div>
<div v-if="row.auditStatus==='2'" class="text-success">审核通过</div>
<div v-if="row.auditStatus==='3'" class="text-warning"> 审核拒绝</div>
<div v-if="row.auditStatus==='4'" class="text-danger"> 已退回</div>
<div v-if="row.auditStatus==='5'" class="text-danger"> 已取消</div>
</template>
</el-table-column>
<el-table-column align="center" label="提交时间" min-width="120" prop="commitTime" />
</el-table>
</el-dialog>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { queryHistory, getRecents } from '@/api/groupMember'
import dayjs from 'dayjs'
const dialogVisible = ref(false)
const loading = ref(false)
const list = ref([])
const memId = ref()
function open(id) {
list.value = []
memId.value = id
dialogVisible.value = true
getList()
}
async function getList() {
loading.value = true
const res = await getRecents(memId.value)
list.value = res.data
for (const v of list.value) {
v.auditLogs = JSON.parse(v.auditLogs)
if (v.commitTime) {
v.commitTime = dayjs(v.commitTime).format('YYYY-MM-DD')
v.commitTimes = dayjs(v.commitTime).valueOf()
} else {
v.commitTimes = 0
v.commitTime = ''
}
}
list.value.sort((a, b) => b.commitTimes - a.commitTimes)
loading.value = false
console.log(list.value)
}
defineExpose({
open
})
</script>
<style lang="scss" scoped>
</style>