Blame view

src/views/fee/propertyFeeList.vue 6.97 KB
24d3590f   wuxw   房屋收费页面开发完成
1
2
  <template>
    <div class="property-fee-container">
24d3590f   wuxw   房屋收费页面开发完成
3
  
24d3590f   wuxw   房屋收费页面开发完成
4
  
814833f5   wuxw   优化费用缴费代码
5
6
7
8
9
10
11
12
      <!-- 主费用信息组件 -->
      <view-main-fee ref="viewMainFee" :fee-name="$t('propertyFee.feeName')" fee-type-cd="888800010001"
        pay-name="propertyPay" />
  
      <el-card class="box-card" style="margin-top: 20px;">
        <div slot="header" class="flex justify-between">
          <span>{{ $t('propertyFee.paymentHistory') }}</span>
        </div>
24d3590f   wuxw   房屋收费页面开发完成
13
  
814833f5   wuxw   优化费用缴费代码
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        <el-row :gutter="20">
          <el-col :span="6">
            <el-date-picker v-model="feeDetailInfo.startTime" type="date" :placeholder="$t('propertyFee.selectStartTime')"
              style="width: 100%;" />
          </el-col>
          <el-col :span="6">
            <el-date-picker v-model="feeDetailInfo.endTime" type="date" :placeholder="$t('propertyFee.selectEndTime')"
              style="width: 100%;" />
          </el-col>
          <el-col :span="12">
            <el-button type="primary" @click="queryFeeDetailMethod()">
              <i class="el-icon-search"></i>
              {{ $t('propertyFee.searchNow') }}
            </el-button>
            <el-button type="info" @click="resetFeeDetailMethod()" style="margin-left: 20px;">
              <i class="el-icon-refresh"></i>
              {{ $t('propertyFee.reset') }}
            </el-button>
          </el-col>
        </el-row>
24d3590f   wuxw   房屋收费页面开发完成
34
  
814833f5   wuxw   优化费用缴费代码
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
85
86
87
        <el-table :data="feeDetailInfo.feeDetails" style="width: 100%; margin-top: 20px;" border stripe>
          <el-table-column prop="detailId" :label="$t('propertyFee.paymentId')" align="center" />
          <el-table-column prop="cycles" :label="$t('propertyFee.cycle')" align="center" />
          <el-table-column prop="primeRateName" :label="$t('propertyFee.paymentMethod')" align="center" />
          <el-table-column :label="$t('propertyFee.receivableAmount')" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.state == '1500'">{{ scope.row.payerObjName }}{{ $t('propertyFee.viewInFee') }}</span>
              <span v-else>{{ scope.row.receivableAmount }}</span>
            </template>
          </el-table-column>
          <el-table-column :label="$t('propertyFee.receivedAmount')" align="center">
            <template slot-scope="scope">
              {{ scope.row.receivedAmount }}<br>
              <div v-if="scope.row.acctAmount > 0">
                {{ $t('propertyFee.accountDeduction') }}: {{ scope.row.acctAmount }}<br>
              </div>
              <div v-for="(item, index) in scope.row.payFeeDetailDiscountDtoList" :key="index">
                {{ item.discountName }}: {{ Math.abs(item.discountPrice) }}<br>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="createTime" :label="$t('propertyFee.paymentTime')" align="center" />
          <el-table-column :label="$t('propertyFee.startTime')" align="center">
            <template slot-scope="scope">
              {{ dateFormat(scope.row.startTime) }}
            </template>
          </el-table-column>
          <el-table-column :label="$t('propertyFee.endTime')" align="center">
            <template slot-scope="scope">
              {{ dateFormat(scope.row.endTime) }}
            </template>
          </el-table-column>
          <el-table-column prop="cashierName" :label="$t('propertyFee.cashier')" align="center" />
          <el-table-column prop="stateName" :label="$t('propertyFee.status')" align="center" />
          <el-table-column prop="remark" :label="$t('propertyFee.remark')" align="center" />
          <el-table-column :label="$t('propertyFee.operation')" align="center">
            <template slot-scope="scope">
              <el-button-group>
                <el-button v-if="scope.row.state == '1400' || scope.row.state == '1200' || scope.row.state == ''"
                  size="mini" @click="_openRefundModel(scope.row)">
                  {{ $t('propertyFee.applyRefund') }}
                </el-button>
                <el-button v-if="scope.row.state != '1500'" size="mini" @click="_openFeeDetailDiscountModal(scope.row)">
                  {{ $t('propertyFee.discount') }}
                </el-button>
              </el-button-group>
            </template>
          </el-table-column>
        </el-table>
  
        <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
          :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
          @current-change="handleCurrentChange" style="margin-top: 20px;" />
24d3590f   wuxw   房屋收费页面开发完成
88
      </el-card>
814833f5   wuxw   优化费用缴费代码
89
90
  
      <!-- 子组件 -->
ac99dc05   wuxw   优化代码
91
      <return-pay-fee ref="returnPayFee" @success="queryFeeDetailMethod" />
814833f5   wuxw   优化费用缴费代码
92
93
      <view-fee-detail-discount ref="viewFeeDetailDiscount" />
  
24d3590f   wuxw   房屋收费页面开发完成
94
95
96
97
98
99
100
101
102
    </div>
  </template>
  
  <script>
  import { getCommunityId } from '@/api/community/communityApi'
  import { queryFeeDetail } from '@/api/fee/propertyFeeApi'
  import ViewMainFee from '@/components/fee/viewMainFee'
  import ReturnPayFee from '@/components/fee/returnPayFee'
  import ViewFeeDetailDiscount from '@/components/fee/viewFeeDetailDiscount'
1a0bdbe0   wuxw   优化缴费页面
103
  import { dateFormat } from '@/utils/dateUtil'
24d3590f   wuxw   房屋收费页面开发完成
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
  
  export default {
    name: 'PropertyFeeList',
    components: {
      ViewMainFee,
      ReturnPayFee,
      ViewFeeDetailDiscount
    },
    data() {
      return {
        feeDetailInfo: {
          feeDetails: [],
          total: 0,
          records: 1,
          feeId: '',
          startTime: '',
          endTime: ''
        },
        page: {
          current: 1,
          size: 10,
          total: 0
        },
        communityId: ''
      }
    },
    created() {
      this.communityId = getCommunityId()
814833f5   wuxw   优化费用缴费代码
132
133
      this.feeDetailInfo.feeId = this.$route.query.feeId
      this.queryFeeDetailMethod()
24d3590f   wuxw   房屋收费页面开发完成
134
135
136
137
    },
    methods: {
      dateFormat(date) {
        if (!date) return ''
1a0bdbe0   wuxw   优化缴费页面
138
        return dateFormat(date)
24d3590f   wuxw   房屋收费页面开发完成
139
140
141
142
143
144
145
146
147
148
149
      },
      async listFeeDetail(page = 1, row = 10) {
        try {
          const params = {
            page,
            row,
            communityId: this.communityId,
            feeId: this.feeDetailInfo.feeId,
            startTime: this.feeDetailInfo.startTime,
            endTime: this.feeDetailInfo.endTime
          }
814833f5   wuxw   优化费用缴费代码
150
151
152
  
          const { feeDetails, total, records } = await queryFeeDetail(params)
          this.feeDetailInfo.feeDetails = feeDetails
24d3590f   wuxw   房屋收费页面开发完成
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
          this.feeDetailInfo.total = total
          this.feeDetailInfo.records = records
          this.page.total = records
        } catch (error) {
          console.error('获取费用明细失败:', error)
        }
      },
      queryFeeDetailMethod() {
        this.page.current = 1
        this.listFeeDetail()
      },
      resetFeeDetailMethod() {
        this.feeDetailInfo.startTime = ''
        this.feeDetailInfo.endTime = ''
        this.queryFeeDetailMethod()
      },
      _openRefundModel(feeDetail) {
        this.$refs.returnPayFee.open(feeDetail)
      },
      _openFeeDetailDiscountModal(detail) {
        this.$refs.viewFeeDetailDiscount.open(detail)
      },
      handleSizeChange(val) {
        this.page.size = val
        this.listFeeDetail(this.page.current, val)
      },
      handleCurrentChange(val) {
        this.page.current = val
        this.listFeeDetail(val, this.page.size)
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .property-fee-container {
    padding: 20px;
814833f5   wuxw   优化费用缴费代码
190
  
24d3590f   wuxw   房屋收费页面开发完成
191
192
193
    .box-card {
      margin-bottom: 20px;
    }
814833f5   wuxw   优化费用缴费代码
194
  
24d3590f   wuxw   房屋收费页面开发完成
195
196
197
198
199
200
    .clearfix {
      font-size: 18px;
      font-weight: bold;
    }
  }
  </style>