feeDetailMonthFee.vue
4.95 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<template>
<div>
<el-row>
<el-col :span="24" class="text-right"></el-col>
</el-row>
<div class="margin-top">
<el-table :data="feeDetailMonthFeeInfo.monthFees" style="width: 100%">
<el-table-column prop="feeName" :label="$t('feeDetailMonthFee.feeItem')" align="center"></el-table-column>
<el-table-column prop="feeFlagName" :label="$t('feeDetailMonthFee.feeFlag')" align="center"></el-table-column>
<el-table-column prop="feeTypeCdName" :label="$t('feeDetailMonthFee.feeType')" align="center"></el-table-column>
<el-table-column :label="$t('feeDetailMonthFee.chargeYearMonth')" align="center">
<template slot-scope="scope">{{scope.row.detailYear}}-{{scope.row.detailMonth}}</template>
</el-table-column>
<el-table-column prop="receivableAmount" :label="$t('feeDetailMonthFee.receivableAmount')" align="center"></el-table-column>
<el-table-column :label="$t('feeDetailMonthFee.description')" align="center">
<template slot-scope="scope">
<div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
<div>
<span>{{$t('feeDetailMonthFee.lastDegrees')}}</span>{{scope.row.preDegrees}}
</div>
<div>
<span>{{$t('feeDetailMonthFee.currentDegrees')}}</span>{{scope.row.curDegrees}}
</div>
<div>
<span>{{$t('feeDetailMonthFee.unitPrice')}}</span>{{getOnePrice1(scope.row)}}
</div>
<div>
<span>{{$t('feeDetailMonthFee.additionalFee')}}</span>{{scope.row.additionalAmount}}
</div>
</div>
<div v-else-if="scope.row.computingFormula == '6006'">
<div>
<span>{{$t('feeDetailMonthFee.usage')}}</span>{{_getAttrValue(scope.row.feeAttrs,'390006')}}
</div>
<div>
<span>{{$t('feeDetailMonthFee.unitPrice')}}</span>{{scope.row.squarePrice}}
</div>
<div>
<span>{{$t('feeDetailMonthFee.additionalFee')}}</span>{{scope.row.additionalAmount}}
</div>
</div>
<div v-else-if="scope.row.feeTypeCd == '888800010017'" width="150">
<div>
<span>{{$t('feeDetailMonthFee.algorithm')}}</span>{{_getAttrValue(scope.row.feeAttrs,'390005')}}
</div>
<div>
<span>{{$t('feeDetailMonthFee.usage')}}</span>{{_getAttrValue(scope.row.feeAttrs,'390003')}}
</div>
</div>
<div v-else>
<div>
<span>{{$t('feeDetailMonthFee.unitPrice')}}</span>{{scope.row.squarePrice}}
</div>
<div v-if="scope.row.feeFlag == '1003006'">
<span>{{$t('feeDetailMonthFee.additionalFee')}}</span>{{scope.row.additionalAmount}}
</div>
<div v-else>
<span>{{$t('feeDetailMonthFee.fixedFee')}}</span>{{scope.row.additionalAmount}}
</div>
</div>
</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 { listMonthFee } from '@/api/fee/feeDetailMonthFeeApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'FeeDetailMonthFee',
data() {
return {
feeDetailMonthFeeInfo: {
monthFees: [],
feeId: ''
},
pagination: {
currentPage: 1,
pageSize: 10,
total: 0
}
}
},
methods: {
open(params) {
this.feeDetailMonthFeeInfo.feeId = params.feeId
this._loadFeeDetailMonthFeeData()
},
_loadFeeDetailMonthFeeData() {
const params = {
communityId: getCommunityId(),
feeId: this.feeDetailMonthFeeInfo.feeId,
detailId: '-1',
page: this.pagination.currentPage,
row: this.pagination.pageSize
}
listMonthFee(params).then(res => {
this.feeDetailMonthFeeInfo.monthFees = res.data
this.pagination.total = res.total
}).catch(error => {
console.error('Failed to load month fee details:', error)
})
},
handleCurrentChange(val) {
this.pagination.currentPage = val
this._loadFeeDetailMonthFeeData()
},
getOnePrice1(fee) {
// Implement your logic here
return fee.squarePrice || '-'
},
_getAttrValue(attrs, code) {
if (!attrs) return '-'
const attr = attrs.find(item => item.specCd === code)
return attr ? attr.value : '-'
}
}
}
</script>