b25b036d
wuxw
v1.9 优化日期
|
1
|
<template>
|
27dcfde5
wuxw
系统全面测试完成
|
2
|
<div class="community-integral-container ">
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
3
4
|
<el-card>
<div class="white-bg border-radius">
|
27dcfde5
wuxw
系统全面测试完成
|
5
|
<div class="flex justify-between">
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
6
|
<span>{{ $t('communityIntegral.title') }}</span>
|
27dcfde5
wuxw
系统全面测试完成
|
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
|
</div>
<!-- 业主信息 -->
<div class="margin-top">
<el-row>
<el-col :span="8">
<div class="form-group">
<label class="col-form-label">
{{ $t('communityIntegral.accountId') }}
</label>
<label>{{ communityIntegralInfo.integralId }}</label>
</div>
</el-col>
<el-col :span="8">
<div class="form-group">
<label class="col-form-label">
{{ $t('communityIntegral.accountName') }}
</label>
<label>{{ communityIntegralInfo.integralName }}</label>
</div>
</el-col>
<el-col :span="8">
<div class="form-group">
<label class="col-form-label">
{{ $t('communityIntegral.points') }}
</label>
<label>
{{ communityIntegralInfo.amount }}
<el-link type="primary" @click="openApplyWithholdIntegral">{{ $t('communityIntegral.withdraw')
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
36
|
}}</el-link>
|
27dcfde5
wuxw
系统全面测试完成
|
37
38
39
40
41
42
43
44
|
</label>
</div>
</el-col>
</el-row>
</div>
<divider></divider>
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
45
|
<div class="margin-top">
|
27dcfde5
wuxw
系统全面测试完成
|
46
47
48
49
50
51
52
53
54
55
56
57
|
<el-tabs v-model="communityIntegralInfo._currentTab"
@tab-click="changeTab(communityIntegralInfo._currentTab)">
<el-tab-pane :label="$t('communityIntegral.transactionDetails')" name="communityIntegralDetail">
<community-integral-detail v-if="communityIntegralInfo._currentTab === 'communityIntegralDetail'"
ref="communityIntegralDetail" />
</el-tab-pane>
<el-tab-pane :label="$t('communityIntegral.pointsWithdrawal')" name="applyWithholdIntegral">
<apply-withhold-integral v-if="communityIntegralInfo._currentTab === 'applyWithholdIntegral'"
ref="applyWithholdIntegral" />
</el-tab-pane>
</el-tabs>
</div>
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
58
59
|
</div>
|
27dcfde5
wuxw
系统全面测试完成
|
60
61
62
|
<withhold-integral ref="withholdIntegral" @success="handleWithdrawSuccess" />
</el-card>
</div>
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
63
64
65
66
67
68
69
70
|
</template>
<script>
import { getCommunityId } from '@/api/community/communityApi'
import { queryCommunityIntegral } from '@/api/scm/communityIntegralApi'
import CommunityIntegralDetail from '@/components/scm/communityIntegralDetail'
import ApplyWithholdIntegral from '@/components/scm/applyWithholdIntegral'
import WithholdIntegral from '@/components/scm/withholdIntegral'
|
27dcfde5
wuxw
系统全面测试完成
|
71
|
import divider from '@/components/system/divider'
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
72
73
74
75
76
77
|
export default {
name: 'CommunityIntegralList',
components: {
CommunityIntegralDetail,
ApplyWithholdIntegral,
|
27dcfde5
wuxw
系统全面测试完成
|
78
79
|
WithholdIntegral,
divider
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
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
|
},
data() {
return {
communityIntegralInfo: {
integralId: "",
integralName: '',
amount: "",
communityName: "",
communityId: "",
_currentTab: 'communityIntegralDetail'
}
}
},
created() {
this.communityIntegralInfo.communityId = getCommunityId()
this.loadCommunityIntegralInfo()
},
methods: {
async loadCommunityIntegralInfo() {
try {
const params = {
page: 1,
row: 1,
communityId: this.communityIntegralInfo.communityId
}
const { data } = await queryCommunityIntegral(params)
if (data && data.length > 0) {
this.communityIntegralInfo = {
...this.communityIntegralInfo,
...data[0]
}
this.changeTab(this.communityIntegralInfo._currentTab)
}
} catch (error) {
console.error('Failed to load community integral info:', error)
}
},
changeTab(tab) {
this.communityIntegralInfo._currentTab = tab
setTimeout(() => {
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
120
121
122
123
124
125
|
this.$refs[tab].open({
integralId: this.communityIntegralInfo.integralId,
integralName: this.communityIntegralInfo.integralName,
amount: this.communityIntegralInfo.amount,
communityId: this.communityIntegralInfo.communityId
})
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
}, 500);
},
openApplyWithholdIntegral() {
this.$refs.withholdIntegral.open({
integralId: this.communityIntegralInfo.integralId,
amount: this.communityIntegralInfo.amount,
communityId: this.communityIntegralInfo.communityId
})
},
handleWithdrawSuccess() {
this.communityIntegralInfo._currentTab = 'applyWithholdIntegral'
this.changeTab(this.communityIntegralInfo._currentTab)
this.loadCommunityIntegralInfo()
}
}
}
</script>
<style scoped>
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
145
146
147
|
.community-integral-container {
margin:20px
}
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
148
149
150
151
152
|
.white-bg {
background-color: #fff;
}
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
153
|
.padding-lg {}
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
154
|
|
ab44ac83
wuxw
v1.9 测试优惠相关功能 修复部...
|
155
|
.padding-top {}
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
.border-radius {
border-radius: 4px;
}
.margin-top {
margin-top: 20px;
}
.margin-top-sm {
margin-top: 10px;
}
.flex {
display: flex;
}
.justify-between {
justify-content: space-between;
}
.form-group {
margin-bottom: 20px;
}
.col-form-label {
|
6ed9faf1
wuxw
开发完成优惠下的积分功能
|
182
183
184
|
margin-right: 10px;
}
</style>
|