Blame view

src/components/fee/simplifyRoomFee.vue 26.5 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
24d3590f   wuxw   房屋收费页面开发完成
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
    <div>
      <el-row class="margin-top-lg">
        <el-col :span="2" >
          <el-select v-model="simplifyRoomFeeInfo.feeTypeCd" @change="changeSimplifyRoomFeeFeeTypeCd" size="small"
            :placeholder="$t('simplifyRoomFee.selectFeeType')">
            <template v-for="item in simplifyRoomFeeInfo.feeTypeCds">
              <el-option :key="item.statusCd" :label="item.name" :value="item.statusCd"
                v-if="item.statusCd != '888800010008'"></el-option>
            </template>
          </el-select>
        </el-col>
        <el-col :span="2" >
          <el-select v-model="simplifyRoomFeeInfo.configId" @change="changeSimplifyRoomConfigId" size="small"
            :placeholder="$t('simplifyRoomFee.selectFeeItem')">
            <el-option v-for="item in simplifyRoomFeeInfo.feeConfigs" :key="item.configId" :label="item.feeName"
              :value="item.configId"></el-option>
          </el-select>
        </el-col>
        <el-col :span="2" >
          <el-select v-model="simplifyRoomFeeInfo.state" @change="changeSimplifyRoomConfigId" size="small"
            :placeholder="$t('simplifyRoomFee.selectStatus')">
            <el-option :label="$t('simplifyRoomFee.valid')" value="2008001"></el-option>
            <el-option :label="$t('simplifyRoomFee.feeEnd')" value="2009001"></el-option>
          </el-select>
        </el-col>
        <el-col :span="2" >
          <el-select v-model="simplifyRoomFeeInfo.ownerFee" @change="changeSimplifyRoomConfigId" size="small">
            <el-option :label="$t('simplifyRoomFee.currentRoom')" value="N"></el-option>
            <el-option :label="$t('simplifyRoomFee.currentOwner')" value="Y"></el-option>
          </el-select>
        </el-col>
        <el-col :span="2" v-if="simplifyRoomFeeInfo.roomId && simplifyRoomFeeInfo.state == '2008001'">
          <el-select v-model="simplifyRoomFeeInfo.showFlag" @change="changeSimplifyRoomShowFlag" size="small">
            <el-option :label="$t('simplifyRoomFee.default')" value="DEFAULT"></el-option>
            <el-option :label="$t('simplifyRoomFee.monthly')" value="MONTH"></el-option>
          </el-select>
        </el-col>
        <el-col :span="2" v-else></el-col>
        <el-col :span="13" class="text-right">
          <el-button type="primary" size="small" v-if="hasPrivilege('502020082314267912')"
            @click="openBatchPayRoomFeeModal">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.batchPayment') }}
          </el-button>
          <el-button type="primary" size="small" v-if="hasPrivilege('502022073007100003')"
            @click="openTempImportRoomFeeModal">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.tempFee') }}
          </el-button>
          <el-button type="primary" size="small" v-if="hasPrivilege('502022073049300004')" @click="openProxyFeeModal">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.quantityPayment') }}
          </el-button>
          <el-button type="primary" size="small" v-if="hasPrivilege('502022073042960005')"
            @click="openAddMeterWaterSimplifyModal">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.waterElectricity') }}
          </el-button>
          <el-button type="primary" size="small" v-if="hasPrivilege('502022073006890006')"
            @click="openRoomCreateFeeComboModal">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.feePackage') }}
          </el-button>
          <el-button type="primary" size="small" v-if="hasPrivilege('502022073096990007')"
            @click="openRoomCreateFeeAddModal">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.createFee') }}
          </el-button>
          <el-button type="primary" size="small" v-if="hasPrivilege('502020080570210194')" @click="toOwnerPayFee">
            <i class="el-icon-plus"></i>
            {{ $t('simplifyRoomFee.arrearsPayment') }}
          </el-button>
        </el-col>
      </el-row>
  
      <div class="margin-top" v-show="simplifyRoomFeeInfo.showFlag == 'DEFAULT'">
        <el-table :data="simplifyRoomFeeInfo.fees" style="width: 100%" border stripe>
          <el-table-column prop="feeName" :label="$t('simplifyRoomFee.feeItem')" align="center">
            <template slot-scope="scope">
              <span class="hand" @click="viewRoomFeeConfig(scope.row)">
                {{ scope.row.feeName }}{{ getSimplifyRoomFeeRoomName(scope.row) }}
24d3590f   wuxw   房屋收费页面开发完成
83
84
85
86
87
88
89
90
91
92
93
94
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
              </span>
            </template>
          </el-table-column>
          <el-table-column prop="feeFlagName" :label="$t('simplifyRoomFee.feeFlag')" align="center"></el-table-column>
          <el-table-column prop="feeTypeCdName" :label="$t('simplifyRoomFee.feeType')" align="center"></el-table-column>
          <el-table-column prop="amountOwed" :label="$t('simplifyRoomFee.receivableAmount')"
            align="center"></el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.accountTime')" align="center">
            <template slot-scope="scope">
              {{ scope.row.startTime }}
            </template>
          </el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.receivablePeriod')" align="center">
            <template slot-scope="scope">
              {{ getEndTime(scope.row) }}~<br />{{ getDeadlineTime(scope.row) }}
            </template>
          </el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.description')" align="center" width="150">
            <template slot-scope="scope">
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.preDegrees') }}</span>{{ scope.row.preDegrees }}
              </div>
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.curDegrees') }}</span>{{ scope.row.curDegrees }}
              </div>
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.unitPrice') }}</span>{{ getOnePrice1(scope.row) }}
              </div>
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.additionalFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
              <div v-else-if="scope.row.computingFormula == '6006'">
                <span>{{ $t('simplifyRoomFee.usage') }}</span>{{ getAttrValue(scope.row.feeAttrs, '390006') }}
              </div>
              <div v-else-if="scope.row.computingFormula == '6006'">
                <span>{{ $t('simplifyRoomFee.unitPrice') }}</span>{{ scope.row.squarePrice }}
              </div>
              <div v-else-if="scope.row.computingFormula == '6006'">
                <span>{{ $t('simplifyRoomFee.additionalFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
              <div v-else-if="scope.row.feeTypeCd == '888800010017'">
                <span>{{ $t('simplifyRoomFee.algorithm') }}</span>{{ getAttrValue(scope.row.feeAttrs, '390005') }}
              </div>
              <div v-else-if="scope.row.feeTypeCd == '888800010017'">
                <span>{{ $t('simplifyRoomFee.usage') }}</span>{{ getAttrValue(scope.row.feeAttrs, '390003') }}
              </div>
              <div v-else>
                <span>{{ $t('simplifyRoomFee.unitPrice') }}</span>{{ scope.row.squarePrice }}
              </div>
              <div v-if="scope.row.feeFlag == '1003006'">
                <span>{{ $t('simplifyRoomFee.additionalFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
              <div v-else>
                <span>{{ $t('simplifyRoomFee.fixedFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="stateName" :label="$t('simplifyRoomFee.status')" align="center"></el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.operation')" align="center" width="200">
            <template slot-scope="scope">
              <el-button type="text" v-if="scope.row.state != '2009001' && hasPrivilege('502020082314267912')"
                @click="payFee(scope.row)">
                {{ $t('simplifyRoomFee.payment') }}
              </el-button>
              <el-button type="text" @click="payFeeHis(scope.row)">
                {{ $t('simplifyRoomFee.paymentHistory') }}
              </el-button>
              <el-dropdown
                v-if="hasPrivilege('502020090604200029') || hasPrivilege('502021070488970005') || hasPrivilege('502020090427190001')">
                <span class="el-dropdown-link">
                  {{ $t('simplifyRoomFee.moreOperations') }}<i class="el-icon-arrow-down el-icon--right"></i>
                </span>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-if="hasPrivilege('502020090604200029')" @click.native="deleteFee(scope.row)">
                    {{ $t('simplifyRoomFee.cancelFee') }}
                  </el-dropdown-item>
                  <el-dropdown-item v-if="hasPrivilege('502021070488970005')" @click.native="finishFee(scope.row)">
                    {{ $t('simplifyRoomFee.manualEnd') }}
                  </el-dropdown-item>
                  <el-dropdown-item v-if="scope.row.state != '2009001' && hasPrivilege('502020090427190001')"
                    @click.native="editFee(scope.row)">
                    {{ $t('simplifyRoomFee.feeChange') }}
                  </el-dropdown-item>
                  <el-dropdown-item>
f80ea09a   wuxw   加入费用详情
167
                    <a target="_blank" :href="'/#/views/fee/feeDetail?feeId=' + scope.row.feeId">
24d3590f   wuxw   房屋收费页面开发完成
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
                      {{ $t('simplifyRoomFee.details') }}
                    </a>
                  </el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize"
          layout="total, prev, pager, next" :total="total" class="pagination text-right"></el-pagination>
      </div>
  
      <div class="margin-top" v-show="simplifyRoomFeeInfo.showFlag == 'MONTH'">
        <el-table :data="simplifyRoomFeeInfo.monthFees" style="width: 100%" border stripe>
          <el-table-column prop="feeName" :label="$t('simplifyRoomFee.feeItem')" align="center">
            <template slot-scope="scope">
              <span class="hand" @click="viewRoomFeeConfig(scope.row)">
                {{ scope.row.feeName }}{{ getSimplifyRoomFeeRoomName(scope.row) }}
24d3590f   wuxw   房屋收费页面开发完成
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
              </span>
            </template>
          </el-table-column>
          <el-table-column prop="feeFlagName" :label="$t('simplifyRoomFee.feeFlag')" align="center"></el-table-column>
          <el-table-column prop="feeTypeCdName" :label="$t('simplifyRoomFee.feeType')" align="center"></el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.chargeYearMonth')" align="center">
            <template slot-scope="scope">
              {{ scope.row.detailYear }}-{{ scope.row.detailMonth }}
            </template>
          </el-table-column>
          <el-table-column prop="receivableAmount" :label="$t('simplifyRoomFee.receivableAmount')"
            align="center"></el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.description')" align="center" width="150">
            <template slot-scope="scope">
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.preDegrees') }}</span>{{ scope.row.preDegrees }}
              </div>
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.curDegrees') }}</span>{{ scope.row.curDegrees }}
              </div>
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.unitPrice') }}</span>{{ getOnePrice1(scope.row) }}
              </div>
              <div v-if="scope.row.computingFormula == '5005' || scope.row.computingFormula == '9009'">
                <span>{{ $t('simplifyRoomFee.additionalFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
              <div v-else-if="scope.row.computingFormula == '6006'">
                <span>{{ $t('simplifyRoomFee.usage') }}</span>{{ getAttrValue(scope.row.feeAttrs, '390006') }}
              </div>
              <div v-else-if="scope.row.computingFormula == '6006'">
                <span>{{ $t('simplifyRoomFee.unitPrice') }}</span>{{ scope.row.squarePrice }}
              </div>
              <div v-else-if="scope.row.computingFormula == '6006'">
                <span>{{ $t('simplifyRoomFee.additionalFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
              <div v-else-if="scope.row.feeTypeCd == '888800010017'">
                <span>{{ $t('simplifyRoomFee.algorithm') }}</span>{{ getAttrValue(scope.row.feeAttrs, '390005') }}
              </div>
              <div v-else-if="scope.row.feeTypeCd == '888800010017'">
                <span>{{ $t('simplifyRoomFee.usage') }}</span>{{ getAttrValue(scope.row.feeAttrs, '390003') }}
              </div>
              <div v-else>
                <span>{{ $t('simplifyRoomFee.unitPrice') }}</span>{{ scope.row.squarePrice }}
              </div>
              <div v-if="scope.row.feeFlag == '1003006'">
                <span>{{ $t('simplifyRoomFee.additionalFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
              <div v-else>
                <span>{{ $t('simplifyRoomFee.fixedFee') }}</span>{{ scope.row.additionalAmount }}
              </div>
            </template>
          </el-table-column>
          <el-table-column :label="$t('simplifyRoomFee.operation')" align="center">
            <template slot-scope="scope">
f80ea09a   wuxw   加入费用详情
240
              <a target="_blank" :href="'/#/views/fee/feeDetail?feeId=' + scope.row.feeId">
24d3590f   wuxw   房屋收费页面开发完成
241
242
243
244
245
246
247
248
                {{ $t('simplifyRoomFee.details') }}
              </a>
            </template>
          </el-table-column>
        </el-table>
      </div>
  
      <el-row>
963f5a4f   wuxw   车辆功能测试完成
249
        <el-col :span="12" class="text-left table-desc">
24d3590f   wuxw   房屋收费页面开发完成
250
251
252
253
254
255
256
257
258
259
          <div>{{ $t('simplifyRoomFee.note1') }}</div>
          <div>{{ $t('simplifyRoomFee.note2') }}</div>
        </el-col>
        <el-col :span="6">
          <span>
            <span>{{ $t('simplifyRoomFee.arrearsSubtotal') }}</span>{{ simplifyRoomFeeInfo.totalAmount }}
          </span>
        </el-col>
      </el-row>
      <!-- Modal Components -->
814833f5   wuxw   优化费用缴费代码
260
261
262
263
264
265
      <delete-fee ref="deleteFee" @success="handleNotify"></delete-fee>
      <edit-fee ref="editFee" @success="handleNotify"></edit-fee>
      <temp-import-room-fee ref="tempImportRoomFee" @success="handleNotify"></temp-import-room-fee>
      <room-create-fee-add ref="roomCreateFeeAdd" @success="handleNotify"></room-create-fee-add>
      <add-meter-water ref="addMeterWater" @success="handleNotify"></add-meter-water>
      <add-proxy-fee ref="addProxyFee" @success="handleNotify"></add-proxy-fee>
5f798b88   wuxw   费用功能继续完善
266
      <finish-fee ref="finishFee" @success="handleNotify"></finish-fee>
24d3590f   wuxw   房屋收费页面开发完成
267
268
269
270
271
272
273
274
275
276
277
278
    </div>
  </template>
  
  <script>
  import { listFee, listFeeConfigs, listMonthFee } from '@/api/fee/simplifyRoomFeeApi'
  import { getDict } from '@/api/community/communityApi'
  import { getCommunityId } from '@/api/community/communityApi'
  //import { listFeeConfigs } from '@/api/fee/feeConfigManageApi'
  import TempImportRoomFee from './tempImportRoomFee'
  import { dateFormat } from '@/utils/dateUtil'
  import DeleteFee from '@/components/fee/deleteFee'
  import EditFee from '@/components/fee/editFee'
814833f5   wuxw   优化费用缴费代码
279
280
281
  import RoomCreateFeeAdd from '@/components/fee/roomCreateFeeAdd'
  import AddMeterWater from '@/components/fee/addMeterWater'
  import AddProxyFee from '@/components/fee/addProxyFee'
5f798b88   wuxw   费用功能继续完善
282
  import FinishFee from '@/components/fee/finishFee'
24d3590f   wuxw   房屋收费页面开发完成
283
284
285
286
287
288
289
  
  export default {
    name: 'SimplifyRoomFee',
    components: {
      TempImportRoomFee,
      DeleteFee,
      EditFee,
814833f5   wuxw   优化费用缴费代码
290
291
292
      RoomCreateFeeAdd,
      AddMeterWater,
      AddProxyFee,
5f798b88   wuxw   费用功能继续完善
293
      FinishFee
24d3590f   wuxw   房屋收费页面开发完成
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
    },
    data() {
      return {
        simplifyRoomFeeInfo: {
          total: 0,
          records: 1,
          fees: [],
          monthFees: [],
          roomId: '',
          roomName: '',
          name: '',
          floorNum: '',
          unitNum: '',
          roomNum: '',
          configId: '',
          feeTypeCds: [],
          feeTypeCd: '',
          state: '2008001',
          totalAmount: 0.0,
          roomType: '',
          ownerFee: 'N',
          ownerId: '',
          showFlag: 'DEFAULT',
          feeConfigs: []
        },
        currentPage: 1,
        pageSize: 10,
        total: 0
      }
    },
    computed: {
      filteredFeeTypeCds() {
        return this.simplifyRoomFeeInfo.feeTypeCds.filter(item => item.statusCd !== '888800010008')
      }
    },
    created() {
      this.communityId = getCommunityId()
      //this.loadDictData()
    },
    methods: {
      open(params) {
        this.handleSwitch(params)
      },
      handleSwitch(param) {
        this.clearSimplifyRoomFeeInfo()
        if (param.roomId === '') return
  
        Object.assign(this.simplifyRoomFeeInfo, param)
        this.listSimplifyRoomFee(1, this.pageSize)
  
        getDict('pay_fee_config', 'fee_type_cd').then(data => {
          this.simplifyRoomFeeInfo.feeTypeCds = data
        })
      },
      handleNotify() {
        this.listSimplifyRoomFee(this.currentPage, this.pageSize)
      },
      getOnePrice1(fee) {
        let price = fee.mwPrice
        if (!price) return fee.squarePrice
        if (parseFloat(price) > 0) return price
        return fee.squarePrice
      },
      async listSimplifyRoomFee(page, row) {
        const params = {
          page,
          row,
          communityId: getCommunityId(),
          payerObjId: this.simplifyRoomFeeInfo.roomId,
          payerObjType: '3333',
          configId: this.simplifyRoomFeeInfo.configId,
          state: this.simplifyRoomFeeInfo.state,
          feeTypeCd: this.simplifyRoomFeeInfo.feeTypeCd
        }
  
        if (this.simplifyRoomFeeInfo.ownerFee === 'Y') {
          params.payerObjId = ''
          params.ownerId = this.simplifyRoomFeeInfo.ownerId
        }
  
        try {
          const res = await listFee(params)
          this.simplifyRoomFeeInfo.total = res.total
          this.simplifyRoomFeeInfo.records = res.records
          let totalAmount = 0.0
  
          res.fees.forEach(item => {
            totalAmount += parseFloat(item.amountOwed)
          })
  
          this.simplifyRoomFeeInfo.totalAmount = totalAmount.toFixed(2)
          this.simplifyRoomFeeInfo.fees = res.fees.sort(this.roomFeeCompare)
f9f29297   wuxw   v1.9 分页 record 传给...
386
          this.total = res.total
24d3590f   wuxw   房屋收费页面开发完成
387
388
389
390
391
392
393
394
395
396
397
        } catch (error) {
          console.error('Failed to fetch fee list:', error)
        }
      },
      roomFeeCompare(a, b) {
        if (a.payerObjName < b.payerObjName) return -1
        if (a.payerObjName > b.payerObjName) return 1
        return 0
      },
      toOwnerPayFee() {
        this.$router.push({
9d019fa6   wuxw   测试OA相关流程
398
          path: '/views/fee/owePayFeeOrder',
24d3590f   wuxw   房屋收费页面开发完成
399
400
401
402
403
404
405
406
407
          query: {
            payObjId: this.simplifyRoomFeeInfo.roomId,
            payObjType: '3333',
            roomName: this.simplifyRoomFeeInfo.roomName
          }
        })
      },
      openRoomCreateFeeAddModal() {
        this.simplifyRoomFeeInfo.ownerName = this.simplifyRoomFeeInfo.name
814833f5   wuxw   优化费用缴费代码
408
        this.$refs.roomCreateFeeAdd.open({
24d3590f   wuxw   房屋收费页面开发完成
409
          isMore: false,
814833f5   wuxw   优化费用缴费代码
410
411
          roomId: this.simplifyRoomFeeInfo.roomId,
          roomName: this.simplifyRoomFeeInfo.roomName,
24d3590f   wuxw   房屋收费页面开发完成
412
413
414
415
          ownerName: this.simplifyRoomFeeInfo.name
        })
      },
      openAddMeterWaterSimplifyModal() {
814833f5   wuxw   优化费用缴费代码
416
        this.$refs.addMeterWater.open({
24d3590f   wuxw   房屋收费页面开发完成
417
418
419
          roomId: this.simplifyRoomFeeInfo.roomId,
          roomName: this.simplifyRoomFeeInfo.roomName,
          ownerName: this.simplifyRoomFeeInfo.name
814833f5   wuxw   优化费用缴费代码
420
        });
24d3590f   wuxw   房屋收费页面开发完成
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
      },
      getAttrValue(attrs, specCd) {
        const attr = attrs.find(item => item.specCd === specCd)
        return attr ? attr.value : ""
      },
      getDeadlineTime(fee) {
        if (fee.amountOwed == 0 && fee.endTime == fee.deadlineTime) return "-"
        if (fee.state == '2009001') return "-"
        return dateFormat(fee.deadlineTime)
      },
      getEndTime(fee) {
        if (fee.state == '2009001') return "-"
        return dateFormat(fee.endTime)
      },
      openProxyFeeModal() {
814833f5   wuxw   优化费用缴费代码
436
        this.$refs.addProxyFee.open({
24d3590f   wuxw   房屋收费页面开发完成
437
438
439
440
441
442
443
444
445
          roomId: this.simplifyRoomFeeInfo.roomId,
          roomName: this.simplifyRoomFeeInfo.roomName,
          ownerName: this.simplifyRoomFeeInfo.name
        })
      },
      payFee(fee) {
        fee.roomName = this.simplifyRoomFeeInfo.roomName
        fee.builtUpArea = this.simplifyRoomFeeInfo.builtUpArea
        this.$router.push({
1a0bdbe0   wuxw   优化缴费页面
446
          path: '/views/fee/payFeeOrder',
24d3590f   wuxw   房屋收费页面开发完成
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
          query: { feeId: fee.feeId }
        })
      },
      editFee(fee) {
        fee.maxEndTime = this.getAttrValue(fee.feeAttrs, '390010')
        this.$refs.editFee.open(fee)
      },
      payFeeHis(fee) {
        fee.builtUpArea = this.simplifyRoomFeeInfo.builtUpArea
        this.$router.push({
          path: '/views/fee/propertyFee',
          query: fee
        })
      },
      deleteFee(fee) {
5f798b88   wuxw   费用功能继续完善
462
        this.$refs.deleteFee.open({
24d3590f   wuxw   房屋收费页面开发完成
463
464
465
466
          communityId: getCommunityId(),
          feeId: fee.feeId
        })
      },
5f798b88   wuxw   费用功能继续完善
467
468
      finishFee(fee) {  
        this.$refs.finishFee.open({
24d3590f   wuxw   房屋收费页面开发完成
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
          communityId: getCommunityId(),
          feeId: fee.feeId
        })
      },
      openTempImportRoomFeeModal() {
        this.$refs.tempImportRoomFee.open({
          roomId: this.simplifyRoomFeeInfo.roomId,
          roomName: this.simplifyRoomFeeInfo.roomName,
          ownerName: this.simplifyRoomFeeInfo.name
        })
      },
      clearSimplifyRoomFeeInfo() {
        const feeConfigs = this.simplifyRoomFeeInfo.feeConfigs
        this.simplifyRoomFeeInfo = {
          total: 0,
          records: 1,
          fees: [],
          monthFees: [],
          accounts: [],
          roomId: '',
          name: '',
          roomName: '',
          floorNum: '',
          unitNum: '',
          roomNum: '',
          feeConfigs: feeConfigs,
          feeTypeCd: '',
          configId: '',
          state: '2008001',
          totalAmount: 0.0,
          roomType: '',
          ownerFee: 'N',
          ownerId: '',
          showFlag: 'DEFAULT'
        }
      },
      changeSimplifyRoomFeeFeeTypeCd(feeTypeCd) {
        this.simplifyRoomFeeInfo.configId = ''
        this.$emit('notify', {})
  
        const params = {
          page: 1,
          row: 50,
          communityId: getCommunityId(),
          feeTypeCd: feeTypeCd,
          isDefault: '',
          valid: '1'
        }
  
        listFeeConfigs(params).then(res => {
          this.simplifyRoomFeeInfo.feeConfigs = res.feeConfigs
        }).catch(error => {
          console.error('Failed to fetch fee configs:', error)
        })
      },
      changeSimplifyRoomConfigId() {
        this.$emit('notify', {})
      },
      simplifyRoomGetFeeOwnerInfo(attrs) {
        const ownerName = this.getAttrValue(attrs, '390008')
        const ownerLink = this.getAttrValue(attrs, '390009')
        return `业主:${ownerName},电话:${ownerLink}`
      },
      getSimplifyRoomFeeRoomName(fee) {
        if (this.simplifyRoomFeeInfo.ownerFee != 'Y') return ''
  
        const attr = fee.feeAttrs.find(item => item.specCd === '390012')
        return attr ? `(${attr.value})` : ''
      },
      openBatchPayRoomFeeModal() {
        this.$router.push({
          path: '/views/fee/batchPayFeeOrder',
          query: {
            ownerId: this.simplifyRoomFeeInfo.ownerId,
            payerObjType: '3333'
          }
        })
      },
      openMonthPayRoomFeeModal() {
        this.$router.push({
          path: '/property/payFeeMonthOrder',
          query: {
            payerObjId: this.simplifyRoomFeeInfo.roomId,
            payerObjType: '3333'
          }
        })
      },
      openRoomCreateFeeComboModal() {
        this.$router.push({
9d019fa6   wuxw   测试OA相关流程
558
          path: '/views/fee/createFeeByCombo',
24d3590f   wuxw   房屋收费页面开发完成
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
          query: {
            payerObjId: this.simplifyRoomFeeInfo.roomId,
            payerObjName: this.simplifyRoomFeeInfo.roomName,
            payerObjType: '3333'
          }
        })
      },
      viewRoomFeeConfig(fee) {
        const params = {
          page: 1,
          row: 1,
          communityId: getCommunityId(),
          configId: fee.configId
        }
  
        listFeeConfigs(params).then(res => {
          const feeConfig = res.feeConfigs[0]
          this.$emit('openViewDataModal', {
            title: `${fee.feeName} 费用项`,
            data: {
              "费用项ID": feeConfig.configId,
              "费用类型": feeConfig.feeTypeCdName,
              "收费项目": feeConfig.feeName,
              "费用标识": feeConfig.feeFlagName,
              "催缴类型": feeConfig.billTypeName,
              "付费类型": feeConfig.paymentCd == '1200' ? '预付费' : '后付费',
              "缴费周期": feeConfig.paymentCycle,
              "应收开始时间": feeConfig.startTime,
              "应收结束时间": feeConfig.endTime,
              "公式": feeConfig.computingFormulaName,
              "计费单价": feeConfig.computingFormula == '2002' ? '-' : feeConfig.squarePrice,
              "附加/固定费用": feeConfig.additionalAmount
            }
          })
        }).catch(error => {
          console.error('Failed to fetch fee config:', error)
        })
      },
      viewRoomFee(fee) {
        const data = {
          "费用ID": fee.feeId,
          "费用标识": fee.feeFlagName,
          "费用类型": fee.feeTypeCdName,
          "付费对象": fee.payerObjName,
          "费用项": fee.feeName,
          "费用状态": fee.stateName,
          "建账时间": fee.startTime,
          "应收开始时间": this.getEndTime(fee),
          "应收结束时间": this.getDeadlineTime(fee),
          "批次": fee.batchId
        }
  
        fee.feeAttrs.forEach(attr => {
          data[attr.specCdName] = attr.value
        })
  
        this.$emit('openViewDataModal', {
          title: `${fee.feeName} 详情`,
          data: data
        })
      },
      changeSimplifyRoomShowFlag() {
        if (this.simplifyRoomFeeInfo.showFlag == 'MONTH') {
          this.listSimplifyRoomMonthFee(1, this.pageSize)
        } else {
          this.listSimplifyRoomFee(1, this.pageSize)
        }
      },
      async listSimplifyRoomMonthFee(page, row) {
        const params = {
          page,
          row,
          communityId: getCommunityId(),
          objId: this.simplifyRoomFeeInfo.roomId,
          payerObjType: '3333',
          configId: this.simplifyRoomFeeInfo.configId,
          feeTypeCd: this.simplifyRoomFeeInfo.feeTypeCd,
          detailId: '-1',
          feeState: '2008001'
        }
  
        if (this.simplifyRoomFeeInfo.ownerFee == 'Y') {
          params.payerObjId = ''
          params.ownerId = this.simplifyRoomFeeInfo.ownerId
        }
  
        try {
          const res = await listMonthFee(params)
          this.simplifyRoomFeeInfo.total = res.total
          this.simplifyRoomFeeInfo.records = res.records
          let totalAmount = 0.0
  
          res.data.forEach(item => {
            totalAmount += parseFloat(item.receivableAmount)
          })
  
          this.simplifyRoomFeeInfo.totalAmount = totalAmount.toFixed(2)
          this.simplifyRoomFeeInfo.monthFees = res.data
        } catch (error) {
          console.error('Failed to fetch month fee list:', error)
        }
      },
      handleCurrentChange(page) {
        this.currentPage = page
        if (this.simplifyRoomFeeInfo.showFlag == 'MONTH') {
          this.listSimplifyRoomMonthFee(page, this.pageSize)
        } else {
          this.listSimplifyRoomFee(page, this.pageSize)
        }
      },
      // 其他方法类似
    }
  }
  </script>
  
  <style scoped>
  .margin-top-lg {
    margin-top: 20px;
  }
  
  .margin-top {
    margin-top: 15px;
  }
  
  .text-right {
    text-align: right;
  }
  
  .hand {
    cursor: pointer;
  }
  </style>