Blame view

src/components/room/roomOweFees.vue 2.58 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
81955f61   wuxw   优化房屋页面
2
3
4
5
6
7
8
9
10
11
12
    <el-dialog :visible.sync="visible" :title="$t('roomOweFees.title')" width="80%" top="5vh" custom-class="custom-modal"
      @close="handleClose">
      <el-table :data="roomOweFeesInfo.fees" stripe border style="width: 100%; margin-top: 15px">
        <el-table-column prop="payerObjName" :label="$t('roomOweFees.payerObj')" align="center" />
        <el-table-column prop="ownerName" :label="$t('roomOweFees.ownerName')" align="center" />
        <el-table-column prop="ownerTel" :label="$t('roomOweFees.phone')" align="center" />
        <el-table-column prop="endTime" :label="$t('roomOweFees.startTime')" align="center" />
        <el-table-column prop="deadlineTime" :label="$t('roomOweFees.endTime')" align="center" />
        <el-table-column prop="amountOwed" :label="`${$t('roomOweFees.total')} (${$t('roomOweFees.unit')})`"
          align="center" />
        <el-table-column prop="updateTime" :label="$t('roomOweFees.updateTime')" align="center" />
af1bcbd6   wuxw   房屋页面开发中
13
      </el-table>
81955f61   wuxw   优化房屋页面
14
15
16
17
  
      <el-pagination v-if="pagination.total > 0" background layout="prev, pager, next" :total="pagination.total"
        :page-size="pagination.pageSize" :current-page="pagination.currentPage" @current-change="handlePageChange"
        style="margin-top: 20px; text-align: right" />
af1bcbd6   wuxw   房屋页面开发中
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
    </el-dialog>
  </template>
  
  <script>
  import { getRoomOweFees } from '@/api/room/roomOweFeesApi'
  
  export default {
    name: 'RoomOweFees',
    data() {
      return {
        visible: false,
        roomOweFeesInfo: {
          fees: [],
          roomId: ''
        },
        pagination: {
          total: 0,
          pageSize: 10,
          currentPage: 1
        }
      }
    },
    methods: {
      open(roomId) {
        this.roomOweFeesInfo.roomId = roomId
        this.pagination.currentPage = 1
        this.visible = true
        this.loadData()
      },
      handleClose() {
        this.visible = false
      },
      handlePageChange(currentPage) {
        this.pagination.currentPage = currentPage
        this.loadData()
      },
      async loadData() {
        try {
          const params = {
            page: this.pagination.currentPage,
            row: this.pagination.pageSize,
            communityId: this.getCommunityId(),
            payerObjId: this.roomOweFeesInfo.roomId,
            payerObjType: '3333'
          }
81955f61   wuxw   优化房屋页面
63
  
af1bcbd6   wuxw   房屋页面开发中
64
65
          const response = await getRoomOweFees(params)
          this.roomOweFeesInfo.fees = response.data
f9f29297   wuxw   v1.9 分页 record 传给...
66
          this.pagination.total = response.total
af1bcbd6   wuxw   房屋页面开发中
67
68
69
70
71
        } catch (error) {
          console.error('加载房屋欠费信息失败:', error)
          this.$message.error(this.$t('common.loadFailed'))
        }
      },
81955f61   wuxw   优化房屋页面
72
  
af1bcbd6   wuxw   房屋页面开发中
73
74
75
76
77
    }
  }
  </script>
  
  <style scoped>
81955f61   wuxw   优化房屋页面
78
  .custom-modal>>>.el-dialog__body {
af1bcbd6   wuxw   房屋页面开发中
79
80
81
    padding: 15px 20px;
  }
  </style>