1a0bdbe0
wuxw
优化缴费页面
|
1
|
<template>
|
1a0bdbe0
wuxw
优化缴费页面
|
2
|
<el-card v-if="feeCoupons.length > 0">
|
ab1ebb3c
wuxw
缴费支持 押金 优惠券 优惠折扣 ...
|
3
|
<div slot="header" class="flex justify-between">
|
1a0bdbe0
wuxw
优化缴费页面
|
4
5
6
|
<span>{{ $t('payFeeCoupon.couponInfo') }}</span>
</div>
|
ab1ebb3c
wuxw
缴费支持 押金 优惠券 优惠折扣 ...
|
7
8
9
10
|
<el-table :data="feeCoupons" border style="width: 100%">
<el-table-column prop="ruleName" align="center" :label="$t('payFeeCoupon.ruleName')" />
<el-table-column prop="couponName" align="center" :label="$t('payFeeCoupon.couponName')" />
<el-table-column prop="quantity" align="center" :label="$t('payFeeCoupon.quantity')">
|
1a0bdbe0
wuxw
优化缴费页面
|
11
12
13
14
|
<template slot-scope="scope">
{{ scope.row.quantity }}{{ $t('payFeeCoupon.unit') }}
</template>
</el-table-column>
|
ab1ebb3c
wuxw
缴费支持 押金 优惠券 优惠折扣 ...
|
15
|
<el-table-column prop="toTypeName" align="center" :label="$t('payFeeCoupon.purpose')" />
|
1a0bdbe0
wuxw
优化缴费页面
|
16
17
|
</el-table>
</el-card>
|
1a0bdbe0
wuxw
优化缴费页面
|
18
19
20
21
|
</template>
<script>
import { getCommunityId } from '@/api/community/communityApi'
|
ab1ebb3c
wuxw
缴费支持 押金 优惠券 优惠折扣 ...
|
22
|
import { computePayFeeCoupon } from '@/api/fee/payFeeOrderApi'
|
1a0bdbe0
wuxw
优化缴费页面
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
export default {
name: 'PayFeeCoupon',
data() {
return {
dialogVisible: false,
feeCoupons: [],
feeId: '',
communityId: '',
cycles: 1,
endTime: ''
}
},
methods: {
open(params) {
this.feeId = params.feeId
this.cycles = params.cycles || 1
this.endTime = params.endTime || ''
this.listFeeCoupons()
|
1a0bdbe0
wuxw
优化缴费页面
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
},
close() {
this.dialogVisible = false
},
async listFeeCoupons() {
try {
this.communityId = await getCommunityId()
const params = {
page: 1,
row: 20,
feeId: this.feeId,
communityId: this.communityId,
cycles: this.cycles,
endTime: this.endTime
}
|
ab1ebb3c
wuxw
缴费支持 押金 优惠券 优惠折扣 ...
|
58
59
|
const response = await computePayFeeCoupon(params)
this.feeCoupons = response.data || []
|
1a0bdbe0
wuxw
优化缴费页面
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
} catch (error) {
console.error('查询优惠券信息失败:', error)
}
},
handleClose() {
this.feeCoupons = []
}
}
}
</script>
<style scoped>
.el-table {
margin-top: 20px;
}
</style>
|