Blame view

src/components/fee/simplifyRefundDeposit.vue 4.08 KB
24d3590f   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
82
83
84
  <template>
    <div>
      <el-row class="margin-top">
        <el-col :span="20"></el-col>
        <el-col :span="4" class="text-right"></el-col>
      </el-row>
  
      <el-table :data="simplifyRefundDepositInfo.fees" border style="width: 100%; margin-top:10px">
        <el-table-column prop="payerObjName" :label="$t('simplifyRefundDeposit.chargeObject')"
          align="center"></el-table-column>
        <el-table-column prop="feeName" :label="$t('simplifyRefundDeposit.feeItem')" align="center"></el-table-column>
        <el-table-column :label="$t('simplifyRefundDeposit.timePeriod')" align="center">
          <template slot-scope="scope">
            {{ scope.row.startTime }}~{{ scope.row.endTime }}
          </template>
        </el-table-column>
        <el-table-column prop="receivedAmount" :label="$t('simplifyRefundDeposit.amount')"
          align="center"></el-table-column>
        <el-table-column prop="createTime" :label="$t('simplifyRefundDeposit.paymentTime')"
          align="center"></el-table-column>
        <el-table-column prop="stateName" :label="$t('simplifyRefundDeposit.status')" align="center"></el-table-column>
        <el-table-column :label="$t('simplifyRefundDeposit.operation')" align="center">
          <template slot-scope="scope">
            <el-button-group>
              <el-button v-if="scope.row.state == '1400'" size="mini" @click="_openRefundModel(scope.row)">
                {{ $t('simplifyRefundDeposit.refundDeposit') }}
              </el-button>
              <el-button size="mini" @click="_toSimplifyFeeDepositFeeDetail(scope.row)">
                {{ $t('simplifyRefundDeposit.detail') }}
              </el-button>
            </el-button-group>
          </template>
        </el-table-column>
      </el-table>
  
      <el-row class="margin-top">
        <el-col :span="24" class="text-right">
          <el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize"
            layout="total, prev, pager, next" :total="simplifyRefundDepositInfo.total"></el-pagination>
        </el-col>
      </el-row>
    </div>
  </template>
  
  <script>
  import { queryFeeDeposit } from '@/api/fee/simplifyRefundDepositApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'SimplifyRefundDeposit',
    data() {
      return {
        simplifyRefundDepositInfo: {
          fees: [],
          ownerId: '',
          roomId: '',
          roomName: '',
          total: 0,
          records: 0
        },
        currentPage: 1,
        pageSize: 10,
        communityId: ''
      }
    },
    created() {
      this.communityId = getCommunityId()
    },
    methods: {
      handleCurrentChange(val) {
        this.currentPage = val
        this._listSimplifyFeeDeposit(val, this.pageSize)
      },
      _listSimplifyFeeDeposit(page, rows) {
        const params = {
          page,
          row: rows,
          payerObjId: this.simplifyRefundDepositInfo.roomId,
          ownerId: this.simplifyRefundDepositInfo.ownerId,
          communityId: this.communityId,
          state: '1400'
        }
  
        queryFeeDeposit(params).then(response => {
24d3590f   wuxw   房屋收费页面开发完成
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
          this.simplifyRefundDepositInfo.total = response.total
          this.simplifyRefundDepositInfo.records = response.records
          this.simplifyRefundDepositInfo.fees = response.data
        }).catch(error => {
          console.error('请求失败:', error)
        })
      },
      clearSimplifyFeeDepositInfo() {
        this.simplifyRefundDepositInfo = {
          fees: [],
          ownerId: '',
          roomId: '',
          roomName: '',
          total: 0,
          records: 0
        }
      },
      _openRefundModel() {
        const roomId = this.simplifyRefundDepositInfo.roomId
745b8235   wuxw   v1.9 优化优惠申请 bug
104
        this.$router.push(`/views/fee/refundDepositFee?roomId=${roomId}`)
24d3590f   wuxw   房屋收费页面开发完成
105
106
      },
      _toSimplifyFeeDepositFeeDetail(fee) {
6d21390a   wuxw   开发车辆详情页面
107
        this.$router.push(`/views/fee/propertyFee?feeId=${fee.feeId}`)
24d3590f   wuxw   房屋收费页面开发完成
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
      },
      switchData(param) {
        if (!param.roomId) return
        this.clearSimplifyFeeDepositInfo()
        Object.assign(this.simplifyRefundDepositInfo, param)
        this._listSimplifyFeeDeposit(1, 10)
      },
      open(params) {
        this.switchData(params)
      }
    }
  }
  </script>
  
  <style scoped>
  .margin-top {
    margin-top: 15px;
  }
  
  .text-right {
    text-align: right;
  }
  </style>