b25b036d
wuxw
v1.9 优化日期
|
1
|
<template>
|
07e12785
wuxw
v1.9 admin账户中部分页面...
|
2
|
<div class="community-payment-container padding">
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
3
|
<el-row :gutter="20">
|
65dba003
wuxw
开发完成admin功能
|
4
5
6
|
<el-col :span="4" class="">
<select-admin-community :community-id="searchForm.communityId"
@changeCommunity="handleChangeCommunity" />
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
7
8
9
|
</el-col>
<el-col :span="20">
<el-card class="search-card">
|
65dba003
wuxw
开发完成admin功能
|
10
|
<div slot="header" class="flex justify-between">
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
11
12
|
<span>{{ $t('communityPayment.search') }}</span>
</div>
|
65dba003
wuxw
开发完成admin功能
|
13
|
<el-form :inline="true" :model="searchForm" class="text-left">
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
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
|
<el-form-item>
<el-input
v-model="searchForm.paymentName"
:placeholder="$t('communityPayment.paymentName')"
clearable
/>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.state"
:placeholder="$t('communityPayment.selectStatus')"
clearable
>
<el-option value="" :label="$t('communityPayment.selectStatus')" />
<el-option value="Y" :label="$t('communityPayment.enabled')" />
<el-option value="N" :label="$t('communityPayment.disabled')" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">
{{ $t('communityPayment.search') }}
</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="list-card">
|
65dba003
wuxw
开发完成admin功能
|
41
|
<div slot="header" class="flex justify-between">
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
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
|
<span>{{ $t('communityPayment.title') }}</span>
<el-button
v-if="searchForm.communityId"
type="primary"
size="mini"
style="float: right"
@click="openAddDialog"
>
{{ $t('communityPayment.add') }}
</el-button>
</div>
<el-table :data="payments" border stripe>
<el-table-column prop="paymentName" :label="$t('communityPayment.paymentName')" align="center" />
<el-table-column prop="communityName" :label="$t('communityPayment.communityName')" align="center" />
<el-table-column prop="paymentTypeName" :label="$t('communityPayment.paymentVendor')" align="center" />
<el-table-column :label="$t('communityPayment.paymentScope')" align="center">
<template slot-scope="{ row }">
<span v-if="row.payType === '1001'">{{ $t('communityPayment.communityFee') }}</span>
<span v-else-if="row.payType === '2002'">{{ $t('communityPayment.tempParkingFee') }}</span>
<span v-else>{{ $t('communityPayment.specificFee') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('communityPayment.status')" align="center">
<template slot-scope="{ row }">
{{ row.state === 'Y' ? $t('communityPayment.enabled') : $t('communityPayment.disabled') }}
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('communityPayment.createTime')" align="center" />
<el-table-column prop="remark" :label="$t('communityPayment.instruction')" align="center" />
<el-table-column :label="$t('communityPayment.operation')" align="center" width="180">
<template slot-scope="{ row }">
<el-button size="mini" @click="openEditDialog(row)">{{ $t('communityPayment.edit') }}</el-button>
<el-button size="mini" type="danger" @click="openDeleteDialog(row)">
{{ $t('communityPayment.delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="pagination.current"
:page-sizes="[10, 20, 30, 50]"
:page-size="pagination.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handlePageChange"
/>
</el-card>
</el-col>
</el-row>
<add-community-payment ref="addDialog" @success="handleSuccess" />
<edit-community-payment ref="editDialog" @success="handleSuccess" />
<delete-community-payment ref="deleteDialog" @success="handleSuccess" />
</div>
</template>
<script>
|
65dba003
wuxw
开发完成admin功能
|
101
|
import SelectAdminCommunity from '@/components/community/selectAdminCommunity'
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
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
138
139
140
141
142
143
144
145
146
147
148
|
import AddCommunityPayment from '@/components/fee/AddCommunityPayment'
import EditCommunityPayment from '@/components/fee/EditCommunityPayment'
import DeleteCommunityPayment from '@/components/fee/DeleteCommunityPayment'
import { listAdminPayment } from '@/api/fee/communityPaymentApi'
export default {
name: 'CommunityPaymentList',
components: {
SelectAdminCommunity,
AddCommunityPayment,
EditCommunityPayment,
DeleteCommunityPayment
},
data() {
return {
searchForm: {
paymentName: '',
state: '',
communityId: ''
},
payments: [],
pagination: {
current: 1,
size: 10,
total: 0
}
}
},
created() {
this.fetchPayments()
},
methods: {
async fetchPayments() {
try {
const params = {
...this.searchForm,
page: this.pagination.current,
row: this.pagination.size
}
const res = await listAdminPayment(params)
this.payments = res.data || []
this.pagination.total = res.total || 0
} catch (error) {
console.error('Failed to fetch payments:', error)
this.$message.error(this.$t('communityPayment.fetchError'))
}
},
|
65dba003
wuxw
开发完成admin功能
|
149
|
handleChangeCommunity(community) {
|
1f3f7892
wuxw
开发完成admin 系统小区公众号
|
150
151
152
153
154
155
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
this.searchForm.communityId = community.communityId
this.fetchPayments()
},
handleSearch() {
this.pagination.current = 1
this.fetchPayments()
},
handleSizeChange(size) {
this.pagination.size = size
this.fetchPayments()
},
handlePageChange(page) {
this.pagination.current = page
this.fetchPayments()
},
openAddDialog() {
this.$refs.addDialog.open({
communityId: this.searchForm.communityId
})
},
openEditDialog(row) {
this.$refs.editDialog.open(row)
},
openDeleteDialog(row) {
this.$refs.deleteDialog.open(row)
},
handleSuccess() {
this.fetchPayments()
}
}
}
</script>
<style lang="scss" scoped>
.community-payment-container {
height: calc(100vh - 84px);
.tree-container {
height: calc(100vh - 140px);
overflow-y: auto;
}
.search-card, .list-card {
margin-bottom: 20px;
}
}
</style>
|