Blame view

src/views/fee/payFeeConfigDiscountManageList.vue 5.27 KB
f0032091   wuxw   完成费用项页面
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <template>
    <el-card class="pay-fee-config-discount-manage">
      <div slot="header">
        <el-row type="flex" justify="space-between" align="middle">
          <el-col :span="12" class="text-left">
            <h5>{{ $t('payFeeConfigDiscountManage.title') }}</h5>
          </el-col>
          <el-col :span="12" class="text-right">
            <el-button type="primary" size="small" @click="goBack">
              {{ $t('common.back') }}
            </el-button>
            <el-button type="primary" size="small" icon="el-icon-plus" @click="openAddModal">
              {{ $t('common.add') }}
            </el-button>
          </el-col>
        </el-row>
      </div>
  
      <el-table :data="payFeeConfigDiscounts" border style="width: 100%">
        <el-table-column prop="configDiscountId" :label="$t('payFeeConfigDiscountManage.discountId')" align="center" />
76d4c8fc   wuxw   优惠需要申请测试中
21
22
23
24
25
        <el-table-column prop="feeName" :label="$t('payFeeConfigDiscountManage.feeName')" align="center" >
          <template >
            {{ feeName }}
          </template>
        </el-table-column>
f0032091   wuxw   完成费用项页面
26
27
28
29
30
31
32
33
34
35
        <el-table-column prop="discountName" :label="$t('payFeeConfigDiscountManage.discountName')" align="center" />
        <el-table-column :label="$t('payFeeConfigDiscountManage.rule')" align="center">
          <template slot-scope="scope">
            <div v-for="(item, index) in scope.row.feeDiscountSpecs" :key="index">
              {{ item.specName }}:{{ item.specValue }}
            </div>
          </template>
        </el-table-column>
        <el-table-column :label="$t('payFeeConfigDiscountManage.discountType')" align="center">
          <template slot-scope="scope">
76d4c8fc   wuxw   优惠需要申请测试中
36
37
            {{ scope.row.discountType === '1001' ? $t('payFeeConfigDiscountManage.discount') :
              $t('payFeeConfigDiscountManage.penalty') }}
f0032091   wuxw   完成费用项页面
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
          </template>
        </el-table-column>
        <el-table-column :label="$t('payFeeConfigDiscountManage.paymentPeriod')" align="center">
          <template slot-scope="scope">
            {{ scope.row.startTime }}<br />~{{ scope.row.endTime }}
          </template>
        </el-table-column>
        <el-table-column prop="payMaxEndTime" :label="$t('payFeeConfigDiscountManage.discountEndTime')" align="center" />
        <el-table-column :label="$t('common.operation')" align="center" width="150">
          <template slot-scope="scope">
            <el-button type="danger" size="mini" @click="openDeleteModal(scope.row)">
              {{ $t('common.delete') }}
            </el-button>
          </template>
        </el-table-column>
      </el-table>
  
      <el-row class="margin-top-xs">
963f5a4f   wuxw   车辆功能测试完成
56
        <el-col :span="21" class="text-left discount-desc">
f0032091   wuxw   完成费用项页面
57
58
59
60
61
62
          <div>{{ $t('payFeeConfigDiscountManage.paymentPeriodTip') }}</div>
          <div>{{ $t('payFeeConfigDiscountManage.discountEndTimeTip') }}</div>
          <div>{{ $t('payFeeConfigDiscountManage.currentYearTip1') }}</div>
          <div>{{ $t('payFeeConfigDiscountManage.currentYearTip2') }}</div>
        </el-col>
        <el-col :span="3" class="text-right">
76d4c8fc   wuxw   优惠需要申请测试中
63
64
65
          <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
            :total="page.total" layout="total, prev, pager, next" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
f0032091   wuxw   完成费用项页面
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
        </el-col>
      </el-row>
  
      <add-pay-fee-config-discount ref="addModal" @success="fetchData" />
      <delete-pay-fee-config-discount ref="deleteModal" @success="fetchData" />
    </el-card>
  </template>
  
  <script>
  import { getPayFeeConfigDiscountList } from '@/api/fee/payFeeConfigDiscountManageApi'
  import AddPayFeeConfigDiscount from '@/components/fee/addPayFeeConfigDiscount'
  import DeletePayFeeConfigDiscount from '@/components/fee/deletePayFeeConfigDiscount'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'PayFeeConfigDiscountManageList',
    components: {
      AddPayFeeConfigDiscount,
      DeletePayFeeConfigDiscount
    },
    data() {
      return {
        payFeeConfigDiscounts: [],
        page: {
          current: 1,
          size: 10,
          total: 0
        },
        configId: '',
        feeName: '',
        communityId: ''
      }
    },
    created() {
      this.communityId = getCommunityId()
      this.configId = this.$route.query.configId
      this.feeName = this.$route.query.feeName
      this.fetchData()
    },
    methods: {
      async fetchData() {
        try {
          const params = {
            page: this.page.current,
            row: this.page.size,
            configId: this.configId,
            communityId: this.communityId
          }
          const response = await getPayFeeConfigDiscountList(params)
          this.payFeeConfigDiscounts = response.data
          this.page.total = response.total
        } catch (error) {
          this.$message.error(this.$t('payFeeConfigDiscountManage.fetchError'))
        }
      },
      handleSizeChange(size) {
        this.page.size = size
        this.fetchData()
      },
      handleCurrentChange(current) {
        this.page.current = current
        this.fetchData()
      },
      goBack() {
        this.$router.go(-1)
      },
      openAddModal() {
        this.$refs.addModal.open(this.configId)
      },
      openDeleteModal(row) {
        this.$refs.deleteModal.open(row)
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .pay-fee-config-discount-manage {
    .margin-top-xs {
      margin-top: 20px;
    }
76d4c8fc   wuxw   优惠需要申请测试中
147
  
f0032091   wuxw   完成费用项页面
148
149
150
    .text-right {
      text-align: right;
    }
76d4c8fc   wuxw   优惠需要申请测试中
151
  
963f5a4f   wuxw   车辆功能测试完成
152
153
154
155
156
    .discount-desc {
      text-align: left;
      font-size: 13px;
      color: #606266;
    }
f0032091   wuxw   完成费用项页面
157
158
  }
  </style>