Blame view

src/components/report/viewFeeDetail.vue 3.23 KB
8db44267   wuxw   开始开发报表功能
1
  <template>
71def04c   wuxw   优化优惠
2
3
4
5
6
7
8
9
    <el-dialog :title="`${viewFeeDetailInfo.curYear}${$t('viewFeeDetail.title')}(${viewFeeDetailInfo.roomName})`"
      :visible.sync="dialogVisible" width="80%" @close="handleClose">
      <el-table :data="viewFeeDetailInfo.feeDetails" border style="width: 100%">
        <el-table-column prop="cycles" :label="$t('viewFeeDetail.table.cycle')" align="center" />
        <el-table-column prop="receivableAmount" :label="$t('viewFeeDetail.table.receivableAmount')" align="center" />
        <el-table-column prop="receivedAmount" :label="$t('viewFeeDetail.table.receivedAmount')" align="center" />
        <el-table-column prop="createTime" :label="$t('viewFeeDetail.table.payTime')" align="center" />
        <el-table-column prop="startTime" :label="$t('viewFeeDetail.table.startTime')" align="center">
8db44267   wuxw   开始开发报表功能
10
          <template slot-scope="scope">
59833eeb   wuxw   测试报表代码
11
            {{ dateFormat(scope.row.startTime) }}
8db44267   wuxw   开始开发报表功能
12
13
          </template>
        </el-table-column>
71def04c   wuxw   优化优惠
14
        <el-table-column prop="endTime" :label="$t('viewFeeDetail.table.endTime')" align="center">
8db44267   wuxw   开始开发报表功能
15
          <template slot-scope="scope">
59833eeb   wuxw   测试报表代码
16
            {{ dateFormat(scope.row.endTime) }}
8db44267   wuxw   开始开发报表功能
17
18
          </template>
        </el-table-column>
71def04c   wuxw   优化优惠
19
20
        <el-table-column prop="stateName" :label="$t('viewFeeDetail.table.status')" align="center" />
        <el-table-column prop="remark" :label="$t('viewFeeDetail.table.remark')" align="center" />
8db44267   wuxw   开始开发报表功能
21
22
      </el-table>
  
71def04c   wuxw   优化优惠
23
24
      <el-pagination :current-page.sync="pagination.current" :page-size="pagination.size" :total="pagination.total"
        layout="total, prev, pager, next, jumper" @current-change="handlePageChange" class="margin-top" />
8db44267   wuxw   开始开发报表功能
25
26
27
28
    </el-dialog>
  </template>
  
  <script>
71def04c   wuxw   优化优惠
29
30
  import { queryFeeDetail } from '@/api/report/reportHuaningApi'
  import { getCommunityId } from '@/api/community/communityApi'
59833eeb   wuxw   测试报表代码
31
  import {dateFormat} from '@/utils/dateUtil'
8db44267   wuxw   开始开发报表功能
32
33
34
35
36
37
38
39
  
  export default {
    name: 'ViewFeeDetail',
    data() {
      return {
        dialogVisible: false,
        viewFeeDetailInfo: {
          feeDetails: [],
71def04c   wuxw   优化优惠
40
41
          total: 0,
          records: 1,
8db44267   wuxw   开始开发报表功能
42
43
          feeId: '',
          configId: '',
71def04c   wuxw   优化优惠
44
45
46
          payerObjId: '',
          curYear: '',
          roomName: ''
8db44267   wuxw   开始开发报表功能
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
        },
        pagination: {
          current: 1,
          size: 10,
          total: 0
        }
      }
    },
    methods: {
      open(params) {
        this.viewFeeDetailInfo = {
          ...this.viewFeeDetailInfo,
          ...params
        }
        this.dialogVisible = true
        this.listFeeDetail()
      },
71def04c   wuxw   优化优惠
64
65
66
67
      handleClose() {
        this.dialogVisible = false
        this.pagination.current = 1
      },
8db44267   wuxw   开始开发报表功能
68
69
70
71
72
      async listFeeDetail() {
        try {
          const params = {
            page: this.pagination.current,
            row: this.pagination.size,
71def04c   wuxw   优化优惠
73
            communityId: getCommunityId(),
8db44267   wuxw   开始开发报表功能
74
75
76
77
            curYear: this.viewFeeDetailInfo.curYear,
            configId: this.viewFeeDetailInfo.configId,
            payerObjId: this.viewFeeDetailInfo.payerObjId
          }
71def04c   wuxw   优化优惠
78
  
59833eeb   wuxw   测试报表代码
79
          const { feeDetails, total } = await queryFeeDetail(params)
8db44267   wuxw   开始开发报表功能
80
  
59833eeb   wuxw   测试报表代码
81
          this.viewFeeDetailInfo.feeDetails = feeDetails
71def04c   wuxw   优化优惠
82
          this.pagination.total = total
8db44267   wuxw   开始开发报表功能
83
        } catch (error) {
71def04c   wuxw   优化优惠
84
          console.error('获取费用明细失败:', error)
8db44267   wuxw   开始开发报表功能
85
86
        }
      },
71def04c   wuxw   优化优惠
87
88
      handlePageChange(currentPage) {
        this.pagination.current = currentPage
8db44267   wuxw   开始开发报表功能
89
        this.listFeeDetail()
59833eeb   wuxw   测试报表代码
90
91
      },
      dateFormat
8db44267   wuxw   开始开发报表功能
92
93
94
95
96
    }
  }
  </script>
  
  <style lang="scss" scoped>
71def04c   wuxw   优化优惠
97
98
  .margin-top {
    margin-top: 20px;
8db44267   wuxw   开始开发报表功能
99
100
  }
  </style>