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 a0742fa2
authored
Jun 19, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复一轮bug
1 parent
1f946c43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
24 deletions
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/editEvent.vue
src/views/sop/editSop/baseInfo.vue
View file @
a0742fa
...
...
@@ -74,10 +74,14 @@
<div
class=
"container edit-container"
v-loading=
"marketingEventLoading"
>
<div
class=
"edit-title flex"
style=
"align-items: center"
>
<p>
营销事件设置
</p>
<el-tooltip
:disabled=
"!(!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName)"
effect=
"dark"
content=
"请先完善sop名称和营销对象"
placement=
"top"
>
<el-tooltip
:disabled=
"!(!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName)"
effect=
"dark"
content=
"请先完善sop名称和营销对象"
placement=
"top"
>
<div>
<el-button
class=
"m-r-20"
:disabled=
"!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName"
:size=
"size"
<el-button
class=
"m-r-20"
:disabled=
"!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName"
:size=
"size"
type=
"primary"
@
click=
"handleEventEdit('add')"
>
添加事件
</el-button>
</div>
...
...
@@ -275,12 +279,15 @@
<el-button
v-if=
"new Date(item.eventStartDate) > new Date() || routeInfo.addOrEdit == 'copy'"
class=
"default newBtnSty"
:size=
"size"
@
click=
"handleEventDelete(index)"
>
删除
</el-button>
<el-tooltip
:disabled=
"!(!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName)"
effect=
"dark"
content=
"请先完善sop名称和营销对象"
placement=
"top"
>
<el-tooltip
:disabled=
"!(!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName)"
effect=
"dark"
content=
"请先完善sop名称和营销对象"
placement=
"top"
>
<div>
<el-button
class=
"default-blue-btn newBtnSty"
v-if=
"new Date(item.eventStartDate) > new Date() || !item.eventStartDate"
:disabled=
"!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName"
:size=
"size"
:disabled=
"!(editForm.customerInfoList && editForm.customerInfoList.length) || !editForm.sopName"
:size=
"size"
@
click=
"handleEventEdit('edit', item, index)"
>
编辑
</el-button>
</div>
...
...
@@ -1008,13 +1015,11 @@ export default {
break
}
this
.
$nextTick
(()
=>
{
this
.
$set
(
this
.
editForm
,
'customerInfoList'
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
)))
this
.
$refs
.
editFormRef
&&
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
'customerInfoList'
)
}
)
this
.
$nextTick
(()
=>
{
this
.
$set
(
this
.
editForm
,
'customerInfoList'
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
customerDataList
[
this
.
currentCustomerIdx
].
list
)))
this
.
$refs
.
editFormRef
&&
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
'customerInfoList'
)
}
)
// this.key = new Date()
...
...
@@ -1245,6 +1250,7 @@ this.$nextTick(()=>{
// 处理营销内容类型
handleMarketingContentTypes
(
val
)
{
console
.
log
(
val
)
const
materialType
=
val
.
some
(
item
=>
item
.
attType
==
6
)
const
activityType
=
val
.
some
(
item
=>
item
.
attType
==
7
||
item
.
attType
==
4
)
const
mixedType
=
materialType
&&
activityType
...
...
@@ -1273,7 +1279,7 @@ this.$nextTick(()=>{
// 活动
if
(
event
&&
(
event
.
attType
==
7
||
event
.
attType
==
4
))
{
obj
.
additionalType
=
2
let
attContentCopy
=
JSON
.
parse
(
event
.
attContent
)
let
attContentCopy
=
typeof
event
.
attContent
==
'string'
?
JSON
.
parse
(
event
.
attContent
)
:
event
.
attContent
if
(
attContentCopy
.
marketingContent
.
selectType
==
'coupon'
)
{
obj
.
additionalType
=
3
obj
.
objectType
=
5
...
...
@@ -1333,7 +1339,7 @@ this.$nextTick(()=>{
this
.
submit
=
true
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
!
this
.
editForm
.
customerInfoList
?.
length
){
if
(
!
this
.
editForm
.
customerInfoList
?.
length
)
{
this
.
$message
({
message
:
'请选择营销对象'
,
type
:
'error'
...
...
src/views/sop/editSop/editEvent.vue
View file @
a0742fa
...
...
@@ -9,7 +9,8 @@
<!-- :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData"-->
<!-- :formRules="editRule">
</glsx-combi-form>
-->
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRefDate"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRefDate"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormDataDate"
:formRules=
"editRule"
>
<div
slot=
"eventStartDate"
slot-scope=
"scope"
>
<el-date-picker
class=
"m-r-20"
...
...
@@ -78,8 +79,10 @@
</div>
<div
class=
"preview"
>
<Preview
:previewVal=
"previewList"
v-if=
"editForm.pushChannelType == 1 && editForm.sopType ==1"
></Preview>
<MessagePreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 2"
></MessagePreview>
<FriendGroupPreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 3"
></FriendGroupPreview>
<MessagePreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 2 && editForm.sopType ==1"
></MessagePreview>
<FriendGroupPreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 3 && editForm.sopType ==1"
></FriendGroupPreview>
<GoupchatPreview
:previewVal=
"previewList"
v-if=
"editForm.sopType ==2"
></GoupchatPreview>
</div>
</div>
...
...
@@ -492,6 +495,7 @@ export default {
addHtml
:
'eventContent'
}
],
editFormDataChannelCopy
:
null
,
editFormDataChannel
:
[
{
label
:
'营销设置'
,
...
...
@@ -633,6 +637,14 @@ export default {
this
.
editFormDataChannel
[
idx
].
optionList
[
2
].
isDisabled
=
[
1
,
2
,
3
].
includes
(
val
)
},
'editForm.pushChannelType'
(
newValue
)
{
if
(
newValue
==
2
)
{
this
.
editFormDataChannel
=
this
.
editFormDataChannel
.
filter
(
item
=>
{
return
item
.
name
!==
'followerTypeId'
})
}
else
{
this
.
editFormDataChannel
=
this
.
editFormDataChannelCopy
}
setTimeout
(()
=>
{
this
.
previewList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
previewList
))
})
...
...
@@ -651,6 +663,7 @@ export default {
Object
.
assign
(
this
.
editForm
,
this
.
eventObj
.
info
)
this
.
editFormDataChannelCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editFormDataChannel
))
// 客户sop还是群sop做营销设置处理
if
(
this
.
editForm
.
sopType
==
2
)
{
this
.
editForm
.
pushChannelType
=
1
...
...
@@ -668,12 +681,11 @@ export default {
methods
:
{
previewForm
(
val
)
{
console
.
log
(
this
.
previewList
)
this
.
previewList
=
val
val
.
forEach
(
item
=>
{
if
([
2
,
3
].
includes
(
item
.
attType
))
{
this
.
editFormDataChannel
[
0
].
optionList
[
1
].
isDisabled
=
true
if
(
this
.
editForm
.
pushChannelType
==
2
)
{
if
(
this
.
editForm
.
pushChannelType
pushChannelType
==
2
)
{
this
.
editForm
.
pushChannelType
=
''
}
}
else
{
...
...
@@ -773,7 +785,6 @@ export default {
getWelcomeDetails
()
{
let
backupContent
=
typeof
(
this
.
editForm
.
backupContent
)
==
'string'
?
JSON
.
parse
(
this
.
editForm
.
backupContent
)
:
this
.
editForm
.
backupContent
console
.
log
(
backupContent
)
if
(
backupContent
)
{
const
previewList
=
backupContent
.
map
(
item
=>
{
if
(
item
.
attType
==
7
||
item
.
attType
==
4
)
item
.
attContent
=
typeof
(
item
.
attContent
)
==
'string'
?
JSON
.
parse
(
item
.
attContent
)
:
item
.
attContent
...
...
@@ -804,7 +815,6 @@ export default {
handleMarketingContent
()
{
let
params
=
{}
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
console
.
log
(
previewList
)
if
((
previewList
[
0
]
&&
previewList
[
0
].
attType
==
1
&&
previewList
[
0
].
attContent
==
''
)
||
!
previewList
.
length
||
(
previewList
[
0
]
&&
previewList
[
0
].
attType
!==
1
))
{
this
.
hasEventContentDisplaySpecial
=
true
}
else
{
...
...
@@ -1015,12 +1025,10 @@ export default {
this
.
submit
=
false
return
true
}
console
.
log
(
this
.
editForm
)
this
.
$emit
(
'handleInfoConfirm'
,
{
baseInfo
:
this
.
editForm
,
predictCountObj
:
this
.
predictCountObj
})
})
}
else
{
// this.editForm.eventCount = 1
console
.
log
(
this
.
editForm
)
this
.
$emit
(
'handleInfoConfirm'
,
{
baseInfo
:
this
.
editForm
,
predictCountObj
:
this
.
predictCountObj
})
}
},
...
...
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