Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
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 3a11b89f
authored
Mar 18, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
fixed
2 parents
c83ef419
ec219301
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
148 additions
and
64 deletions
src/api/modules/baseInfo.js
src/api/modules/emp.js
src/config/index.js
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/views/approvalConfig/createGuide.vue
src/views/approvalConfig/index.vue
src/views/baseInfo/editInfo.vue
src/views/baseInfo/selectBrand.vue
src/views/followUp/components/addSale.vue
src/views/followUp/index.vue
src/api/modules/baseInfo.js
View file @
3a11b89
...
...
@@ -6,7 +6,7 @@
* @param {*} params
* @returns
*/
import
{
http_config
,
http
_car
}
from
'@/main'
import
{
http_config
,
http
}
from
'@/main'
const
getMerchantTree
=
params
=>
{
params
.
method
=
'entmicro.api.common.findMerchantTreeByMerchantNo.list'
return
http_config
({
...
...
@@ -44,9 +44,9 @@ const merchantInfo = params => {
})
}
const
brandList
=
params
=>
{
params
.
method
=
'
dj.api.get.car.brandList
'
return
http
_car
({
url
:
'/rop-
dj-car-boutique
/router'
,
params
.
method
=
'
merchants.api.merchantCommon.getCarbrandTree
'
return
http
({
url
:
'/rop-
merchants
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
src/api/modules/emp.js
View file @
3a11b89
...
...
@@ -6,11 +6,9 @@
* @param {*} params
* @returns
*/
import
{
http_config
}
from
'@/main'
const
sessionId
=
'mini-a8d84762-da6a-4ff7-b009-eb7fa0c80dfb-rop'
;
import
{
http_config
,
http
}
from
'@/main'
const
listFollowerStaffByPage
=
params
=>
{
params
.
method
=
'entmicro.api.staff.listFollowerStaffByPage'
params
.
sessionId
=
sessionId
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
...
...
@@ -21,7 +19,6 @@ const listFollowerStaffByPage = params => {
// 获取跟进类型列表
const
listEntFollowerType
=
params
=>
{
params
.
method
=
'entmicro.api.staff.listEntFollowerType'
params
.
sessionId
=
sessionId
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
...
...
@@ -32,7 +29,6 @@ const listEntFollowerType = params => {
// 删除根据员工
const
deleteFollowerStaff
=
params
=>
{
params
.
method
=
'entmicro.api.staff.deleteFollowerStaff'
params
.
sessionId
=
sessionId
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
...
...
@@ -42,7 +38,6 @@ const deleteFollowerStaff = params => {
}
// 删除跟进类型
const
deleteFollowerType
=
params
=>
{
params
.
sessionId
=
sessionId
params
.
method
=
'entmicro.api.staff.deleteFollowerType'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
...
...
@@ -53,7 +48,6 @@ const deleteFollowerType = params => {
}
// 查询外部联系人员工
const
listEntmicroStaff
=
params
=>
{
params
.
sessionId
=
sessionId
params
.
method
=
'entmicro.api.staff.listEntmicroStaff'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
...
...
@@ -64,7 +58,6 @@ const listEntmicroStaff = params => {
}
// 添加跟进员工
const
saveFollowerStaff
=
params
=>
{
params
.
sessionId
=
sessionId
params
.
method
=
'entmicro.api.staff.saveFollowerStaff'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
...
...
@@ -75,7 +68,6 @@ const saveFollowerStaff = params => {
}
// 新增跟进类型
const
saveFollowerType
=
params
=>
{
params
.
sessionId
=
sessionId
params
.
method
=
'entmicro.api.staff.saveFollowerType'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
...
...
@@ -86,7 +78,6 @@ const saveFollowerType = params => {
}
// 同步企微外部联系人
const
syncEntmicroIsOutsiderStaff
=
params
=>
{
params
.
sessionId
=
sessionId
params
.
method
=
'entmicro.api.staff.syncEntmicroIsOutsiderStaff'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
...
...
@@ -97,7 +88,6 @@ const syncEntmicroIsOutsiderStaff = params => {
}
// 查询组织树
const
listDepartmentTree
=
params
=>
{
params
.
sessionId
=
sessionId
params
.
method
=
'entmicro.api.department.listDepartmentTree'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
...
...
@@ -106,6 +96,16 @@ const listDepartmentTree = params => {
sign
:
true
})
}
// 获取业务类型
const
getListEntBusinessType
=
(
params
=
{})
=>
{
params
.
method
=
'entmicro.api.staff.listEntBusinessType'
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
listFollowerStaffByPage
,
listEntFollowerType
,
...
...
@@ -115,6 +115,6 @@ export default {
saveFollowerType
,
saveFollowerStaff
,
syncEntmicroIsOutsiderStaff
,
listDepartmentTree
listDepartmentTree
,
getListEntBusinessType
}
\ No newline at end of file
src/config/index.js
View file @
3a11b89
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-03-1
2 14:01:09
* @LastEditTime: 2022-03-1
5 10:07:01
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
...
...
@@ -18,7 +18,7 @@ export const fetchConfig = function (isEnv = true) {
// return Promise.resolve(cfg)
// }
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
return
new
Http
().
get
(
'
http://192.168.3.171:7300
/mock/617ba1df1072f92988f05a14/account/config'
)
return
new
Http
().
get
(
'
http://oss-config.dev.glsx.com.cn
/mock/617ba1df1072f92988f05a14/account/config'
)
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
...
...
src/views/account/addAccount.vue
View file @
3a11b89
...
...
@@ -299,9 +299,8 @@ export default {
if
(
params
.
businessType
)
{
params
.
businessType
=
params
.
businessType
.
join
(
','
)
}
const
getCheckedArr
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getCheckedArr
const
merchantBrandMain
=
getCheckedArr
.
map
(
item
=>
item
.
id
)
params
.
merchantBrandMain
=
merchantBrandMain
.
join
(
','
)
const
merchantBrandList
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getMerchantBrandList
()
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
)
params
.
merchantAccountLevel
=
this
.
accountDetail
.
merchantAccountLevel
params
.
status
=
1
...
...
src/views/account/components/baseInfo.vue
View file @
3a11b89
...
...
@@ -200,13 +200,14 @@ export default {
}
},
methods
:
{
checkBrandList
(
merchantBrandMain
)
{
checkBrandList
(
chant
)
{
let
merchantBrandMain
=
chant
.
filter
(
item
=>
item
)
this
.
$set
(
this
.
accountAddForm
,
'merchantBrandMain'
,
merchantBrandMain
)
console
.
log
(
this
.
accountAddForm
.
merchantBrandMain
)
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
this
.
accountAddForm
.
merchantBrandMain
=
[]
}
else
{
this
.
accountAddForm
.
merchantBrandMain
=
this
.
accountAddForm
.
merchantBrandMain
.
split
(
','
)
}
console
.
log
(
this
.
accountAddForm
.
merchantBrandMain
)
this
.
$refs
.
brandListTree
.
getCheckList
(
this
.
accountAddForm
.
merchantBrandMain
)
},
checkBusinessType
(
type
)
{
...
...
@@ -224,11 +225,12 @@ export default {
async
brandList
()
{
this
.
$refs
.
brandListTree
.
loading
=
true
this
.
businessType
=
await
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_type'
})
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({
needCarSeries
:
true
})
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({})
brandListTree
.
forEach
(
item
=>
{
let
child
=
item
.
childs
let
child
=
item
.
children
if
(
!
child
)
return
child
.
forEach
(
k
=>
{
delete
k
.
child
s
delete
k
.
child
ren
})
})
this
.
brandListTree
=
brandListTree
...
...
src/views/account/detailAccount.vue
View file @
3a11b89
...
...
@@ -127,7 +127,7 @@
</el-col>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
经营业务类型:
</span>
<!--
roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
-->
<!--
<span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span>
-->
<span
class=
"itemValue"
>
{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}
</span>
</el-col>
</el-row>
...
...
src/views/account/editAccount.vue
View file @
3a11b89
...
...
@@ -314,9 +314,8 @@ export default {
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
(
item
=>
item
.
name
)
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
','
)
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
const
getCheckedArr
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getCheckedArr
const
merchantBrandMain
=
getCheckedArr
.
map
(
item
=>
item
.
id
)
params
.
merchantBrandMain
=
merchantBrandMain
.
join
(
','
)
const
merchantBrandList
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getMerchantBrandList
()
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
if
(
res
)
{
...
...
@@ -424,6 +423,7 @@ export default {
accounttypeId
:
accountType
,
merchantBrandMain
})
merchantBrandMain
=
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
this
.
$refs
.
baseInfoForm
.
checkBrandList
(
merchantBrandMain
)
this
.
$refs
.
baseInfoForm
.
checkBusinessType
(
businessType
)
this
.
$nextTick
(()
=>
{
...
...
src/views/approvalConfig/createGuide.vue
View file @
3a11b89
<!--
* @Author: your name
* @Date: 2022-03-03 17:45:22
* @LastEditTime: 2022-03-
14 21:52:43
* @LastEditTime: 2022-03-
04 16:53:04
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue
...
...
@@ -17,7 +17,7 @@
</div>
<div
class=
"step-content"
>
打开企微后台登录地址:
<el-link
type=
"primary"
target=
"_blank"
:underline=
"false"
href=
"https://work.weixin.qq.com/
login"
>
https://work.weixin.qq.com/login
</el-link>
<el-link
type=
"primary"
target=
"_blank"
:underline=
"false"
href=
"https://work.weixin.qq.com/
wework_admin/loginpage_wx?from=myhome"
>
https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome
</el-link>
企微管理员用企微或者微信扫码进行登录
</div>
</div>
...
...
@@ -38,7 +38,7 @@
<div
class=
"step-title"
style=
"margin-bottom: 16px"
>
在【嘀加企微管家】应用页下方,根据接入方式,找到对应功能(自建应用模式和应用代开发模式为2存1,不会同时出现,企微管理员只需关注“审批设置”在企微后台那里 展示,点进去配置即可)
</div>
<div
class=
"half-step"
>
<div
class=
"half-title"
>
自建应用模式:
</div>
<div
class=
"half-content third-content"
:style=
"
{ height: thirdHeight + 'px' }"
>在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页
</div>
<div
class=
"half-content third-content"
>
在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页
</div>
<img
class=
"step3-img"
src=
"../../../src/assets/guide/02@3x.png"
alt=
""
/>
</div>
<div
class=
"half-step m-l-md"
>
...
...
@@ -85,7 +85,7 @@
</div>
<div
class=
"half-step m-l-md"
>
<div
class=
"half-title"
>
应用代开发模式:
</div>
<div
class=
"half-content five-content"
:style=
"
{ height: fiveHeight + 'px' }"
>需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID
</div>
<div
class=
"half-content five-content"
>
需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID
</div>
<img
class=
"step5-img"
src=
"../../../src/assets/guide/09@3x.png"
alt=
""
/>
</div>
</div>
...
...
@@ -104,15 +104,23 @@ export default {
footerLeft
:
0
,
footerWidth
:
0
,
// 当屏幕太小导致换行,出现对不齐问题
fiveHeight
:
4
0
,
thirdHeight
:
4
0
fiveHeight
:
2
0
,
thirdHeight
:
2
0
}
},
mounted
()
{
// setTimeout(() => {
// this.lineHeight = document.querySelector('.guide-content').clientHeight - 92
// this.resize()
window
.
onresize
=
()
=>
{
// this.resize()
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
thirdHeight
=
document
.
querySelector
(
'.third-content'
).
clientHeight
this
.
fiveHeight
=
document
.
querySelector
(
'.five-content'
).
clientHeight
}
// window.addEventListener('resize', this.resize())
// }, 1000 / 60)
},
beforeDestroy
()
{
// 事件注销
...
...
@@ -121,6 +129,20 @@ export default {
methods
:
{
handleCancel
()
{
this
.
$router
.
push
({
path
:
'/approvalConfig/index'
})
},
resize
()
{
// this.resetData()
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
thirdHeight
=
document
.
querySelector
(
'.third-content'
).
clientHeight
this
.
fiveHeight
=
document
.
querySelector
(
'.five-content'
).
clientHeight
},
resetData
()
{
this
.
lineHeight
=
2200
this
.
footerLeft
=
0
this
.
footerWidth
=
0
this
.
fiveHeight
=
20
this
.
thirdHeight
=
20
}
}
}
...
...
src/views/approvalConfig/index.vue
View file @
3a11b89
<!--
* @Author: your name
* @Date: 2022-03-02 18:28:20
* @LastEditTime: 2022-03-14
21:58:4
8
* @LastEditTime: 2022-03-14
18:24:0
8
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
...
...
@@ -84,7 +84,7 @@ export default {
edit
(
index
)
{
this
.
configList
[
index
].
disabled
=
false
},
//
编辑
//
提交
submit
(
model
,
index
)
{
this
.
oldConfig
[
model
]
=
this
.
config
[
model
]
this
.
configList
[
index
].
disabled
=
true
...
...
@@ -108,6 +108,7 @@ export default {
},
// 取消
cancel
(
model
,
index
)
{
console
.
log
(
this
.
oldConfig
[
model
])
this
.
config
[
model
]
=
this
.
oldConfig
[
model
]
this
.
configList
[
index
].
disabled
=
true
},
...
...
src/views/baseInfo/editInfo.vue
View file @
3a11b89
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-14 21:
32:45
* @LastEditTime: 2022-03-14 21:
04:10
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
...
...
@@ -17,7 +17,7 @@
</el-form-item>
<el-form-item
size=
"small"
label=
"经营业务类型"
>
<el-checkbox-group
v-model=
"infoForm.businessType"
>
<el-checkbox
:label=
"item.dictValue"
v-for=
"item in businessType"
:
disabled=
"item.dictValue
<
= 6" :key="item.dictValue
">
{{
item
.
dictLabel
}}
</el-checkbox>
<el-checkbox
:label=
"item.dictValue"
v-for=
"item in businessType"
:
key=
"item.dictValue"
:disabled=
"item.dictValue
<
= 6
">
{{
item
.
dictLabel
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
size=
"small"
label=
"营业时间"
class=
"time-row"
>
...
...
@@ -58,7 +58,7 @@ export default {
dialogMapVisible
:
false
,
mapHeight
:
450
,
infoForm
:
{
businessType
:
[],
businessType
:
[
1
,
2
,
3
,
4
,
5
,
6
],
bussinessTime
:
[]
},
businessType
:
[],
...
...
@@ -92,13 +92,16 @@ export default {
}
else
{
const
businessType
=
this
.
infoForm
.
businessType
.
split
(
','
)
this
.
infoForm
.
businessType
=
businessType
.
map
(
item
=>
(
item
=
parseInt
(
item
)))
console
.
log
(
this
.
infoForm
.
businessType
)
}
console
.
log
(
this
.
infoForm
.
businessType
)
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({
needCarSeries
:
true
})
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({})
console
.
log
(
brandListTree
)
brandListTree
.
forEach
(
item
=>
{
let
child
=
item
.
childs
let
child
=
item
.
children
if
(
!
child
)
return
child
.
forEach
(
k
=>
{
delete
k
.
child
s
delete
k
.
child
ren
})
})
this
.
brandListTree
=
brandListTree
...
...
@@ -106,7 +109,7 @@ export default {
if
(
!
this
.
infoForm
.
merchantBrandMain
)
{
this
.
infoForm
.
merchantBrandMain
=
[]
}
else
{
this
.
infoForm
.
merchantBrandMain
=
this
.
infoForm
.
merchantBrandMain
.
split
(
','
)
this
.
infoForm
.
merchantBrandMain
=
this
.
infoForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
}
this
.
$refs
.
brandListTree
.
getCheckList
(
this
.
infoForm
.
merchantBrandMain
)
this
.
$nextTick
(()
=>
{
...
...
@@ -146,9 +149,8 @@ export default {
delete
params
.
stores
params
.
businessType
=
params
.
businessType
.
join
(
','
)
//merchantBrandMain 品牌id
const
getCheckedArr
=
this
.
$refs
.
brandListTree
.
getCheckedArr
const
merchantBrandMain
=
getCheckedArr
.
map
(
item
=>
item
.
id
)
params
.
merchantBrandMain
=
merchantBrandMain
.
join
(
','
)
const
merchantBrandList
=
this
.
$refs
.
brandListTree
.
getMerchantBrandList
()
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
$router
.
push
({
path
:
'/baseInfo/index'
})
...
...
src/views/baseInfo/selectBrand.vue
View file @
3a11b89
...
...
@@ -11,13 +11,13 @@
<div
class=
"select-input-box"
>
<template
v-for=
"(item, idx) in getCheckedArr"
>
<el-tag
effect=
"plain"
type=
"info"
:key=
"idx"
closable
:disable-transitions=
"false"
@
close=
"removeItem(item, idx)"
v-if=
"idx
< 3
"
>
{{
item
.
name
}}
{{
item
.
label
}}
</el-tag>
</
template
>
<el-popover
placement=
"top"
width=
"600"
trigger=
"hover"
class=
"select-popover"
>
<div
class=
"select-popover-box"
>
<el-tag
effect=
"plain"
class=
"popover-item"
v-for=
"(item, idx) in getCheckedArr"
type=
"info"
:key=
"idx"
closable
:disable-transitions=
"false"
@
close=
"removeItem(item, idx)"
>
{{ item.
name
}}
{{ item.
label
}}
</el-tag>
</div>
<el-tag
effect=
"plain"
slot=
"reference"
type=
"info"
v-show=
"getCheckedArr.length > 3"
>
+ {{ getCheckedArr.length - 3 }}
</el-tag>
...
...
@@ -47,8 +47,8 @@ export default {
treeArr
:
[],
getCheckedArr
:
[],
defaultProps
:
{
children
:
'child
s
'
,
label
:
'
name
'
children
:
'child
ren
'
,
label
:
'
label
'
}
}
},
...
...
@@ -65,7 +65,7 @@ export default {
handler
()
{
const
getCheckedNodes
=
this
.
$refs
.
tree
.
getCheckedNodes
()
this
.
getCheckedArr
=
getCheckedNodes
.
reduce
((
prev
,
cur
)
=>
{
if
(
Object
.
keys
(
cur
).
includes
(
'child
s'
)
&&
cur
.
childs
.
length
>
0
)
{
if
(
Object
.
keys
(
cur
).
includes
(
'child
ren'
)
&&
cur
.
children
.
length
>
0
)
{
return
prev
}
return
prev
.
concat
(
cur
)
...
...
@@ -75,6 +75,37 @@ export default {
}
},
methods
:
{
getMerchantBrandList
()
{
let
getCheckedNodes
=
this
.
$refs
.
tree
.
getCheckedNodes
()
const
getCheckedKeys
=
this
.
$refs
.
tree
.
getCheckedKeys
()
const
getHalfCheckedNodes
=
this
.
$refs
.
tree
.
getHalfCheckedNodes
()
let
merchantBrandList
=
getHalfCheckedNodes
.
map
(
car
=>
{
let
merchantBrandId
=
[]
car
.
children
.
forEach
(
item
=>
{
if
(
getCheckedKeys
.
includes
(
item
.
id
))
{
merchantBrandId
.
push
(
item
.
id
)
}
})
return
{
cars
:
car
.
id
,
merchantBrandId
}
})
getCheckedNodes
=
getCheckedNodes
.
filter
(
item
=>
item
.
children
)
let
merchantBrandList2
=
getCheckedNodes
.
map
(
car
=>
{
let
merchantBrandId
=
[]
car
.
children
.
forEach
(
item
=>
{
if
(
getCheckedKeys
.
includes
(
item
.
id
))
{
merchantBrandId
.
push
(
item
.
id
)
}
})
return
{
cars
:
car
.
id
,
merchantBrandId
}
})
return
merchantBrandList
.
concat
(
merchantBrandList2
)
},
//勾选
handleCheck
()
{
this
.
treeArr
=
this
.
getTreeArray
()
...
...
@@ -86,6 +117,8 @@ export default {
}
},
getCheckList
(
checkArr
=
[])
{
checkArr
.
forEach
(
item
=>
item
=
parseInt
(
item
));
console
.
log
(
checkArr
)
this
.
$refs
.
tree
.
setCheckedKeys
(
checkArr
)
this
.
$nextTick
(()
=>
{
this
.
handleCheck
()
...
...
@@ -95,7 +128,7 @@ export default {
getTreeArray
()
{
let
tree_arr
=
[]
this
.
brandListTree
.
forEach
(
k
=>
{
let
child
=
k
.
child
s
let
child
=
k
.
child
ren
if
(
child
&&
child
.
length
>
0
)
{
child
.
forEach
(
j
=>
{
tree_arr
.
push
(
j
.
id
)
...
...
@@ -133,7 +166,7 @@ export default {
this
.
getCheckedArr
.
splice
(
index
,
1
)
const
getCheckedNodes
=
this
.
$refs
.
tree
.
getCheckedNodes
()
let
getCheckedArr
=
getCheckedNodes
.
reduce
((
prev
,
cur
)
=>
{
if
(
Object
.
keys
(
cur
).
includes
(
'child
s
'
))
{
if
(
Object
.
keys
(
cur
).
includes
(
'child
ren
'
))
{
return
prev
}
return
prev
.
concat
(
cur
)
...
...
src/views/followUp/components/addSale.vue
View file @
3a11b89
...
...
@@ -36,6 +36,11 @@
</div>
<div
class=
"sale-type-desc"
>
跟进员工类型最多新增30个,已新增
{{
empType
.
length
-
empTypeF
.
length
}}
个
</div>
</el-form-item>
<el-form-item
label=
"负责的业务类型"
>
<el-checkbox-group
v-model=
"selectBusiness"
@
change=
"selectType"
>
<el-checkbox
v-for=
"item in businessType"
:key=
"item"
:label=
"item.id"
>
{{
item
.
businessName
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
style=
"text-align: center"
>
<el-button
@
click=
"onCancel"
size=
"small"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
size=
"small"
>
确定
</el-button>
...
...
@@ -64,7 +69,9 @@ export default {
empTypeValue
:
''
,
newTag
:
''
,
innerTags
:
[],
dialog_temp
:
{}
dialog_temp
:
{},
businessType
:
[],
selectBusiness
:
[]
}
},
methods
:
{
...
...
@@ -72,16 +79,30 @@ export default {
this
.
newTag
=
''
this
.
innerTags
=
[]
this
.
empTypeValue
=
''
this
.
selectBusiness
=
[]
if
(
this
.
$refs
.
selectEmpTabel
.
listTree
.
length
!=
0
)
{
this
.
$refs
.
selectEmpTabel
.
listEntmicroStaff
()
this
.
$refs
.
selectEmpTabel
.
clearSelection
()
}
},
// 获取业务类型
getBusinessType
()
{
this
.
$apis
.
emp
.
getListEntBusinessType
().
then
(
res
=>
{
console
.
log
(
res
,
'111'
);
this
.
businessType
=
res
})
},
// 选取业务类型
selectType
(
data
)
{
console
.
log
(
data
,
'businessType'
);
this
.
selectBusiness
=
data
},
selectTable
(
val
)
{
this
.
innerTags
=
val
},
listEntFollowerType
()
{
this
.
$apis
.
emp
.
listEntFollowerType
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
}).
then
(
res
=>
{
const
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
$apis
.
emp
.
listEntFollowerType
({
merchantId
}).
then
(
res
=>
{
this
.
empType
=
res
this
.
empTypeF
=
res
.
filter
(
item
=>
item
.
commonFlag
)
})
...
...
@@ -158,7 +179,7 @@ export default {
this
.
innerTags
.
forEach
(
item
=>
{
userIds
.
push
(
item
.
userId
)
})
this
.
$emit
(
'handSelectdEmp'
,
this
.
empType
[
this
.
typeIndex
].
id
,
userIds
)
this
.
$emit
(
'handSelectdEmp'
,
this
.
empType
[
this
.
typeIndex
].
id
,
userIds
,
this
.
selectBusiness
)
},
onCancel
()
{
if
(
this
.
innerTags
.
length
!=
0
)
{
...
...
@@ -176,7 +197,8 @@ export default {
},
mounted
()
{
this
.
listEntFollowerType
()
this
.
listEntFollowerType
(),
this
.
getBusinessType
()
}
}
</
script
>
...
...
src/views/followUp/index.vue
View file @
3a11b89
...
...
@@ -24,7 +24,8 @@
<el-button
type=
"primary"
@
click=
"handleSearch"
size=
"small"
>
查询
</el-button>
</el-form-item>
<el-form-item
class=
"follow-form-jump"
>
<GLButton
fn=
"新增"
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</GLButton>
<!--
<GLButton
fn=
"新增"
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</GLButton>
-->
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</el-button>
</el-form-item>
</el-form>
<GLTable
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"handleSearch"
>
...
...
@@ -151,11 +152,13 @@ export default {
closeDrawer
()
{
this
.
handleClose
()
},
handSelectdEmp
(
followerTypeId
,
userIds
)
{
handSelectdEmp
(
followerTypeId
,
userIds
,
businessTypeId
)
{
var
params
=
{
followerTypeId
,
userIds
userIds
,
businessTypeId
}
console
.
log
(
params
,
'1253715427'
);
this
.
$apis
.
emp
.
saveFollowerStaff
(
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
handleClose
()
...
...
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