Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
6f0fcdf6
Commit
6f0fcdf6
authored
Mar 23, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate: 四个场景
parent
eb614a7e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
143 additions
and
147 deletions
+143
-147
form.vue
src/views/ai/form.vue
+33
-13
holidayActiveTime.vue
src/views/ai/holidayActiveTime.vue
+110
-9
holidayPop.vue
src/views/ai/holidayPop.vue
+0
-125
No files found.
src/views/ai/form.vue
View file @
6f0fcdf6
...
...
@@ -28,6 +28,12 @@
<el-radio
v-model=
"form.memberType"
:label=
"0"
@
change=
"onChangeEffectType"
>
客户筛选
</el-radio>
<el-radio
v-model=
"form.memberType"
:label=
"1"
@
change=
"onChangeEffectType"
>
客户分组
</el-radio>
</el-form-item>
<el-form-item
label=
"消费条件"
v-if=
"form.scene == 4"
>
<div><el-checkbox
v-model=
"form.consume_days_flag"
:true-label=
"1"
:false-label=
"0"
>
最近消费间隔
</el-checkbox>
<el-input-number
v-model=
"form.consume_days"
controls-position=
"right"
:max=
"730"
:min=
"30"
size=
"small"
/>
天
</div>
<div><el-checkbox
v-model=
"form.consume_times_flag"
:true-label=
"1"
:false-label=
"0"
>
最近消费次数
</el-checkbox>
<el-input-number
v-model=
"form.consume_times"
controls-position=
"right"
:max=
"100"
:min=
"1"
size=
"small"
/>
次
</div>
<div><el-checkbox
v-model=
"form.consume_amount_flag"
:true-label=
"1"
:false-label=
"0"
>
累计消费金额
</el-checkbox>
<el-input-number
v-model=
"form.consume_amount"
controls-position=
"right"
:max=
"100000"
:min=
"1"
size=
"small"
/>
元
</div>
<el-button
size=
"small"
>
添加其它条件
</el-button>
</el-form-item>
<el-form-item
label=
"预计覆盖人数"
>
<span
class=
"bold"
>
{{
form
.
planMemberCount
}}
</span>
<span
class=
"tips"
>
不包含无手机号的客户,以最终活动覆盖人数为准
</span>
...
...
@@ -238,8 +244,14 @@ export default {
scene
:
''
,
//活动场景 「1 客户生日」、「2 节日活动邀约」、「3 加企微好友」、「4 客户复购」、「5 其它场景」
aiTemplateId
:
''
,
//话术模板id
memberType
:
0
,
// 会员类型(0:会员筛选,1:会员分组)
filterJson
:
'
{"list":[{"type":"or","list":[{"type":"data","data":{"key":"city","compute":"in","value":"330100"}}]},{"type":"or","list":[{"type":"data","data":{"key":"mainStoreId","compute":"in","value":"e8fdc210a59411ecb9cb9f7ed8d63716","dealKey":"storeWidget"}}]}],"type":"and"}
'
,
filterJson
:
'
dc22f2f3f66a405f8cede4e7cabdca93,e1a819ba985a40caa14c2018feb4fc24
'
,
analyseFlag
:
1
,
//活动分析
consume_days_flag
:
0
,
// 【最新消费金额 0否1是】
consume_days
:
''
,
consume_times_flag
:
0
,
//【有效消费次数 0否1是】
consume_times
:
''
,
consume_amount_flag
:
0
,
// 【累计消费金额 0否1是】
consume_amount
:
''
,
labelFlag
:
0
,
//是否根据客户意向打标签
smsFlag
:
0
,
//是否根据客户意向发送挂机短信
recallFlag
:
0
,
//是否根据未接通状态设置重拨
...
...
@@ -344,7 +356,7 @@ export default {
const
{
activityId
,
activityName
,
activityPlanList
,
analyseAmount
,
analyseDays
,
analyseFlag
,
startDate
,
endDate
,
scene
}
=
result
;
const
{
activityEventList
,
filterJson
,
memberType
,
planId
,
planMemberCount
,
planName
,
sceneJson
}
=
activityPlanList
[
0
];
const
{
aiEventId
,
aiTemplateId
,
callFlag
,
callTime
,
eventId
,
labelFlag
,
recallFlag
,
smsFlag
,
labelJson
,
recallJson
,
smsJson
}
=
activityEventList
[
0
];
const
{
birth_type
,
birth_days
,
holiday_type
,
holiday_name
,
holiday_date
}
=
JSON
.
parse
(
sceneJson
);
const
{
birth_type
,
birth_days
,
holiday_type
,
holiday_name
,
holiday_date
,
consume_days_flag
,
consume_days
,
consume_times_flag
,
consume_times
,
consume_amount_flag
,
consume_amount
}
=
JSON
.
parse
(
sceneJson
);
this
.
form
=
{
activityName
,
//活动名称
activityId
,
//活动id
...
...
@@ -359,15 +371,19 @@ export default {
planMemberCount
,
//覆盖人数
analyseDays
,
//分析天数
analyseAmount
,
//销售额
holiday_type
,
// 节日活动场景特有值 节日类型
holiday_name
,
// 节日活动场景特有值 节日名称
holiday_date
,
// 节日活动场景特有值 节日日期
consume_days_flag
,
// 客服复购场景 【最新消费金额 0否1是】
consume_days
,
consume_times_flag
,
// 客服复购场景 【有效消费次数 0否1是】
consume_times
,
consume_amount_flag
,
// 客服复购场景 【累计消费金额 0否1是】
consume_amount
,
planId
,
planName
,
aiEventId
,
eventId
};
if
(
scene
==
1
)
{
// 活动时间回显
this
.
birthTimeData
=
{
birth_days
,
// 生日前xx天
birthDate1
:
[
startDate
,
endDate
],
//生日范围 当天
...
...
@@ -384,7 +400,7 @@ export default {
holiday_date
,
//节日活动场景特有值 节日日期
holiday_day
:
''
,
// 节日时间
callFlag
,
//外呼时段 0 默认 1 自定义
callTime
,
// 自定义时段
callTime
:
callFlag
==
1
?
callTime
:
[]
,
// 自定义时段
startDate
,
//有效时间
endDate
//有效时间
};
...
...
@@ -392,11 +408,9 @@ export default {
this
.
activeTimeData
=
{
activeTime
:
[
startDate
,
endDate
],
//有效时间
callFlag
,
//外呼时段 0 默认 1 自定义
callTime
// 自定义时段
callTime
:
callFlag
==
1
?
callTime
:
[]
// 自定义时段
};
}
console
.
log
(
this
.
birthTimeData
);
console
.
log
(
this
.
activeTimeData
);
if
(
labelFlag
)
{
this
.
tagMatchList
=
JSON
.
parse
(
labelJson
);
}
...
...
@@ -420,7 +434,7 @@ export default {
console
.
log
(
obj
);
console
.
log
(
this
.
form
);
if
(
val
)
{
const
{
activityName
,
scene
,
analyseFlag
,
analyseDays
,
analyseAmount
,
planName
,
memberType
,
filterJson
,
aiTemplateId
,
labelFlag
,
smsFlag
,
recallFlag
,
activityId
,
planId
,
aiEventId
,
eventId
,
planMemberCount
}
=
this
.
form
;
const
{
activityName
,
scene
,
analyseFlag
,
analyseDays
,
analyseAmount
,
planName
,
memberType
,
filterJson
,
aiTemplateId
,
labelFlag
,
smsFlag
,
recallFlag
,
activityId
,
planId
,
aiEventId
,
eventId
,
planMemberCount
,
consume_days_flag
,
consume_days
,
consume_times_flag
,
consume_times
,
consume_amount_flag
,
consume_amount
}
=
this
.
form
;
let
sceneJson
=
JSON
.
stringify
({});
if
(
scene
==
1
)
{
sceneJson
=
JSON
.
stringify
({
...
...
@@ -433,6 +447,15 @@ export default {
holiday_type
,
holiday_name
});
}
else
if
(
scene
==
4
)
{
sceneJson
=
JSON
.
stringify
({
consume_days_flag
,
consume_days
,
consume_times_flag
,
consume_times
,
consume_amount_flag
,
consume_amount
});
}
const
data
=
{
activityId
,
...
...
@@ -498,9 +521,6 @@ export default {
this
.
smsDialogVisible
=
true
;
this
.
currentIndex
=
index
;
},
confirmSmsDialog
()
{
this
.
smsDialogVisible
=
false
;
},
handleSmsTemplateClose
(
item
)
{
const
obj
=
this
.
smsList
.
find
(
val
=>
val
.
template
==
item
.
template
);
obj
.
template
=
''
;
...
...
src/views/ai/holidayActiveTime.vue
View file @
6f0fcdf6
...
...
@@ -31,14 +31,29 @@
<span
v-if=
"!activeTime"
class=
"tips"
style=
"font-size: 14px;margin:0"
>
设置【节日日期】和【外呼时间】后自动生成
</span>
<span
v-else
>
{{
activeTime
}}
</span>
</el-form-item>
<holiday-pop
:show
.
sync=
"visible"
@
sendItem=
"handleSendItem"
/>
<el-dialog
title=
"选择节日"
:visible
.
sync=
"visible"
width=
"700px"
:before-close=
"close"
>
<div
class=
"tips"
>
仅支持选择节日日期为最近1-60天内的节日
</div>
<div
class=
"holiday"
v-for=
"item in holidayData"
:key=
"item.id"
>
<dm-sub-title>
{{
item
.
id
}}
级
</dm-sub-title>
<div
class=
"radioLine"
>
<el-radio
v-model=
"selectedData"
:label=
"val"
v-for=
"val in item.holidaysList"
:key=
"val.id"
>
{{
val
.
name
}}
</el-radio>
</div>
</div>
<span
slot=
"footer"
>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"addItem"
>
确定
</el-button>
</span>
</el-dialog>
</el-form>
</
template
>
<
script
>
import
defineTime
from
'./defineTime.vue'
;
import
{
formatDateTimeByType
,
getTimesByReq
}
from
'@/utils/index'
;
import
holidayPop
from
'./holidayPop.vue'
;
import
{
listAllHolidays
}
from
'@/service/api/aiApi.js'
;
export
default
{
data
()
{
return
{
...
...
@@ -46,13 +61,69 @@ export default {
getTimesByReq
,
form
:
{
holiday_type
:
1
,
// 节日活动场景特有值 节日类型 1推荐 2自定义
holiday_name
:
'
妇女
节'
,
// 节日活动场景特有值 节日名称
holiday_date
:
'2022-
03-08
'
,
//节日活动场景特有值 节日日期
holiday_name
:
'
国庆
节'
,
// 节日活动场景特有值 节日名称
holiday_date
:
'2022-
10-01
'
,
//节日活动场景特有值 节日日期
holiday_day
:
''
,
// 外呼时间
callFlag
:
0
,
//外呼时段 0 默认 1 自定义
callTime
:
[{}]
// 自定义时段
},
rules
:
{},
holidayData
:
[
{
id
:
'S'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'1'
,
// 节日配置ID
name
:
'妇女节'
,
//节日配置名称
date
:
'2020-03-08'
//节日配置日期
},
{
id
:
'2'
,
// 节日配置ID
name
:
'618'
,
//节日配置名称
date
:
'2020-06-18'
//节日配置日期
},
{
id
:
'3'
,
// 节日配置ID
name
:
'端午节端午节端午'
,
//节日配置名称
date
:
'2020-10-01'
//节日配置日期
}
]
},
{
id
:
'A'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'4'
,
// 节日配置ID
name
:
'端午节'
,
//节日配置名称
date
:
'2020-05-05'
//节日配置日期
},
{
id
:
'5'
,
// 节日配置ID
name
:
'中秋节'
,
//节日配置名称
date
:
'2020-07-15'
//节日配置日期
},
{
id
:
'6'
,
// 节日配置ID
name
:
'愚人节'
,
//节日配置名称
date
:
'2020-04-01'
//节日配置日期
}
]
},
{
id
:
'B'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'7'
,
// 节日配置ID
name
:
'元宵节'
,
//节日配置名称
date
:
'2020-01-01'
//节日配置日期
}
]
}
],
selectedData
:
''
,
visible
:
false
};
},
...
...
@@ -62,6 +133,9 @@ export default {
default
:
()
=>
{}
}
},
mounted
()
{
this
.
getListAllHolidays
();
},
watch
:
{
data
(
val
)
{
if
(
val
)
{
...
...
@@ -82,16 +156,34 @@ export default {
}
},
components
:
{
defineTime
,
holidayPop
defineTime
},
methods
:
{
handleHolidayDay
()
{
// 回显时 根据活动有效期和节日日期 算出外呼时间
this
.
form
.
holiday_day
=
((
getTimesByReq
(
this
.
form
.
holiday_date
)
-
this
.
form
.
startDate
)
/
24
)
*
60
*
60
*
1000
;
},
handleSendItem
(
item
)
{
console
.
log
(
item
);
async
getListAllHolidays
()
{
const
{
result
}
=
await
listAllHolidays
();
console
.
log
(
result
);
if
(
result
)
{
// this.holidayData = result;
}
},
addItem
()
{
if
(
!
this
.
selectedData
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'未选择节日'
});
return
;
}
const
{
date
,
name
}
=
this
.
selectedData
;
this
.
form
.
holiday_name
=
name
;
this
.
form
.
holiday_date
=
date
;
this
.
close
();
},
close
()
{
this
.
selectedData
=
''
;
this
.
visible
=
false
;
},
submit
()
{
return
new
Promise
(
async
resolve
=>
{
...
...
@@ -130,7 +222,7 @@ export default {
};
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.tips
{
font-size
:
12px
;
font-weight
:
400
;
...
...
@@ -138,4 +230,13 @@ export default {
line-height
:
17px
;
margin-left
:
20px
;
}
.radioLine
{
padding
:
12px
0
24px
0
;
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
15px
;
.el-radio
{
margin
:
0
;
}
}
</
style
>
src/views/ai/holidayPop.vue
deleted
100644 → 0
View file @
eb614a7e
<
template
>
<el-dialog
title=
"选择节日"
:visible
.
sync=
"show"
width=
"700px"
:before-close=
"close"
>
<div
class=
"tips"
>
仅支持选择节日日期为最近1-60天内的节日
</div>
<div
class=
"holiday"
v-for=
"item in holidayData"
:key=
"item.id"
>
<dm-sub-title>
{{
item
.
id
}}
级
</dm-sub-title>
<div
class=
"section"
>
<el-radio
v-model=
"selectedData"
:label=
"val"
v-for=
"val in item.holidaysList"
:key=
"val.id"
>
{{
val
.
name
}}
</el-radio>
</div>
</div>
<span
slot=
"footer"
>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"addItem"
>
确定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
listAllHolidays
}
from
'@/service/api/aiApi.js'
;
export
default
{
props
:
{
show
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
holidayData
:
[
{
id
:
'S'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'1'
,
// 节日配置ID
name
:
'妇女节'
,
//节日配置名称
date
:
'2020-03-08'
//节日配置日期
},
{
id
:
'2'
,
// 节日配置ID
name
:
'618'
,
//节日配置名称
date
:
'2020-06-18'
//节日配置日期
},
{
id
:
'3'
,
// 节日配置ID
name
:
'端午节端午节端午'
,
//节日配置名称
date
:
'2020-10-01'
//节日配置日期
}
]
},
{
id
:
'A'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'4'
,
// 节日配置ID
name
:
'端午节'
,
//节日配置名称
date
:
'2020-05-05'
//节日配置日期
},
{
id
:
'5'
,
// 节日配置ID
name
:
'中秋节'
,
//节日配置名称
date
:
'2020-07-15'
//节日配置日期
},
{
id
:
'6'
,
// 节日配置ID
name
:
'愚人节'
,
//节日配置名称
date
:
'2020-04-01'
//节日配置日期
}
]
},
{
id
:
'B'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'7'
,
// 节日配置ID
name
:
'元宵节'
,
//节日配置名称
date
:
'2020-01-01'
//节日配置日期
}
]
}
],
selectedData
:
{}
};
},
mounted
()
{
this
.
getListAllHolidays
();
},
methods
:
{
async
getListAllHolidays
()
{
const
{
result
}
=
await
listAllHolidays
();
console
.
log
(
result
);
if
(
result
)
{
// this.holidayData = result;
}
},
addItem
()
{
this
.
$emit
(
'sendItem'
,
this
.
selectedData
);
},
close
()
{
this
.
$emit
(
'update:show'
,
false
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.section
{
padding
:
12px
0
24px
0
;
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
15px
;
.tips
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#606266
;
line-height
:
17px
;
margin-bottom
:
20px
;
}
.el-radio
{
margin
:
0
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment