Blame view

src/views/fee/payFeeAuditManageList.vue 9.06 KB
a6fd0349   wuxw   开发完成套餐费用
1
2
3
4
5
6
7
8
  <template>
    <div class="pay-fee-audit-manage-container">
      <el-card class="search-card">
        <div slot="header" class="flex justify-between">
          <span>{{ $t('payFeeAuditManage.searchTitle') }}</span>
        </div>
        <el-row :gutter="20">
          <el-col :span="6">
24d3590f   wuxw   房屋收费页面开发完成
9
10
11
            <el-select v-model="searchForm.payObjType" :placeholder="$t('payFeeAuditManage.selectPayObj')"
              style="width:100%">
              <el-option v-for="item in payObjTypes" :key="item.statusCd" :label="item.name" :value="item.statusCd" />
a6fd0349   wuxw   开发完成套餐费用
12
13
14
            </el-select>
          </el-col>
          <el-col :span="6">
24d3590f   wuxw   房屋收费页面开发完成
15
16
17
18
            <el-select v-model="searchForm.state" :placeholder="$t('payFeeAuditManage.selectStatus')" style="width:100%">
              <el-option :label="$t('payFeeAuditManage.pendingReview')" value="1010" />
              <el-option :label="$t('payFeeAuditManage.approved')" value="2020" />
              <el-option :label="$t('payFeeAuditManage.rejected')" value="3030" />
a6fd0349   wuxw   开发完成套餐费用
19
20
21
            </el-select>
          </el-col>
          <el-col :span="6">
24d3590f   wuxw   房屋收费页面开发完成
22
23
24
            <el-input v-model="searchForm.payerObjId" :placeholder="searchForm.payObjType === '666'
              ? $t('payFeeAuditManage.inputPlateNumber')
              : $t('payFeeAuditManage.inputRoomInfo')" />
a6fd0349   wuxw   开发完成套餐费用
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
          </el-col>
          <el-col :span="6">
            <el-button type="primary" @click="handleSearch">
              <i class="el-icon-search"></i>
              {{ $t('common.search') }}
            </el-button>
            <el-button @click="handleReset">
              <i class="el-icon-refresh"></i>
              {{ $t('common.reset') }}
            </el-button>
          </el-col>
        </el-row>
      </el-card>
  
      <el-card class="table-card">
        <div slot="header" class="flex justify-between">
          <span>{{ $t('payFeeAuditManage.tableTitle') }}</span>
24d3590f   wuxw   房屋收费页面开发完成
42
          <el-button type="primary" size="small" style="float:right" @click="handleBatchAudit">
a6fd0349   wuxw   开发完成套餐费用
43
44
45
46
            <i class="el-icon-plus"></i>
            {{ $t('payFeeAuditManage.batchAudit') }}
          </el-button>
        </div>
24d3590f   wuxw   房屋收费页面开发完成
47
48
  
        <el-table :data="tableData" border style="width:100%" @selection-change="handleSelectionChange">
a6fd0349   wuxw   开发完成套餐费用
49
          <el-table-column type="selection" width="55" align="center" />
24d3590f   wuxw   房屋收费页面开发完成
50
51
52
          <el-table-column prop="payerObjName" :label="$t('payFeeAuditManage.house')" align="center" />
          <el-table-column prop="feeName" :label="$t('payFeeAuditManage.feeItem')" align="center" />
          <el-table-column prop="cycles" :label="$t('payFeeAuditManage.payCycle')" align="center">
a6fd0349   wuxw   开发完成套餐费用
53
54
55
56
            <template slot-scope="scope">
              {{ scope.row.cycles }} {{ $t('payFeeAuditManage.month') }}
            </template>
          </el-table-column>
24d3590f   wuxw   房屋收费页面开发完成
57
58
59
60
61
62
63
          <el-table-column prop="startTime" :label="$t('payFeeAuditManage.startTime')" align="center" />
          <el-table-column prop="endTime" :label="$t('payFeeAuditManage.endTime')" align="center" />
          <el-table-column prop="receivableAmount" :label="$t('payFeeAuditManage.receivableAmount')" align="center" />
          <el-table-column prop="receivedAmount" :label="$t('payFeeAuditManage.receivedAmount')" align="center" />
          <el-table-column prop="userName" :label="$t('payFeeAuditManage.operator')" align="center" />
          <el-table-column prop="createTime" :label="$t('payFeeAuditManage.payTime')" align="center" />
          <el-table-column prop="state" :label="$t('payFeeAuditManage.auditStatus')" align="center">
a6fd0349   wuxw   开发完成套餐费用
64
            <template slot-scope="scope">
24d3590f   wuxw   房屋收费页面开发完成
65
              <el-tag :type="getStatusTagType(scope.row.state)">
a6fd0349   wuxw   开发完成套餐费用
66
67
68
69
                {{ getStatusText(scope.row.state) }}
              </el-tag>
            </template>
          </el-table-column>
24d3590f   wuxw   房屋收费页面开发完成
70
71
72
          <el-table-column prop="message" :label="$t('payFeeAuditManage.auditRemark')" align="center" />
          <el-table-column prop="remark" :label="$t('payFeeAuditManage.payRemark')" align="center" />
          <el-table-column :label="$t('common.operation')" align="center" width="200">
a6fd0349   wuxw   开发完成套餐费用
73
            <template slot-scope="scope">
24d3590f   wuxw   房屋收费页面开发完成
74
              <el-button type="text" size="small" @click="handleDetail(scope.row)">
a6fd0349   wuxw   开发完成套餐费用
75
76
                {{ $t('common.detail') }}
              </el-button>
24d3590f   wuxw   房屋收费页面开发完成
77
78
              <el-button v-if="scope.row.state !== '2020' && scope.row.state !== '3030'" type="text" size="small"
                @click="handleAudit(scope.row)">
a6fd0349   wuxw   开发完成套餐费用
79
80
                {{ $t('payFeeAuditManage.auditFee') }}
              </el-button>
24d3590f   wuxw   房屋收费页面开发完成
81
              <el-button v-if="scope.row.state === '3030'" type="text" size="small" @click="handleRefund(scope.row)">
a6fd0349   wuxw   开发完成套餐费用
82
83
84
85
86
87
88
89
90
91
                {{ $t('payFeeAuditManage.refund') }}
              </el-button>
            </template>
          </el-table-column>
        </el-table>
  
        <div class="pagination-wrapper">
          <div class="tip-text">
            {{ $t('payFeeAuditManage.auditTip') }}
          </div>
24d3590f   wuxw   房屋收费页面开发完成
92
93
94
          <el-pagination :current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
            :total="pagination.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
a6fd0349   wuxw   开发完成套餐费用
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
        </div>
      </el-card>
  
      <audit-modal ref="auditModal" @success="handleAuditSuccess" />
      <return-pay-fee-modal ref="returnPayFeeModal" @success="handleRefundSuccess" />
    </div>
  </template>
  
  <script>
  import { getPayFeeAuditList, savePayFeeAudit } from '@/api/fee/payFeeAuditManageApi'
  import { getDict } from '@/api/community/communityApi'
  import { getCommunityId } from '@/api/community/communityApi'
  import AuditModal from '@/components/fee/audit'
  import ReturnPayFeeModal from '@/components/fee/returnPayFee'
  
  export default {
    name: 'PayFeeAuditManageList',
    components: {
      AuditModal,
      ReturnPayFeeModal
    },
    data() {
      return {
        searchForm: {
          communityId: '',
          payObjType: '',
          state: '1010',
          payerObjId: ''
        },
        tableData: [],
        multipleSelection: [],
        payObjTypes: [],
        pagination: {
          current: 1,
          size: 10,
          total: 0
        },
        currentRow: null
      }
    },
    created() {
      this.searchForm.communityId = getCommunityId()
      this.getList()
      this.getPayObjTypes()
    },
    methods: {
      async getList() {
        try {
          const params = {
            ...this.searchForm,
            page: this.pagination.current,
            row: this.pagination.size
          }
          const { data, total } = await getPayFeeAuditList(params)
          this.tableData = data
          this.pagination.total = total
        } catch (error) {
          this.$message.error(this.$t('payFeeAuditManage.fetchError'))
        }
      },
      async getPayObjTypes() {
        try {
          this.payObjTypes = await getDict('pay_fee', 'payer_obj_type')
        } catch (error) {
          console.error('获取付费对象类型失败:', error)
        }
      },
      handleSearch() {
        this.pagination.current = 1
        this.getList()
      },
      handleReset() {
        this.searchForm = {
          communityId: getCommunityId(),
          payObjType: '',
          state: '1010',
          payerObjId: ''
        }
        this.handleSearch()
      },
      handleSizeChange(val) {
        this.pagination.size = val
        this.getList()
      },
      handleCurrentChange(val) {
        this.pagination.current = val
        this.getList()
      },
      handleSelectionChange(val) {
        this.multipleSelection = val
      },
      handleDetail(row) {
        this.$router.push({
          path: '/fee/propertyFee',
          query: row
        })
      },
      handleAudit(row) {
        this.currentRow = row
        this.$refs.auditModal.open()
      },
      handleBatchAudit() {
        if (this.multipleSelection.length === 0) {
          this.$message.warning(this.$t('payFeeAuditManage.selectFeeTip'))
          return
        }
        this.currentRow = null
        this.$refs.auditModal.open()
      },
      handleRefund(row) {
        this.$refs.returnPayFeeModal.open(row)
      },
      async handleAuditSuccess(auditInfo) {
        try {
          const params = {
            state: auditInfo.state === '1100' ? '2020' : '3030',
            message: auditInfo.remark,
24d3590f   wuxw   房屋收费页面开发完成
212
213
            feeDetailId: this.currentRow
              ? this.currentRow.detailId
a6fd0349   wuxw   开发完成套餐费用
214
215
216
217
218
219
220
221
222
223
224
225
226
227
              : this.multipleSelection.map(item => item.detailId).join(','),
            communityId: this.searchForm.communityId
          }
          await savePayFeeAudit(params)
          this.$message.success(this.$t('common.operateSuccess'))
          this.getList()
        } catch (error) {
          this.$message.error(error.message || this.$t('common.operateFailed'))
        }
      },
      handleRefundSuccess() {
        this.getList()
      },
      getStatusTagType(state) {
24d3590f   wuxw   房屋收费页面开发完成
228
        switch (state) {
a6fd0349   wuxw   开发完成套餐费用
229
230
231
232
233
234
          case '2020': return 'success'
          case '3030': return 'danger'
          default: return 'info'
        }
      },
      getStatusText(state) {
24d3590f   wuxw   房屋收费页面开发完成
235
        switch (state) {
a6fd0349   wuxw   开发完成套餐费用
236
237
238
239
240
241
242
243
244
245
246
247
          case '2020': return this.$t('payFeeAuditManage.approved')
          case '3030': return this.$t('payFeeAuditManage.rejected')
          default: return this.$t('payFeeAuditManage.pendingReview')
        }
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .pay-fee-audit-manage-container {
    padding: 20px;
24d3590f   wuxw   房屋收费页面开发完成
248
  
a6fd0349   wuxw   开发完成套餐费用
249
250
251
    .search-card {
      margin-bottom: 20px;
    }
24d3590f   wuxw   房屋收费页面开发完成
252
  
a6fd0349   wuxw   开发完成套餐费用
253
254
255
256
257
    .pagination-wrapper {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 20px;
24d3590f   wuxw   房屋收费页面开发完成
258
  
a6fd0349   wuxw   开发完成套餐费用
259
260
261
262
263
264
265
      .tip-text {
        color: #999;
        font-size: 12px;
      }
    }
  }
  </style>