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 23a396f5
authored
Dec 16, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新3.3.0代码
1 parent
5d17b1b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
97 deletions
src/views/sop/editSop.vue
src/views/sop/editSop/components/selectCustomer.vue
src/views/sop/editSop/editEvent.vue
src/views/sop/sopList.vue
src/views/sop/editSop.vue
View file @
23a396f
...
...
@@ -66,7 +66,6 @@ export default {
jumpEvent
(
obj
)
{
this
.
$set
(
this
.
eventObj
,
'addOrEdit'
,
obj
.
addOrEdit
)
delete
obj
.
info
.
eventStartDate
this
.
$set
(
this
.
eventObj
,
'info'
,
obj
.
info
)
this
.
parentCustomerObj
=
obj
.
parentCustomerObj
this
.
eventIndex
=
obj
.
eventIndex
...
...
src/views/sop/editSop/components/selectCustomer.vue
View file @
23a396f
...
...
@@ -57,13 +57,6 @@ export default {
type
:
'input'
,
isClear
:
true
,
maxlength
:
11
},
{
label
:
'企微名称'
,
name
:
'customerPhone'
,
type
:
'input'
,
isClear
:
true
,
maxlength
:
50
}
],
// 表格
...
...
src/views/sop/editSop/editEvent.vue
View file @
23a396f
...
...
@@ -3,16 +3,11 @@
<div
class=
"edit-event marketing edit-box"
>
<!-- 营销时间 -->
<div
class=
"container m-b-20"
>
<p
class=
"edit-title"
>
营销时间
</p>
<glsx-combi-form
class=
"edit-form-container m-r-20"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"sopNameFormData"
:formRules=
"editRule"
></glsx-combi-form>
<p
class=
"edit-title"
>
营销时间
</p>
<glsx-combi-form
class=
"edit-form-container m-r-20"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"sopNameFormData"
:formRules=
"editRule"
></glsx-combi-form>
<glsx-combi-form
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"
v-model=
"editForm[scope.scope.name]"
:placeholder=
"scope.scope.placeholder"
:value-format=
"scope.scope.valueFormat"
:clearable=
"scope.scope.isClear"
:picker-options=
"scope.scope.customPickerOptions"
@
change=
"scope.scope.change"
></el-date-picker>
<el-date-picker
class=
"m-r-20"
v-model=
"editForm[scope.scope.name]"
:placeholder=
"scope.scope.placeholder"
:value-format=
"scope.scope.valueFormat"
:clearable=
"scope.scope.isClear"
:picker-options=
"scope.scope.customPickerOptions"
@
change=
"scope.scope.change"
></el-date-picker>
</div>
<div
slot=
"eventTime"
slot-scope=
"scope"
>
<el-time-picker
v-model=
"editForm[scope.scope.name]"
value-format=
"HH:mm"
format=
"HH:mm"
:placeholder=
"scope.scope.placeholder"
></el-time-picker>
...
...
@@ -110,7 +105,6 @@
<nickname-model
v-if=
"isNicknameVisible"
:isNicknameVisible
.
sync=
"isNicknameVisible"
@
handleNicknameConfirm=
"handleNicknameConfirm"
@
handleNicknameClose=
"handleNicknameClose"
></nickname-model>
</div>
</template>
<
script
>
import
{
limitPrice
}
from
'@/common/constant'
import
ActivityModel
from
'./components/activityModel'
...
...
@@ -396,7 +390,6 @@ export default {
}
}
},
props
:
{
eventObj
:
{
type
:
Object
,
...
...
@@ -424,13 +417,11 @@ export default {
}
}
},
components
:
{
ActivityModel
,
materialModel
,
nicknameModel
},
watch
:
{
editForm
:
{
handler
(
val
)
{
...
...
@@ -448,14 +439,12 @@ export default {
this
.
editFormDataChannel
[
idx
].
optionList
[
2
].
isDisabled
=
[
1
,
2
,
3
].
includes
(
val
)
}
},
created
()
{
this
.
getDay
(
'weekList'
,
7
)
this
.
getDay
(
'monthList'
,
31
)
this
.
predictCountObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
parentCustomerObj
.
parentPredictObj
))
// this.limitQwPhone()
},
mounted
()
{
Object
.
assign
(
this
.
editForm
,
this
.
eventObj
.
info
)
this
.
getStaffTypeList
()
...
...
@@ -464,7 +453,6 @@ export default {
})
this
.
eventObj
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
''
},
methods
:
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
...
...
@@ -491,18 +479,15 @@ export default {
})
}
},
handleResetMaxSet
()
{
this
.
maxReachesTypeSet
=
''
},
getStaffTypeList
()
{
this
.
$apis
.
common
.
getStaffFollowerListApi
({}).
then
(
res
=>
{
this
.
baseData
.
staffTypeList
=
res
this
.
getOptionsList
(
'editFormDataChannel'
,
false
,
'followerTypeId'
)
})
},
getDay
(
attrName
,
day
)
{
let
weekNameList
=
[
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'日'
]
for
(
var
i
=
0
;
i
<
day
;
i
++
)
{
...
...
@@ -512,7 +497,6 @@ export default {
})
}
},
recoveryRepeat
()
{
var
idx
=
this
.
editFormDataRepeat
.
findIndex
(
item
=>
item
.
name
==
'repeatMode'
)
this
.
editFormDataRepeat
[
idx
].
isHide
=
this
.
editForm
.
repeatFlag
==
'N'
...
...
@@ -527,7 +511,6 @@ export default {
this
.
editForm
.
reachesTypeSet
=
1
}
},
recoveryEndTime
()
{
var
idx
=
this
.
editFormDataTime
.
findIndex
(
item
=>
item
.
name
==
'eventEndDate'
)
var
startTime
=
new
Date
(
this
.
editForm
.
eventStartDate
)
...
...
@@ -541,20 +524,17 @@ export default {
}
}
},
getInfo
()
{
this
.
editForm
.
eventStartDate
=
this
.
editForm
.
eventStartDate
?
moment
(
this
.
editForm
.
eventStartDate
).
format
(
'YYYY-MM-DD'
)
:
''
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
.
recoveryRepeat
()
this
.
recoveryEndTime
()
this
.
getCustomerNum
()
},
handleReachesType
(
val
)
{
this
.
editForm
.
reachesTypeSet
=
val
==
1
?
1
:
''
},
// 素材
handleMaterialConfirm
(
val
)
{
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...
...
@@ -570,11 +550,9 @@ export default {
]
this
.
handleMaterialClose
()
},
handleMaterialClose
()
{
this
.
isMaterialVisible
=
!
this
.
isMaterialVisible
},
// 朋友圈模板
handleNicknameConfirm
(
val
)
{
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...
...
@@ -593,11 +571,9 @@ export default {
]
this
.
handleNicknameClose
()
},
handleNicknameClose
()
{
this
.
isNicknameVisible
=
!
this
.
isNicknameVisible
},
// 营销内容
handleFun
(
name
)
{
if
(
name
==
'material'
)
{
...
...
@@ -610,7 +586,6 @@ export default {
this
.
handleNicknameClose
()
}
},
close
(
index
)
{
this
.
previewList
.
splice
(
index
,
1
)
if
(
this
.
editForm
.
object
.
additionalType
==
4
)
{
...
...
@@ -619,7 +594,6 @@ export default {
}
this
.
editForm
.
object
=
{}
},
selectActivity
(
val
)
{
this
.
editForm
.
object
=
JSON
.
parse
(
JSON
.
stringify
(
val
))
this
.
editRule
.
eventContent
[
0
].
required
=
true
...
...
@@ -632,7 +606,6 @@ export default {
]
},
// 营销内容
getCustomerNum
()
{
switch
(
this
.
parentCustomerObj
.
currentCustomerTypeName
)
{
case
'人群'
:
...
...
@@ -645,7 +618,6 @@ export default {
break
}
},
getCustomerByCrowdList
()
{
var
params
=
{
pageSize
:
1
,
...
...
@@ -658,7 +630,6 @@ export default {
this
.
predictCountObj
[
this
.
editForm
.
pushChannelType
==
2
?
'phone'
:
'qiwei'
]
=
res
.
count
})
},
getCustomerByTagList
()
{
var
params
=
{
combineType
:
2
,
...
...
@@ -667,18 +638,18 @@ export default {
tagLists
:
[]
}
this
.
parentCustomerObj
.
list
&&
this
.
parentCustomerObj
.
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
.
parentCustomerObj
.
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
=>
{
...
...
@@ -689,10 +660,8 @@ export default {
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
},
handleConfirm
()
{
console
.
log
(
this
.
editForm
.
eventStartDate
)
let
countParams
=
{
var
countParams
=
{
eventStartDate
:
this
.
editForm
.
eventStartDate
,
eventEndDate
:
this
.
editForm
.
eventEndDate
,
eventTime
:
this
.
editForm
.
eventTime
,
...
...
@@ -700,7 +669,6 @@ export default {
repeatMode
:
this
.
editForm
.
repeatMode
,
repeatTime
:
this
.
editForm
.
repeatTime
}
console
.
log
(
countParams
)
if
(
this
.
submit
)
{
return
true
}
...
...
@@ -753,10 +721,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{
})
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{
})
}
else
{
this
.
cancelJump
()
}
...
...
src/views/sop/sopList.vue
View file @
23a396f
...
...
@@ -7,7 +7,6 @@
</div>
<div
class=
"container"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable
ref=
"sopListRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
...
...
@@ -18,7 +17,6 @@
</div>
</div>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
...
...
@@ -81,29 +79,6 @@ export default {
},
{
type
:
'el-button'
,
name
:
'查看'
,
attrs
:
{
type
:
'text'
},
condition
:
row
=>
{
return
row
.
sopStatus
==
3
},
listeners
:
{
click
:
this
.
handleEnd
}
},
{
type
:
'el-button'
,
name
:
'复制'
,
attrs
:
{
type
:
'text'
},
listeners
:
{
click
:
row
=>
this
.
handleEdit
(
'copy'
,
row
)
}
},
{
type
:
'el-button'
,
name
:
'编辑'
,
attrs
:
{
type
:
'text'
...
...
@@ -138,7 +113,7 @@ export default {
{
label
:
'SOP名称'
,
prop
:
'sopName'
,
width
:
2
4
0
,
width
:
2
6
0
,
line
:
1
},
{
...
...
@@ -196,11 +171,9 @@ export default {
}
}
},
mounted
()
{
this
.
getOptionsList
(
'searchFormData'
)
},
methods
:
{
handleJump
(
path
,
row
=
{})
{
this
.
$router
.
push
({
...
...
@@ -208,7 +181,6 @@ export default {
query
:
row
?
{
id
:
row
.
id
,
fromPage
:
'/marketing/sop/sopList'
}
:
''
})
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -243,16 +215,13 @@ export default {
query
:
params
})
},
// 结束
handleEnd
(
row
)
{
this
.
secondConfirm
(
'结束'
,
'结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?'
,
'sop'
,
'endSopEventApi'
,
{
sopId
:
row
.
id
})
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'SOP删除后,不可恢复。是否确定删除?'
,
'sop'
,
'deleteSopEventApi'
,
{
sopId
:
row
.
id
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
...
...
@@ -278,22 +247,18 @@ export default {
})
}
},
setTableFinishFun
()
{
//接收到的数据为空
this
.
$refs
.
sopListRef
.
data
.
length
?
(
this
.
$refs
.
sopListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
sopListRef
.
setTableHeightFun
()
},
handleBack
()
{
this
.
$router
.
push
({
path
:
'/sop/index'
})
},
handleSearch
()
{
this
.
$refs
.
sopListRef
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
sopName
:
''
,
...
...
@@ -304,7 +269,6 @@ export default {
}
}
</
script
>
<
style
scoped
>
.sop-list
.sop-back-btn
{
position
:
absolute
;
...
...
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