gift.js
3.23 KB
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
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
import { mapState } from 'vuex'
export default {
data() {
return {
currentIndex: '1',
goodsIndex: 1,
serviceIndex: 7,
carList: [],
selectedCarList: [],
goodsTabList: [
{ label: '卡券', type: 1 },
{ label: '直充', type: 2 }
],
serviceTabList: [
{ label: '门店服务', type: 7 },
{ label: '折扣券', type: 2 },
{ label: '代金券', type: 3 },
{ label: '兑换券', type: 4 }
],
carTableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
checkSelectKey: 'packageCode',
checkSelectVal: '',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '名称',
prop: 'packageName',
width: 300,
formatter: cellValue => {
return cellValue.packageName || cellValue.serviceName
}
},
{
label: '价格',
prop: 'packageServicePeriod',
addHtml: 'price'
}
]
},
serviceList: [],
selectedServiceList: [],
serviceTableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
checkSelectKey: 'id',
checkSelectVal: '',
checkSelectable: null,
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '名称',
prop: 'couponName',
width: 180
},
{
label: '预估成本/元',
prop: 'anticipatedCost',
formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2)
}
},
{
label: '有效期',
prop: 'effectiveType',
addHtml: 'effectiveType'
},
{
label: '使用限制',
prop: 'useType',
addHtml: 'useType'
},
{
label: '剩余库存',
prop: 'residueAmount',
formatter: cellValue => {
return '无限制'
}
}
]
},
goodsList: [],
selectedGoodsList: [],
goodsTableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '品牌',
prop: 'brandName',
width: 120
},
{
label: '商品名称',
prop: 'goodsName',
width: 180
},
{
label: '劵面额',
prop: 'denomination',
formatter: cellValue => {
return isNaN(cellValue.denomination) ? cellValue.denomination : (cellValue.denomination / 100).toFixed(2) + '元'
}
},
{
label: '有效期',
prop: 'effectiveDays',
formatter: cellValue => {
return cellValue.effectiveDays + '天'
}
}
]
}
}
},
computed: {
...mapState('marketing', ['subscribe'])
}
}