feeDetailHisFee.vue
4.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
99
100
101
102
103
104
105
106
107
108
109
110
111
<template>
<div>
<el-row>
<el-col :span="24" class="text-right"></el-col>
</el-row>
<div class="margin-top">
<el-table :data="feeDetailHisFeeInfo.feeDetails" style="width: 100%">
<el-table-column prop="feeName" :label="$t('feeDetailHisFee.feeName')" align="center"></el-table-column>
<el-table-column prop="payerObjName" :label="$t('feeDetailHisFee.payerObjName')"
align="center"></el-table-column>
<el-table-column prop="cycles" :label="$t('feeDetailHisFee.cycles')" align="center"></el-table-column>
<el-table-column :label="$t('feeDetailHisFee.amount')" align="center">
<template slot-scope="scope">
{{ scope.row.receivableAmount }}/{{ scope.row.receivedAmount }}<br>
<div v-if="scope.row.acctAmount > 0">
{{ $t('feeDetailHisFee.accountDeduction') }}: {{ scope.row.acctAmount }}<br>
</div>
<div v-for="(item, index) in scope.row.payFeeDetailDiscountDtoList" :key="index">
{{ item.discountName }}: {{ Math.abs(item.discountPrice) }}<br>
</div>
</template>
</el-table-column>
<el-table-column prop="primeRateName" :label="$t('feeDetailHisFee.paymentMethod')"
align="center"></el-table-column>
<el-table-column :label="$t('feeDetailHisFee.paymentPeriod')" align="center">
<template slot-scope="scope">
{{ dateFormat(scope.row.startTime) }}~<br>
{{ dateFormat(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('feeDetailHisFee.paymentTime')" align="center"></el-table-column>
<el-table-column prop="cashierName" :label="$t('feeDetailHisFee.cashier')" align="center">
<template slot-scope="scope">{{ scope.row.cashierName || '-' }}</template>
</el-table-column>
<el-table-column prop="stateName" :label="$t('feeDetailHisFee.status')" align="center"></el-table-column>
<el-table-column prop="remark" :label="$t('feeDetailHisFee.remark')" align="center"></el-table-column>
<el-table-column :label="$t('feeDetailHisFee.operation')" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.state == '1400' || scope.row.state == '1200' || scope.row.state == ''" size="mini"
@click="_toRefundFee(scope.row)">
{{ $t('feeDetailHisFee.detail') }}
</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="margin-top">
<el-col :span="12"></el-col>
<el-col :span="12">
<el-pagination @current-change="handleCurrentChange" :current-page="pagination.currentPage"
:page-size="pagination.pageSize" layout="total, prev, pager, next" :total="pagination.total">
</el-pagination>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { queryFeeDetail } from '@/api/fee/feeDetailHisFeeApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'FeeDetailHisFee',
data() {
return {
feeDetailHisFeeInfo: {
feeDetails: [],
feeId: ''
},
pagination: {
currentPage: 1,
pageSize: 10,
total: 0
}
}
},
methods: {
open(params) {
this.feeDetailHisFeeInfo.feeId = params.feeId
this._loadFeeDetailHisFeeData()
},
_loadFeeDetailHisFeeData() {
const params = {
communityId: getCommunityId(),
feeId: this.feeDetailHisFeeInfo.feeId,
page: this.pagination.currentPage,
row: this.pagination.pageSize
}
queryFeeDetail(params).then(res => {
this.feeDetailHisFeeInfo.feeDetails = res.feeDetails
this.pagination.total = res.total
}).catch(error => {
console.error('Failed to load fee detail history:', error)
})
},
handleCurrentChange(val) {
this.pagination.currentPage = val
this._loadFeeDetailHisFeeData()
},
_toRefundFee(detail) {
this.$router.push(`/views/fee/propertyFee?feeId=${detail.feeId}`)
},
dateFormat(date) {
return this.$moment(date).format('YYYY-MM-DD')
}
}
}
</script>