contractDetailHisFee.vue
4.51 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
112
113
114
115
116
117
118
119
<template>
<div class="margin-top">
<el-table :data="contractDetailHisFeeInfo.feeDetails" style="width: 100%" border stripe>
<el-table-column prop="feeName" :label="$t('contractDetailHisFee.feeItem')" align="center"></el-table-column>
<el-table-column prop="payerObjName" :label="$t('contractDetailHisFee.payer')" align="center"></el-table-column>
<el-table-column prop="cycles" :label="$t('contractDetailHisFee.cycle')" align="center"></el-table-column>
<el-table-column :label="$t('contractDetailHisFee.receivableAmount')" align="center">
<template slot-scope="scope">
{{ scope.row.receivableAmount }}/{{ scope.row.receivedAmount }}<br>
<div v-if="scope.row.acctAmount > 0">
{{ $t('contractDetailHisFee.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('contractDetailHisFee.paymentMethod')"
align="center"></el-table-column>
<el-table-column :label="$t('contractDetailHisFee.paymentPeriod')" align="center">
<template slot-scope="scope">
{{ $options.filters.dateFormat(scope.row.startTime) }}~<br />
{{ $options.filters.dateFormat(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('contractDetailHisFee.paymentTime')"
align="center"></el-table-column>
<el-table-column prop="cashierName" :label="$t('contractDetailHisFee.cashier')" align="center">
<template slot-scope="scope">
{{ scope.row.cashierName || '-' }}
</template>
</el-table-column>
<el-table-column prop="stateName" :label="$t('contractDetailHisFee.status')" align="center"></el-table-column>
<el-table-column prop="remark" :label="$t('contractDetailHisFee.remark')" align="center"></el-table-column>
<el-table-column :label="$t('contractDetailHisFee.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('contractDetailHisFee.detail') }}
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination @current-change="handlePageChange" :current-page="pagination.currentPage"
:page-size="pagination.pageSize" layout="total, prev, pager, next" :total="pagination.total"
class="margin-top"></el-pagination>
</div>
</template>
<script>
import { queryFeeDetail } from '@/api/contract/contractDetailHisFeeApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'ContractDetailHisFee',
data() {
return {
contractDetailHisFeeInfo: {
total: 0,
records: 1,
feeDetails: [],
contractId: ''
},
pagination: {
currentPage: 1,
pageSize: 10,
total: 0
}
}
},
methods: {
open(data) {
this.contractDetailHisFeeInfo.contractId = data.contractId
this._listContractDetailHisFeeDetails(1, this.pagination.pageSize)
},
_listContractDetailHisFeeDetails(page, row) {
const params = {
page: page || 1,
row: row || 10,
communityId: this.communityId,
payerObjId: this.contractDetailHisFeeInfo.contractId,
}
queryFeeDetail(params).then(response => {
this.contractDetailHisFeeInfo.total = response.total
this.contractDetailHisFeeInfo.records = response.records
this.contractDetailHisFeeInfo.feeDetails = response.feeDetails
this.pagination.total = response.total
}).catch(error => {
console.error('请求失败:', error)
})
},
clearContractDetailHisFeeInfo() {
this.contractDetailHisFeeInfo = {
total: 0,
records: 1,
feeDetails: [],
contractId: ''
}
},
_toRefundFee(detail) {
this.$router.push(`/property/propertyFee?feeId=${detail.feeId}`)
},
handlePageChange(currentPage) {
this.pagination.currentPage = currentPage
this._listContractDetailHisFeeDetails(currentPage, this.pagination.pageSize)
}
},
created() {
this.communityId = getCommunityId()
}
}
</script>
<style scoped>
.margin-top {
margin-top: 20px;
}
</style>