Blame view

src/views/report/reportPayFeeDepositList.vue 16.1 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
71def04c   wuxw   优化优惠
2
3
4
5
6
7
8
9
10
11
    <div class="report-pay-fee-deposit-container animated fadeInRight">
      <!-- 查询条件 -->
      <el-card class="search-card">
        <div slot="header" class="flex justify-between">
          <span>{{ $t('reportPayFeeDeposit.search.title') }}</span>
        </div>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-row :gutter="20">
              <el-col :span="4">
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
12
13
14
15
16
17
                <el-select v-model="conditions.floorId" :placeholder="$t('reportPayFeeDeposit.search.floorName')"
                  @change="handleFloorChange" class="search-item" style="width:100%">
                  <el-option :label="$t('reportPayFeeDeposit.search.floorName')" value=""></el-option>
                  <el-option v-for="item in floors" :key="item.floorId" :label="item.floorName" :value="item.floorId">
                  </el-option>
                </el-select>
71def04c   wuxw   优化优惠
18
19
20
21
22
23
              </el-col>
              <el-col :span="4">
                <el-select v-model="conditions.unitId" :placeholder="$t('reportPayFeeDeposit.search.unit')"
                  class="search-item" style="width:100%">
                  <el-option :label="$t('reportPayFeeDeposit.search.unitPlaceholder')" value=""></el-option>
                  <el-option v-for="(unit, index) in roomUnits" :key="index"
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
24
                    :label="unit.unitNum" :value="unit.unitId">
71def04c   wuxw   优化优惠
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
                  </el-option>
                </el-select>
              </el-col>
              <el-col :span="4">
                <el-input v-model="conditions.roomNum" :placeholder="$t('reportPayFeeDeposit.search.roomNum')"
                  class="search-item">
                </el-input>
              </el-col>
              <el-col :span="4">
                <el-input v-model="conditions.feeId" :placeholder="$t('reportPayFeeDeposit.search.feeId')"
                  class="search-item">
                </el-input>
              </el-col>
              <el-col :span="4">
                <el-select v-model="conditions.configId" :placeholder="$t('reportPayFeeDeposit.search.feeName')"
                  class="search-item" style="width:100%">
                  <el-option :label="$t('reportPayFeeDeposit.search.feeNamePlaceholder')" value=""></el-option>
                  <el-option v-for="(item, index) in feeConfigs" :key="index" :label="item.feeName" :value="item.configId">
                  </el-option>
                </el-select>
              </el-col>
              <el-col :span="4">
                <el-button type="primary" @click="queryMethod">
                  <i class="el-icon-search"></i>
                  {{ $t('reportPayFeeDeposit.search.search') }}
                </el-button>
                <el-button @click="resetMethod" style="margin-left: 10px;">
                  <i class="el-icon-refresh"></i>
                  {{ $t('reportPayFeeDeposit.search.reset') }}
                </el-button>
              </el-col>
            </el-row>
            <el-row :gutter="20" style="margin-top: 15px;">
              <el-col :span="4">
                <el-select v-model="conditions.state" :placeholder="$t('reportPayFeeDeposit.search.state')"
                  class="search-item" style="width:100%">
                  <el-option :label="$t('reportPayFeeDeposit.search.statePlaceholder')" value=""></el-option>
                  <el-option v-for="(item, index) in states" :key="index" :label="item.name" :value="item.statusCd">
                  </el-option>
                </el-select>
              </el-col>
              <el-col :span="4">
                <el-select v-model="conditions.payerObjType" :placeholder="$t('reportPayFeeDeposit.search.payerObjType')"
                  class="search-item" style="width:100%">
                  <el-option :label="$t('reportPayFeeDeposit.search.payerObjTypePlaceholder')" value=""></el-option>
                  <el-option v-for="(item, index) in payerObjTypes" :key="index" :label="item.name" :value="item.statusCd">
                  </el-option>
                </el-select>
              </el-col>
              <el-col :span="4">
b25b036d   wuxw   v1.9 优化日期
75
                <el-date-picker v-model="conditions.startTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"                :placeholder="$t('reportPayFeeDeposit.search.startTime')" style="width:100%" >
71def04c   wuxw   优化优惠
76
77
78
                </el-date-picker>
              </el-col>
              <el-col :span="4">
b25b036d   wuxw   v1.9 优化日期
79
                <el-date-picker v-model="conditions.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"                :placeholder="$t('reportPayFeeDeposit.search.endTime')" style="width:100%" >
71def04c   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
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
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
                </el-date-picker>
              </el-col>
              <el-col :span="4">
                <el-select v-model="conditions.detailState" :placeholder="$t('reportPayFeeDeposit.search.detailState')"
                  class="search-item" style="width:100%">
                  <el-option :label="$t('reportPayFeeDeposit.search.detailStatePlaceholder')" value=""></el-option>
                  <template v-for="(item, index) in detailStates">
                    <el-option :key="index" :label="item.name" :value="item.statusCd" v-if="item.statusCd != '1300'">
                    </el-option>
                  </template>
                </el-select>
              </el-col>
            </el-row>
          </el-col>
        </el-row>
      </el-card>
  
      <!-- 押金报表 -->
      <el-card class="table-card">
        <div slot="header" class="flex justify-between">
          <div>
            <span>{{ $t('reportPayFeeDeposit.table.title') }}</span>
            <el-tooltip class="item" effect="dark" :content="$t('reportPayFeeDeposit.table.tooltip')" placement="top">
              <i class="el-icon-info" style="margin-left: 10px; cursor: pointer;"></i>
            </el-tooltip>
          </div>
          <el-button type="primary" size="small" style="float: right;" @click="exportFee">
            <i class="el-icon-download"></i>
            {{ $t('reportPayFeeDeposit.table.export') }}
          </el-button>
        </div>
        <el-table :data="depositFees" border style="width: 100%" v-loading="loading">
          <el-table-column prop="feeId" :label="$t('reportPayFeeDeposit.table.feeId')" align="center">
          </el-table-column>
          <el-table-column prop="objName" :label="$t('reportPayFeeDeposit.table.roomNum')" align="center">
          </el-table-column>
          <el-table-column prop="ownerName" :label="$t('reportPayFeeDeposit.table.owner')" align="center">
          </el-table-column>
          <el-table-column prop="feeTypeCdName" :label="$t('reportPayFeeDeposit.table.feeType')" align="center">
          </el-table-column>
          <el-table-column prop="feeName" :label="$t('reportPayFeeDeposit.table.feeName')" align="center">
          </el-table-column>
          <el-table-column prop="startTime" :label="$t('reportPayFeeDeposit.table.startTime')" align="center">
          </el-table-column>
          <el-table-column prop="deadlineTime" :label="$t('reportPayFeeDeposit.table.endTime')" align="center">
          </el-table-column>
          <el-table-column prop="createTime" :label="$t('reportPayFeeDeposit.table.createTime')" align="center">
          </el-table-column>
          <el-table-column prop="payerObjTypeName" :label="$t('reportPayFeeDeposit.table.payerObjType')" align="center">
          </el-table-column>
          <el-table-column prop="payerObjId" :label="$t('reportPayFeeDeposit.table.payerObjId')" align="center">
          </el-table-column>
          <el-table-column prop="additionalAmount" :label="$t('reportPayFeeDeposit.table.amount')" align="center">
          </el-table-column>
          <el-table-column prop="stateName" :label="$t('reportPayFeeDeposit.table.state')" align="center">
          </el-table-column>
          <el-table-column :label="$t('reportPayFeeDeposit.table.detailState')" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.state == '2009001'">{{ scope.row.detailStateName }}</span>
              <span v-else>{{ $t('reportPayFeeDeposit.table.unpaid') }}</span>
            </template>
          </el-table-column>
          <el-table-column :label="$t('reportPayFeeDeposit.table.operation')" align="center" width="120">
            <template slot-scope="scope">
              <el-button size="mini" @click="openPayFeeDetail(scope.row)">
                {{ $t('reportPayFeeDeposit.table.detail') }}
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.current"
          :page-sizes="[10, 20, 30, 50]" :page-size="page.size" layout="total, sizes, prev, pager, next, jumper"
          :total="total" style="margin-top: 20px;">
        </el-pagination>
        <el-row :gutter="20" style="margin-top: 20px;">
          <el-col :span="2">
            <div>
              <b>{{ $t('reportPayFeeDeposit.table.subtotal') }}</b>
            </div>
            <div style="margin-top: 10px;">
              <b>{{ $t('reportPayFeeDeposit.table.total') }}</b>
            </div>
          </el-col>
          <el-col :span="3">
            <div>
              {{ $t('reportPayFeeDeposit.table.unpaid') }}: {{ sumTotal.unpaidfeeAmount }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
            <div style="margin-top: 10px;">
              {{ $t('reportPayFeeDeposit.table.unpaid') }}: {{ sumTotal.unpaidfeeAmounts }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
          </el-col>
          <el-col :span="3">
            <div>
              {{ $t('reportPayFeeDeposit.table.paid') }}: {{ sumTotal.paidfeeAmount }} {{
                $t('reportPayFeeDeposit.table.yuan')
              }}
            </div>
            <div style="margin-top: 10px;">
              {{ $t('reportPayFeeDeposit.table.paid') }}: {{ sumTotal.paidfeeAmounts }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
          </el-col>
          <el-col :span="3">
            <div>
              {{ $t('reportPayFeeDeposit.table.refunded') }}: {{ sumTotal.refundedAmount }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
            <div style="margin-top: 10px;">
              {{ $t('reportPayFeeDeposit.table.refunded') }}: {{ sumTotal.refundedAmounts }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
          </el-col>
          <el-col :span="3">
            <div>
              {{ $t('reportPayFeeDeposit.table.refundInProgress') }}: {{ sumTotal.refundInProgressAmount }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
            <div style="margin-top: 10px;">
              {{ $t('reportPayFeeDeposit.table.refundInProgress') }}: {{ sumTotal.refundInProgressAmounts }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
          </el-col>
          <el-col :span="3">
            <div>
              {{ $t('reportPayFeeDeposit.table.refundFailed') }}: {{ sumTotal.refundFailedAmount }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
            <div style="margin-top: 10px;">
              {{ $t('reportPayFeeDeposit.table.refundFailed') }}: {{ sumTotal.refundFailedAmounts }} {{
                $t('reportPayFeeDeposit.table.yuan') }}
            </div>
          </el-col>
        </el-row>
      </el-card>
71def04c   wuxw   优化优惠
216
217
218
219
220
221
    </div>
  </template>
  
  <script>
  import { getCommunityId } from '@/api/community/communityApi'
  import { getDict } from '@/api/community/communityApi'
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
222
  import { queryPayFeeDeposit, queryFloors, queryUnits, exportData } from '@/api/report/reportPayFeeDepositApi'
71def04c   wuxw   优化优惠
223
224
225
  
  export default {
    name: 'ReportPayFeeDepositList',
71def04c   wuxw   优化优惠
226
227
228
229
230
231
    data() {
      return {
        loading: false,
        communityId: '',
        conditions: {
          floorId: '',
71def04c   wuxw   优化优惠
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
          roomNum: '',
          unitId: '',
          feeId: '',
          state: '',
          payerObjType: '',
          startTime: '',
          endTime: '',
          configId: '',
          detailState: '',
          feeTypeCd: '888800010006', // 押金
          communityId: '',
          page: 1,
          row: 10
        },
        depositFees: [],
        feeConfigs: [],
        states: [],
        payerObjTypes: [],
        detailStates: [],
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
251
        floors: [],
71def04c   wuxw   优化优惠
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
        roomUnits: [],
        sumTotal: {
          unpaidfeeAmount: 0,
          unpaidfeeAmounts: 0,
          paidfeeAmount: 0,
          paidfeeAmounts: 0,
          refundedAmount: 0,
          refundedAmounts: 0,
          refundInProgressAmount: 0,
          refundInProgressAmounts: 0,
          refundFailedAmount: 0,
          refundFailedAmounts: 0
        },
        page: {
          current: 1,
          size: 10,
          total: 0
        },
        total: 0
      }
    },
    created() {
      this.communityId = getCommunityId()
      this.conditions.communityId = this.communityId
      this.initData()
    },
    methods: {
      async initData() {
        try {
          // 获取字典数据
          await Promise.all([
            this.getDictData('pay_fee', 'state'),
            this.getDictData('pay_fee', 'payer_obj_type'),
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
285
286
            this.getDictData('pay_fee_detail', 'state'),
            this.loadFloors()
71def04c   wuxw   优化优惠
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
          ])
          this.listFees()
        } catch (error) {
          console.error('初始化数据失败:', error)
        }
      },
      async getDictData(dictType, state) {
        try {
          const data = await getDict(dictType, state)
          if (dictType === 'pay_fee' && state === 'state') {
            this.states = data
          } else if (dictType === 'pay_fee' && state === 'payer_obj_type') {
            this.payerObjTypes = data
          } else if (dictType === 'pay_fee_detail' && state === 'state') {
            this.detailStates = data
          }
        } catch (error) {
          console.error('获取字典数据失败:', error)
        }
      },
      async listFees() {
        this.loading = true
        try {
          const params = {
            ...this.conditions,
            page: this.page.current,
            row: this.page.size
          }
          const res = await queryPayFeeDeposit(params)
          this.depositFees = res.data
          this.total = res.total
          this.sumTotal = res.sumTotal
          if (res.data.length > 0) {
            this.feeConfigs = res.data[0].feeConfigDtos || []
          }
        } catch (error) {
          console.error('获取押金报表失败:', error)
        } finally {
          this.loading = false
        }
      },
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
328
329
330
331
332
333
334
335
336
337
338
339
340
      async loadFloors() {
        try {
          const params = {
            page: 1,
            row: 100,
            communityId: this.communityId
          }
          const data = await queryFloors(params)
          this.floors = data
        } catch (error) {
          console.error('加载楼栋数据失败:', error)
        }
      },
71def04c   wuxw   优化优惠
341
342
      async loadUnits(floorId) {
        try {
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
343
          const params = {
71def04c   wuxw   优化优惠
344
            floorId,
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
345
346
347
348
349
350
            communityId: this.communityId,
            page: 1,
            row: 100
          }
          const data = await queryUnits(params)
          this.roomUnits = data || []
71def04c   wuxw   优化优惠
351
352
353
354
        } catch (error) {
          console.error('获取单元列表失败:', error)
        }
      },
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
355
356
357
358
359
360
361
362
363
364
365
366
      async handleFloorChange(floorId) {
        try {
          this.conditions.unitId = ''
          this.roomUnits = []
  
          if (!floorId) return
  
          await this.loadUnits(floorId)
        } catch (error) {
          console.error('楼栋变化处理失败:', error)
        }
      },
71def04c   wuxw   优化优惠
367
368
369
370
371
372
373
      queryMethod() {
        this.page.current = 1
        this.listFees()
      },
      resetMethod() {
        this.conditions = {
          floorId: '',
71def04c   wuxw   优化优惠
374
375
376
377
378
379
380
381
382
383
384
385
386
387
          roomNum: '',
          unitId: '',
          feeId: '',
          state: '',
          payerObjType: '',
          startTime: '',
          endTime: '',
          configId: '',
          detailState: '',
          feeTypeCd: '888800010006',
          communityId: this.communityId,
          page: 1,
          row: 10
        }
baee4721   wuxw   v1.9 优化群里网友反馈的报表部...
388
        this.roomUnits = []
71def04c   wuxw   优化优惠
389
390
391
392
393
394
395
396
397
398
        this.listFees()
      },
      handleSizeChange(val) {
        this.page.size = val
        this.listFees()
      },
      handleCurrentChange(val) {
        this.page.current = val
        this.listFees()
      },
71def04c   wuxw   优化优惠
399
400
401
402
403
404
405
406
407
408
409
410
411
      async exportFee() {
        try {
          this.conditions.pagePath = 'reportPayFeeDeposit'
          const res = await exportData(this.conditions)
          this.$message.success(res.msg)
          if (res.code === 0) {
            this.$router.push('/pages/property/downloadTempFile?tab=下载中心')
          }
        } catch (error) {
          console.error('导出失败:', error)
        }
      },
      openPayFeeDetail(fee) {
6d21390a   wuxw   开发车辆详情页面
412
        this.$router.push(`/views/fee/propertyFee?feeId=${fee.feeId}`)
71def04c   wuxw   优化优惠
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .report-pay-fee-deposit-container {
    padding: 20px;
  
    .search-card {
      margin-bottom: 20px;
  
      .search-item {
        margin-bottom: 15px;
      }
    }
  
    .table-card {
      margin-bottom: 20px;
    }
  }
  </style>