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
6934f678
Commit
6934f678
authored
Dec 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/horse
parents
0406a55a
043ea0aa
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
168 additions
and
115 deletions
+168
-115
App.vue
src/App.vue
+1
-1
customerHead.vue
src/components/customer/customerHead.vue
+97
-16
label-group.vue
src/components/customer/label-group.vue
+8
-0
request-group.vue
src/components/customer/request-group.vue
+22
-18
editRuleModule.ts
src/module/editor/editRuleModule.ts
+16
-24
customer.vue
src/pages/customerManage/customer.vue
+14
-51
clueRule.vue
src/pages/customerManage/customerSet/components/clueRule.vue
+2
-2
customerSetup.vue
src/pages/customerManage/customerSet/customerSetup.vue
+4
-1
editRule.vue
src/pages/editor/editRule.vue
+4
-2
No files found.
src/App.vue
View file @
6934f678
...
...
@@ -10,7 +10,7 @@ export default defineComponent({
</
script
>
<
style
lang=
"sass"
>
@import
url('./css/font.sass')
@import
url('//at.alicdn.com/t/font_2930340_
uvse4eempkh
.css')
@import
url('//at.alicdn.com/t/font_2930340_
s3kedu8od4
.css')
@import
url('./css/table.sass')
.svg-icon-primary
g
[
fill
]
transition
:
fill
0
.3s
ease
...
...
src/components/customer/customerHead.vue
View file @
6934f678
<
template
>
<div
class=
"page-search row items-center"
v-if=
"select.length==0"
>
<div
class=
"
col row
wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"SeletObj.selectVal"
clearable
dense
@
clear=
"clearSelectWay"
<div
class=
"
flex
wrap q-mr-lg q-col-gutter-md"
>
<div
>
<q-input
filled
v-model=
"SeletObj.selectVal"
clearable
dense
@
clear=
"clearSelectWay"
@
update:model-value=
"getSelectWay"
placeholder=
"请输入"
>
<template
#
before
>
<div
style=
"border-right: 1px solid #999;padding-right:0"
>
<div
style=
"border-right: 1px solid #999;
padding-right:0"
>
<q-select
filled
@
update:model-value=
"getSelectWay"
option-value=
"Id"
option-label=
"Name"
dense
v-model=
"SeletObj.selectWay"
:options=
"TypeList"
emit-value
map-options
/>
</div>
...
...
@@ -20,23 +20,23 @@
class=
"full-height"
@
update:value=
'changeTimeRange'
/>
</n-config-provider>
</div>
<div
class=
"col-2"
>
<div
>
<n-cascader
v-model:value=
"CascaderData.customerCascaderValue"
clearable
placeholder=
"客户筛选"
check-strategy=
"child"
size=
"large"
:show-path=
"false"
max-tag-count=
"responsive"
multiple
:options=
"CustomList"
cascade
/>
</div>
<div
class=
"col-2"
>
<div
>
<n-cascader
v-model:value=
"CascaderData.deptCascaderValue"
clearable
placeholder=
"选择部门/人员"
check-strategy=
"all"
value-field=
"newId"
label-field=
"DeptName"
size=
"large"
:show-path=
"false"
max-tag-count=
"responsive"
:options=
"EmployeeList"
cascade
children-field=
"ChildList"
@
update:value=
"getDept"
/>
</div>
<div
class=
"col-2"
>
<vt-custom-btn
ref=
"vtBtn"
:page-code=
"pageCode"
:columns=
"columns"
@
empty-where=
"deleteWhereHandler(0)"
<div>
<vt-custom-btn
ref=
"vtBtn"
:page-code=
"pageCode"
:columns=
"columns"
@
empty-where=
"deleteWhereHandler(0)"
class=
"full-height"
@
update-where=
"updateWhereHandler"
></vt-custom-btn>
<
!-- <q-btn class="q-ml-md q-px-md" color="dark" label="重置" dense outline @click="deleteWhereHandler(1)"></q-btn> --
>
<
q-btn
class=
"q-ml-md q-px-md"
color=
"dark"
label=
"重置"
dense
outline
@
click=
"deleteWhereHandler(1)"
></q-btn
>
</div>
<div
class=
"col-2"
>
<q-btn-dropdown
label=
"导入"
dense
color=
"primary"
>
<q-btn-dropdown
label=
"导入"
color=
"primary"
>
<q-list>
<q-item>
<q-btn
unelevated
dense
label=
"导入个人客户"
@
click=
"showImport=true"
/>
...
...
@@ -46,7 +46,7 @@
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown
label=
"导出"
color=
"primary"
dense
class=
"q-ml-md"
>
<q-btn-dropdown
label=
"导出"
color=
"primary"
class=
"q-ml-md"
>
<q-list>
<q-item>
<q-btn
unelevated
dense
label=
"导出个人客户"
/>
...
...
@@ -69,7 +69,7 @@
<q-btn
style=
"background-color: #fff; color: #606266"
unelevated
outline
label=
"转移"
class=
"q-ml-md"
@
click=
"showDialog('showTransfer')"
/>
<q-btn-dropdown
label=
"导出"
outline
style=
"background-color: #fff; color: #606266"
class=
"q-ml-md"
>
<q-btn-dropdown
label=
"导出"
outline
style=
"background-color: #fff; color: #606266"
class=
"q-ml-md"
>
<q-list>
<q-item>
<q-btn
unelevated
dense
label=
"导出客户"
/>
...
...
@@ -193,13 +193,16 @@
}
from
'naive-ui'
import
dayjs
from
'dayjs'
import
message
from
'@/utils/message'
import
{
Dialog
}
from
'quasar'
import
{
Dialog
}
from
'quasar'
import
customerService
from
'@/api/customer'
import
vtCustomBtn
from
'../common/customWhere/vtCustomBtn.vue'
import
labelgroup
from
'@/components/customer/label-group.vue'
import
importComponents
from
'@/components/common/import.vue'
import
departmentStaff
from
'@/components/common/departmentStaff.vue'
export
default
{
emits
:
[
'update'
],
props
:
{
/**
* @description 模式:0为未选择表格内容模式,1为选中了表格内容模式
...
...
@@ -358,6 +361,34 @@
}
ctx
.
emit
(
'update'
)
}
const
updateWhereHandler
=
params
=>
{
console
.
log
(
365
,
params
)
msg
.
AddCondition
=
params
.
AddCondition
msg
.
SelectList
=
params
.
SelectList
ctx
.
emit
(
'update'
)
}
const
deleteWhereHandler
=
type
=>
{
msg
.
SelectList
=
[]
msg
.
AddCondition
=
0
//重置
if
(
type
==
1
)
{
vtBtn
.
value
.
clearWhereHandler
()
SeletObj
.
selectVal
=
""
msg
.
CorpName
=
''
msg
.
WeChatName
=
''
msg
.
CustomerName
=
''
msg
.
CustomerMobile
=
''
msg
.
FriendSTime
=
''
msg
.
FriendETime
=
''
msg
.
CreateSTime
=
''
msg
.
CreateETime
=
''
msg
.
EmpId
=
0
TimeObj
.
timeRange
=
null
,
CascaderData
.
deptCascaderValue
=
null
,
CascaderData
.
customerCascaderValue
=
""
}
ctx
.
emit
(
'update'
)
}
const
data
=
reactive
({
isshowlabel
:
false
,
//设置标签弹窗
showTransfer
:
false
,
//转移客户弹窗
...
...
@@ -442,13 +473,13 @@
}
customerService
.
delCustomerInfo
(
delMsg
).
then
(
res
=>
{
message
.
successMsg
(
res
.
data
.
Message
)
ctx
.
emit
(
'update:select'
,[])
ctx
.
emit
(
'update:select'
,
[])
ctx
.
emit
(
'update'
)
})
})
}
const
closeSel
=
()
=>
{
ctx
.
emit
(
'update:select'
,[])
const
closeSel
=
()
=>
{
ctx
.
emit
(
'update:select'
,
[])
}
return
{
updatePage
,
...
...
@@ -478,8 +509,58 @@
AbandonMsg
,
TransferMsg
,
closeSel
,
updateWhereHandler
,
deleteWhereHandler
,
}
}
}
</
script
>
<
style
scoped
>
:deep
(
.n-base-selection-label
)
{
width
:
160px
;
height
:
40px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.05
);
border
:
none
!important
;
}
:deep
(
.n-base-selection-input
)
{
display
:
flex
;
align-items
:
center
;
border
:
none
!important
;
}
:deep
(
.n-input
)
{
height
:
100%
;
border
:
none
;
display
:
flex
;
align-items
:
center
;
}
:deep
(
.n-base-selection-tags
)
{
width
:
160px
;
height
:
40px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.05
);
}
.select-navs
{
background-color
:
#f6f6f6
;
border-radius
:
4px
;
}
.bottom-slot
{
border-top
:
1px
solid
#ccc
;
margin-top
:
20px
;
padding-top
:
35px
;
}
.add-dep-left
{
white-space
:
nowrap
;
min-width
:
76px
;
line-height
:
36px
;
}
:deep
(
.q-btn
)
{
height
:
100%
;
}
</
style
>
\ No newline at end of file
src/components/customer/label-group.vue
View file @
6934f678
...
...
@@ -77,7 +77,15 @@
show
.
value
=
val
}
)
let
selectList
=
ref
(
props
.
list
)
watch
(
()
=>
props
.
list
,
val
=>
{
selectList
.
value
=
val
getLabelList
()
}
)
let
LableList
=
ref
([])
const
goclose
=
()
=>
{
//关闭弹窗
ctx
.
emit
(
'update:modelValue'
,
false
)
...
...
src/components/customer/request-group.vue
View file @
6934f678
...
...
@@ -149,6 +149,7 @@
onMounted
}
from
'vue'
import
customerSetService
from
'@/api/customerSet'
import
customerService
from
'@/api/customer'
import
labelgroup
from
'./label-group.vue'
import
dayjs
from
'dayjs'
import
{
...
...
@@ -317,21 +318,15 @@
}
case
4
:
{
//多选
console
.
log
(
'多选'
,
e
)
e
.
labelType
=
4
if
(
e
.
Id
==
'标签'
)
{
e
.
StartValue
=
''
}
else
{
if
(
e
.
StartValue
)
{
e
.
StartValue
=
e
.
StartValue
.
split
(
','
).
map
(
e
=>
Number
(
e
))
}
else
{
e
.
StartValue
=
[]
}
}
e
.
directionList
=
directionList1
if
(
find
.
OptionsList
)
{
e
.
OptionsList
=
find
.
OptionsList
}
if
(
e
.
Name
==
'标签'
&&
e
.
StartValue
){
getLabelByIds
(
e
.
StartValue
)
}
break
}
case
5
:
{
...
...
@@ -363,7 +358,7 @@
})
}
else
{
addMsg
.
value
=
[{
Id
:
'标签'
,
Id
:
0
,
Name
:
'标签'
,
Type
:
1
,
Direction
:
''
,
...
...
@@ -395,7 +390,7 @@
const
getCustomerStageList
=
()
=>
{
customerSetService
.
getCustomerStageList
({}).
then
(
res
=>
{
let
obj
:
params
=
{
Id
:
'客户阶段'
,
Id
:
-
1
,
Name
:
'客户阶段'
,
Type
:
3
,
IsCustom
:
3
,
...
...
@@ -403,7 +398,7 @@
}
filedList
.
value
.
unshift
(
obj
)
let
obj2
:
params
=
{
Id
:
'标签'
,
Id
:
0
,
Name
:
'标签'
,
Type
:
4
,
IsCustom
:
2
...
...
@@ -417,7 +412,7 @@
}
const
addsList
=
()
=>
{
let
obj
:
params
=
{
Id
:
0
,
Id
:
filedList
.
value
[
2
].
Id
,
Name
:
''
,
Type
:
''
,
Direction
:
''
,
...
...
@@ -442,17 +437,17 @@
// 禁用标签
let
changeLabel
=
()
=>
{
let
find
:
any
=
addMsg
.
value
.
find
(
e
=>
{
return
e
.
Id
==
'标签'
return
e
.
Name
==
'标签'
})
if
(
find
)
{
filedList
.
value
.
map
(
_e
=>
{
if
(
_e
.
Id
==
'标签'
)
{
if
(
_e
.
Name
==
'标签'
)
{
_e
.
disable
=
true
}
})
}
else
{
filedList
.
value
.
map
(
_e
=>
{
if
(
_e
.
Id
==
'标签'
)
{
if
(
_e
.
Name
==
'标签'
)
{
_e
.
disable
=
false
}
})
...
...
@@ -600,6 +595,7 @@
}
return
flag
}
watch
(
()
=>
[...
addMsg
.
value
],
val
=>
{
...
...
@@ -622,6 +618,13 @@
deep
:
true
}
)
const
getLabelByIds
=
ids
=>
{
customerService
.
getLabelListByIds
(
ids
).
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
Data
)
{
lableList
.
value
=
res
.
data
.
Data
}
})
}
onMounted
(()
=>
{
//进入页面就调用
setTimeout
(()
=>
{
...
...
@@ -648,7 +651,8 @@
changeDate
,
changeRange
,
changeAddCondition
,
checkRule
checkRule
,
getLabelByIds
,
}
}
})
...
...
src/module/editor/editRuleModule.ts
View file @
6934f678
...
...
@@ -11,6 +11,7 @@ interface dataParams {
defaultConditionList
:
Array
<
any
>
editMsg
:
any
peopleNum
:
number
[
key
:
string
]:
any
}
const
msg
=
()
=>
{
...
...
@@ -21,7 +22,6 @@ const msg = () => {
}
const
condition
=
ref
<
any
>
(
null
)
const
data
=
reactive
<
dataParams
>
({
showDialog
:
false
,
shape
:
0
,
dataTree
:
[],
...
...
@@ -35,7 +35,8 @@ const data = reactive<dataParams>({
RuleAllotWay
:
1
,
//分配方式 1依次轮流 2随机分配
ConditionList
:
[]
//条件列表
},
peopleNum
:
0
peopleNum
:
0
,
selectOptionList
:[],
})
const
jumpBeforePage
=
()
=>
{
router
.
push
({
...
...
@@ -96,7 +97,6 @@ const editRuleModule = () => {
return
'2-'
+
e
.
Id
})
data
.
defaultArray
=
[...
Dep
,
...
Emp
]
console
.
log
(
d
.
ConditionList
,
'ConditionList'
)
})
}
//获取部门数据
...
...
@@ -124,27 +124,19 @@ const editRuleModule = () => {
}
// 新增,修改
const
setCustomerClueRuleInfo
=
()
=>
{
console
.
log
(
data
.
editMsg
.
ConditionList
)
const
flag
=
condition
.
value
.
checkRule
(
data
.
editMsg
.
ConditionList
)
console
.
log
(
94
,
flag
)
if
(
!
flag
)
return
if
(
data
.
editMsg
.
DeptList
.
length
==
0
&&
data
.
editMsg
.
EmpList
.
length
==
0
)
{
message
.
warnMsg
(
'适用部门/成员'
)
return
}
// customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
// message.successMsg(res.data.Message)
// setTimeout(() => {
// router.push({
// path: '/customerSetup',
// query: {
// type: 'clue'
// }
// })
// }, 2000)
// })
customerSetService
.
setCustomerClueRuleInfo
(
data
.
editMsg
).
then
(
res
=>
{
message
.
successMsg
(
res
.
data
.
Message
)
setTimeout
(()
=>
{
router
.
push
({
path
:
'/customerSetup'
,
query
:
{
type
:
'clue'
}
})
},
2000
)
})
}
return
{
msg
,
condition
,
...
...
@@ -156,7 +148,7 @@ const editRuleModule = () => {
setCustomerClueRuleInfo
,
getCondition
,
getdpt
,
getNum
getNum
,
}
}
...
...
src/pages/customerManage/customer.vue
View file @
6934f678
<
template
>
<div
class=
"q-pa-md customer"
>
<customerHead
v-model:select=
"data.selected"
:EmployeeList=
"data.EmployeeList"
@
update=
"updatePage"
/>
<q-page
padding
style=
"background-color: #fff; border-radius: 10px"
>
<div
class=
"page-content"
style=
"margin-top: 20px"
>
<div
class=
"page-content"
>
<div
class=
"q-mb-md"
>
<customerHead
v-model:select=
"data.selected"
:columns=
"data.allColumns"
:EmployeeList=
"data.EmployeeList"
@
update=
"updatePage"
/>
</div>
<q-table
:rows=
"data.dataList"
:columns=
"data.columns"
class=
"sticky-tow-column-table full-height sticky-right-column-table"
row-key=
"Id"
:loading=
"data.loading"
v-model:pagination=
"pagination"
selection=
"multiple"
v-model:selected=
"data.selected"
...
...
@@ -10,7 +14,6 @@
<template
v-slot:body-cell-CustomerName=
"props"
>
<q-td
auto-width
:props=
"props"
>
<div
class=
"cutomer_Header"
>
<div
class=
"customer_Img"
>
<img
:src=
"props.row.WeChatPhoto"
style=
"width: 100%; height: 100%"
/>
</div>
...
...
@@ -67,9 +70,9 @@
import
CustomerModule
from
'@/module/customer/customerModule'
import
customRight
from
'@/components/customer/customRight.vue'
import
visibleColumns
from
'@/components/common/visibleColumns.vue'
import
customerHead
from
'@/components/customer/customerHead.vue'
export
default
defineComponent
({
components
:
{
...
...
@@ -81,7 +84,7 @@
useMeta
({
title
:
'客户'
,
})
let
{
getCustomerList
,
getWayList
,
...
...
@@ -101,9 +104,9 @@
CustomerId
.
value
=
item
.
row
.
Id
isShowCustom
.
value
=
true
}
provide
(
'msg'
,
msg
)
const
updatePage
=
()
=>
{
msg
.
PageIndex
=
1
provide
(
'msg'
,
msg
)
const
updatePage
=
()
=>
{
msg
.
PageIndex
=
1
getCustomerList
()
}
onMounted
(()
=>
{
...
...
@@ -158,44 +161,4 @@
.customer_Wechat
{
color
:
#9999a8
;
}
:deep
(
.n-base-selection-label
)
{
height
:
40px
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.05
);
border
:
none
!
important
;
}
:deep
(
.n-base-selection-input
)
{
height
:
40px
;
display
:
flex
;
align-items
:
center
;
border
:
none
!
important
;
}
:deep
(
.n-input
)
{
height
:
100%
;
border
:
none
;
display
:
flex
;
align-items
:
center
;
}
:deep
(
.n-base-selection-tags
)
{
height
:
40px
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.05
);
}
.select-navs
{
background-color
:
#f6f6f6
;
border-radius
:
4px
;
}
.bottom-slot
{
border-top
:
1px
solid
#ccc
;
margin-top
:
20px
;
padding-top
:
35px
;
}
.add-dep-left
{
white-space
:
nowrap
;
min-width
:
76px
;
line-height
:
36px
;
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/customerManage/customerSet/components/clueRule.vue
View file @
6934f678
...
...
@@ -3,13 +3,13 @@
<div
class=
"q-gutter-lg"
>
<q-radio
v-model=
"configMsg.ClueType"
:val=
"
1
"
:val=
"
2
"
label=
"自动分配"
@
update:model-value=
"configChange"
></q-radio>
<q-radio
v-model=
"configMsg.ClueType"
:val=
"
2
"
:val=
"
1
"
label=
"手动分配"
@
update:model-value=
"configChange"
></q-radio>
...
...
src/pages/customerManage/customerSet/customerSetup.vue
View file @
6934f678
...
...
@@ -10,7 +10,7 @@
indicator-color=
"primary"
narrow-indicator
>
<q-tab
name=
"
yewumoshi
"
label=
"业务模式"
/>
<q-tab
name=
"
model
"
label=
"业务模式"
/>
<q-tab
name=
"field"
label=
"客户字段"
/>
<q-tab
name=
"label"
label=
"标签"
/>
<q-tab
name=
"clue"
label=
"线索分配规则"
/>
...
...
@@ -18,6 +18,7 @@
<q-tab
name=
"operation"
label=
"客户操作"
/>
</q-tabs>
<div
class=
"container fit"
>
<businessModel
v-if=
"tab == 'model'"
></businessModel>
<customer-Field
v-if=
"tab == 'field'"
></customer-Field>
<clue-rule
v-if=
"tab == 'clue'"
></clue-rule>
<customer-phase
v-if=
"tab == 'phase'"
></customer-phase>
...
...
@@ -29,6 +30,7 @@
</
template
>
<
script
lang=
"ts"
>
import
businessModel
from
'./components/businessModel.vue'
import
customerField
from
'./components/customerField.vue'
import
clueRule
from
'./components/clueRule.vue'
import
customerPhase
from
'./components/customerPhase.vue'
...
...
@@ -44,6 +46,7 @@ import {
export
default
defineComponent
({
components
:
{
businessModel
,
customerField
,
clueRule
,
customerPhase
,
...
...
src/pages/editor/editRule.vue
View file @
6934f678
...
...
@@ -81,10 +81,12 @@ import {
import
requestGroup
from
'@/components/customer/request-group.vue'
import
departmentStaff
from
'@/components/common/departmentStaff.vue'
import
editRuleModule
from
'@/module/editor/editRuleModule'
// import where from '@/components/common/customWhere/where.vue'
export
default
defineComponent
({
components
:
{
requestGroup
,
departmentStaff
departmentStaff
,
// where
},
setup
()
{
let
{
...
...
@@ -122,7 +124,7 @@ export default defineComponent({
setCustomerClueRuleInfo
,
getCondition
,
getdpt
,
getNum
getNum
,
}
}
...
...
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