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
66
67
68
69
70
71
72
73
74
75
| <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,
| getActivityReceiveTime,
| getActivityEffectiveTime,
| } from '@/utils/coupon-form'
| import CouponDetail from '@/plugins/mixins/coupon-detail.vue'
| export default {
| mixins: [CouponDetail],
| data() {
| return {
| detailUrl: `flower/api/v2/coupon/avtivy`,
| formContent: [
| {
| type: 'row',
| items: [
| ...couponForm(),
| { label: '发放数量:', id: 'couponAmount', type: 'input' },
| { label: '每人限领:', id: 'getLimit', type: 'input' },
| { label: '已领取:', id: 'getNum', type: 'input' },
| { label: '剩余:', id: 'unGetNum', type: 'input' },
| { label: '领取渠道:', id: 'getTypeName', type: 'input' },
| {
| label: '领取时间:',
| id: 'getStartDate',
| inputFormat: (row) => getActivityReceiveTime(row),
| span: 24,
| },
| {
| label: '有效期:',
| id: 'usageStartDate',
| inputFormat: (row) => getActivityEffectiveTime(row),
| span: 24,
| },
| ],
| },
| ],
| recordTableConfig: {
| ...recordTableConfig(this.$route.params.id),
| columns: [...couponRecordColumn('领取时间')],
| },
| }
| },
| head() {
| return {
| title: '活动优惠券详情',
| }
| },
| }
| </script>
|
| <style lang="scss" scoped>
| @import '@/assets/coupon/detail.scss';
| </style>
|
|