Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-journey
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 3f88eedd
authored
Sep 26, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
9d7aae1e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
44 deletions
src/api/modules/journey.js
src/common/constant.js
src/views/journey/index.vue
src/views/journey/index/combiFormConfig.js
src/views/journey/index/dataView.vue
src/views/journey/index/table.vue
src/api/modules/journey.js
View file @
3f88eed
...
@@ -47,4 +47,15 @@ const exportExcel = params => {
...
@@ -47,4 +47,15 @@ const exportExcel = params => {
sign
:
false
sign
:
false
})
})
}
}
export
default
{
getCustomersList
,
getCustomersDetail
,
stageUpdate
,
exportExcel
}
/**
* 状态刷新
*/
const
refreshInst
=
params
=>
{
return
http_sop
({
url
:
`http://gateway.platform.dev.glsx.com.cn/process/sop/inst/refresh`
,
method
:
'get'
,
data
:
params
,
sign
:
false
})
}
export
default
{
getCustomersList
,
getCustomersDetail
,
stageUpdate
,
exportExcel
,
refreshInst
}
src/common/constant.js
View file @
3f88eed
...
@@ -148,7 +148,42 @@ const stateList = [{
...
@@ -148,7 +148,42 @@ const stateList = [{
confName
:
'已下架'
confName
:
'已下架'
},
},
]
]
function
getExplorer
()
{
var
ua
=
navigator
.
userAgent
.
toLocaleLowerCase
()
var
browserType
=
null
if
(
ua
.
match
(
/msie/
)
!=
null
||
ua
.
match
(
/trident/
)
!=
null
)
{
browserType
=
'IE'
}
else
if
(
ua
.
match
(
/firefox/
)
!=
null
)
{
browserType
=
'火狐'
}
else
if
(
ua
.
match
(
/ubrowser/
)
!=
null
)
{
browserType
=
'UC'
}
else
if
(
ua
.
match
(
/opera/
)
!=
null
)
{
browserType
=
'欧朋'
}
else
if
(
ua
.
match
(
/bidubrowser/
)
!=
null
)
{
browserType
=
'百度'
}
else
if
(
ua
.
match
(
/metasr/
)
!=
null
)
{
browserType
=
'搜狗'
}
else
if
(
ua
.
match
(
/tencenttraveler/
)
!=
null
||
ua
.
match
(
/qqbrowse/
)
!=
null
)
{
browserType
=
'QQ'
}
else
if
(
ua
.
match
(
/maxthon/
)
!=
null
)
{
browserType
=
'遨游'
}
else
{
browserType
=
'谷歌'
}
return
browserType
}
function
exportFn
(
url
)
{
let
browserType
=
getExplorer
()
if
(
browserType
==
'QQ'
)
{
window
.
open
(
url
)
return
}
let
iframe
=
document
.
createElement
(
'iframe'
)
iframe
.
style
.
display
=
'none'
iframe
.
src
=
url
document
.
body
.
appendChild
(
iframe
)
}
export
{
export
{
limitPrice
,
limitPrice
,
orderManageStatusList
,
orderManageStatusList
,
...
@@ -159,5 +194,7 @@ export {
...
@@ -159,5 +194,7 @@ export {
memberTypeList
,
memberTypeList
,
stateList
,
stateList
,
orderTypesList
,
orderTypesList
,
orderStatusList
orderStatusList
,
exportFn
,
getExplorer
}
}
\ No newline at end of file
\ No newline at end of file
src/views/journey/index.vue
View file @
3f88eed
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<div
class=
"btns"
>
<div
class=
"btns"
>
<el-button
<el-button
type=
"default"
type=
"default"
@
click=
"
handleRefresh
"
@
click=
"
refreshInst
"
plain
plain
>
状态刷新
</el-button>
>
状态刷新
</el-button>
<el-button
<el-button
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
import
{
combiFormConfig
}
from
'./index/config'
import
{
combiFormConfig
}
from
'./index/config'
import
journeyTable
from
'./index/table.vue'
import
journeyTable
from
'./index/table.vue'
import
dataView
from
'./index/dataView.vue'
import
dataView
from
'./index/dataView.vue'
import
{
exportFn
}
from
'@/common/constant'
export
default
{
export
default
{
mixins
:
[
combiFormConfig
],
mixins
:
[
combiFormConfig
],
components
:
{
components
:
{
...
@@ -82,14 +83,13 @@ export default {
...
@@ -82,14 +83,13 @@ export default {
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{
return
{
viewType
:
1
1
,
viewType
:
1
,
journeyList
:
[],
journeyList
:
[],
FormKey
:
Date
.
now
()
FormKey
:
Date
.
now
()
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
getList
()
this
.
getCustomersList
();
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
...
@@ -115,7 +115,7 @@ export default {
...
@@ -115,7 +115,7 @@ export default {
this
.
handleSearch
()
this
.
handleSearch
()
})
})
},
},
changeTab
(
val
)
{
changeTab
(
val
)
{
this
.
searchForm
.
sopJourneyStage
=
val
this
.
searchForm
.
sopJourneyStage
=
val
this
.
handleSearch
()
this
.
handleSearch
()
},
},
...
@@ -141,11 +141,22 @@ export default {
...
@@ -141,11 +141,22 @@ export default {
},
},
handleExport
()
{
handleExport
()
{
this
.
$apis
.
journey
.
exportExcel
({
...
this
.
searchForm
,
pageSize
:
10000
,
pageNumber
:
1
}).
then
(
res
=>
{
this
.
$apis
.
journey
.
exportExcel
({
...
this
.
searchForm
,
pageSize
:
10000
,
pageNumber
:
1
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
url
)
exportFn
(
res
.
url
)
})
})
},
},
changeViewType
()
{
changeViewType
()
{
this
.
viewType
=
this
.
viewType
==
1
?
0
:
1
this
.
viewType
=
this
.
viewType
==
1
?
0
:
1
},
/**状态刷新 */
async
refreshInst
()
{
const
{
sopJourneyId
}
=
this
.
tableSearchForm
,
{
refreshTime
}
=
this
if
(
refreshTime
&&
Date
.
now
()
-
refreshTime
<
1
e4
)
return
this
.
$message
(
'数据正在刷新中,请勿频繁提交'
)
const
res
=
await
this
.
$apis
.
journey
.
refreshInst
({
instId
:
sopJourneyId
})
this
.
refreshTime
=
Date
.
now
()
this
.
handleSearch
()
}
}
}
}
}
}
...
@@ -172,7 +183,8 @@ export default {
...
@@ -172,7 +183,8 @@ export default {
text-align
:
center
;
text-align
:
center
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.active
,
.tab
:hover
{
.active
,
.tab
:hover
{
background-color
:
#fff
;
background-color
:
#fff
;
color
:
#5850ff
;
color
:
#5850ff
;
}
}
...
...
src/views/journey/index/combiFormConfig.js
View file @
3f88eed
...
@@ -10,6 +10,7 @@ export default {
...
@@ -10,6 +10,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
refreshTime
:
''
,
searchForm
:
{
searchForm
:
{
...
defaultFormData
...
defaultFormData
},
},
...
...
src/views/journey/index/dataView.vue
View file @
3f88eed
...
@@ -45,21 +45,21 @@
...
@@ -45,21 +45,21 @@
>
>
<div
class=
"top flex"
>
<div
class=
"top flex"
>
<div
class=
"icon"
>
<div
class=
"icon"
>
<template
v-if=
"item.
icon
"
>
<template
v-if=
"item.
wechatAvatarUrl
"
>
<img
:src=
"item.
icon
"
/>
<img
:src=
"item.
wechatAvatarUrl
"
/>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<img
src=
"@/assets/icon/default-avatar.png"
/>
<img
src=
"@/assets/icon/default-avatar.png"
/>
</
template
>
</
template
>
</div>
</div>
<div
class=
"text"
>
<div
class=
"text"
>
<div
class=
"name"
>
微信昵称
</div>
<div
class=
"name"
>
{{ item.wechatNickname}}
</div>
18888888888
{{ item.customerPhone }}
</div>
</div>
</div>
</div>
<div
class=
"bottom flex"
>
<div
class=
"bottom flex"
>
<div
class=
"left text-hide"
>
进入该阶段:第
1
天
</div>
<div
class=
"left text-hide"
>
进入该阶段:第
{{ item.day }}
天
</div>
<div
class=
"right text-hide"
>
跟进人:
姓名啊
</div>
<div
class=
"right text-hide"
>
跟进人:
{{ item.sopFollowUpPersonName }}
</div>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
</template>
</template>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
props
:
{
props
:
{
...
@@ -125,6 +125,7 @@ export default {
...
@@ -125,6 +125,7 @@ export default {
},
},
methods
:
{
methods
:
{
async
refreshTable
()
{
async
refreshTable
()
{
console
.
log
(
dayjs
)
function
splitArrayIntoChunks
(
arr
,
chunkSize
)
{
function
splitArrayIntoChunks
(
arr
,
chunkSize
)
{
const
weight
=
1
/
arr
.
length
const
weight
=
1
/
arr
.
length
return
arr
.
reduce
((
result
,
item
,
index
)
=>
{
return
arr
.
reduce
((
result
,
item
,
index
)
=>
{
...
@@ -143,18 +144,18 @@ export default {
...
@@ -143,18 +144,18 @@ export default {
const
stageList
=
this
.
stageList
,
const
stageList
=
this
.
stageList
,
arr
=
[]
arr
=
[]
for
(
let
k
of
stageList
)
{
for
(
let
k
of
stageList
)
{
if
(
k
.
value
)
{
//
if (k.value) {
params
.
sopJourneyStage
=
k
.
value
params
.
sopJourneyStage
=
k
.
value
const
{
list
}
=
await
this
.
$apis
.
journey
.
getCustomersList
(
params
)
const
{
list
}
=
await
this
.
$apis
.
journey
.
getCustomersList
(
params
)
list
.
length
&&
list
.
map
(
e
=>
e
.
day
=
dayjs
().
diff
(
dayjs
(
e
.
sopJourneyStageEnterTime
),
'day'
))
arr
.
push
({
arr
.
push
({
title
:
k
.
label
,
title
:
k
.
label
,
list
list
})
})
}
//
}
}
}
this
.
viewList
=
splitArrayIntoChunks
(
arr
,
4
)
this
.
viewList
=
splitArrayIntoChunks
(
arr
,
4
)
this
.
dataViewLoading
=
false
this
.
dataViewLoading
=
false
},
},
}
}
}
}
...
...
src/views/journey/index/table.vue
View file @
3f88eed
<
template
>
<
template
>
<div
class=
"journey-table"
>
<div
class=
"journey-table"
>
<GLTable
ref=
"tableRef"
:noDataImg=
"url"
:tableParams=
"tableParams"
:tableData=
"tableData"
:pageConf=
"pageConf"
@
refreshTable=
"refreshTable"
:tableTotal=
"tableTotal"
>
<GLTable
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
ref=
"tableRef"
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
></GLTableButton>
:noDataImg=
"url"
:tableParams=
"tableParams"
:tableData=
"tableData"
:pageConf=
"pageConf"
@
refreshTable=
"refreshTable"
:tableTotal=
"tableTotal"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
></GLTableButton>
</div>
</div>
</GLTable>
</GLTable>
<el-drawer
:visible
.
sync=
"showDrawer"
direction=
"rtl"
size=
"720px"
>
<el-drawer
:visible
.
sync=
"showDrawer"
direction=
"rtl"
size=
"720px"
>
<template
#
title
>
<template
#
title
>
<div
class=
"drawer-title"
>
编辑客户旅程
</div>
<div
class=
"drawer-title"
>
编辑客户旅程
</div>
</
template
>
</
template
>
...
@@ -28,8 +47,15 @@
...
@@ -28,8 +47,15 @@
<div
class=
"label"
>
旅程阶段:
</div>
<div
class=
"label"
>
旅程阶段:
</div>
<
template
v-for=
"(i, index) in stageList"
>
<
template
v-for=
"(i, index) in stageList"
>
<template>
<template>
<div
:key=
"index"
class=
"tags-item flex"
>
<div
<el-button
:class=
"['text',
{ active: index == stageIndex }]" :disabled="index
< stageIndex
"
@
click=
"editStage(index)"
>
{{
i
.
label
}}
</el-button>
:key=
"index"
class=
"tags-item flex"
>
<el-button
:class=
"['text',
{ active: index == stageIndex }]"
:disabled="index
< stageIndex
"
@
click=
"editStage(index)"
>
{{
i
.
label
}}
</el-button>
<div
class=
"arrow"
></div>
<div
class=
"arrow"
></div>
</div>
</div>
</
template
>
</
template
>
...
@@ -44,7 +70,10 @@
...
@@ -44,7 +70,10 @@
</div>
</div>
<
template
v-for=
"(i, index) in fileObject"
>
<
template
v-for=
"(i, index) in fileObject"
>
<template>
<template>
<div
:key=
"index"
class=
"file-item flex"
>
<div
:key=
"index"
class=
"file-item flex"
>
<div
class=
"label"
>
{{
i
.
label
}}
:
</div>
<div
class=
"label"
>
{{
i
.
label
}}
:
</div>
<div
class=
"value"
>
{{
userInfo
.
carMaintenanceInsurances
[
0
][
i
.
key
]
}}
</div>
<div
class=
"value"
>
{{
userInfo
.
carMaintenanceInsurances
[
0
][
i
.
key
]
}}
</div>
</div>
</div>
...
@@ -53,8 +82,14 @@
...
@@ -53,8 +82,14 @@
</div>
</div>
</div>
</div>
<div
class=
"footer flex"
>
<div
class=
"footer flex"
>
<el-button
type=
"default"
@
click=
"showDrawer = false"
>
取消
</el-button>
<el-button
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
type=
"default"
@
click=
"showDrawer = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
</div>
</div>
</el-drawer>
</el-drawer>
</div>
</div>
...
@@ -62,6 +97,7 @@
...
@@ -62,6 +97,7 @@
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
props
:
{
props
:
{
...
@@ -77,7 +113,7 @@ export default {
...
@@ -77,7 +113,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
userInfo
:
{
userInfo
:
{
carMaintenanceInsurances
:[{}]
carMaintenanceInsurances
:
[{}]
},
},
tableSearchForm
:
{},
tableSearchForm
:
{},
tableData
:
[],
tableData
:
[],
...
@@ -107,19 +143,27 @@ export default {
...
@@ -107,19 +143,27 @@ export default {
},
},
{
{
label
:
'旅程'
,
label
:
'旅程'
,
prop
:
'orderCode'
,
prop
:
'sopJourneyStage'
,
minWidth
:
'100px'
minWidth
:
'100px'
,
formatter
:
cell
=>
{
const
{
journeyList
}
=
this
.
$parent
return
journeyList
.
find
(
e
=>
e
.
instId
==
cell
.
sopJourneyId
).
instName
}
},
},
{
{
label
:
'进入旅程时间'
,
label
:
'进入旅程时间'
,
prop
:
'sopJourneyEnterTime'
,
prop
:
'sopJourneyEnterTime'
,
minWidth
:
'160px'
minWidth
:
'160px'
,
formatter
:
cell
=>
{
return
`
${
dayjs
(
cell
.
sopJourneyEnterTime
).
format
(
'YYYY/MM/DD'
)}
`
}
},
},
{
{
label
:
'所处旅程天数'
,
label
:
'所处旅程天数'
,
prop
:
'orderCode'
,
minWidth
:
'160px'
,
minWidth
:
'160px'
formatter
:
cell
=>
{
return
`
${
dayjs
().
diff
(
dayjs
(
cell
.
sopJourneyEnterTime
),
'day'
)}
天`
}
},
},
{
{
label
:
'旅程阶段'
,
label
:
'旅程阶段'
,
...
@@ -128,8 +172,10 @@ export default {
...
@@ -128,8 +172,10 @@ export default {
},
},
{
{
label
:
'所处旅程阶段天数'
,
label
:
'所处旅程阶段天数'
,
prop
:
'orderCode'
,
minWidth
:
'160px'
,
minWidth
:
'160px'
formatter
:
cell
=>
{
return
`
${
dayjs
().
diff
(
dayjs
(
cell
.
sopJourneyStageEnterTime
),
'day'
)}
天`
}
}
}
]
]
},
},
...
@@ -152,7 +198,7 @@ export default {
...
@@ -152,7 +198,7 @@ export default {
},
},
],
],
showDrawer
:
false
,
showDrawer
:
false
,
stageIndex
:
''
,
stageIndex
:
''
,
fileObject
:
[
fileObject
:
[
{
{
label
:
'车牌号'
,
label
:
'车牌号'
,
...
@@ -194,7 +240,7 @@ export default {
...
@@ -194,7 +240,7 @@ export default {
// })
// })
// },
// },
refreshTable
()
{
refreshTable
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
$refs
)
console
.
log
(
this
.
$refs
)
const
params
=
{
const
params
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
params
)),
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
params
)),
...
@@ -213,20 +259,20 @@ export default {
...
@@ -213,20 +259,20 @@ export default {
},
},
getCustomersDetail
(
row
)
{
getCustomersDetail
(
row
)
{
this
.
$apis
.
journey
.
getCustomersDetail
({
oneId
:
row
.
oneId
,
sopJourneyId
:
row
.
sopJourneyId
,
orgId
:
row
.
orgId
}).
then
(
res
=>
{
this
.
$apis
.
journey
.
getCustomersDetail
({
oneId
:
row
.
oneId
,
sopJourneyId
:
row
.
sopJourneyId
,
orgId
:
row
.
orgId
}).
then
(
res
=>
{
this
.
userInfo
=
res
this
.
userInfo
=
res
this
.
stageIndex
=
this
.
stageList
.
findIndex
(
i
=>
i
.
label
==
this
.
userInfo
.
sopJourneyStage
)
this
.
stageIndex
=
this
.
stageList
.
findIndex
(
i
=>
i
.
label
==
this
.
userInfo
.
sopJourneyStage
)
console
.
log
(
this
.
stageIndex
)
console
.
log
(
this
.
stageIndex
)
})
})
},
},
editStage
(
index
)
{
editStage
(
index
)
{
this
.
stageIndex
=
index
this
.
stageIndex
=
index
this
.
userInfo
.
sopJourneyStage
=
this
.
stageList
[
index
].
label
this
.
userInfo
.
sopJourneyStage
=
this
.
stageList
[
index
].
label
},
},
handleConfirm
()
{
handleConfirm
()
{
const
{
oneId
,
sopJourneyId
,
orgId
,
sopJourneyStage
}
=
this
.
userInfo
const
{
oneId
,
sopJourneyId
,
orgId
,
sopJourneyStage
}
=
this
.
userInfo
this
.
$apis
.
journey
.
stageUpdate
({
oneId
,
sopJourneyId
,
orgId
,
sopJourneyStage
,
oprBy
:
this
.
$globalState
.
session
.
accountName
}).
then
(
res
=>
{
this
.
$apis
.
journey
.
stageUpdate
({
oneId
,
sopJourneyId
,
orgId
,
sopJourneyStage
,
oprBy
:
this
.
$globalState
.
session
.
accountName
}).
then
(
res
=>
{
this
.
showDrawer
=
false
this
.
showDrawer
=
false
})
})
...
...
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