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
| <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/vip`,
| formContent: [
| {
| type: 'row',
| items: [
| ...couponForm(),
| { label: '已发放总数:', id: 'getNum' },
| {
| label: '有效期:',
| id: 'usageStartDate',
| inputFormat: (row) => {
| return row.usageStartDate
| ? `${row.usageStartDate} ~ ${row.usageEndDate || ''}`
| : ''
| },
| span: 24,
| },
| ],
| },
| ],
| recordTableConfig: {
| ...recordTableConfig(this.$route.params.id),
| columns: [...couponRecordColumn('发放时间')],
| },
| }
| },
| head() {
| return {
| title: '会员优惠券详情',
| }
| },
| }
| </script>
|
| <style lang="scss" scoped>
| @import '@/assets/coupon/detail.scss';
| </style>
|
|