Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 82a5418a
authored
Apr 03, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
6943e963
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
241 additions
and
225 deletions
src/common/constants.js
src/views/clientManage/index.vue
src/common/constants.js
View file @
82a5418
export
const
Constants
=
{
CLIENT_STATUS
:
{
'0'
:
'正常, green-text'
,
'1'
:
'删除好友, red-text'
},
//性别选项
GENDER_OPTION
:
[{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
],
SOURCE_OPTION
:
[{
label
:
'全部'
,
value
:
0
},
{
label
:
'直接导入'
,
value
:
1
},
{
label
:
'扫描二维码'
,
value
:
'first'
},
{
label
:
'搜索手机号'
,
value
:
2
},
{
label
:
'名片分享'
,
value
:
3
},
{
label
:
'群聊'
,
value
:
4
},
{
label
:
'手机通讯录'
,
value
:
5
},
{
label
:
'微信联系人'
,
value
:
6
},
{
label
:
'来自微信的添加好友申请'
,
value
:
7
},
{
label
:
'第三方应用的客户人员'
,
value
:
8
},
{
label
:
'搜索邮箱'
,
value
:
9
},
{
label
:
'内部成员共享'
,
value
:
10
},
{
label
:
'管理员/负责人分配'
,
value
:
11
},
{
label
:
'未知来源'
,
value
:
12
}
],
//标签类型
LABEL_OPTION
:
[{
label
:
'企业标签'
,
value
:
'企业标签'
},
{
label
:
'自店标签'
,
value
:
'自店标签'
},
{
label
:
'系统标签'
,
value
:
'系统标签'
}
],
CLIENT_STATUS
:
{
'0'
:
'正常, green-text'
,
'1'
:
'删除好友, red-text'
},
//性别选项
GENDER_OPTION
:
[
{
label
:
'全部'
,
value
:
0
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
}
// {
// label: '未知',
// value: 0
// }
],
SOURCE_OPTION
:
[
{
label
:
'全部'
,
value
:
0
},
{
label
:
'直接导入'
,
value
:
1
},
{
label
:
'扫描二维码'
,
value
:
'first'
},
{
label
:
'搜索手机号'
,
value
:
2
},
{
label
:
'名片分享'
,
value
:
3
},
{
label
:
'群聊'
,
value
:
4
},
{
label
:
'手机通讯录'
,
value
:
5
},
{
label
:
'微信联系人'
,
value
:
6
},
{
label
:
'来自微信的添加好友申请'
,
value
:
7
},
{
label
:
'第三方应用的客户人员'
,
value
:
8
},
{
label
:
'搜索邮箱'
,
value
:
9
},
{
label
:
'内部成员共享'
,
value
:
10
},
{
label
:
'管理员/负责人分配'
,
value
:
11
},
{
label
:
'未知来源'
,
value
:
12
}
],
//标签类型
LABEL_OPTION
:
[
{
label
:
'企业标签'
,
value
:
'企业标签'
},
{
label
:
'自店标签'
,
value
:
'自店标签'
},
{
label
:
'系统标签'
,
value
:
'系统标签'
}
],
// 文件大小提示语
FILESIZEMSG
:
'单个文件大小不能超过10M'
,
// 文件大小提示语
FILESIZEMSG
:
'单个文件大小不能超过10M'
,
// 文件格式提示
FILETYPEMSG
:
'文件格式只支持jpg/jpeg/gif/png'
,
// 文件格式提示
FILETYPEMSG
:
'文件格式只支持jpg/jpeg/gif/png'
,
// 文件上传个数限制
FILEUPLOADLIMIT
:
'最多只能上传5张图片'
,
// 文件上传个数限制
FILEUPLOADLIMIT
:
'最多只能上传5张图片'
,
// 删除文件失败
// 删除文件失败
// 新增成功
ADDSUCCESSMSG
:
'新增成功'
,
// 新增成功
ADDSUCCESSMSG
:
'新增成功'
,
// 编辑成功
EDITSUCCESSMSG
:
'编辑成功'
,
// 编辑成功
EDITSUCCESSMSG
:
'编辑成功'
,
// 删除成功
DELETESUCCESSMSG
:
'删除成功'
,
// 删除成功
DELETESUCCESSMSG
:
'删除成功'
,
// 操作成功
OPERATESUCCESSMSG
:
'操作成功'
,
// 操作成功
OPERATESUCCESSMSG
:
'操作成功'
,
// 操作失败
OPERATEFAILMSG
:
'操作失败'
,
// 操作失败
OPERATEFAILMSG
:
'操作失败'
,
// 错误提示
ERRORMSG
:
'出错了,请联系管理员'
,
// 错误提示
ERRORMSG
:
'出错了,请联系管理员'
,
// 请选择门店
CHOSSESTOREMSG
:
'请选择门店'
,
// 请选择门店
CHOSSESTOREMSG
:
'请选择门店'
,
// 缺少参数
LACKPARAMSMSG
:
'缺少参数'
,
// 缺少参数
LACKPARAMSMSG
:
'缺少参数'
,
// 付费方式 0用户续费,1后台续费
PAYWAYSTATUS
:
{
'0'
:
'用户续费'
,
'1'
:
'后台续费'
,
null
:
'--'
},
// 付费方式 0用户续费,1后台续费
PAYWAYSTATUS
:
{
'0'
:
'用户续费'
,
'1'
:
'后台续费'
,
null
:
'--'
},
// 续费时长
PERIODSTATUS
:
{
'0'
:
'六个月'
,
'1'
:
'一年'
,
'2'
:
'两年'
,
'3'
:
'三年'
,
null
:
'--'
},
// 续费时长
PERIODSTATUS
:
{
'0'
:
'六个月'
,
'1'
:
'一年'
,
'2'
:
'两年'
,
'3'
:
'三年'
,
null
:
'--'
},
// 设备状态
DEVICESTATUS
:
{
0
:
'未激活'
,
1
:
'已激活'
,
2
:
'已过期'
},
DESCRIBEDATA
:
[{
name
:
'潜在意向客户'
,
info
:
'无购车且无其他交易行为的所有客户'
,
id
:
4
},
{
name
:
'潜在意向已加企微客户'
,
info
:
'在潜在意向客户中,已加企微的客户'
,
id
:
5
},
{
name
:
'潜在意向未加企微客户'
,
info
:
'在潜在意向客户中,未加企微的客户'
,
id
:
6
},
{
name
:
'基盘客户'
,
info
:
'有购车或其他交易行为的所有客户'
,
id
:
1
},
{
name
:
'基盘已加企微客户'
,
info
:
'在基盘客户中,已加企微的客户'
,
id
:
2
},
{
name
:
'基盘未加企微客户'
,
info
:
'在基盘客户中,未加企微的客户'
,
id
:
3
},
// {
// name: '新车客户',
// info: '购车时间3个月的客户',
// id: 7
// },
// {
// name: '车险待续保客户',
// info: '近一个月内车险即将到期的客户',
// id: 8
// },
// {
// name: '新车待首保客户',
// info: '购车时间5~7个月内,且无保养记录的客户',
// id: 9
// },
// {
// name: '沉默客户',
// info: '超过180天未到店的客户',
// id: 10
// },
{
name
:
'已加企微,待匹配客户'
,
info
:
'已加企微,且未匹配到潜在意向或基盘客户的客户'
,
id
:
7
},
{
name
:
'已加企微,待匹配客户(已绑定手机号)'
,
info
:
'已加企微,且未匹配到潜在意向或基盘客户的客户(已绑定手机号)'
,
id
:
8
},
{
name
:
'未加企微,未匹配客户'
,
info
:
'未添加企微或添加企微后删除好友,且未匹配到意向和基盘客户的客户'
,
id
:
9
}
]
}
\ No newline at end of file
// 设备状态
DEVICESTATUS
:
{
0
:
'未激活'
,
1
:
'已激活'
,
2
:
'已过期'
},
DESCRIBEDATA
:
[
{
name
:
'潜在意向客户'
,
info
:
'无购车且无其他交易行为的所有客户'
,
id
:
4
},
{
name
:
'潜在意向已加企微客户'
,
info
:
'在潜在意向客户中,已加企微的客户'
,
id
:
5
},
{
name
:
'潜在意向未加企微客户'
,
info
:
'在潜在意向客户中,未加企微的客户'
,
id
:
6
},
{
name
:
'基盘客户'
,
info
:
'有购车或其他交易行为的所有客户'
,
id
:
1
},
{
name
:
'基盘已加企微客户'
,
info
:
'在基盘客户中,已加企微的客户'
,
id
:
2
},
{
name
:
'基盘未加企微客户'
,
info
:
'在基盘客户中,未加企微的客户'
,
id
:
3
},
// {
// name: '新车客户',
// info: '购车时间3个月的客户',
// id: 7
// },
// {
// name: '车险待续保客户',
// info: '近一个月内车险即将到期的客户',
// id: 8
// },
// {
// name: '新车待首保客户',
// info: '购车时间5~7个月内,且无保养记录的客户',
// id: 9
// },
// {
// name: '沉默客户',
// info: '超过180天未到店的客户',
// id: 10
// },
{
name
:
'已加企微,待匹配客户'
,
info
:
'已加企微,且未匹配到潜在意向或基盘客户的客户'
,
id
:
7
},
{
name
:
'已加企微,待匹配客户(已绑定手机号)'
,
info
:
'已加企微,且未匹配到潜在意向或基盘客户的客户(已绑定手机号)'
,
id
:
8
},
{
name
:
'未加企微,未匹配客户'
,
info
:
'未添加企微或添加企微后删除好友,且未匹配到意向和基盘客户的客户'
,
id
:
9
}
]
}
src/views/clientManage/index.vue
View file @
82a5418
...
...
@@ -18,7 +18,7 @@
</span>
<!--
<span
slot=
"customerSex"
slot-scope=
"scope"
>
-->
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
0
?
'
未知
'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
scope
.
scope
.
customerSex
==
2
?
'女'
:
''
}}
</span>
<span>
{{
scope
.
scope
.
customerSex
==
0
?
'
全部
'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
scope
.
scope
.
customerSex
==
2
?
'女'
:
''
}}
</span>
</span>
<!-- 企微名称 -->
<div
slot=
"nickNameList"
slot-scope=
"scope"
class=
"expandImg"
>
...
...
@@ -376,9 +376,13 @@ export default {
flushTime
:
false
,
orderform
:
{
order
:
''
,
result
:
''
},
disabled
:
false
,
placeholder
:
'帮我针对车牌号为粤B开头的车主发一条
4s
营销文案'
,
placeholder
:
'帮我针对车牌号为粤B开头的车主发一条
5.1节保养相关的
营销文案'
,
drawer
:
false
,
gptRequest
:
false
gptRequest
:
false
,
keys
:
{
subject
:
''
,
festival
:
''
}
}
},
created
()
{
...
...
@@ -650,19 +654,21 @@ export default {
//取值范围为:"'30岁以下','31-40岁','41-55岁'",
// 提取出购车月份,命名为buyMonth,例如5月,用数组输出;
// tags包括上面的购车年份,命名为buyYear,购车月份,命名为buyMonth,车型,命名为brand,是否保养,命名为maintain
// 提取出是否已加企微,命名为isJoin,取值范围为:"'','1','0'",''表示全部,'1'表示是,'0'表示否;
if
(
this
.
orderform
.
order
==
''
)
{
this
.
orderform
.
order
=
this
.
placeholder
}
Object
.
assign
(
this
.
keys
,
{
subject
:
''
,
festival
:
''
})
const
order
=
this
.
orderform
.
order
// const content = '帮我查询从2023-3-29日至2023-04-05日期间西安飞广州或者深圳的机票,从上面一句话中提取出发日期,命名为date,出发地,命名为start,目的地,命名为end,输出json格式。'
const
content
=
`
${
order
}
,忽略之前的上下文,今年是2023年,针对上面这段文字,
提取出联系电话,命名为customerPhone;
提取出营销文案关键字,命名为subject;
提取出节日,命名为festival,如果是数字,转化成大写,例如:五一节;
提取出联系电话(手机号),命名为customerPhone,不用补全;
提取出车牌号,命名为carNumber,不用补全;
提取出客户名称,命名为customerName;
提取出车架号,命名为carVin;
提取出性别,命名为customerSex,取值范围:"0,1,2",0表示未知,1表示男,2表示女;
提取出是否已加企微,命名为isJoin,取值范围为:"'','1','0'",''表示全部,'1'表示是,'0'表示否;
所有提取字段取值精确匹配。
提取出性别,命名为customerSex,取值范围:"0,1,2",0表示全部,1表示男,2表示女;
所有提取的字段未精确匹配到的不提取和输出。
输出json格式`
const
result
=
await
this
.
$apis
.
crowdManage
.
gpt
(
content
)
...
...
@@ -681,9 +687,10 @@ export default {
// }
// }
// }
const
{
subject
,
festival
,
...
others
}
=
data
this
.
keys
=
{
subject
,
festival
}
//searchForm
this
.
searchForm
=
{
...
data
,
customerSex
:
Number
(
data
.
customerSex
)
}
this
.
searchForm
=
{
...
others
,
customerSex
:
Number
(
data
.
customerSex
)
}
console
.
log
(
this
.
searchForm
)
// 设置 searchForm
this
.
searchTable
()
...
...
@@ -705,30 +712,35 @@ export default {
if
(
!
this
.
gptRequest
)
{
return
false
}
this
.
$refs
.
orderform
.
resetFields
()
this
.
gptRequest
=
false
console
.
log
(
'getGptList'
)
this
.
drawer
=
false
let
list
=
this
.
$refs
.
clientManage
.
data
console
.
log
(
list
)
list
=
list
.
map
(
element
=>
{
element
.
test
=
'正在生成中...'
return
element
})
// let content = '我有一批客户,资料(id,customerName,customerSex,customerPhone,buyDate,carVin,carNumber) 分别是:'
let
content
=
`忽略之前的上下文,我有
${
list
.
length
}
个客户资料分别是:`
let
cutomerInfo
=
[]
for
(
let
index
=
0
;
index
<
list
.
length
;
index
++
)
{
let
k
=
list
[
index
]
const
content
=
`忽略之前的上下文,对姓名为
${
k
.
customerName
}
客户,
${
k
.
customerName
}
是一个人,性别为
${{
1
:
'男'
,
2
:
'女'
}
[k.customerSex] || '先生/女士'},客户手机号为
${
k
.
customerPhone
}
,
${
k
.
customerPhone
}
是客户的电话不是客服电话;生成一条最少100字的4s店新车营销文案,字段命名为content。只需content一个字段即可;输出json格式`
let
{
customerName
,
customerSex
,
customerPhone
,
buyDate
,
carVin
,
carNumber
}
=
list
[
index
]
//
const content = `忽略之前的上下文,对姓名为${k.customerName}客户,${k.customerName}是一个人,性别为${{ 1: '男', 2: '女' }[k.customerSex] || '先生/女士'},客户手机号为${k.customerPhone},${k.customerPhone}是客户的电话不是客服电话;生成一条最少100字的4s店新车营销文案,字段命名为content。只需content一个字段即可;输出json格式`
// console.log(content, 'content')
this
.
$apis
.
crowdManage
.
gpt
(
content
).
then
(
result
=>
{
// console.log(result)
let
_obj
=
result
.
data
this
.
$refs
.
clientManage
.
data
[
index
].
test
=
_obj
.
content
// this.$refs.clientManage.data = this.$refs.clientManage.data
this
.
$forceUpdate
()
})
cutomerInfo
.
push
(
`客户
${
index
+
1
}
,姓名:
${
customerName
}
,性别:
${{
1
:
'男'
,
2
:
'女'
}
[customerSex] || '先生/女士'},电话:
${
customerPhone
}
,购车日期:
${
buyDate
}
,车架号:
${
carVin
}
,车牌号:
${
carNumber
}
`
)
}
content
+=
`
${
cutomerInfo
.
join
(
';'
)}
;请根据客户的特征,分别为每个客户生成一条50字左右关于
${
this
.
keys
.
subject
||
''
}
的营销文案。字段命名为content;整条结果以数组输出,命名为customers。输出json格式.`
this
.
$apis
.
crowdManage
.
gpt
(
content
).
then
(
result
=>
{
// console.log(result)
// let _obj = result.data
// this.$refs.clientManage.data[index].test = _obj.content
// this.$refs.clientManage.data = this.$refs.clientManage.data
list
.
map
((
k
,
i
)
=>
{
k
.
test
=
result
.
data
.
customers
[
i
].
content
return
k
})
this
.
$forceUpdate
()
})
// list.map(k => {
// const content = `忽略之前的上下文,对姓名为${k.customerName}客户,${k.customerName}是一个人,性别为${{ '1': '男', '2': '女' }[k.customerSex] || '先生/女士'},客户手机号为${k.customerPhone},${k.customerPhone}是客户的电话不是客服电话;生成一条最少100字的4s店新车营销文案,字段命名为content。只需content一个字段即可;输出json格式`
// this.$apis.crowdManage.gpt(content).then(result => {
...
...
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