Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
horse
Commits
3cbadd41
Commit
3cbadd41
authored
Dec 17, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a927beb9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
181 additions
and
86 deletions
+181
-86
customRight.vue
src/components/customer/customRight.vue
+11
-8
editCustomerLibModule.ts
src/module/customer/editor/editCustomerLibModule.ts
+61
-55
editRuleModule.ts
src/module/customer/editor/editRuleModule.ts
+2
-2
CustomerLibrary.vue
...customerManage/customerSet/components/CustomerLibrary.vue
+1
-1
clueRule.vue
src/pages/customerManage/customerSet/components/clueRule.vue
+1
-1
editCustomerLib.vue
src/pages/customerManage/editor/editCustomerLib.vue
+104
-18
editRule.vue
src/pages/customerManage/editor/editRule.vue
+1
-1
No files found.
src/components/customer/customRight.vue
View file @
3cbadd41
...
...
@@ -60,6 +60,7 @@
<div
class=
"edit_info_wrap"
>
<q-select
filled
dense
option-value=
"Id"
size=
"sm"
v-model=
"cutomMsg.Value"
...
...
@@ -67,7 +68,7 @@
:options=
"data.customData"
emit-value
map-options
label
=
"请选择客户阶段"
placeholder
=
"请选择客户阶段"
/>
</div>
</div>
...
...
@@ -110,7 +111,7 @@
</div>
<div
class=
"edit_content"
>
<div
class=
"edit_info_wrap"
>
<q-input
filled
v-model=
"item.Value"
placeholder=
"请输入要修改的值"
></q-input>
<q-input
filled
dense
v-model=
"item.Value"
placeholder=
"请输入要修改的值"
></q-input>
</div>
</div>
</div>
...
...
@@ -146,7 +147,7 @@
</div>
<div
class=
"edit_content"
>
<div
class=
"edit_info_wrap"
>
<q-input
filled
v-model=
"item.Value"
maxlength=
"50"
placeholder=
"请输入要修改的值"
></q-input>
<q-input
filled
dense
v-model=
"item.Value"
maxlength=
"50"
placeholder=
"请输入要修改的值"
></q-input>
</div>
</div>
</div>
...
...
@@ -184,6 +185,7 @@
<div
class=
"edit_info_wrap"
>
<q-select
filled
dense
option-value=
"Id"
size=
"sm"
v-model=
"item.Value"
...
...
@@ -191,7 +193,7 @@
:options=
"item.OptionsList"
emit-value
map-options
label
=
"请选择"
placeholder
=
"请选择"
/>
</div>
</div>
...
...
@@ -230,6 +232,7 @@
<div
class=
"edit_info_wrap"
>
<q-select
filled
dense
multiple
use-chips
option-value=
"Id"
...
...
@@ -239,7 +242,7 @@
:options=
"item.OptionsList"
emit-value
map-options
label
=
"请选择"
placeholder
=
"请选择"
/>
</div>
</div>
...
...
@@ -277,7 +280,7 @@
</div>
<div
class=
"edit_content"
>
<div
class=
"edit_info_wrap"
>
<q-input
filled
v-model=
"item.Value"
mask=
"date"
:rules=
"['date']"
>
<q-input
filled
dense
v-model=
"item.Value"
mask=
"date"
:rules=
"['date']"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
...
...
@@ -330,7 +333,7 @@
</div>
<div
class=
"edit_content"
>
<div
class=
"edit_info_wrap"
>
<q-input
filled
v-model=
"item.Value"
mask=
"date"
:rules=
"['date']"
>
<q-input
filled
dense
v-model=
"item.Value"
mask=
"date"
:rules=
"['date']"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
...
...
@@ -383,7 +386,7 @@
</div>
<div
class=
"edit_content"
>
<div
class=
"edit_info_wrap"
>
<q-input
filled
v-model=
"item.Value"
maxlength=
"20"
placeholder=
"数值"
></q-input>
<q-input
filled
dense
v-model=
"item.Value"
maxlength=
"20"
placeholder=
"数值"
></q-input>
</div>
</div>
</div>
...
...
src/module/customer/editor/editCustomerLibModule.ts
View file @
3cbadd41
import
{
re
f
,
re
active
}
from
'vue'
import
{
reactive
}
from
'vue'
import
customerSetService
from
'@/api/customerSet'
import
customerService
from
'@/api/customer'
//
import customerService from '@/api/customer'
import
router
from
'@/router/index'
import
message
from
'@/utils/message'
const
msg
=
()
=>
{
const
curQueryId
=
Number
(
router
.
currentRoute
.
value
.
query
.
Id
)
return
{
RuleId
:
curQueryId
}
}
const
condition
=
ref
<
any
>
(
null
)
const
data
=
reactive
<
any
>
({
step
:
1
step
:
1
,
text
:
''
,
radio
:
1
,
showDeptDialog
:
false
,
dataTree
:
[],
defaultDept
:[],
})
const
editMsg
=
reactive
({
Id
:
0
,
Name
:
'打丧尸'
,
IsAllowRepeat
:
1
,
DeptList
:
[]
as
any
,
EmpList
:
[]
as
any
,
RecyclingType
:
1
,
ConditionList
:
[]
as
any
,
NotRecycleTimeList
:
[]
as
any
,
RemindDay
:
0
,
RemindType
:
1
,
LimitDay
:
0
,
PrivateLibraryType
:
''
})
const
jumpBeforePage
=
()
=>
{
router
.
push
({
path
:
'/customerSetup'
,
...
...
@@ -25,78 +43,65 @@ const jumpBeforePage = () => {
}
const
editRuleModule
=
()
=>
{
//获取分配客户条件
const
getCondition
=
val
=>
{
data
.
editMsg
.
ConditionList
=
[...
val
]
}
//获取已选部门成员
const
getdpt
=
val
=>
{
data
.
showDialog
=
false
data
.
editMsg
.
DeptList
=
[]
data
.
editMsg
.
EmpList
=
[]
editMsg
.
DeptList
=
[]
val
.
map
(
e
=>
{
if
(
e
.
Id
.
slice
(
0
,
1
)
==
1
)
{
data
.
editMsg
.
DeptList
.
push
({
DeptId
:
e
.
Id
.
slice
(
2
),
DeptName
:
e
.
Name
})
}
else
{
data
.
editMsg
.
EmpList
.
push
({
Id
:
e
.
Id
.
slice
(
2
),
EmployeeName
:
e
.
Name
})
}
editMsg
.
DeptList
.
push
({
DeptId
:
e
.
Id
,
DeptName
:
e
.
DeptName
})
})
console
.
log
(
val
,
'dpt'
)
}
//获取已选人数
const
getNum
=
n
=>
{
const
getNum
=
(
n
)
=>
{
data
.
peopleNum
=
n
}
//获取线索详情
const
getDetail
=
()
=>
{
customerSetService
.
getCustomerClueRuleDetail
(
msg
()).
then
(
res
=>
{
const
d
=
res
.
data
.
Data
data
.
editMsg
.
DeptList
=
d
.
DeptList
data
.
editMsg
.
EmpList
=
d
.
EmpList
data
.
editMsg
.
ConditionList
=
d
.
ConditionList
data
.
defaultConditionList
=
d
.
ConditionList
data
.
editMsg
.
RuleAllotWay
=
d
.
RuleAllotWay
data
.
editMsg
.
RuleSelectType
=
d
.
RuleSelectType
const
Dep
=
d
.
DeptList
.
map
(
e
=>
{
return
'1-'
+
e
.
DeptId
})
const
Emp
=
d
.
EmpList
.
map
(
e
=>
{
return
'2-'
+
e
.
Id
// data.editMsg.DeptList = d.DeptList
// data.editMsg.EmpList = d.EmpList
// data.editMsg.ConditionList = d.ConditionList
// data.defaultConditionList = d.ConditionList
// data.editMsg.RuleAllotWay = d.RuleAllotWay
// data.editMsg.RuleSelectType = d.RuleSelectType
data
.
defaultDept
=
d
.
DeptList
.
map
(
e
=>
{
return
e
.
DeptId
})
data
.
defaultArray
=
[...
Dep
,
...
Emp
]
})
}
const
showDeptDig
=
()
=>
{
data
.
showDeptDialog
=
true
}
//获取部门数据
const
getEmployeeData
=
()
=>
{
customerSe
rvice
.
getEmployeeData
({}).
then
(
res
=>
{
customerSe
tService
.
getDeptTree
({}).
then
(
res
=>
{
console
.
log
(
res
.
data
.
Data
,
'部门'
)
data
.
dataTree
=
res
.
data
.
Data
// 重组唯一id
if
(
data
.
dataTree
.
length
==
0
)
return
data
.
dataTree
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
})
})
}
const
getChildList
=
(
ChildList
:
Array
<
any
>
)
=>
{
ChildList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
// data.dataTree.forEach(x => {
// x.newId = x.DataType + '-' + x.DeptId
// if (x.ChildList && x.ChildList.length > 0) {
// getChildList(x.ChildList)
// }
// })
})
}
// const getChildList = (ChildList: Array<any>) => {
// ChildList.forEach(x => {
// x.newId = x.DataType + '-' + x.DeptId
// if (x.ChildList && x.ChildList.length > 0) {
// getChildList(x.ChildList)
// }
// })
// }
// 新增,修改
const
setCustomerClueRuleInfo
=
()
=>
{
customerSetService
.
setCustomerClueRuleInfo
(
data
.
editMsg
).
then
(
res
=>
{
...
...
@@ -114,15 +119,16 @@ const editRuleModule = () => {
return
{
msg
,
condition
,
data
,
editMsg
,
getDetail
,
getEmployeeData
,
jumpBeforePage
,
setCustomerClueRuleInfo
,
getCondition
,
getdpt
,
getNum
,
//----------new---
showDeptDig
,
}
}
...
...
src/module/customer/editor/editRuleModule.ts
View file @
3cbadd41
...
...
@@ -65,12 +65,12 @@ const editRuleModule = () => {
if
(
e
.
Id
.
slice
(
0
,
1
)
==
1
)
{
data
.
editMsg
.
DeptList
.
push
({
DeptId
:
e
.
Id
.
slice
(
2
),
DeptName
:
e
.
Name
DeptName
:
e
.
Dept
Name
})
}
else
{
data
.
editMsg
.
EmpList
.
push
({
Id
:
e
.
Id
.
slice
(
2
),
EmployeeName
:
e
.
Name
EmployeeName
:
e
.
Dept
Name
})
}
})
...
...
src/pages/customerManage/customerSet/components/CustomerLibrary.vue
View file @
3cbadd41
...
...
@@ -52,7 +52,7 @@
</div>
<q-btn
text-color=
"accent"
outline
unelevated
label=
"设置查重规则"
@
click=
"showRuleDig=true"
/>
</div>
<q-table
class=
"sticky-right-column-table"
:rows=
"list"
flat
:columns=
"columns"
row-key=
"Id"
>
<q-table
class=
"sticky-right-column-table"
:rows=
"list"
flat
:columns=
"columns"
hide-bottom
row-key=
"Id"
>
<
template
v-slot:body-cell-range=
"props"
>
<q-td
:props=
"props"
>
<div
v-for=
"(item,index) in props.row.DeptList"
:key=
"index"
>
{{
item
.
DeptName
}}
</div>
...
...
src/pages/customerManage/customerSet/components/clueRule.vue
View file @
3cbadd41
...
...
@@ -376,7 +376,7 @@
}
.tipBox
{
font-size
:
1
2
px
;
font-size
:
1
3
px
;
line-height
:
1
.8
;
}
...
...
src/pages/customerManage/editor/editCustomerLib.vue
View file @
3cbadd41
...
...
@@ -7,18 +7,71 @@
</q-breadcrumbs>
<q-btn
color=
"primary"
label=
"完成"
@
click=
"setCustomerClueRuleInfo"
/>
</div>
<div
class=
"
container
"
>
<q-stepper
v-model=
"step"
vertical
color=
"primary"
animated
flat
class=
"step-container"
>
<q-step
:name=
"1"
title=
"基础设置"
icon=
"settings"
:done=
"step > 1"
style=
"height: 1
00
px;"
>
<div
class=
"
editCustomerLib flex
"
>
<q-stepper
v-model=
"step"
vertical
color=
"primary"
animated
flat
header-nav
class=
"step-container"
>
<q-step
:name=
"1"
title=
"基础设置"
icon=
"settings"
:done=
"step > 1"
style=
"height: 1
25
px;"
>
</q-step>
<q-step
:name=
"2"
title=
"公海设置"
icon=
"settings"
:done=
"step > 2"
style=
"height: 1
00
px;"
>
<q-step
:name=
"2"
title=
"公海设置"
icon=
"settings"
:done=
"step > 2"
style=
"height: 1
25
px;"
>
</q-step>
<q-step
:name=
"3"
title=
"私库规则"
icon=
"settings"
:done=
"step =
3"
style=
"height: 100
px;"
>
<q-step
:name=
"3"
title=
"私库规则"
icon=
"settings"
:done=
"step =
= 3"
style=
"height: 125
px;"
>
</q-step>
</q-stepper>
<div
class=
"container"
>
<div
v-if=
"step==1"
>
<div
class=
"content-block"
>
<div
class=
"block-title q-mb-sm"
>
基础信息
</div>
<div
class=
"block-subtitle q-mb-xs"
>
名称
<span
style=
"color:#f00"
>
*
</span></div>
<q-input
outlined
dense
v-model=
"editMsg.Name"
clearable
maxlength=
"8"
placeholder=
"请输入客户库名称"
:suffix=
"editMsg.Name?`$
{editMsg.Name.length}/8`:'0/8'" class="q-mb-md" style="width:450px" />
<div
class=
"block-subtitle q-mb-xs"
>
是否允许重复客户
<span
style=
"color:#f00"
>
*
</span></div>
<q-radio
v-model=
"editMsg.IsAllowRepeat"
:val=
"2"
dense
class=
"full-width q-mb-xs"
>
<div
class=
""
>
<span
class=
"q-ml-sm"
>
否
</span>
<span
class=
"text-subTip q-ml-sm"
>
不支持创建重复客户(一个客户只能被一个员工跟进)
</span>
<n-popover
trigger=
"hover"
placement=
"top"
>
<template
#
trigger
>
<q-icon
name=
"help"
size=
"xs"
color=
"grey-4"
/>
</
template
>
<div
class=
"tipBox"
>
特殊情况:由于员工扫码添加客户微信不可控,所以可也能造成
<br
/>
重复客户的情况。针对这种场景,会有撞单提示,且支持向其他负责人
<br
/>
申请共享客户,共享成功后,申请人的客户详情将被合并覆盖。
</div>
</n-popover>
</div>
</q-radio>
<q-radio
v-model=
"editMsg.IsAllowRepeat"
:val=
"1"
dense
>
<span
class=
"q-ml-sm"
>
是
</span>
<span
class=
"text-subTip q-ml-sm"
>
不支持创建重复客户(一个客户只能被一个员工跟进)
</span>
</q-radio>
</div>
<div
class=
"content-block q-mt-md"
>
<div
class=
"block-title q-mb-sm"
>
权限范围
</div>
<div
class=
"block-subtitle q-mb-xs"
>
适用部门
<span
style=
"color:#f00"
>
*
</span></div>
<div
class=
"q-my-sm flex justify-between items-center"
>
<q-btn
outline
color=
"primary"
label=
"选择部门/成员"
@
click=
"showDeptDig"
/>
<div
class=
"flex align-center depart-title"
>
<span>
已选:0人
</span>
<div
class=
"per"
></div>
<span>
有效账号数(已启用探马账号人数):0人
</span>
</div>
</div>
<div
class=
"Dept-box "
>
<q-chip
color=
"primary"
v-for=
"(item,index) in editMsg.DeptList"
:key=
"index"
text-color=
"white"
icon=
"work"
>
{{item.DeptName}}
</q-chip>
</div>
</div>
</div>
<div
class=
"q-mt-md"
>
<q-btn
unelevated
color=
"white"
text-color=
"black"
label=
"上一步"
/>
<q-btn
unelevated
color=
"accent"
label=
"下一步"
class=
"q-ml-md"
/>
</div>
</div>
</div>
<departmentStaff
v-model=
"showDialog"
:defaultArray=
"defaultArray"
nodeKey=
"newId"
labelKey=
"DeptName"
childrenKey=
"ChildList"
strategy=
"leaf"
:treeData=
"dataTree"
@
select=
"getdpt"
@
getNum=
"getNum"
/>
<departmentStaff
v-model=
"showDeptDialog"
:defaultArray=
"defaultDept"
nodeKey=
"DeptId"
:showType=
"1"
labelKey=
"DeptName"
childrenKey=
"ChildList"
strategy=
"leaf"
:treeData=
"dataTree"
@
select=
"getdpt"
@
getNum=
"getNum"
/>
</div>
</template>
<
script
lang=
"ts"
>
...
...
@@ -32,7 +85,6 @@
import
editRuleModule
from
'@/module/customer/editor/editCustomerLibModule'
export
default
defineComponent
({
components
:
{
departmentStaff
,
},
setup
()
{
...
...
@@ -40,30 +92,29 @@
jumpBeforePage
,
msg
,
data
,
condition
,
getDetail
,
editMsg
,
//
getDetail,
getEmployeeData
,
setCustomerClueRuleInfo
,
getCondition
,
getdpt
,
getNum
,
showDeptDig
,
}
=
editRuleModule
();
onMounted
(()
=>
{
if
(
msg
().
RuleId
>
0
)
{
// data.editMsg.Id = msg().RuleId
getDetail
()
//
getDetail()
}
getEmployeeData
()
})
return
{
jumpBeforePage
,
condition
,
...
toRefs
(
data
),
editMsg
,
setCustomerClueRuleInfo
,
getCondition
,
getdpt
,
getNum
,
showDeptDig
}
}
...
...
@@ -87,18 +138,53 @@
background-color
:
#fff
;
}
.container
{
.editCustomerLib
{
.step-container
{
width
:
200px
;
height
:calc
(
100vh
-
70px
)
;
height
:
calc
(
100vh
-
70px
);
padding
:
40px
;
flex-shrink
:
0
;
border-right
:
1px
solid
#d7d7d7
;
overflow-x
:
hidden
;
}
.container
{
width
:
1087px
;
margin
:
50px
auto
0
;
padding-bottom
:
50px
;
.content-block
{
width
:
1087px
;
padding
:
30px
20px
;
border-radius
:
8px
;
background-color
:
#fff
;
.block-title
{
font-size
:
16px
;
color
:
#000
;
}
.block-subtitle
{
font-size
:
14px
;
color
:
#000
;
}
.inputTip
{
color
:
#909399
;
font-size
:
12px
;
}
}
}
}
.tipBox
{
font-size
:
14px
;
line-height
:
1
.8
;
}
.text-subTip
{
color
:
#858598
;
}
</
style
>
src/pages/customerManage/editor/editRule.vue
View file @
3cbadd41
...
...
@@ -21,7 +21,7 @@
<div
class=
"content-block mt20"
>
<div
class=
"fission-title"
>
分配给以下部门/成员
</div>
<div
class=
"fission-subtitle"
>
适用部门/成员
</div>
<div
class=
"departs flex
-between
-center"
>
<div
class=
"departs flex
justify-between items
-center"
>
<q-btn
outline
color=
"primary"
label=
"选择部门/成员"
@
click=
"changeDialog"
/>
<div
class=
"flex align-center depart-title"
>
<span>
已选:
{{
peopleNum
}}
人
</span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment