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
39b87432
Commit
39b87432
authored
Nov 12, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
21
parents
8acb4f83
a6e5adce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
211 additions
and
7 deletions
+211
-7
customer.ts
src/api/customer.ts
+8
-1
request-group.vue
src/components/customer/request-group.vue
+49
-0
clueRule.vue
src/pages/customer/components/clueRule.vue
+136
-0
customerField.vue
src/pages/customer/components/customerField.vue
+11
-3
customerSetup.vue
src/pages/customer/customerSetup.vue
+7
-3
No files found.
src/api/customer.ts
View file @
39b87432
...
...
@@ -30,7 +30,14 @@
data
})
}
// 获取客户线索规则列表
static
async
getCustomerClueRuleList
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'QYCustomer/GetCustomerClueRuleList'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
}
export
default
customerService
src/components/customer/request-group.vue
0 → 100644
View file @
39b87432
<
template
>
<div
class=
"requestgroup"
>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
}
from
'vue'
import
customerService
from
'@/api/customer'
export
default
defineComponent
({
setup
()
{
const
filedList
=
ref
([])
const
addMsg
=
ref
([])
onMounted
(()
=>
{
//进入页面就调用
getCustomerFiledList
();
//获取客户字段
})
const
getCustomerFiledList
=
()
=>
{
customerService
.
getCustomerFiledList
({
Enable
:
1
}).
then
((
res
)
=>
{
let
data
=
res
.
data
.
Data
filedList
.
value
=
data
;
filedList
.
value
.
forEach
(
x
=>
{
// IsCustom 是否自定义字段 1是 2标签 3阶段
x
.
IsCustom
=
1
})
let
obj
=
{
Id
:
'客户阶段'
,
Name
:
'客户阶段'
,
Type
:
4
,
IsCustom
:
3
}
filedList
.
value
.
unshift
(
obj
)
let
obj2
=
{
Id
:
'标签'
,
Name
:
'标签'
,
Type
:
3
,
IsCustom
:
2
}
filedList
.
value
.
unshift
(
obj2
)
addMsg
.
value
.
push
({
Name
:
filedList
.
value
[
0
].
Id
,
Type
:
filedList
.
value
,
Direction
:
1
,
StartValue
:
''
,
EndValue
:
''
,
IsCustom
:
2
,
})
})
}
return
{
getCustomerFiledList
}
}
})
</
script
>
\ No newline at end of file
src/pages/customer/components/clueRule.vue
0 → 100644
View file @
39b87432
<
template
>
<div
class=
"q-pa-md"
>
<div
class=
"q-gutter-lg"
>
<q-radio
v-model=
"ClueType"
:val=
"1"
label=
"自动分配"
></q-radio>
<q-radio
v-model=
"ClueType"
:val=
"2"
label=
"手动分配"
></q-radio>
</div>
<div
class=
"q-pa-md"
v-if=
"ClueType === 1"
>
<table
class=
"payTable"
>
<thead>
<tr>
<th>
查询类型
</th>
<th>
是否默认
</th>
<th>
部门列表
</th>
<th>
人员列表
</th>
<th>
分配方式
</th>
<th>
条件列表
</th>
<th>
条件描述
</th>
<th>
排序
</th>
<th
width=
"4%"
></th>
</tr>
</thead>
<!--
<tr
v-if=
"data && data.length == 0"
>
<td
:colspan=
"8"
align=
"center"
>
暂无数据
</td>
</tr>
-->
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
@
update=
"datadragEnd"
>
<template
#
item=
"
{ element }">
<tr>
<td>
<span
v-if=
"element.RuleSelectType === 1"
>
并且
</span>
<span
v-if=
"element.RuleSelectType === 2"
>
或者
</span>
</td>
<td>
<span
v-if=
"element.IsDefault == 1"
>
是
</span>
<span
v-else
>
否
</span>
</td>
<td>
<span>
{{
element
.
DeptList
.
join
(
','
)
}}
</span>
</td>
<td>
<span>
{{
element
.
EmpList
.
join
(
','
)
}}
</span>
</td>
<td>
<span
v-if=
"element.RuleAllotWay === 1"
>
依次轮流
</span>
<span
v-if=
"element.RuleAllotWay === 2"
>
随机分配
</span>
</td>
<td>
<span>
{{
element
.
ConditionList
.
join
(
','
)
}}
</span>
</td>
<td>
<span>
{{
element
.
ConditionStrList
.
join
(
','
)
}}
</span>
</td>
<td>
<span>
{{
element
.
Sort
}}
</span>
</td>
<td>
<i
class=
"iconfont icon-left"
style=
"font-size: 14px;color: #777;"
></i>
</td>
</tr>
</
template
>
</draggable>
</table>
</div>
</div>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
}
from
'vue'
import
draggable
from
"vuedraggable"
;
import
customerService
from
'@/api/customer'
;
export
default
defineComponent
({
component
:
{
draggable
},
setup
()
{
let
data
=
ref
([{
Id
:
1
,
RuleSelectType
:
1
,
IsDefault
:
1
,
DeptList
:[],
EmpList
:[],
RuleAllotWay
:
1
,
ConditionList
:[],
ConditionStrList
:[],
Sort
:
1
}])
const
datadragEnd
=
(
e
:
any
)
=>
{
console
.
log
(
'拖动结束'
,
e
)
}
const
getClueList
=
()
=>
{
customerService
.
getCustomerClueRuleList
({}).
then
(
res
=>
{
data
.
value
=
res
.
data
.
Data
console
.
log
(
59
,
data
)
})
}
onMounted
(()
=>
{
getClueList
();
})
return
{
ClueType
:
ref
(
1
),
data
,
// columns,
datadragEnd
}
}
})
</
script
>
<
style
>
.payTable
{
width
:
100%
;
border-collapse
:
collapse
;
}
.payTable
tr
th
{
background
:
#fff
;
height
:
40px
;
font-size
:
12px
;
font-weight
:
bold
;
color
:
#2d2d2d
;
background
:
#dddee0
;
}
.payTable
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
40px
;
}
.payTable
tr
td
{
font-size
:
13px
;
text-align
:
center
;
color
:
#2d2d2d
;
padding
:
10px
0
;
font-weight
:
bold
;
border-bottom
:
1px
solid
#e5e5e5
;
}
</
style
>
\ No newline at end of file
src/pages/customer/components/customerField.vue
View file @
39b87432
<
template
>
<requestgroup></requestgroup>
<div
class=
"q-pa-md customerField"
>
<table
class=
"payTable"
>
<thead>
...
...
@@ -16,7 +17,7 @@
<tr
v-if=
"data && data.length==0"
>
<td
:colspan=
"8"
align=
"center"
>
暂无数据
</td>
</tr>
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
@
update=
"datadragEnd"
:clone=
"cloneFun"
>
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
:move=
"getdata"
@
update=
"datadragEnd"
:clone=
"cloneFun"
>
<template
#
item=
"
{ element }">
<tr>
<td><span>
{{
element
.
Name
}}
</span></td>
...
...
@@ -58,15 +59,16 @@
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
}
from
'vue'
import
requestgroup
from
'../../../components/customer/request-group.vue'
import
customerService
from
'@/api/customer'
import
draggable
from
"vuedraggable"
;
export
default
defineComponent
({
components
:
{
draggable
},
components
:
{
draggable
,
requestgroup
},
setup
()
{
const
data
=
ref
([]);
const
dragId
=
ref
(
0
);
const
changePage
=
()
=>
{
customerService
.
getCustomerFiledList
({
Enable
:
-
1
}).
then
((
res
)
=>
{
console
.
log
(
132
,
res
)
data
.
value
=
res
.
data
.
Data
})
}
...
...
@@ -74,6 +76,11 @@
console
.
log
(
'拖动结束'
,
e
)
}
const
getdata
=
(
e
:
any
)
=>
{
console
.
log
(
'拖动结束22323'
,
e
)
dragId
.
value
=
e
.
draggedContext
.
element
.
Id
}
onMounted
(()
=>
{
changePage
()
...
...
@@ -82,6 +89,7 @@
data
,
changePage
,
datadragEnd
,
getdata
}
}
...
...
src/pages/customer/customerSetup.vue
View file @
39b87432
...
...
@@ -13,9 +13,11 @@
<q-tab
name=
"yewumoshi"
label=
"业务模式"
/>
<q-tab
name=
"field"
label=
"客户字段"
/>
<q-tab
name=
"label"
label=
"标签"
/>
<q-tab
name=
"clue"
label=
"线索分配规则"
/>
</q-tabs>
<div
v-if=
"tab == 'field'"
>
<customer-Field></customer-Field>
<div>
<customer-Field
v-if=
"tab == 'field'"
></customer-Field>
<clue-rule
v-if=
"tab == 'clue'"
></clue-rule>
</div>
</q-page>
</div>
...
...
@@ -23,13 +25,15 @@
<
script
lang=
"ts"
>
import
customerField
from
'./components/customerField.vue'
import
clueRule
from
'./components/clueRule.vue'
import
{
defineComponent
,
ref
}
from
'vue'
export
default
defineComponent
({
components
:
{
customerField
customerField
,
clueRule
},
setup
()
{
return
{
...
...
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