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 c8a30fec
authored
May 25, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复;sop联调
1 parent
d9078f60
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
179 additions
and
25 deletions
src/api/modules/sop.js
src/views/couponManage/editMemberService.vue
src/views/couponManage/receiveDetail.vue
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/components/selectCustomer.vue
src/views/sop/editSop/editEvent.vue
src/api/modules/sop.js
View file @
c8a30fe
...
...
@@ -15,7 +15,17 @@ const getCustomerListApi = params => {
// 标签获取客户列表
const
getCustomerByTagListApi
=
params
=>
{
params
.
method
=
'entmicro.api.customer.getCustomerPageByTag'
params
.
source
=
'scrm-home'
return
http
({
url
:
'rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 人群获取客户列表
const
getCustomerCrowdApi
=
params
=>
{
params
.
method
=
'entmicro.api.customer.crowd.page'
return
http
({
url
:
'rop-scrm-entmicro/router'
,
method
:
'POST'
,
...
...
@@ -204,4 +214,4 @@ const getMomentListApi = params => {
})
}
export
default
{
getCustomerListApi
,
getCustomerByTagListApi
,
getSopInfoListApi
,
getSopBaseInfoApi
,
getEventListApi
,
getSopCustomerStatisticsListApi
,
getSopStaffTaskListApi
,
getTaskStatusApi
,
parseEventCountApi
,
deleteSopEventApi
,
endSopEventApi
,
batchEditSopEventApi
,
insertOrUpdateSopApi
,
getSopInfoDetailApi
,
getGroupListApi
,
getMaterialListApi
,
getMomentListApi
}
export
default
{
getCustomerListApi
,
getCustomerByTagListApi
,
get
CustomerCrowdApi
,
get
SopInfoListApi
,
getSopBaseInfoApi
,
getEventListApi
,
getSopCustomerStatisticsListApi
,
getSopStaffTaskListApi
,
getTaskStatusApi
,
parseEventCountApi
,
deleteSopEventApi
,
endSopEventApi
,
batchEditSopEventApi
,
insertOrUpdateSopApi
,
getSopInfoDetailApi
,
getGroupListApi
,
getMaterialListApi
,
getMomentListApi
}
src/views/couponManage/editMemberService.vue
View file @
c8a30fe
...
...
@@ -162,7 +162,7 @@
width: footerWidth + 'px'
}"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
size=
"medium"
:loading=
"sloading"
v-if=
"showSubmit"
>
确定
</el-button>
<el-button
type=
"
primary
"
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
type=
"
default
"
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
</div>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog
title=
""
top=
"30vh"
:hasScroll=
"false"
width=
"547px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleConfirm"
>
...
...
src/views/couponManage/receiveDetail.vue
View file @
c8a30fe
...
...
@@ -167,7 +167,7 @@ export default {
label
:
'领取用户'
,
prop
:
'userName'
,
formatter
:
cellValue
=>
{
return
cellValue
.
userName
+
' '
+
cellValue
.
phone
return
cellValue
.
userName
==
cellValue
.
phone
?
cellValue
.
userName
:
cellValue
.
userName
+
' '
+
cellValue
.
phone
}
},
{
...
...
src/views/sop/editSop/baseInfo.vue
View file @
c8a30fe
...
...
@@ -23,7 +23,7 @@
<div
v-show=
"item.list.length != 0"
>
<div
class=
"customer-box m-t-10"
>
<!--
<div
class=
"customer-title"
>
{{
condLimitObj
.
hasQw
?
'已加'
:
'没加'
}}
企微/
{{
condLimitObj
.
hasPhone
?
'有'
:
'没有'
}}
手机号:
{{
editForm
.
customerInfoList
.
length
}}
人
</div>
-->
<div
class=
"customer-title"
>
{{
item
.
confName
}}
客户:预估
{{}}
人
</div>
<div
class=
"customer-title"
>
{{
item
.
confName
}}
客户:预估
{{
item
.
customerCount
}}
人
</div>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<template
v-if=
"item.confName == '标签'"
>
<div
v-for=
"(subItem, subIdx) in item.list"
:key=
"subIdx"
>
...
...
@@ -98,9 +98,9 @@
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
</div>
<select-Crowd
v-if=
"isCrowdCustVisible"
:dialogVisible=
"isCrowdCustVisible"
:selectedCustomerList=
"customerDataList[0].list"
@
handleCrowdCustClose=
"handleCrowdCustClose"
@
handleCrowdCustConfirm=
"handleDialogConfirm"
></select-Crowd>
<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-Crowd
v-if=
"isCrowdCustVisible"
:dialogVisible=
"isCrowdCustVisible"
:selectedCustomerList=
"customerDataList[0].list"
@
handleCrowdCustClose=
"handleCrowdCustClose"
@
handleCrowdCustConfirm=
"handleDialogConfirm"
></select-Crowd>
</div>
</template>
...
...
@@ -147,8 +147,10 @@ export default {
currentCustomerIdx
:
-
1
,
customerDataList
:
[
{
confId
:
1
,
confId
:
2
,
confName
:
'人群'
,
reqListName
:
'crowdList'
,
customerCount
:
''
,
listConf
:
{
confId
:
'crowdId'
,
confName
:
'crowdName'
...
...
@@ -156,13 +158,17 @@ export default {
list
:
[]
},
{
confId
:
2
,
confId
:
3
,
confName
:
'标签'
,
reqListName
:
'labelList'
,
customerCount
:
''
,
list
:
[]
},
{
confId
:
3
,
confId
:
1
,
confName
:
'指定'
,
reqListName
:
'customerList'
,
customerCount
:
''
,
listConf
:
{
confId
:
'id'
,
confName
:
'customerName'
...
...
@@ -178,7 +184,7 @@ export default {
// tagging: [],
customerOptType
:
''
,
customerInfoList
:
[],
customerIds
:
[],
//
customerIds: [],
customerOptUpdate
:
'2'
,
eventList
:
[]
},
...
...
@@ -209,15 +215,15 @@ export default {
addHtml
:
'customerInfoList'
,
customerRadioList
:
[
{
confId
:
1
,
confId
:
2
,
confName
:
'按人群选择客户'
},
{
confId
:
2
,
confId
:
3
,
confName
:
'按标签选择客户'
},
{
confId
:
3
,
confId
:
1
,
confName
:
'选择指定客户'
}
],
...
...
@@ -306,14 +312,52 @@ export default {
this
.
editFormData
[
idx
].
isDisabled
=
this
.
editDisabled
})
},
recoverAppointList
()
{
var
list
=
[]
var
sexToObj
=
{
U
:
0
,
M
:
1
,
W
:
2
}
this
.
editForm
[
this
.
customerDataList
[
this
.
currentCustomerIdx
].
reqListName
].
forEach
(
item
=>
{
list
.
push
({
id
:
item
.
customerId
,
customerName
:
item
.
customerName
,
customerPhone
:
item
.
customerPhone
,
customerSex
:
sexToObj
[
item
.
customerSex
],
isJoin
:
item
.
customerWxAdd
==
'Y'
?
1
:
0
,
addTime
:
item
.
customerTimeAdd
,
oneId
:
item
.
externalUserId
})
})
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
this
.
changeCustomer
()
},
recoverCustomerList
()
{
switch
(
this
.
customerDataList
[
this
.
currentCustomerIdx
].
confName
)
{
case
'人群'
:
break
case
'标签'
:
break
case
'指定'
:
this
.
recoverAppointList
()
break
}
},
getInfo
()
{
this
.
$apis
.
sop
.
getSopInfoDetailApi
({
sopId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
// console.log(res)
this
.
editForm
=
res
this
.
editForm
.
customerInfoList
=
this
.
editForm
.
customerInfoList
||
[]
this
.
editForm
.
customerInfoList
.
forEach
(
item
=>
{
item
.
id
=
item
.
customerId
})
this
.
currentCustomerIdx
=
this
.
customerDataList
.
findIndex
(
item
=>
item
.
confId
==
this
.
editForm
.
customerOptType
)
this
.
recoverCustomerList
()
this
.
editForm
.
customerOptUpdate
=
this
.
editForm
.
customerOptUpdate
+
''
// this.editForm.customerInfoList = this.editForm.customerInfoList || []
// this.editForm.customerInfoList.forEach(item => {
// item.id = item.customerId
// })
// this.editForm.customerInfoList.length && this.recoveryCondLimit()
this
.
editForm
.
eventList
.
forEach
(
item
=>
{
if
(
item
.
object
)
{
...
...
@@ -370,7 +414,55 @@ export default {
// }
// },
getCustomerByCrowdList
()
{
var
params
=
{
pageSize
:
9999
,
pageNum
:
1
,
crowdId
:
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
[
0
].
crowdId
}
this
.
$apis
.
sop
.
getCustomerCrowdApi
(
params
).
then
(
res
=>
{
this
.
customerDataList
[
this
.
currentCustomerIdx
].
customerCount
=
res
.
count
})
},
getCustomerByTagList
()
{
var
params
=
{
combineType
:
2
,
pageSize
:
9999
,
pageNum
:
1
,
tagLists
:
[]
}
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
&&
this
.
customerDataList
[
this
.
currentCustomerIdx
].
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
})
})
})
this
.
$apis
.
sop
.
getCustomerByTagListApi
(
params
).
then
(
res
=>
{
this
.
customerDataList
[
this
.
currentCustomerIdx
].
customerCount
=
res
.
count
})
},
changeCustomer
()
{
// 预估人数
switch
(
this
.
customerDataList
[
this
.
currentCustomerIdx
].
confName
)
{
case
'人群'
:
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
.
length
&&
this
.
getCustomerByCrowdList
()
break
case
'标签'
:
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
.
length
&&
this
.
getCustomerByTagList
()
break
case
'指定'
:
this
.
customerDataList
[
this
.
currentCustomerIdx
].
customerCount
=
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
.
length
break
}
this
.
editForm
.
customerInfoList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
))
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
'customerInfoList'
)
},
...
...
@@ -378,11 +470,13 @@ export default {
// 选择标签
handleDialogConfirm
(
obj
)
{
console
.
log
(
obj
)
switch
(
this
.
cu
rrentCustomerIdx
)
{
case
0
:
switch
(
this
.
cu
stomerDataList
[
this
.
currentCustomerIdx
].
confName
)
{
case
'人群'
:
this
.
handleCrowdCustClose
()
break
case
2
:
case
'标签'
:
break
case
'指定'
:
this
.
handleAppointCustClose
()
break
}
...
...
@@ -514,6 +608,41 @@ export default {
this
.
$emit
(
'handleTabChange'
,
{
activeName
:
'editEvent'
,
addOrEdit
:
addOrEdit
,
eventIndex
:
addOrEdit
==
'add'
?
'-1'
:
idx
,
info
:
{
...
row
,
sopName
:
this
.
editForm
.
sopName
}
})
},
reqCrowdAttrs
()
{
},
reqAppointAttrs
()
{
var
list
=
[]
var
sexToObj
=
{
0
:
'U'
,
1
:
'M'
,
2
:
'W'
}
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
.
forEach
(
item
=>
{
list
.
push
({
customerId
:
item
.
id
,
customerName
:
item
.
customerName
,
customerPhone
:
item
.
customerPhone
,
customerSex
:
item
.
customerSex
?
sexToObj
[
item
.
customerSex
]
:
'U'
,
customerWxAdd
:
item
.
isJoin
?
'Y'
:
'N'
,
customerTimeAdd
:
item
.
addTime
,
externalUserId
:
item
.
oneid
})
})
console
.
log
(
list
)
return
list
},
reqCustAttrs
()
{
switch
(
this
.
customerDataList
[
this
.
currentCustomerIdx
].
confName
)
{
case
'人群'
:
return
this
.
reqCrowdAttrs
()
case
'标签'
:
return
this
.
reqLabelAttrs
()
case
'指定'
:
return
this
.
reqAppointAttrs
()
}
},
handleConfirm
()
{
this
.
submit
=
true
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
...
...
@@ -522,7 +651,9 @@ export default {
return
true
}
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
params
.
customerIds
=
this
.
editForm
.
customerInfoList
.
map
(
item
=>
item
.
id
).
join
(
','
)
// params.customerIds = this.editForm.customerInfoList.map(item => item.id).join(',')
params
[
this
.
customerDataList
[
this
.
currentCustomerIdx
].
reqListName
]
=
JSON
.
stringify
(
this
.
reqCustAttrs
())
params
.
customerCount
=
this
.
customerDataList
[
this
.
currentCustomerIdx
].
customerCount
delete
params
.
customerInfoList
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
params
.
id
=
this
.
routeInfo
.
id
...
...
@@ -539,7 +670,10 @@ export default {
repeatFlag
:
item
.
repeatFlag
,
repeatMode
:
item
.
repeatMode
,
sopName
:
item
.
sopName
,
sopId
:
this
.
routeInfo
.
id
sopId
:
this
.
routeInfo
.
id
,
followerTypeId
:
item
.
followerTypeId
,
reachesType
:
item
.
reachesType
,
reachesTypeSet
:
item
.
reachesTypeSet
})
if
(
item
.
id
)
{
params
.
eventList
[
idx
].
id
=
item
.
id
...
...
src/views/sop/editSop/components/selectCustomer.vue
View file @
c8a30fe
...
...
@@ -54,10 +54,18 @@ export default {
// 搜索
searchFormData
:
[
{
label
:
'
关键字
'
,
name
:
'
keyword
'
,
label
:
'
客户名称
'
,
name
:
'
customerName
'
,
type
:
'input'
,
placeholder
:
'请输入客户名称/手机号'
isClear
:
true
,
maxlength
:
50
},
{
label
:
'客户手机号'
,
name
:
'customerPhone'
,
type
:
'input'
,
isClear
:
true
,
maxlength
:
11
}
],
// 表格
...
...
src/views/sop/editSop/editEvent.vue
View file @
c8a30fe
...
...
@@ -134,6 +134,7 @@ export default {
eventCount
:
''
,
object
:
{},
//营销渠道
followerTypeId
:
''
,
reachesType
:
''
,
reachesTypeSet
:
''
},
...
...
@@ -524,6 +525,7 @@ export default {
this
.
editForm
.
eventStartDate
=
moment
(
this
.
editForm
.
eventStartDate
).
format
(
'YYYY-MM-DD'
)
this
.
editForm
.
eventEndDate
=
this
.
editForm
.
eventEndDate
?
moment
(
this
.
editForm
.
eventEndDate
).
format
(
'YYYY-MM-DD'
)
:
''
this
.
previewList
=
this
.
editForm
.
object
?
[{
attContent
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
.
object
)),
additionalType
:
this
.
editForm
.
object
.
additionalType
}]
:
[]
this
.
editForm
.
followerTypeId
=
this
.
editForm
.
followerTypeId
+
''
this
.
recoveryRepeat
()
this
.
recoveryEndTime
()
},
...
...
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