wordReportDialog.vue
5.36 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<template>
<GLDialog :mode="mode" title="文字喜报配置" :before-close="handlebattleClose" :visible.sync="isDialogVisible" @onOk="handlebattleConfirm" @onCancel="handlebattleClose">
<div class="popup-wrap">
<div class="left-wrap">
<div class="img-wrap">
<img src="@/assets/wordReport_qy.png" />
</div>
<p class="color-3 txt-center text-14">图示效果</p>
</div>
<div class="right-wrap">
<el-form ref="form" :model="form" label-width="120px">
<div class="item-line">
<el-form-item label="编辑文本:" class="verbal-wrap">
<verbal :showNewMaxNum="true" :btnList="btnList" :maxNum="2000" :mapList="mapList" ref="verbalRef"></verbal>
</el-form-item>
</div>
</el-form>
<div class="explain">
<div class="color6 weight-6 font-14">
<i class="el-icon-warning"></i>
推送机制说明
</div>
<p class="mrp">推送2.1会员权益场景的商品,驻店在小程序端下单,客户支付成功后产生有效订单时自动推送,订单金额低于1元时四舍五入为0元产值订单进行推送,测试订单不推送。</p>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import dialog from './dialog'
export default {
mixins: [dialog],
data() {
return {
mode: 'big',
wordType: {
switchType: 2401,
switchText: ''
},
btnList: [
{
type: 1,
name: '表情'
},
{
type: 2,
name: '销售顾问'
},
{
type: 2,
name: '客户姓名'
},
{
type: 2,
name: '转化人员'
},
{
type: 2,
name: '商品名称'
},
{
type: 2,
name: '车辆价格'
},
{
type: 2,
name: '今日单量'
},{
type: 2,
name: '部门名称累计:本月累计单量'
},{
type: 2,
name: '本月累计单量'
},{
type: 2,
name: '本月累计产值'
},{
type: 2,
name: '订单总金额'
},{
type: 2,
name: '流量店门店名称'
},
],
params: ['wordType'],
mapList: {
销售顾问: '${referrer}',
客户姓名: '${customerName}',
转化人员: '${transferName}',
车辆价格: '${carPrice}',
商品名称: '${goodsNames}',
今日单量: '${orderNumber}',
'部门名称累计:本月累计单量': '${departmentNameOrderNumber}',
本月累计单量: '${monthOrderNumber}',
本月累计产值: '${monthTurnover}',
订单总金额: '${orderPrice}',
流量店门店名称: '${merchantName4s}',
}
}
},
methods: {
initData() {
this.switchList.wordReport.forEach(i => {
this.params.find(data => {
if (this[data].switchType == i.switchType) {
this[data] = this.$common.utils.deepClone(i)
}
})
})
this.$nextTick(() => {
this.$refs.verbalRef && this.$refs.verbalRef.update(this.wordType.switchText)
})
},
handlebattleConfirm() {
this.isDialogVisible = false
let switchList = []
this.params.forEach(data => {
if (data == 'wordType') this[data].switchText = this.$refs.verbalRef.getTextValue()
switchList.push(this[data])
})
this.$emit('handlePreview', { key: 'wordReport', data: switchList })
}
}
}
</script>
<style lang="scss" scoped>
.popup-wrap {
display: flex;
padding: 0 28px;
.img-wrap {
width: 250px;
height: 560px;
margin-bottom: 14px;
img {
width: 100%;
height: 100%;
}
}
.right-wrap {
margin-top: 12px;
/deep/.el-form-item {
margin-bottom: 0px;
}
.item-line {
margin-bottom: 20px;
}
.switchStyle /deep/ .el-switch__label {
position: absolute;
display: none;
color: #fff;
font-size: 12px !important;
line-height: 20px;
}
.el-switch__core {
background-color: rgba(166, 166, 166, 1);
}
.switchStyle /deep/.el-switch__label--left {
z-index: 9;
left: 20px;
}
.switchStyle /deep/ .el-switch__label--right {
z-index: 9;
left: 4px;
}
.switchStyle /deep/ .el-switch__label.is-active {
display: block;
}
.switchStyle /deep/ .el-switch__core {
width: 56px !important;
}
.switchStyle /deep/ .el-switch__label {
width: 56px !important;
}
.explain {
width: 592px;
background: #f4f6fc;
padding: 16px;
margin-left: 120px;
box-sizing: border-box;
position: absolute;
bottom: 85px;
.el-icon-warning {
width: 16px;
height: 16px;
margin-right: 4px;
}
.mrp {
margin: 8px 0 0 20px;
line-height: 22px;
}
}
}
.warn {
font-size: 12px;
color: #999999;
margin-left: 154px;
}
.verbal-wrap {
/deep/ .el-form-item__content {
width: 592px;
}
/deep/ .w-textarea_input {
height: 328px;
}
/deep/ .btn-group-panel .btn-group {
flex-wrap: wrap;
justify-content: none;
.add-btn {
margin-bottom: 5px;
}
}
}
}
</style>