cloudroam
2025-03-28 cef2bb0eeeb91a22860cf5d23c7348af1ba921dc
1
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
<template>
  <div class="base-page-wrapper coupon-detail">
    <el-bus-title title="优惠券信息" size="small" />
    <el-bus-form
      ref="form"
      label-width="auto"
      :content="formContent"
      readonly
      class="readonly-form"
    />
    <div class="base-page-wrapper__line"></div>
    <el-bus-title title="兑换记录" size="small" />
    <el-bus-crud v-bind="recordTableConfig" />
    <div class="text-center mt-20">
      <el-button class="min-w-100" @click="goBack">返回</el-button>
    </div>
  </div>
</template>
 
<script>
import {
  couponForm,
  couponRecordColumn,
  recordTableConfig,
} from '@/utils/coupon-form'
import CouponDetail from '@/plugins/mixins/coupon-detail.vue'
export default {
  mixins: [CouponDetail],
  data() {
    return {
      detailUrl: `flower/api/v2/coupon/point`,
      formContent: [
        {
          type: 'row',
          items: [
            ...couponForm(),
            {
              label: '领取后有效时间:',
              id: 'usageTimeNum',
              inputFormat: (row) => {
                return `${row.usageTimeNum}${row.usageTimeTypeName}`
              },
            },
            { label: '库存:', id: 'couponAmount' },
            { label: '积分数量:', id: 'point' },
          ],
        },
      ],
      recordTableConfig: {
        ...recordTableConfig(this.$route.params.id),
        columns: [...couponRecordColumn('兑换时间')],
      },
    }
  },
  head() {
    return {
      title: '积分优惠券详情',
    }
  },
}
</script>
 
<style lang="scss" scoped>
@import '@/assets/coupon/detail.scss';
</style>