Blame view

src/components/fee/viewFeeConfigData.vue 2.78 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
1a0bdbe0   wuxw   优化缴费页面
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    <el-dialog
      :title="title"
      :visible.sync="dialogVisible"
      width="50%"
      @close="handleClose"
    >
      <el-table
        :data="tableData"
        border
        style="width: 100%"
      >
        <el-table-column
          prop="label"
          :label="$t('viewFeeConfigData.label')"
          width="180"
        />
        <el-table-column
          prop="value"
          :label="$t('viewFeeConfigData.value')"
        />
      </el-table>
    </el-dialog>
24d3590f   wuxw   房屋收费页面开发完成
24
25
26
27
  </template>
  
  <script>
  import { getCommunityId } from '@/api/community/communityApi'
24d3590f   wuxw   房屋收费页面开发完成
28
29
30
31
32
  
  export default {
    name: 'ViewFeeConfigData',
    data() {
      return {
1a0bdbe0   wuxw   优化缴费页面
33
34
35
36
        dialogVisible: false,
        title: '',
        tableData: [],
        configId: ''
24d3590f   wuxw   房屋收费页面开发完成
37
38
      }
    },
24d3590f   wuxw   房屋收费页面开发完成
39
40
41
    methods: {
      open(params) {
        this.configId = params.configId
1a0bdbe0   wuxw   优化缴费页面
42
43
44
45
46
        this.loadFeeConfigData()
        this.dialogVisible = true
      },
      close() {
        this.dialogVisible = false
24d3590f   wuxw   房屋收费页面开发完成
47
      },
1a0bdbe0   wuxw   优化缴费页面
48
      async loadFeeConfigData() {
24d3590f   wuxw   房屋收费页面开发完成
49
        try {
1a0bdbe0   wuxw   优化缴费页面
50
51
          const communityId = await getCommunityId()
          const params = {
24d3590f   wuxw   房屋收费页面开发完成
52
53
            page: 1,
            row: 1,
1a0bdbe0   wuxw   优化缴费页面
54
            communityId,
24d3590f   wuxw   房屋收费页面开发完成
55
            configId: this.configId
24d3590f   wuxw   房屋收费页面开发完成
56
          }
1a0bdbe0   wuxw   优化缴费页面
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
  
          const response = await this.$http.get('/feeConfig.listFeeConfigs', { params })
          const feeConfig = response.data.feeConfigs[0]
  
          this.title = `${feeConfig.feeName} ${this.$t('viewFeeConfigData.feeItem')}`
  
          this.tableData = [
            { label: this.$t('viewFeeConfigData.configId'), value: feeConfig.configId },
            { label: this.$t('viewFeeConfigData.feeType'), value: feeConfig.feeTypeCdName },
            { label: this.$t('viewFeeConfigData.feeName'), value: feeConfig.feeName },
            { label: this.$t('viewFeeConfigData.feeFlag'), value: feeConfig.feeFlagName },
            { label: this.$t('viewFeeConfigData.billType'), value: feeConfig.billTypeName },
            { label: this.$t('viewFeeConfigData.paymentType'), value: feeConfig.paymentCd === '1200' ? this.$t('viewFeeConfigData.prepay') : this.$t('viewFeeConfigData.postpay') },
            { label: this.$t('viewFeeConfigData.paymentCycle'), value: feeConfig.paymentCycle },
            { label: this.$t('viewFeeConfigData.billingStartTime'), value: feeConfig.startTime },
            { label: this.$t('viewFeeConfigData.billingEndTime'), value: feeConfig.endTime },
            { label: this.$t('viewFeeConfigData.formula'), value: feeConfig.computingFormulaName },
            { label: this.$t('viewFeeConfigData.unitPrice'), value: feeConfig.computingFormula === '2002' ? '-' : feeConfig.squarePrice },
            { label: this.$t('viewFeeConfigData.additionalFee'), value: feeConfig.additionalAmount }
          ]
24d3590f   wuxw   房屋收费页面开发完成
77
78
79
        } catch (error) {
          console.error('加载费用配置数据失败:', error)
        }
1a0bdbe0   wuxw   优化缴费页面
80
81
82
83
84
      },
      handleClose() {
        this.tableData = []
        this.title = ''
        this.configId = ''
24d3590f   wuxw   房屋收费页面开发完成
85
86
87
      }
    }
  }
1a0bdbe0   wuxw   优化缴费页面
88
  </script>