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
916004df
Commit
916004df
authored
May 21, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 复制新建
parent
2e52acba
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
16 deletions
+81
-16
index.html
index.html
+2
-2
ecm.js
src/router/modules/ecm.js
+8
-0
form.js
src/views/ecm/form.js
+35
-8
list.vue
src/views/ecm/list.vue
+7
-1
item-qfxx.vue
src/views/ecm/marketing-event/components/item-qfxx.vue
+8
-1
lib-qfxx.vue
src/views/ecm/marketing-event/components/lib-qfxx.vue
+2
-2
lib-qywx.vue
src/views/ecm/marketing-event/components/lib-qywx.vue
+1
-1
index.vue
src/views/ecm/marketing-event/index.vue
+10
-0
operator-log.vue
src/views/ecm/operator-log.vue
+8
-1
No files found.
index.html
View file @
916004df
...
...
@@ -26,7 +26,7 @@
<!-- <script src="//web-1251519181.file.myqcloud.com/components/card.2.0.19.js"></script>卡券选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/store.2.0.01.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/member-group.2.2.3
0
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/member-group.2.2.3
1
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/store-card.2.0.30.js"
></script>
<!-- 门店选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/store-new.2.0.71.js"
></script>
<!-- 新版门店选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.06.js"
></script>
...
...
@@ -42,6 +42,6 @@
<script
src=
"//web-1251519181.file.myqcloud.com/components/card.2.0.20.js"
></script>
<!-- 卡券弹窗 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/radio-transfer.1.0.13.js"
></script>
<!-- 单选穿梭框 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/steps.1.0.1.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/material.1.0.
4
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/material.1.0.
5
.js"
></script>
</body>
</html>
src/router/modules/ecm.js
View file @
916004df
...
...
@@ -14,6 +14,14 @@ export default {
}
},
{
path
:
'copy/:id'
,
name
:
'智能营销新增'
,
component
:
()
=>
import
(
/* webpackChunkName: "ecm" */
'../../views/ecm/form.vue'
),
meta
:
{
path
:
'/ecm/list'
}
},
{
path
:
'list'
,
name
:
'智能营销'
,
component
:
()
=>
import
(
/* webpackChunkName: "ecm" */
'../../views/ecm/list.vue'
),
...
...
src/views/ecm/form.js
View file @
916004df
...
...
@@ -116,9 +116,10 @@ export default {
// execDate: { validator: checkExecDate, required: true, message: '执行日期填写不完整', trigger: 'change' }
},
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
,
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
||
this
.
$route
.
meta
.
type
===
'copy'
,
isInfo
:
this
.
$route
.
meta
.
type
===
'info'
,
isCopy
:
this
.
$route
.
meta
.
copy
===
'copy'
,
isInit
:
this
.
$route
.
meta
.
type
===
'add'
,
// 人群筛选器可传参数
sceneValue
:
'member'
,
// 场景值
useId
:
''
,
// 模板id
...
...
@@ -235,7 +236,7 @@ export default {
return
this
.
$store
.
state
.
marketing
.
asideShow
;
},
storeParams
()
{
return
!
this
.
is
Add
?
{
creatorId
:
this
.
creatorId
}
:
{};
return
!
this
.
is
Init
?
{
creatorId
:
this
.
creatorId
}
:
{};
},
marketingTimesTips
()
{
let
tips
=
''
;
...
...
@@ -294,7 +295,7 @@ export default {
// 获取ecm信息
async
getEcmInfo
(
isResetTemplate
=
false
)
{
this
.
loading
=
true
;
let
res
=
await
getEcmInfo
({
ecmPlanId
:
this
.
$route
.
params
.
id
});
let
res
=
await
getEcmInfo
({
ecmPlanId
:
this
.
$route
.
params
.
id
,
copy
:
this
.
isCopy
?
1
:
undefined
});
this
.
loading
=
false
;
// 如果是模板重置不需要重置基本信息
if
(
!
isResetTemplate
)
{
...
...
@@ -303,7 +304,7 @@ export default {
const
consumTrigger
=
res
.
result
.
consumTrigger
;
this
.
enabledMessageState
=
res
.
result
.
enabledMessageState
||
0
;
this
.
xxSysp
.
goodsEnable
=
res
.
result
.
goodsEnable
||
false
;
// 是否支持商品选择器
if
(
result
&&
!
this
.
is
Add
)
{
if
(
result
&&
!
this
.
is
Init
)
{
this
.
onlineStatus
=
result
.
onlineStatus
;
this
.
creatorId
=
res
.
result
.
ecmDTO
.
creatorId
;
this
.
ecmPlanId
=
this
.
form
.
ecmPlanId
=
result
.
ecmPlanId
||
''
;
...
...
@@ -363,7 +364,7 @@ export default {
this
.
checked
=
[
'lastCost_day'
];
}
}
}
else
if
(
this
.
is
Add
)
{
}
else
if
(
this
.
is
Init
)
{
this
.
ecmPlanId
=
res
.
result
.
templateEcmPlanId
||
''
;
}
this
.
form
.
templateUseEnable
=
res
.
result
.
templateUseEnable
;
...
...
@@ -436,7 +437,7 @@ export default {
if
(
!
this
.
form
.
templateUseEnable
)
return
;
let
template
=
null
;
this
.
templateOptions
=
res
.
result
.
marketingTemplateList
||
[];
if
(
!
this
.
is
Add
)
{
if
(
!
this
.
is
Init
)
{
template
=
res
.
result
.
customMarketingTemplate
||
res
.
result
.
marketingTemplateList
[
0
];
}
else
{
template
=
res
.
result
.
marketingTemplateList
[
0
];
...
...
@@ -447,9 +448,23 @@ export default {
this
.
templateInit
(
template
);
}
// 新增给消费触发增加默认最小值
if
(
this
.
is
Add
)
{
if
(
this
.
is
Init
)
{
this
.
form
.
lowest_cost
=
1
;
}
if
(
this
.
isCopy
)
{
this
.
form
.
ecmPlanName
=
''
;
this
.
form
.
execTime
=
''
;
this
.
form
.
beginDate
=
''
;
this
.
form
.
endDate
=
''
;
this
.
form
.
effectTime
=
0
;
this
.
analyseConfig
=
{
open_flag
:
''
,
crowd_flag
:
0
,
crowd_send
:
4
,
crowd_no_send
:
1
,
marke_days
:
14
};
}
},
// 模板消息初始化
templateInit
(
template
)
{
...
...
@@ -692,6 +707,17 @@ export default {
return
;
}
}
if
(
this
.
isCopy
)
{
if
(
this
.
form
.
memberType
===
1
&&
this
.
form
.
memberGroupIds
.
some
(
el
=>
'effectiveStatus'
in
el
&&
el
.
effectiveStatus
===
0
))
{
return
this
.
$tips
({
type
:
'warning'
,
message
:
'所选的会员分组中,有失效的会员分组,请先将失效分组删除后再保存。'
});
}
if
(
this
.
$refs
.
marketingEvent
.
hasDeleted
)
{
return
this
.
$tips
({
type
:
'warning'
,
message
:
'所选的营销事件中,存在已失效或被删除模板的营销事件,请先将失效的营销事件删除后再保存!'
});
}
if
(
this
.
$refs
.
marketingEvent
.
hasMaterialDeleted
)
{
return
this
.
$tips
({
type
:
'warning'
,
message
:
'所选的群发消息中,存在已失效或被删除的营销素材,请先将失效的营销素材删除后再保存!'
});
}
}
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
let
params
=
{
...
...
@@ -983,7 +1009,8 @@ export default {
// 初始化门店左侧数据
initStoreCardLeft
()
{
if
(
this
.
consumeChecked
.
store
)
{
if
(
this
.
isAdd
)
{
if
(
this
.
isInit
)
{
// TODO: 可能会有问题
// 这里新增的情况下也要初始化 门店组件
this
.
$nextTick
(
_
=>
{
this
.
$refs
.
storeCard
.
init
();
...
...
src/views/ecm/list.vue
View file @
916004df
...
...
@@ -54,7 +54,7 @@
<el-dropdown-item
:command=
"1"
>
记录
</el-dropdown-item>
<el-dropdown-item
v-if=
"scope.row.effectType !== 2 && scope.row.onlineStatus === 1 && scope.row.canEdit !== false"
@
confirm=
"offlineEcmPlan(scope.row)"
:command=
"2"
>
下线
</el-dropdown-item>
<el-dropdown-item
v-if=
"xsxsFlag && isOpenFlag(scope.row.analyseJson)"
:command=
"3"
>
触达效果
</el-dropdown-item>
<el-dropdown-item
:command=
"
3
"
>
复制新建
</el-dropdown-item>
<el-dropdown-item
:command=
"
4
"
>
复制新建
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
...
...
@@ -245,6 +245,10 @@ export default {
this
.
loading
=
false
;
},
//编辑
copyData
(
row
)
{
this
.
$router
.
push
(
'/ecm/copy/'
+
row
.
ecmPlanId
);
},
//编辑
editData
(
row
)
{
this
.
$router
.
push
(
'/ecm/edit/'
+
row
.
ecmPlanId
);
},
...
...
@@ -320,6 +324,8 @@ export default {
this
.
offlineEcmPlan
(
row
);
}
else
if
(
command
==
3
)
{
this
.
toTouch
(
row
);
}
else
if
(
command
==
4
)
{
this
.
copyData
(
row
);
}
}
},
...
...
src/views/ecm/marketing-event/components/item-qfxx.vue
View file @
916004df
...
...
@@ -39,7 +39,14 @@ export default {
6
:
'小程序'
};
let
res
=
JSON
.
parse
(
this
.
item
.
qfxx
.
chatContent
||
'[]'
);
return
[...
new
Set
(
res
.
map
(
el
=>
el
.
type
))].
map
(
el
=>
mapName
[
el
]);
const
item
=
res
.
find
(
el
=>
el
.
statusFlag
==
0
);
return
[...
new
Set
(
res
.
map
(
el
=>
el
.
type
))].
map
(
el
=>
{
if
(
item
&&
item
.
type
==
el
)
{
return
`
${
mapName
[
el
]}
(已失效)`
;
}
else
{
return
mapName
[
el
];
}
});
}
}
};
...
...
src/views/ecm/marketing-event/components/lib-qfxx.vue
View file @
916004df
...
...
@@ -42,7 +42,7 @@
<div
style=
"font-size:12px;color:#6B6D71;margin-bottom:10px"
>
建议以文本+其他类型组合创建群发内容;文本内容最多只能添加 1 个
</div>
<div
style=
"margin-bottom:16px;display:flex;flex-wrap:wrap;margin-top:12px"
>
<material-item
class=
"card-item"
v-for=
"item in materials"
:key=
"item.relation_id"
:item=
"item"
@
delete=
"onDeleteMaterial"
:read-only=
"readOnly"
></material-item>
<div
v-show=
"materials.length <
5
&& !readOnly"
class=
"chat-item card-item"
@
click=
"openMaterialDialog"
>
<div
v-show=
"materials.length <
3
&& !readOnly"
class=
"chat-item card-item"
@
click=
"openMaterialDialog"
>
<i
class=
"el-icon-plus"
></i>
<span
class=
"add-text"
>
添加素材 (最多3个)
</span>
</div>
...
...
@@ -54,7 +54,7 @@
<el-button
style=
"width:74px"
type=
"primary"
@
click=
"addItem"
>
确定
</el-button>
</
template
>
</el-dialog>
<dm-material
:visible
.
sync=
"materialVisible"
@
select=
"onSelectMaterial"
:wx-enterprise-id=
"this.form.qfxxEnterpriseId"
projectName=
"marketing"
:material-ids=
"materials.map(el => el.relation_id)"
:disableTypes=
"disableTypes"
></dm-material>
<dm-material
:visible
.
sync=
"materialVisible"
:types=
"[1, 2, 3, 4, 6]"
@
select=
"onSelectMaterial"
:wx-enterprise-id=
"this.form.qfxxEnterpriseId"
projectName=
"marketing"
:material-ids=
"materials.map(el => el.relation_id)"
:disableTypes=
"disableTypes"
></dm-material>
</div>
</template>
...
...
src/views/ecm/marketing-event/components/lib-qywx.vue
View file @
916004df
...
...
@@ -146,7 +146,7 @@
</
template
>
</el-dialog>
<
template
-dialog
ref=
"template-dialog"
@
sendItem=
"onInsertTemplate"
></template-dialog>
<dm-material
:visible
.
sync=
"materialVisible"
@
select=
"onSelectMaterial"
:wx-enterprise-id=
"this.form.qywxEnterpriseId"
projectName=
"marketing"
:material-ids=
"materials.map(el => el.relation_id)"
></dm-material>
<dm-material
:visible
.
sync=
"materialVisible"
:types=
"[1, 2, 3, 4, 5]"
@
select=
"onSelectMaterial"
:wx-enterprise-id=
"this.form.qywxEnterpriseId"
projectName=
"marketing"
:material-ids=
"materials.map(el => el.relation_id)"
></dm-material>
</div>
</
template
>
...
...
src/views/ecm/marketing-event/index.vue
View file @
916004df
...
...
@@ -288,6 +288,16 @@ export default {
this
.
list
=
[];
let
result
=
res
.
result
.
typeRelationList
||
[];
let
brandInfo
=
res
.
result
.
enterprise
||
{};
if
(
result
.
some
(
el
=>
el
.
status
===
0
))
{
this
.
hasDeleted
=
true
;
}
else
{
result
.
filter
(
el
=>
el
.
marketingType
==
'qfxx'
)
.
some
(
el
=>
{
let
item
=
JSON
.
parse
(
el
.
qfxx
.
chatContent
);
return
item
.
statusFlag
==
0
;
})
&&
(
this
.
hasMaterialDeleted
=
true
);
}
// 八种类型 处理
result
.
map
(
v
=>
{
switch
(
v
.
marketingType
)
{
...
...
src/views/ecm/operator-log.vue
View file @
916004df
...
...
@@ -7,7 +7,9 @@
<el-date-picker
v-model=
"dateRange"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"onSearch"
></el-date-picker>
</el-row>
<el-table
class=
"mt20"
:data=
"tableList"
>
<el-table-column
prop=
"operatorName"
label=
"操作人"
></el-table-column>
<el-table-column
prop=
"operatorName"
label=
"操作人"
>
<template
slot-scope=
"
{ row }">
{{
row
.
operatorPhone
}}
-
{{
row
.
operatorName
}}{{
row
.
superAdmin
?
'-超管'
:
''
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"ecmPlanName"
label=
"操作对象"
></el-table-column>
<el-table-column
label=
"操作时间"
>
<
template
slot-scope=
"{ row }"
>
...
...
@@ -44,6 +46,11 @@ export default {
};
},
mounted
()
{
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[
{
name
:
'营销管理'
,
path
:
''
},
{
name
:
'智能营销'
,
path
:
'/ecm'
},
{
name
:
'操作日志'
,
path
:
''
}
]);
this
.
getList
();
},
methods
:
{
...
...
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