viewFeeDetail.vue
3.19 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
95
96
97
98
<template>
<el-dialog :title="`${viewFeeDetailInfo.curYear}${$t('viewFeeDetail.title')}(${viewFeeDetailInfo.roomName})`"
:visible.sync="dialogVisible" width="80%" @close="handleClose">
<el-table :data="viewFeeDetailInfo.feeDetails" border style="width: 100%">
<el-table-column prop="cycles" :label="$t('viewFeeDetail.table.cycle')" align="center" />
<el-table-column prop="receivableAmount" :label="$t('viewFeeDetail.table.receivableAmount')" align="center" />
<el-table-column prop="receivedAmount" :label="$t('viewFeeDetail.table.receivedAmount')" align="center" />
<el-table-column prop="createTime" :label="$t('viewFeeDetail.table.payTime')" align="center" />
<el-table-column prop="startTime" :label="$t('viewFeeDetail.table.startTime')" align="center">
<template slot-scope="scope">
{{ $dayjs(scope.row.startTime).format('YYYY-MM-DD') }}
</template>
</el-table-column>
<el-table-column prop="endTime" :label="$t('viewFeeDetail.table.endTime')" align="center">
<template slot-scope="scope">
{{ $dayjs(scope.row.endTime).format('YYYY-MM-DD') }}
</template>
</el-table-column>
<el-table-column prop="stateName" :label="$t('viewFeeDetail.table.status')" align="center" />
<el-table-column prop="remark" :label="$t('viewFeeDetail.table.remark')" align="center" />
</el-table>
<el-pagination :current-page.sync="pagination.current" :page-size="pagination.size" :total="pagination.total"
layout="total, prev, pager, next, jumper" @current-change="handlePageChange" class="margin-top" />
</el-dialog>
</template>
<script>
import { queryFeeDetail } from '@/api/report/reportHuaningApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'ViewFeeDetail',
data() {
return {
dialogVisible: false,
viewFeeDetailInfo: {
feeDetails: [],
total: 0,
records: 1,
feeId: '',
configId: '',
payerObjId: '',
curYear: '',
roomName: ''
},
pagination: {
current: 1,
size: 10,
total: 0
}
}
},
methods: {
open(params) {
this.viewFeeDetailInfo = {
...this.viewFeeDetailInfo,
...params
}
this.dialogVisible = true
this.listFeeDetail()
},
handleClose() {
this.dialogVisible = false
this.pagination.current = 1
},
async listFeeDetail() {
try {
const params = {
page: this.pagination.current,
row: this.pagination.size,
communityId: getCommunityId(),
curYear: this.viewFeeDetailInfo.curYear,
configId: this.viewFeeDetailInfo.configId,
payerObjId: this.viewFeeDetailInfo.payerObjId
}
const { data, total } = await queryFeeDetail(params)
this.viewFeeDetailInfo.feeDetails = data
this.pagination.total = total
} catch (error) {
console.error('获取费用明细失败:', error)
}
},
handlePageChange(currentPage) {
this.pagination.current = currentPage
this.listFeeDetail()
}
}
}
</script>
<style lang="scss" scoped>
.margin-top {
margin-top: 20px;
}
</style>