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
8acb4f83
Commit
8acb4f83
authored
Nov 12, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
38089aef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
12 deletions
+183
-12
customer2.ts
src/api/customer2.ts
+9
-0
customerModule.ts
src/module/customer/customerModule.ts
+56
-4
customer.vue
src/pages/customerManage/customer.vue
+118
-8
No files found.
src/api/customer2.ts
View file @
8acb4f83
...
...
@@ -49,6 +49,15 @@ class CustomerService {
data
})
}
//获取途径下拉数据
static
async
getWayList
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/GetCustomerAddWayEnumList'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
}
export
{
CutomerParams
}
export
default
CustomerService
src/module/customer/customerModule.ts
View file @
8acb4f83
...
...
@@ -15,6 +15,13 @@ interface Params {
interface
timeParams
{
timeWay
:
number
}
interface
customParams
{
customWay
:
number
}
interface
friendParams
{
frendArr
:
Array
<
number
>
wayArr
:
Array
<
number
>
}
const
CustomerModule
=
()
=>
{
//调用方法
const
getCustomerList
=
(
param
:
CutomerParams
)
=>
{
...
...
@@ -26,11 +33,22 @@ const CustomerModule = () => {
}
})
}
//调用获取下拉
const
getWayList
=
(
param
:
any
)
=>
{
customer2
.
getWayList
(
param
).
then
(
res
=>
{
console
.
log
(
res
,
'下拉数据'
);
if
(
res
.
data
.
Code
==
1
){
data
.
WayList
=
res
.
data
.
Data
;
}
})
}
const
title
=
ref
(
StaticConfig
.
appsuffix
)
//控制页显示条数
const
pagination
=
reactive
({
rowsPerPage
:
0
})
//日期对象
// const daySelect =
const
data
=
reactive
({
columns
:[{
name
:
'CustomerName'
,
...
...
@@ -51,7 +69,8 @@ const CustomerModule = () => {
{
name
:
'CheckInNum'
,
label
:
'签到拜访'
,
field
:
'CheckInNum'
,
align
:
'left'
},
],
selected
:[],
dataList
:[]
dataList
:[],
WayList
:[]
})
const
msg
=
reactive
({
PageIndex
:
1
,
...
...
@@ -94,12 +113,40 @@ const CustomerModule = () => {
Name
:
'好友添加时间'
,
Id
:
2
}])
//自定义客户筛选
const
CustomList
=
reactive
([{
Name
:
'好友关系'
,
Id
:
1
},{
Name
:
'获取途径'
,
Id
:
2
},{
Name
:
'未跟进客户'
,
Id
:
3
}])
const
friendOptions
=
reactive
([{
Name
:
'好友客户'
,
Id
:
1
},{
Name
:
'待添加'
,
Id
:
2
},{
Name
:
'已申请'
,
Id
:
3
}])
const
SeletObj
:
Params
=
reactive
({
selectVal
:
''
,
selectWay
:
0
})
const
TimeObj
:
timeParams
=
reactive
({
timeWay
:
0
timeWay
:
1
})
const
customSetObj
:
customParams
=
reactive
({
customWay
:
1
})
const
friendObj
:
friendParams
=
reactive
({
frendArr
:[],
wayArr
:[]
})
//选择方式
const
getSelectWay
=
()
=>
{
...
...
@@ -121,11 +168,16 @@ const CustomerModule = () => {
msg
.
CustomerMobile
=
SeletObj
.
selectVal
;
}
}
const
getSelectTime
=
()
=>
{
console
.
log
(
TimeObj
,
'TimeObj'
);
}
const
changePage
=
(
val
:
any
)
=>
{
console
.
log
(
val
);
msg
.
PageIndex
=
val
;
getCustomerList
(
msg
);
}
return
{
getCustomerList
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
}
return
{
getCustomerList
,
getWayList
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
,
getSelectTime
,
CustomList
,
customSetObj
,
friendObj
,
friendOptions
}
}
export
default
CustomerModule
src/pages/customerManage/customer.vue
View file @
8acb4f83
...
...
@@ -11,23 +11,114 @@
</
template
>
</q-input>
</div>
<div
class=
"col-
3
"
>
<
!-- <q-select filled style="width:120px;"
@update:model-value="getSelectTime" option-value="Id" option-label="Name" v-model="TimeObj.timeWay"
<div
class=
"col-
2
"
>
<
q-select
filled
@
update:model-value=
"getSelectTime"
option-value=
"Id"
option-label=
"Name"
v-model=
"TimeObj.timeWay"
:options=
"TimeList"
emit-value
map-options
/>
<q-date v-model="days" multiple /> -->
</div>
<
template
v-if=
"TimeObj.timeWay==1"
>
<div
class=
"col-2"
>
<q-input
filled
v-model=
"msg.CreateSTime"
mask=
"date"
placeholder=
"创建时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"msg.CreateSTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"Close"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
<div
class=
"col-2"
>
<q-input
filled
v-model=
"msg.CreateETime"
mask=
"date"
placeholder=
"创建时间"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"msg.CreateETime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"Close"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</template>
<
template
v-if=
"TimeObj.timeWay==2"
>
<div
class=
"col-2"
>
<q-input
filled
v-model=
"msg.FriendSTime"
mask=
"date"
placeholder=
"添加时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"msg.FriendSTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"Close"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
<div
class=
"col-2"
>
<q-input
filled
v-model=
"msg.FriendETime"
mask=
"date"
placeholder=
"添加时间"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"msg.FriendETime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"Close"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</template>
<div
class=
"col-2"
>
<q-select
filled
option-value=
"Id"
option-label=
"Name"
v-model=
"customSetObj.customWay"
:options=
"CustomList"
emit-value
map-options
/>
</div>
<div
class=
"col-2"
v-if=
"customSetObj.customWay==1"
>
<q-select
filled
label=
"请选择"
use-chips
option-value=
"Id"
option-label=
"Name"
:options=
"friendOptions"
v-model=
"friendObj.frendArr"
multiple
/>
</div>
<div
class=
"col-2"
v-if=
"customSetObj.customWay==2"
>
<q-select
filled
label=
"请选择"
use-chips
option-value=
"Id"
option-label=
"Name"
:options=
"data.WayList"
v-model=
"friendObj.wayArr"
multiple
/>
</div>
<div
class=
"col-2"
v-if=
"customSetObj.customWay==3"
>
<q-input
filled
v-model=
"msg.Q_NotFollowUpDay"
label=
'请输入天数'
></q-input>
</div>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
style=
"margin-top:20px;"
>
<q-table
:rows=
"data.dataList"
:columns=
"data.columns"
class=
"my-sticky-header-column-table"
row-key=
"name"
v-model:pagination=
"pagination"
selection=
"multiple"
>
<
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>
<div>
<div
class=
"cutomer_Free"
>
{{
props
.
row
.
CustomerName
}}
</div>
<div
class=
"customer_Wechat"
>
{{
props
.
row
.
WeChatName
}}
</div>
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.PageIndex"
color=
"primary"
:max=
"msg.pageCount"
:input=
"true"
@
input
=
"changePage"
/>
:input=
"true"
@
update:model-value
=
"changePage"
/>
</
template
>
</q-table>
</div>
...
...
@@ -41,13 +132,16 @@
export
default
defineComponent
({
setup
()
{
let
{
getCustomerList
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
getCustomerList
,
getWayList
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
,
getSelectTime
,
CustomList
,
customSetObj
,
friendObj
,
friendOptions
}
=
CustomerModule
()
onMounted
(()
=>
{
getCustomerList
(
msg
)
getWayList
({})
})
return
{
getCustomerList
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
getCustomerList
,
getWayList
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
,
getSelectTime
,
CustomList
,
customSetObj
,
friendObj
,
friendOptions
}
}
})
...
...
@@ -59,5 +153,21 @@
}
</
style
>
<
style
lang=
"scss"
scoped
>
.cutomer_Header
{
display
:flex
;
}
.customer_Img
{
width
:
40px
;
height
:
40px
;
border-radius
:
5px
;
overflow
:
hidden
;
margin-right
:
14px
;
}
.cutomer_Free
{
color
:
#3470ff
;
font-size
:
14px
;
}
.customer_Wechat
{
color
:
#9999a8
;
}
</
style
>
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