Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6fe43ba9
authored
May 26, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sop
1 parent
429ac7f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
206 additions
and
67 deletions
src/views/sop/editSop.vue
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/components/selectCrowd.vue
src/views/sop/editSop/editEvent.vue
src/views/sop/editSop.vue
View file @
6fe43ba
<
template
>
<
template
>
<div>
<div>
<base-info
v-show=
"activeName == 'baseInfo'"
ref=
"baseInfoRef"
:routeInfo=
"routeInfo"
@
handleTabChange=
"jumpEvent"
></base-info>
<base-info
v-show=
"activeName == 'baseInfo'"
ref=
"baseInfoRef"
:routeInfo=
"routeInfo"
@
handleTabChange=
"jumpEvent"
></base-info>
<edit-event
v-if=
"activeName == 'editEvent'"
:eventObj=
"eventObj"
@
handleTabChange=
"jumpBaseInfo"
@
handleInfoConfirm=
"handleInfoConfirm"
></edit-event>
<edit-event
v-if=
"activeName == 'editEvent'"
:eventObj=
"eventObj"
:parentCustomerObj=
"parentCustomerObj"
@
handleTabChange=
"jumpBaseInfo"
@
handleInfoConfirm=
"handleInfoConfirm"
></edit-event>
</div>
</div>
</
template
>
</
template
>
...
@@ -24,6 +24,16 @@ export default {
...
@@ -24,6 +24,16 @@ export default {
eventObj
:
{
eventObj
:
{
addOrEdit
:
'add'
,
addOrEdit
:
'add'
,
info
:
{}
info
:
{}
},
parentCustomerObj
:
{
// 人群,标签,指定
currentCustomerTypeName
:
''
,
parentPredictObj
:
{
total
:
''
,
qiwei
:
''
,
phone
:
''
},
list
:
[]
}
}
}
}
},
},
...
@@ -43,6 +53,8 @@ export default {
...
@@ -43,6 +53,8 @@ export default {
},
},
handleInfoConfirm
(
info
)
{
handleInfoConfirm
(
info
)
{
this
.
eventObj
.
addOrEdit
==
'add'
?
this
.
$refs
.
baseInfoRef
.
editForm
.
eventList
.
push
(
info
.
baseInfo
)
:
this
.
$set
(
this
.
$refs
.
baseInfoRef
.
editForm
.
eventList
,
this
.
eventIndex
,
info
.
baseInfo
)
this
.
eventObj
.
addOrEdit
==
'add'
?
this
.
$refs
.
baseInfoRef
.
editForm
.
eventList
.
push
(
info
.
baseInfo
)
:
this
.
$set
(
this
.
$refs
.
baseInfoRef
.
editForm
.
eventList
,
this
.
eventIndex
,
info
.
baseInfo
)
this
.
$refs
.
baseInfoRef
.
parentCustomerObj
.
phone
=
info
.
predictCountObj
.
phone
this
.
$refs
.
baseInfoRef
.
parentCustomerObj
.
qiwei
=
info
.
predictCountObj
.
qiwei
this
.
$refs
.
baseInfoRef
.
dealSopTime
()
this
.
$refs
.
baseInfoRef
.
dealSopTime
()
this
.
jumpBaseInfo
({
activeName
:
'baseInfo'
})
this
.
jumpBaseInfo
({
activeName
:
'baseInfo'
})
},
},
...
@@ -50,6 +62,7 @@ export default {
...
@@ -50,6 +62,7 @@ export default {
jumpEvent
(
obj
)
{
jumpEvent
(
obj
)
{
this
.
$set
(
this
.
eventObj
,
'addOrEdit'
,
obj
.
addOrEdit
)
this
.
$set
(
this
.
eventObj
,
'addOrEdit'
,
obj
.
addOrEdit
)
this
.
$set
(
this
.
eventObj
,
'info'
,
obj
.
info
)
this
.
$set
(
this
.
eventObj
,
'info'
,
obj
.
info
)
this
.
parentCustomerObj
=
obj
.
parentCustomerObj
this
.
eventIndex
=
obj
.
eventIndex
this
.
eventIndex
=
obj
.
eventIndex
this
.
activeName
=
obj
.
activeName
this
.
activeName
=
obj
.
activeName
}
}
...
...
src/views/sop/editSop/baseInfo.vue
View file @
6fe43ba
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
</div>
</div>
<select-Crowd
v-if=
"isCrowdCustVisible"
:dialogVisible=
"isCrowdCustVisible"
:selectedC
ustomer
List=
"customerDataList[0].list"
@
handleCrowdCustClose=
"handleCrowdCustClose"
@
handleCrowdCustConfirm=
"handleDialogConfirm"
></select-Crowd>
<select-Crowd
v-if=
"isCrowdCustVisible"
:dialogVisible=
"isCrowdCustVisible"
:selectedC
rowd
List=
"customerDataList[0].list"
@
handleCrowdCustClose=
"handleCrowdCustClose"
@
handleCrowdCustConfirm=
"handleDialogConfirm"
></select-Crowd>
<select-tag
ref=
"selectTagForm"
@
tagSelected=
"handleDialogConfirm"
:dialogVisible=
"isTagVisible"
></select-tag>
<select-tag
ref=
"selectTagForm"
@
tagSelected=
"handleDialogConfirm"
:dialogVisible=
"isTagVisible"
></select-tag>
<select-customer
v-if=
"isAppointCustVisible"
:dialogVisible=
"isAppointCustVisible"
:selectedCustomerList=
"customerDataList[2].list"
@
handleAppointCustClose=
"handleAppointCustClose"
@
handleAppointCustConfirm=
"handleDialogConfirm"
></select-customer>
<select-customer
v-if=
"isAppointCustVisible"
:dialogVisible=
"isAppointCustVisible"
:selectedCustomerList=
"customerDataList[2].list"
@
handleAppointCustClose=
"handleAppointCustClose"
@
handleAppointCustConfirm=
"handleDialogConfirm"
></select-customer>
</div>
</div>
...
@@ -129,22 +129,33 @@ export default {
...
@@ -129,22 +129,33 @@ export default {
3
:
'coupon'
,
3
:
'coupon'
,
4
:
'nickname'
4
:
'nickname'
},
},
markCondLimitObj
:
{
//
markCondLimitObj: {
// 1-有;0-无
//
// 1-有;0-无
hasPhone
:
-
1
,
//
hasPhone: -1,
hasQw
:
-
1
//
hasQw: -1
},
//
},
// condLimitObj: {
// condLimitObj: {
// // 1-有;0-无
// // 1-有;0-无
// hasPhone: 0,
// hasPhone: 0,
// hasQw: 0
// hasQw: 0
// },
// },
parentCustomerObj
:
{
// 人群,标签,指定
currentCustomerTypeName
:
''
,
parentPredictObj
:
{
total
:
''
,
qiwei
:
''
,
phone
:
''
},
list
:
[]
},
// 标签弹窗
// 标签弹窗
isTagVisible
:
false
,
isTagVisible
:
false
,
isAppointCustVisible
:
false
,
isAppointCustVisible
:
false
,
isCrowdCustVisible
:
false
,
isCrowdCustVisible
:
false
,
// tagging: [],
// tagging: [],
currentCustomerIdx
:
-
1
,
currentCustomerIdx
:
-
1
,
// confId值与customerRadioList对应;confName判断标识,不要改
customerDataList
:
[
customerDataList
:
[
{
{
confId
:
2
,
confId
:
2
,
...
@@ -463,7 +474,7 @@ export default {
...
@@ -463,7 +474,7 @@ export default {
getCustomerByCrowdList
()
{
getCustomerByCrowdList
()
{
var
params
=
{
var
params
=
{
pageSize
:
9999
,
pageSize
:
1
,
pageNum
:
1
,
pageNum
:
1
,
crowdId
:
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
[
0
].
crowdId
crowdId
:
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
[
0
].
crowdId
}
}
...
@@ -475,7 +486,7 @@ export default {
...
@@ -475,7 +486,7 @@ export default {
getCustomerByTagList
()
{
getCustomerByTagList
()
{
var
params
=
{
var
params
=
{
combineType
:
2
,
combineType
:
2
,
pageSize
:
9999
,
pageSize
:
1
,
pageNum
:
1
,
pageNum
:
1
,
tagLists
:
[]
tagLists
:
[]
}
}
...
@@ -650,8 +661,21 @@ export default {
...
@@ -650,8 +661,21 @@ export default {
},
},
handleEventEdit
(
addOrEdit
,
row
,
idx
)
{
handleEventEdit
(
addOrEdit
,
row
,
idx
)
{
let
currentCustObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customerDataList
[
this
.
currentCustomerIdx
]))
this
.
parentCustomerObj
.
currentCustomerTypeName
=
currentCustObj
.
confName
this
.
parentCustomerObj
.
parentPredictObj
.
total
=
currentCustObj
.
customerCount
this
.
parentCustomerObj
.
list
=
currentCustObj
.
list
// 指定客户需自己算
if
(
currentCustObj
.
confName
==
'指定'
)
{
this
.
parentCustomerObj
.
parentPredictObj
.
phone
=
0
this
.
parentCustomerObj
.
parentPredictObj
.
qiwei
=
0
this
.
parentCustomerObj
.
list
.
forEach
(
item
=>
{
item
.
customerPhone
&&
this
.
parentCustomerObj
.
parentPredictObj
.
phone
++
item
.
isJoin
==
1
&&
this
.
parentCustomerObj
.
parentPredictObj
.
qiwei
++
})
}
// this.$emit('handleTabChange', { activeName: 'editEvent', addOrEdit: addOrEdit, eventIndex: addOrEdit == 'add' ? '-1' : idx, condLimitObj: this.condLimitObj, info: { ...row, sopName: this.editForm.sopName } })
// this.$emit('handleTabChange', { activeName: 'editEvent', addOrEdit: addOrEdit, eventIndex: addOrEdit == 'add' ? '-1' : idx, condLimitObj: this.condLimitObj, info: { ...row, sopName: this.editForm.sopName } })
this
.
$emit
(
'handleTabChange'
,
{
activeName
:
'editEvent'
,
addOrEdit
:
addOrEdit
,
eventIndex
:
addOrEdit
==
'add'
?
'-1'
:
idx
,
info
:
{
...
row
,
sopName
:
this
.
editForm
.
sopName
}
})
this
.
$emit
(
'handleTabChange'
,
{
activeName
:
'editEvent'
,
addOrEdit
:
addOrEdit
,
eventIndex
:
addOrEdit
==
'add'
?
'-1'
:
idx
,
parentCustomerObj
:
this
.
parentCustomerObj
,
info
:
{
...
row
,
sopName
:
this
.
editForm
.
sopName
}
})
},
},
reqCrowdAttrs
()
{
reqCrowdAttrs
()
{
...
@@ -718,6 +742,11 @@ export default {
...
@@ -718,6 +742,11 @@ export default {
params
[
this
.
customerDataList
[
this
.
currentCustomerIdx
].
reqListName
]
=
JSON
.
stringify
(
this
.
reqCustAttrs
())
params
[
this
.
customerDataList
[
this
.
currentCustomerIdx
].
reqListName
]
=
JSON
.
stringify
(
this
.
reqCustAttrs
())
params
.
customerCount
=
this
.
customerDataList
[
this
.
currentCustomerIdx
].
customerCount
params
.
customerCount
=
this
.
customerDataList
[
this
.
currentCustomerIdx
].
customerCount
delete
params
.
customerInfoList
delete
params
.
customerInfoList
this
.
customerDataList
.
forEach
((
item
,
index
)
=>
{
if
(
index
!=
this
.
currentCustomerIdx
)
{
delete
params
[
item
.
reqListName
]
}
})
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
params
.
id
=
this
.
routeInfo
.
id
params
.
id
=
this
.
routeInfo
.
id
params
.
eventList
=
[]
params
.
eventList
=
[]
...
@@ -726,14 +755,15 @@ export default {
...
@@ -726,14 +755,15 @@ export default {
if
(
new
Date
(
item
.
eventStartDate
)
>
new
Date
())
{
if
(
new
Date
(
item
.
eventStartDate
)
>
new
Date
())
{
params
.
eventList
.
push
({
params
.
eventList
.
push
({
eventContent
:
item
.
eventContent
,
eventContent
:
item
.
eventContent
,
eventCount
:
item
.
eventCount
,
//
eventCount: item.eventCount,
eventStartDate
:
item
.
eventStartDate
,
eventStartDate
:
item
.
eventStartDate
,
eventTime
:
item
.
eventTime
,
eventTime
:
item
.
eventTime
,
pushChannelType
:
item
.
pushChannelType
,
pushChannelType
:
item
.
pushChannelType
,
repeatFlag
:
item
.
repeatFlag
,
repeatFlag
:
item
.
repeatFlag
,
repeatMode
:
item
.
repeatMode
,
repeatMode
:
item
.
repeatMode
,
sopName
:
item
.
sopName
,
predictCount
:
item
.
predictCount
,
sopId
:
this
.
routeInfo
.
id
,
// sopName: item.sopName,
// sopId: this.routeInfo.id,
followerTypeId
:
item
.
followerTypeId
,
followerTypeId
:
item
.
followerTypeId
,
followerTypeName
:
item
.
followerTypeName
,
followerTypeName
:
item
.
followerTypeName
,
reachesType
:
item
.
reachesType
,
reachesType
:
item
.
reachesType
,
...
@@ -767,8 +797,7 @@ export default {
...
@@ -767,8 +797,7 @@ export default {
}
}
})
})
}
}
params
.
eventList
=
JSON
.
stringify
(
params
.
eventList
)
// console.log(params)
console
.
log
(
params
)
if
(
this
.
editDisabled
)
{
if
(
this
.
editDisabled
)
{
var
batchEditParams
=
{
var
batchEditParams
=
{
sopId
:
params
.
id
,
sopId
:
params
.
id
,
...
@@ -786,6 +815,7 @@ export default {
...
@@ -786,6 +815,7 @@ export default {
}
}
})
})
}
else
{
}
else
{
params
.
eventList
=
JSON
.
stringify
(
params
.
eventList
)
// 新增事件或者事件未开始,调这里
// 新增事件或者事件未开始,调这里
this
.
$apis
.
sop
.
insertOrUpdateSopApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
sop
.
insertOrUpdateSopApi
(
params
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
...
...
src/views/sop/editSop/components/selectCrowd.vue
View file @
6fe43ba
...
@@ -6,7 +6,11 @@
...
@@ -6,7 +6,11 @@
<el-button
:size=
"size"
type=
"primary"
@
click=
"getList"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"getList"
>
查询
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<GLTable
ref=
"crowdRef"
:pageConf=
"pageConf"
:noDataImg=
"url"
:tableData=
"crowdList"
:tableTotal=
"total"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
@
selectionTable=
"handleSelectionTable"
></GLTable>
<GLTable
ref=
"crowdRef"
:pageConf=
"pageConf"
:hasNum=
"false"
:noDataImg=
"url"
:tableData=
"crowdList"
:tableTotal=
"total"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
:setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"radioHtml"
class=
"crowd-table"
slot-scope=
"scope"
>
<el-radio
v-model=
"selectedCrowdId"
:label=
"scope.scope.crowdId"
@
click
.
native=
"handleClick(scope.scope)"
></el-radio>
</div>
</GLTable>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleConfirm"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleConfirm"
>
确 定
</el-button>
...
@@ -30,6 +34,7 @@ export default {
...
@@ -30,6 +34,7 @@ export default {
total
:
0
,
total
:
0
,
crowdList
:
[],
crowdList
:
[],
heightBox
:
200
,
heightBox
:
200
,
selectedCrowdId
:
''
,
// 搜索
// 搜索
searchFormData
:
[
searchFormData
:
[
{
{
...
@@ -51,6 +56,17 @@ export default {
...
@@ -51,6 +56,17 @@ export default {
// mutiSelectName: 'list',
// mutiSelectName: 'list',
tableColumns
:
[
tableColumns
:
[
{
{
label
:
''
,
prop
:
''
,
width
:
80
,
addHtml
:
'radioHtml'
},
{
label
:
'序号'
,
prop
:
'idx'
,
width
:
80
},
{
label
:
'人群名称'
,
label
:
'人群名称'
,
prop
:
'crowdName'
,
prop
:
'crowdName'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -81,11 +97,7 @@ export default {
...
@@ -81,11 +97,7 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
selectedLabelList
:
{
selectedCrowdList
:
{
type
:
Array
,
default
:
()
=>
[]
},
selectedCustomerList
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
}
}
...
@@ -109,58 +121,42 @@ export default {
...
@@ -109,58 +121,42 @@ export default {
this
.
$apis
.
common
.
getCrowdTreeListApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
common
.
getCrowdTreeListApi
(
params
).
then
(
res
=>
{
this
.
crowdList
=
res
.
crowdUnitList
this
.
crowdList
=
res
.
crowdUnitList
this
.
total
=
res
.
total
this
.
total
=
res
.
total
this
.
recoverySelected
()
var
page
=
this
.
$refs
.
crowdRef
.
page
// 添加序号
this
.
crowdList
.
forEach
((
item
,
index
)
=>
{
item
.
idx
=
index
+
(
page
[
this
.
pageConf
.
pageNum
]
-
1
)
*
page
[
this
.
pageConf
.
pageSize
]
+
1
})
this
.
selectedCrowdList
.
length
&&
(
this
.
selectedCrowdId
=
this
.
selectedCrowdList
[
0
].
crowdId
)
// this.recoverySelected()
this
.
$refs
.
crowdRef
.
tableHeightValues
=
'460px'
this
.
$refs
.
crowdRef
.
tableHeightValues
=
'460px'
})
})
},
},
// setTableFinishFun() {
setTableFinishFun
()
{
// this.crowdList = this.$refs.crowdRef.data
this
.
crowdList
=
this
.
$refs
.
crowdRef
.
data
// this.recoverySelected()
// this.recoverySelected()
// //接收到的数据为空
//接收到的数据为空
// // this.$refs.crowdRef.tableHeightValues = this.$refs.crowdRef.data.length ? '' : '400px'
// this.$refs.crowdRef.tableHeightValues = this.$refs.crowdRef.data.length ? '' : '400px'
// this.$refs.crowdRef.tableHeightValues = '460px'
this
.
$refs
.
crowdRef
.
tableHeightValues
=
'460px'
// },
recoverySelected
()
{
this
.
$nextTick
(()
=>
{
this
.
selectedCustomerList
.
forEach
(
row
=>
{
var
idx
=
this
.
crowdList
.
findIndex
(
k
=>
k
.
crowdId
==
row
.
crowdId
)
if
(
idx
!=
-
1
)
{
this
.
$refs
.
crowdRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
crowdList
[
idx
],
true
)
}
})
})
},
},
handleSelectionTable
(
val
)
{
handleClick
(
val
)
{
// 未选客户时,筛选客户条件
let
temp
=
JSON
.
parse
(
JSON
.
stringify
(
val
))
// if (!this.selectedCustomerList.length) {
delete
temp
.
idx
// this.dealCondLimit(val[0])
this
.
selectedCrowdList
=
[
temp
]
// }
let
currentList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedCustomerList
))
let
tableIds
=
this
.
crowdList
.
map
(
item
=>
item
.
crowdId
)
this
.
selectedCustomerList
=
JSON
.
parse
(
JSON
.
stringify
(
val
))
var
selectIds
=
this
.
selectedCustomerList
.
map
(
item
=>
item
.
crowdId
)
currentList
.
forEach
(
item
=>
{
if
(
!
selectIds
.
includes
(
item
.
crowdId
)
&&
!
tableIds
.
includes
(
item
.
crowdId
))
{
this
.
selectedCustomerList
.
push
(
item
)
}
})
this
.
recoverySelected
()
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'handleCrowdCustClose'
)
this
.
$emit
(
'handleCrowdCustClose'
)
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$emit
(
'handleCrowdCustConfirm'
,
this
.
selectedC
ustomer
List
)
this
.
$emit
(
'handleCrowdCustConfirm'
,
this
.
selectedC
rowd
List
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.select-crowd
{
.select-crowd
{
.title
{
.title
{
margin-bottom
:
12px
;
margin-bottom
:
12px
;
...
@@ -207,5 +203,8 @@ export default {
...
@@ -207,5 +203,8 @@ export default {
.p-16
{
.p-16
{
padding
:
16px
;
padding
:
16px
;
}
}
.crowd-table
.el-radio__label
{
display
:
none
;
}
}
}
</
style
>
</
style
>
src/views/sop/editSop/editEvent.vue
View file @
6fe43ba
...
@@ -77,15 +77,17 @@
...
@@ -77,15 +77,17 @@
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
>
<p
class=
"edit-title"
>
营销渠道
</p>
<p
class=
"edit-title"
>
营销渠道
</p>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRefChannel"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormDataChannel"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRefChannel"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormDataChannel"
:formRules=
"editRule"
>
<div
slot=
"channelSuffix"
class=
"edit-tips m-t-8"
>
预估受众用户总数:100/500
</div>
<div
v-show=
"editForm.pushChannelType"
slot=
"channelSuffix"
class=
"edit-tips m-t-8"
>
预估受众用户总数:{{ editForm.pushChannelType == 2 ? predictCountObj.phone : predictCountObj.qiwei }} /{{ predictCountObj.total }}
</div>
<
template
slot=
"reachesType"
slot-scope=
"scope"
>
<
template
slot=
"reachesType"
slot-scope=
"scope"
>
<el-radio-group
v-model=
"editForm[scope.scope.name]"
@
change=
"handleReachesType"
>
<el-radio-group
v-model=
"editForm[scope.scope.name]"
@
change=
"handleReachesType"
:disabled=
"editForm.repeatFlag == 'N'"
>
<el-radio
v-for=
"(item, index) in scope.scope.optionList"
:key=
"index"
:label=
"item[scope.scope.optionId]"
>
{{
item
[
scope
.
scope
.
optionLabel
]
}}
</el-radio>
<el-radio
v-for=
"(item, index) in scope.scope.optionList"
:key=
"index"
:label=
"item[scope.scope.optionId]"
>
{{
item
[
scope
.
scope
.
optionLabel
]
}}
</el-radio>
</el-radio-group>
</el-radio-group>
<span
class=
"m-l-20"
v-if=
"editForm[scope.scope.name] == 2"
id=
"reachesTypeSet"
>
<span
class=
"m-l-20"
v-if=
"editForm[scope.scope.name] == 2"
id=
"reachesTypeSet"
>
同一用户最多参与
同一用户最多参与
<el-form-item
prop=
"reachesTypeSet"
>
<el-form-item
prop=
"reachesTypeSet"
>
<el-input
v-model=
"editForm.reachesTypeSet"
></el-input>
<el-input
v-model=
"editForm.reachesTypeSet"
></el-input>
<span
class=
"txt-red"
v-if=
"+maxReachesTypeSet
< editForm
.
reachesTypeSet
"
>
该用户最多能参与
{{
maxReachesTypeSet
}}
次
</span>
<span
class=
"txt-red"
v-else-if=
"editForm.reachesTypeSet
< 2
"
>
只能输入2及以上的数字
</span>
</el-form-item>
</el-form-item>
次
次
</span>
</span>
...
@@ -103,6 +105,7 @@
...
@@ -103,6 +105,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
limitPrice
}
from
'@/common/constant'
import
ActivityModel
from
'./components/activityModel'
import
ActivityModel
from
'./components/activityModel'
import
materialModel
from
'./components/materialModel'
import
materialModel
from
'./components/materialModel'
import
nicknameModel
from
'./components/nicknameModel'
import
nicknameModel
from
'./components/nicknameModel'
...
@@ -119,6 +122,12 @@ export default {
...
@@ -119,6 +122,12 @@ export default {
isNicknameVisible
:
false
,
isNicknameVisible
:
false
,
editStatus
:
false
,
editStatus
:
false
,
labelWidth
:
'144px'
,
labelWidth
:
'144px'
,
maxReachesTypeSet
:
''
,
predictCountObj
:
{
total
:
''
,
qiwei
:
''
,
phone
:
''
},
editForm
:
{
editForm
:
{
sopName
:
''
,
sopName
:
''
,
eventStartDate
:
''
,
eventStartDate
:
''
,
...
@@ -129,13 +138,15 @@ export default {
...
@@ -129,13 +138,15 @@ export default {
repeatTime
:
''
,
repeatTime
:
''
,
eventEndDate
:
''
,
eventEndDate
:
''
,
pushChannelType
:
''
,
pushChannelType
:
''
,
// 预估可触达人数
predictCount
:
''
,
// 营销内容
// 营销内容
eventContent
:
''
,
eventContent
:
''
,
eventCount
:
''
,
//
eventCount: '',
object
:
{},
object
:
{},
//营销渠道
//营销渠道
followerTypeId
:
''
,
followerTypeId
:
''
,
reachesType
:
''
,
reachesType
:
1
,
reachesTypeSet
:
''
reachesTypeSet
:
''
},
},
// 营销内容
// 营销内容
...
@@ -253,6 +264,9 @@ export default {
...
@@ -253,6 +264,9 @@ export default {
this
.
editForm
.
repeatMode
=
1
this
.
editForm
.
repeatMode
=
1
this
.
editForm
.
repeatTime
=
''
this
.
editForm
.
repeatTime
=
''
this
.
editForm
.
eventEndDate
=
''
this
.
editForm
.
eventEndDate
=
''
// 参与次数
this
.
editForm
.
reachesType
=
1
this
.
editForm
.
reachesTypeSet
=
1
}
}
}
}
},
},
...
@@ -334,7 +348,19 @@ export default {
...
@@ -334,7 +348,19 @@ export default {
confName
:
'微信朋友圈'
,
confName
:
'微信朋友圈'
,
isDisabled
:
false
isDisabled
:
false
}
}
]
],
handleRadioChange
:
val
=>
{
switch
(
this
.
parentCustomerObj
.
currentCustomerTypeName
)
{
case
'人群'
:
this
.
getCustomerByCrowdList
()
break
case
'标签'
:
this
.
getCustomerByTagList
()
break
case
'指定'
:
break
}
}
},
},
{
{
label
:
'跟进员工类型'
,
label
:
'跟进员工类型'
,
...
@@ -363,7 +389,7 @@ export default {
...
@@ -363,7 +389,7 @@ export default {
confName
:
'多次'
,
confName
:
'多次'
,
isDisabled
:
false
isDisabled
:
false
}
}
]
]
,
}
}
],
],
baseData
:
{
baseData
:
{
...
@@ -384,6 +410,21 @@ export default {
...
@@ -384,6 +410,21 @@ export default {
info
:
{}
info
:
{}
}
}
}
}
},
parentCustomerObj
:
{
type
:
Object
,
default
:
()
=>
{
return
{
// 人群,标签,指定
currentCustomerTypeName
:
''
,
parentPredictObj
:
{
total
:
''
,
qiwei
:
''
,
phone
:
''
},
list
:
[]
}
}
}
}
// condLimitObj: {
// condLimitObj: {
// type: Object,
// type: Object,
...
@@ -409,6 +450,9 @@ export default {
...
@@ -409,6 +450,9 @@ export default {
this
.
editStatus
=
true
this
.
editStatus
=
true
},
},
deep
:
true
deep
:
true
},
'editForm.reachesTypeSet'
(
newValue
,
oldValue
)
{
this
.
editForm
.
reachesTypeSet
=
limitPrice
(
newValue
,
oldValue
,
5
,
0
,
1
,
9999
,
'zNumReg'
)
}
}
// 'editForm.object.additionalType'(val) {
// 'editForm.object.additionalType'(val) {
// var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
// var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
...
@@ -423,6 +467,7 @@ export default {
...
@@ -423,6 +467,7 @@ export default {
created
()
{
created
()
{
this
.
getDay
(
'weekList'
,
7
)
this
.
getDay
(
'weekList'
,
7
)
this
.
getDay
(
'monthList'
,
31
)
this
.
getDay
(
'monthList'
,
31
)
this
.
predictCountObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
parentCustomerObj
.
parentPredictObj
))
// this.limitQwPhone()
// this.limitQwPhone()
},
},
...
@@ -500,6 +545,11 @@ export default {
...
@@ -500,6 +545,11 @@ export default {
let
index
=
this
.
editFormDataTime
.
findIndex
(
k
=>
k
.
name
==
item
)
let
index
=
this
.
editFormDataTime
.
findIndex
(
k
=>
k
.
name
==
item
)
this
.
editFormDataTime
[
index
].
isHide
=
this
.
editForm
.
repeatFlag
==
'N'
this
.
editFormDataTime
[
index
].
isHide
=
this
.
editForm
.
repeatFlag
==
'N'
})
})
if
(
this
.
editForm
.
repeatFlag
==
'N'
)
{
// 参与次数
this
.
editForm
.
reachesType
=
1
this
.
editForm
.
reachesTypeSet
=
1
}
},
},
recoveryEndTime
()
{
recoveryEndTime
()
{
...
@@ -605,6 +655,45 @@ export default {
...
@@ -605,6 +655,45 @@ export default {
},
},
// 营销内容
// 营销内容
getCustomerByCrowdList
()
{
var
params
=
{
pageSize
:
1
,
pageNum
:
1
,
crowdId
:
this
.
parentCustomerObj
.
list
[
0
].
crowdId
}
// 1-企业微信;2-短信;3-微信朋友圈
this
.
editForm
.
pushChannelType
==
2
?
(
params
.
customerPhone
=
'1'
)
:
(
params
.
isJoin
=
1
)
this
.
$apis
.
sop
.
getCustomerCrowdApi
(
params
).
then
(
res
=>
{
this
.
predictCountObj
[
this
.
editForm
.
pushChannelType
==
2
?
'phone'
:
'qiwei'
]
=
res
.
count
})
},
getCustomerByTagList
()
{
var
params
=
{
combineType
:
2
,
pageSize
:
1
,
pageNum
:
1
,
tagLists
:
[]
}
this
.
parentCustomerObj
.
list
.
list
&&
this
.
parentCustomerObj
.
list
.
list
.
forEach
(
item
=>
{
item
.
labelList
.
length
&&
item
.
labelList
.
forEach
(
subItem
=>
{
params
.
tagLists
.
push
({
groupId
:
item
.
labelGroup
.
id
,
groupName
:
item
.
labelGroup
.
name
,
groupType
:
item
.
labelType
,
labelId
:
subItem
.
id
,
labelName
:
subItem
.
name
})
})
})
// 1-企业微信;2-短信;3-微信朋友圈
this
.
editForm
.
pushChannelType
==
2
?
(
params
.
customerPhone
=
'1'
)
:
(
params
.
isJoin
=
1
)
this
.
$apis
.
sop
.
getCustomerByTagListApi
(
params
).
then
(
res
=>
{
this
.
predictCountObj
[
this
.
editForm
.
pushChannelType
==
2
?
'phone'
:
'qiwei'
]
=
res
.
count
})
},
// 跳转
// 跳转
whereToGo
(
id
)
{
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
document
.
getElementById
(
id
).
scrollIntoView
()
...
@@ -642,15 +731,23 @@ export default {
...
@@ -642,15 +731,23 @@ export default {
}
}
// 跟进员工类型followerTypeId
// 跟进员工类型followerTypeId
this
.
editForm
.
followerTypeName
=
this
.
baseData
.
staffTypeList
.
find
(
item
=>
item
.
id
).
businessName
this
.
editForm
.
followerTypeName
=
this
.
baseData
.
staffTypeList
.
find
(
item
=>
item
.
id
).
businessName
// console.log(this.editForm)
// 预估可触达人数
this
.
editForm
.
predictCount
=
this
.
predictCountObj
[
this
.
editForm
.
pushChannelType
==
2
?
'phone'
:
'qiwei'
]
console
.
log
(
this
.
editForm
)
if
(
this
.
editForm
.
repeatFlag
==
'Y'
)
{
if
(
this
.
editForm
.
repeatFlag
==
'Y'
)
{
this
.
$apis
.
sop
.
parseEventCountApi
(
countParams
).
then
(
res
=>
{
this
.
$apis
.
sop
.
parseEventCountApi
(
countParams
).
then
(
res
=>
{
this
.
editForm
.
eventCount
=
res
.
eventStatistics
.
eventCount
// this.editForm.eventCount = res.eventStatistics.eventCount
this
.
$emit
(
'handleInfoConfirm'
,
{
baseInfo
:
this
.
editForm
})
this
.
maxReachesTypeSet
=
res
.
eventStatistics
.
eventCount
if
(
this
.
maxReachesTypeSet
<
this
.
editForm
.
reachesTypeSet
||
this
.
editForm
.
reachesTypeSet
<
2
)
{
this
.
whereToGo
(
'reachesTypeSet'
)
this
.
submit
=
false
return
true
}
this
.
$emit
(
'handleInfoConfirm'
,
{
baseInfo
:
this
.
editForm
,
predictCountObj
:
this
.
predictCountObj
})
})
})
}
else
{
}
else
{
this
.
editForm
.
eventCount
=
1
//
this.editForm.eventCount = 1
this
.
$emit
(
'handleInfoConfirm'
,
{
baseInfo
:
this
.
editForm
})
this
.
$emit
(
'handleInfoConfirm'
,
{
baseInfo
:
this
.
editForm
,
predictCountObj
:
this
.
predictCountObj
})
}
}
},
},
cancelJump
()
{
cancelJump
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment