51f9221a
wuxw
加入报表功能
|
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
|
<template>
<div class="report-fee-detail-container">
<!-- 查询条件 -->
<el-card class="search-card">
<div slot="header" class="flex justify-between">
<span>{{ $t('reportFeeDetail.search.title') }}</span>
<div class="header-tools">
<el-button type="text" @click="toggleMoreCondition" style="margin-right:10px;">
{{ reportFeeDetailInfo.moreCondition ? $t('reportFeeDetail.hide') : $t('reportFeeDetail.more') }}
</el-button>
</div>
</div>
<el-row :gutter="20">
<el-col :span="6">
<el-date-picker v-model="reportFeeDetailInfo.conditions.startDate" type="date"
:placeholder="$t('reportFeeDetail.placeholder.startDate')" style="width:100%">
</el-date-picker>
</el-col>
<el-col :span="6">
<el-date-picker v-model="reportFeeDetailInfo.conditions.endDate" type="date"
:placeholder="$t('reportFeeDetail.placeholder.endDate')" style="width:100%">
</el-date-picker>
</el-col>
<el-col :span="6">
<el-input v-model.trim="reportFeeDetailInfo.conditions.objName"
:placeholder="$t('reportFeeDetail.placeholder.objName')">
</el-input>
</el-col>
<el-col :span="6">
<el-button type="primary" @click="queryMethod">
<i class="el-icon-search"></i>
{{ $t('common.search') }}
</el-button>
<el-button @click="resetMethod">
<i class="el-icon-refresh"></i>
{{ $t('common.reset') }}
</el-button>
</el-col>
</el-row>
<el-row :gutter="20" v-show="reportFeeDetailInfo.moreCondition">
<el-col :span="6">
<el-input v-model.trim="reportFeeDetailInfo.conditions.ownerName"
:placeholder="$t('reportFeeDetail.placeholder.ownerName')">
</el-input>
</el-col>
<el-col :span="6">
<el-input v-model.trim="reportFeeDetailInfo.conditions.link"
:placeholder="$t('reportFeeDetail.placeholder.link')">
</el-input>
</el-col>
<el-col :span="6" v-if="reportFeeDetailInfo.communitys.length > 1">
<el-select v-model="reportFeeDetailInfo.conditions.communityId" @change="changCommunity" style="width:100%">
<el-option disabled :value="''" :label="$t('reportFeeDetail.placeholder.community')">
</el-option>
<el-option v-for="(item, index) in reportFeeDetailInfo.communitys" :key="index" :label="item.name"
:value="item.communityId">
</el-option>
</el-select>
</el-col>
</el-row>
</el-card>
<!-- 内容区域 -->
<el-card class="content-card">
<el-tabs v-model="reportFeeDetailInfo._currentTab" @tab-click="changeTab">
<el-tab-pane label="房屋费用明细" name="reportFeeDetailRoom">
<report-fee-detail-room v-if="reportFeeDetailInfo._currentTab === 'reportFeeDetailRoom'"
ref="reportFeeDetailRoom">
</report-fee-detail-room>
</el-tab-pane>
<el-tab-pane label="业主费用明细" name="reportFeeDetailOwner">
<report-fee-detail-owner v-if="reportFeeDetailInfo._currentTab === 'reportFeeDetailOwner'"
ref="reportFeeDetailOwner">
</report-fee-detail-owner>
</el-tab-pane>
<el-tab-pane label="合同费用明细" name="reportFeeDetailContract">
<report-fee-detail-contract v-if="reportFeeDetailInfo._currentTab === 'reportFeeDetailContract'"
ref="reportFeeDetailContract">
</report-fee-detail-contract>
</el-tab-pane>
<el-tab-pane label="车辆费用明细" name="reportFeeDetailCar">
|
51f9221a
wuxw
加入报表功能
|
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
</report-fee-detail-car>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<script>
import { getCommunityId } from '@/api/community/communityApi'
import ReportFeeDetailRoom from '@/components/report/reportFeeDetailRoom'
import ReportFeeDetailOwner from '@/components/report/reportFeeDetailOwner'
import ReportFeeDetailContract from '@/components/report/reportFeeDetailContract'
import ReportFeeDetailCar from '@/components/report/reportFeeDetailCar'
import { loadStaffCommunitys } from '@/api/report/reportFeeDetailApi'
export default {
name: 'ReportFeeDetailList',
components: {
ReportFeeDetailRoom,
ReportFeeDetailOwner,
ReportFeeDetailContract,
ReportFeeDetailCar
},
data() {
return {
reportFeeDetailInfo: {
_currentTab: 'reportFeeDetailRoom',
floors: [],
moreCondition: false,
communitys: [],
conditions: {
floorId: '',
objName: '',
startDate: '',
endDate: '',
configId: '',
feeTypeCd: '',
ownerName: '',
link: '',
communityId: ''
}
}
}
},
created() {
this.initDate()
this.loadStaffCommunitys()
this.reportFeeDetailInfo.conditions.communityId = getCommunityId()
this.changeTab(this.reportFeeDetailInfo._currentTab)
},
methods: {
initDate() {
const now = new Date()
const year = now.getFullYear()
let month = now.getMonth() + 1
month = month < 10 ? `0${month}` : month
this.reportFeeDetailInfo.conditions.startDate = `${year}-${month}-01`
const nextMonth = new Date(year, month, 1)
const nextYear = nextMonth.getFullYear()
let nextMonthNum = nextMonth.getMonth() + 1
nextMonthNum = nextMonthNum < 10 ? `0${nextMonthNum}` : nextMonthNum
this.reportFeeDetailInfo.conditions.endDate = `${nextYear}-${nextMonthNum}-01`
},
async loadStaffCommunitys() {
try {
const params = {
_uid: '123mlkdinkldldijdhuudjdjkkd',
page: 1,
row: 100
}
const data = await loadStaffCommunitys(params)
this.reportFeeDetailInfo.communitys = data.communitys
} catch (error) {
console.error('加载小区列表失败:', error)
}
},
changeTab(tab) {
this.reportFeeDetailInfo._currentTab = tab.name || tab
setTimeout(() => {
this.$refs[tab.name || tab].open(this.reportFeeDetailInfo.conditions)
|
51f9221a
wuxw
加入报表功能
|
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
},
queryMethod() {
this.changeTab(this.reportFeeDetailInfo._currentTab)
},
resetMethod() {
this.reportFeeDetailInfo.conditions = {
floorId: '',
objName: '',
startDate: '',
endDate: '',
configId: '',
feeTypeCd: '',
ownerName: '',
link: '',
communityId: getCommunityId()
}
this.initDate()
this.changeTab(this.reportFeeDetailInfo._currentTab)
},
changCommunity() {
this.changeTab(this.reportFeeDetailInfo._currentTab)
},
toggleMoreCondition() {
this.reportFeeDetailInfo.moreCondition = !this.reportFeeDetailInfo.moreCondition
}
}
}
</script>
<style lang="scss" scoped>
.report-fee-detail-container {
padding: 20px;
.search-card {
margin-bottom: 20px;
.header-tools {
float: right;
}
}
.content-card {
width: 100%;
}
}
</style>
|