Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-link
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 45215e6c
authored
Jul 10, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
d40cf384
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
26 deletions
src/mixins/draw.js
src/mixins/marketing.js
src/utils/drawing.js
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/MarketingTask.vue
src/views/activityLink/components/PhoneView.vue
src/mixins/draw.js
View file @
45215e6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-
09 14:03:05
* @LastEditTime: 2023-07-
10 10:17:54
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -96,8 +96,8 @@ export default {
...
@@ -96,8 +96,8 @@ export default {
}
}
]
]
const
textList
=
[
const
textList
=
[
{
x
:
style1
.
x
,
y
:
style1
.
y
,
fontSize
:
style1
.
size
,
width
:
style1
.
width
,
text
:
style1
.
content
,
color
:
style1
.
color
},
{
x
:
style1
.
x
,
y
:
style1
.
y
,
fontSize
:
style1
.
size
,
width
:
style1
.
width
,
text
:
style1
.
content
,
color
:
style1
.
color
,
font
:
style1
.
font
},
{
x
:
style2
.
x
,
y
:
style2
.
y
,
fontSize
:
style2
.
size
,
width
:
style2
.
width
,
text
:
style2
.
content
,
color
:
style2
.
color
}
{
x
:
style2
.
x
,
y
:
style2
.
y
,
fontSize
:
style2
.
size
,
width
:
style2
.
width
,
text
:
style2
.
content
,
color
:
style2
.
color
,
font
:
style2
.
font
}
]
]
console
.
log
(
imageList
,
textList
)
console
.
log
(
imageList
,
textList
)
const
canvasBase64
=
await
drawfun
.
begin
({
const
canvasBase64
=
await
drawfun
.
begin
({
...
...
src/mixins/marketing.js
0 → 100644
View file @
45215e6
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-10 10:53:53
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 11:10:17
* @FilePath: \scrm-micro-link\src\mixins\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export
default
{
data
()
{
return
{
process
:
{
0
:
false
,
1
:
false
,
2
:
false
}
}
},
methods
:
{
setProcess
(
data
)
{
this
.
process
=
{
...
this
.
process
,
...
data
}
}
}
}
src/utils/drawing.js
View file @
45215e6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 16:07:55
* @Date: 2023-05-17 16:07:55
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
5-31 18:02:51
* @LastEditTime: 2023-0
7-10 10:08:29
* @FilePath: \scrm-micro-home\src\utils\drawing.js
* @FilePath: \scrm-micro-home\src\utils\drawing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -43,11 +43,11 @@ class Drawing {
...
@@ -43,11 +43,11 @@ class Drawing {
return
this
.
pixelRatio
*
val
return
this
.
pixelRatio
*
val
}
}
drawText
(
textParams
)
{
drawText
(
textParams
)
{
let
{
fontSize
,
color
,
text
,
x
,
y
,
bold
}
=
textParams
let
{
fontSize
,
color
,
text
,
x
,
y
,
bold
,
font
}
=
textParams
fontSize
=
this
.
toRpx
(
fontSize
)
fontSize
=
this
.
toRpx
(
fontSize
)
x
=
this
.
toRpx
(
x
)
x
=
this
.
toRpx
(
x
)
y
=
this
.
toRpx
(
y
)
y
=
this
.
toRpx
(
y
)
this
.
ctx
.
font
=
`
${
bold
?
'bold '
:
''
}${
fontSize
}
px
Calibri
`
this
.
ctx
.
font
=
`
${
bold
?
'bold '
:
''
}${
fontSize
}
px
${
font
}
`
this
.
ctx
.
fillStyle
=
color
this
.
ctx
.
fillStyle
=
color
this
.
ctx
.
textAlign
=
'center'
this
.
ctx
.
textAlign
=
'center'
this
.
ctx
.
fillText
(
text
,
this
.
canvasId
.
width
/
2
,
y
+
fontSize
)
this
.
ctx
.
fillText
(
text
,
this
.
canvasId
.
width
/
2
,
y
+
fontSize
)
...
...
src/views/activityLink/components/MarketingGift.vue
View file @
45215e6
...
@@ -15,9 +15,13 @@
...
@@ -15,9 +15,13 @@
<div
v-show=
"currentIndex == 1"
class=
"car-table"
>
<div
v-show=
"currentIndex == 1"
class=
"car-table"
>
<GLTable
:hasPage=
"false"
v-loading=
"loading"
ref=
"carRef"
:tableData=
"carList"
:tableParams=
"carTableParams"
@
refreshTable=
"getCarList"
@
select=
"handleSelectionCarTable"
>
<GLTable
:hasPage=
"false"
v-loading=
"loading"
ref=
"carRef"
:tableData=
"carList"
:tableParams=
"carTableParams"
@
refreshTable=
"getCarList"
@
select=
"handleSelectionCarTable"
>
<template
slot=
"price"
slot-scope=
"scope"
>
<template
slot=
"price"
slot-scope=
"scope"
>
<el-input
v-model=
"scope.scope.packageAmount"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"scope.scope.packageAmount"
placeholder=
"请输入"
oninput=
"value=value.match(/\d+\.?\d
{0,2}/, '')"
>
</el-input>
</
template
>
</
template
>
</GLTable>
</GLTable>
<div
class=
"car-gift flex-space-between"
>
<span>
零售礼包价格合计:{{ totalPrice }}
</span>
<span>
温馨提示:具体价格与营销人员商议结算流程。
</span>
</div>
</div>
</div>
<div
v-show=
"currentIndex == 2"
>
<div
v-show=
"currentIndex == 2"
>
<div
class=
"select-tab"
>
<div
class=
"select-tab"
>
...
@@ -81,7 +85,10 @@ export default {
...
@@ -81,7 +85,10 @@ export default {
data
()
{
data
()
{
return
{
return
{
giftValue
:
''
,
giftValue
:
''
,
editForm
:
{},
editForm
:
{
giftList
:
1
},
totalPrice
:
0
,
giftName
:
''
,
giftName
:
''
,
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
tabList
:
[{
label
:
'用车权益'
},
{
label
:
'生活权益'
},
{
label
:
'门店服务'
}],
tabList
:
[{
label
:
'用车权益'
},
{
label
:
'生活权益'
},
{
label
:
'门店服务'
}],
...
@@ -89,7 +96,7 @@ export default {
...
@@ -89,7 +96,7 @@ export default {
editFormData
:
[
editFormData
:
[
{
{
label
:
'营销礼包'
,
label
:
'营销礼包'
,
name
:
'
superMarketing
'
,
name
:
'
giftList
'
,
addHtml
:
'selectGiftBtn'
addHtml
:
'selectGiftBtn'
},
},
{
{
...
@@ -98,13 +105,20 @@ export default {
...
@@ -98,13 +105,20 @@ export default {
type
:
'input'
type
:
'input'
}
}
],
],
giftList
:
[]
giftList
:
[],
editRule
:
{
giftList
:
[{
required
:
true
,
message
:
'giftList'
,
trigger
:
'input'
}],
activityPrice
:
[{
required
:
true
,
message
:
'请输入活动参与价格/元:'
,
trigger
:
'input'
}]
}
}
}
},
},
watch
:
{
watch
:
{
subscribe
(
val
)
{
subscribe
(
val
)
{
this
.
getGiftList
(
val
)
this
.
getGiftList
(
val
)
},
},
'editForm.activityPrice'
(
val
)
{
this
.
editForm
.
activityPrice
=
val
.
match
(
/
\d
+
\.?\d{0,2}
/
,
''
)
},
currentIndex
:
{
currentIndex
:
{
handler
()
{
handler
()
{
this
.
getList
()
this
.
getList
()
...
@@ -186,6 +200,14 @@ export default {
...
@@ -186,6 +200,14 @@ export default {
this
.
$message
.
error
(
'权益服务、平台优惠、门店优惠券至少选一项'
)
this
.
$message
.
error
(
'权益服务、平台优惠、门店优惠券至少选一项'
)
return
return
}
}
this
.
totalPrice
=
0
for
(
let
i
=
0
;
i
<
this
.
selectedCarList
.
length
;
i
++
)
{
if
(
!
this
.
selectedCarList
[
i
].
packageAmount
)
{
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
this
.
selectedCarList
[
i
].
packageAmount
)
}
const
params
=
{}
const
params
=
{}
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
return
{
return
{
...
@@ -216,9 +238,15 @@ export default {
...
@@ -216,9 +238,15 @@ export default {
return
item
.
id
return
item
.
id
})
})
const
equities
=
{}
const
equities
=
{}
selectedCarList
.
forEach
(
item
=>
{
this
.
totalPrice
=
0
equities
[
item
.
packageCode
]
=
item
.
packageAmount
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
})
if
(
!
selectedCarList
[
i
].
packageAmount
)
{
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
)
equities
[
selectedCarList
[
i
].
packageCode
]
=
selectedCarList
[
i
].
packageAmount
}
console
.
log
(
equities
,
selectedCarList
)
console
.
log
(
equities
,
selectedCarList
)
let
params
=
{
let
params
=
{
merchantId
,
merchantId
,
...
@@ -285,7 +313,6 @@ export default {
...
@@ -285,7 +313,6 @@ export default {
}
else
{
}
else
{
this
.
deleteRows
(
this
.
selectedCarList
,
[
row
],
'packageCode'
)
this
.
deleteRows
(
this
.
selectedCarList
,
[
row
],
'packageCode'
)
}
}
console
.
log
(
this
.
selectedCarList
)
this
.
setPackage
(
Object
.
assign
(
this
.
packageList
,
{
selectedCarList
:
this
.
selectedCarList
}))
this
.
setPackage
(
Object
.
assign
(
this
.
packageList
,
{
selectedCarList
:
this
.
selectedCarList
}))
},
},
getList
()
{
getList
()
{
...
...
src/views/activityLink/components/MarketingTask.vue
View file @
45215e6
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
</div>
</div>
<div
class=
"task-add"
@
click=
"addTask"
>
<div
class=
"task-add"
@
click=
"addTask"
>
<i
class=
"el-icon-circle-plus-outline"
></i>
<i
class=
"el-icon-circle-plus-outline"
></i>
请选择导入文档
新建营销任务
</div>
</div>
<div
class=
"task-footer"
>
<div
class=
"task-footer"
>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
跳过营销任务
</el-button>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
跳过营销任务
</el-button>
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
</div>
</div>
</div>
</div>
</GLDialog>
</GLDialog>
<GLDialog
class=
"qr-dialog"
title=
"话术、短信配置"
mode=
"mid"
:visible
.
sync=
"configVisible"
@
onOk=
"handleCancelConfirm"
@
onCancel=
"
configVisible = false
"
>
<GLDialog
class=
"qr-dialog"
title=
"话术、短信配置"
mode=
"mid"
:visible
.
sync=
"configVisible"
@
onOk=
"handleCancelConfirm"
@
onCancel=
"
handleCancelConfing
"
>
<div
class=
"config-body"
>
<div
class=
"config-body"
>
<el-form
ref=
"configForm"
:model=
"configForm"
label-width=
"200px"
>
<el-form
ref=
"configForm"
:model=
"configForm"
label-width=
"200px"
>
<el-form-item
label=
"AI人工智能外呼:"
:size=
"size"
>
<el-form-item
label=
"AI人工智能外呼:"
:size=
"size"
>
...
@@ -116,6 +116,10 @@
...
@@ -116,6 +116,10 @@
</template>
</template>
<
script
>
<
script
>
const
config
=
Object
.
freeze
({
talkId
:
''
,
messageContent
:
'【广汇汽车】尊敬的客户,您获得一份续保权益套餐,您可以点击https://dwz.cn/I2gmHGBQ 查看或使用您的权益明细,退订回T'
})
const
taskData
=
{
tableData
:
[],
expand
:
true
,
assignType
:
0
,
customerNumTotal
:
0
,
lastFollowStaffList
:
[],
staffList
:
[],
excelUrl
:
''
,
isFinish
:
false
}
const
taskData
=
{
tableData
:
[],
expand
:
true
,
assignType
:
0
,
customerNumTotal
:
0
,
lastFollowStaffList
:
[],
staffList
:
[],
excelUrl
:
''
,
isFinish
:
false
}
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
mapActions
,
mapState
}
from
'vuex'
export
default
{
export
default
{
...
@@ -132,7 +136,7 @@ export default {
...
@@ -132,7 +136,7 @@ export default {
},
},
isQrcodeVisible
:
false
,
isQrcodeVisible
:
false
,
configVisible
:
false
,
configVisible
:
false
,
configForm
:
{}
,
configForm
:
config
,
tableData
:
[],
tableData
:
[],
roobList
:
[{
labe
:
3
,
value
:
4
}]
roobList
:
[{
labe
:
3
,
value
:
4
}]
}
}
...
@@ -275,18 +279,24 @@ export default {
...
@@ -275,18 +279,24 @@ export default {
this
.
batchNo
=
num
-
1
this
.
batchNo
=
num
-
1
this
.
selectIndex
=
row
.
$index
this
.
selectIndex
=
row
.
$index
this
.
configForm
=
{
this
.
configForm
=
{
ta
lkId
:
''
,
ta
skId
:
row
.
talkId
?
row
.
talkId
:
config
.
talkId
,
messageContent
:
'【广汇汽车】尊敬的客户,您获得一份续保权益套餐,您可以点击https://dwz.cn/I2gmHGBQ 查看或使用您的权益明细,退订回T'
messageContent
:
row
.
messageContent
?
row
.
messageContent
:
config
.
messageContent
}
}
this
.
$apis
.
marketing
.
getRobotList
({}).
then
(
res
=>
{
this
.
$apis
.
marketing
.
getRobotList
({}).
then
(
res
=>
{
this
.
roobList
=
res
.
list
||
[]
this
.
roobList
=
res
.
list
||
[]
})
})
},
},
handleCancelConfing
()
{
this
.
configVisible
=
false
this
.
configForm
=
{}
},
handleCancelConfirm
()
{
handleCancelConfirm
()
{
this
.
configVisible
=
false
this
.
configVisible
=
false
this
.
taskList
[
this
.
batchNo
].
staffList
[
this
.
selectIndex
].
talkId
=
this
.
configForm
.
talkId
console
.
log
(
this
.
taskList
[
this
.
batchNo
].
tableData
)
this
.
taskList
[
this
.
batchNo
].
staffList
[
this
.
selectIndex
].
messageContent
=
this
.
configForm
.
messageContent
.
replace
(
/广汇汽车/
,
this
.
$globalState
.
session
.
merchantName
)
this
.
taskList
[
this
.
batchNo
].
tableData
[
this
.
selectIndex
].
talkId
=
this
.
configForm
.
talkId
this
.
taskList
[
this
.
batchNo
].
tableData
[
this
.
selectIndex
].
messageContent
=
this
.
configForm
.
messageContent
.
replace
(
/广汇汽车/
,
this
.
$globalState
.
session
.
merchantName
)
},
},
handleCancel
()
{
handleCancel
()
{
this
.
taskList
=
[{
batchNo
:
1
,
...
taskData
,
...{
isFinish
:
false
}
}]
this
.
taskList
=
[{
batchNo
:
1
,
...
taskData
,
...{
isFinish
:
false
}
}]
this
.
customerKey
=
[]
this
.
customerKey
=
[]
...
@@ -303,6 +313,7 @@ export default {
...
@@ -303,6 +313,7 @@ export default {
key
:
item
.
key
key
:
item
.
key
}
}
})
})
console
.
log
(
customerRequestList
)
if
(
this
.
vaildTask
())
if
(
this
.
vaildTask
())
this
.
setProcess
({
this
.
setProcess
({
0
:
{
0
:
{
...
...
src/views/activityLink/components/PhoneView.vue
View file @
45215e6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-
09 12:39:02
* @LastEditTime: 2023-07-
10 10:16:44
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
:y=
"item.y"
:y=
"item.y"
:style=
"
{
:style=
"
{
'font-size': item.size + 'px',
'font-size': item.size + 'px',
'font-family': item.font,
color: item.color
color: item.color
}"
}"
class="img_cl"
class="img_cl"
...
@@ -225,7 +226,8 @@ export default {
...
@@ -225,7 +226,8 @@ export default {
remark
:
'文字'
,
remark
:
'文字'
,
size
:
20
,
size
:
20
,
color
:
''
,
color
:
''
,
customId
:
'1'
customId
:
'1'
,
font
:
''
},
},
{
{
type
:
'text'
,
type
:
'text'
,
...
@@ -237,7 +239,8 @@ export default {
...
@@ -237,7 +239,8 @@ export default {
remark
:
'文字'
,
remark
:
'文字'
,
size
:
20
,
size
:
20
,
color
:
''
,
color
:
''
,
customId
:
'2'
customId
:
'2'
,
font
:
''
}
}
],
],
isModel
:
true
,
isModel
:
true
,
...
@@ -343,8 +346,8 @@ export default {
...
@@ -343,8 +346,8 @@ export default {
try
{
try
{
const
style1
=
JSON
.
parse
(
this
.
detail
.
titleStyle
)
const
style1
=
JSON
.
parse
(
this
.
detail
.
titleStyle
)
const
style2
=
JSON
.
parse
(
this
.
detail
.
subTitleStyle
)
const
style2
=
JSON
.
parse
(
this
.
detail
.
subTitleStyle
)
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
this
.
detail
.
marketingTitle
,
...
style1
,
color
:
style1
.
style
.
color
})
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
this
.
detail
.
marketingTitle
,
...
style1
,
color
:
style1
.
style
.
color
,
font
:
style1
.
font
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
this
.
detail
.
marketingSubtitle
,
...
style1
,
color
:
style2
.
style
.
color
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
this
.
detail
.
marketingSubtitle
,
...
style1
,
color
:
style2
.
style
.
color
,
font
:
style2
.
font
})
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -382,6 +385,16 @@ export default {
...
@@ -382,6 +385,16 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
>
@font-face
{
font-family
:
'jingnanyuanmoti'
;
src
:
url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/fonts/KNFONTYUANMO-2.otf')
;
}
@font-face
{
font-family
:
'YouSheBiaoTiYuan'
;
src
:
url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/fonts/douyuFont-2.otf')
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.review-body
{
.review-body
{
margin
:
10px
auto
;
margin
:
10px
auto
;
...
...
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