Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
02594cbf
Commit
02594cbf
authored
Sep 24, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0378047c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
0 deletions
+195
-0
wechat.js
src/api/system/wechat.js
+10
-0
customer.vue
src/pages/enterprise/customer/customer.vue
+180
-0
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/system/wechat.js
View file @
02594cbf
...
...
@@ -555,6 +555,16 @@ export function SetSynvEduEmployee(data) {
data
})
}
/**
* 获取部门Id
*/
export
function
getEmployeeAddrBook
(
data
)
{
return
request
({
url
:
'/User/GetEmployeeAddrBook'
,
method
:
'post'
,
data
})
}
...
...
src/pages/enterprise/customer/customer.vue
0 → 100644
View file @
02594cbf
<
template
>
<div
class=
"customer page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
keyup
.
enter
.
native=
"changePage(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.Name"
label=
"企业/姓名/备注名/昵称/电话"
@
clear=
"changePage(1)"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"changePage(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.customerType"
ref=
"Id"
:options=
"ctypeList"
label=
"客户类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<q-field
filled
>
<template
v-slot:control
>
<el-date-picker
v-model=
"dateList"
@
change=
"changePage(1)"
value-format=
"yyyy-MM-dd"
type=
"daterange"
style=
"border:none;"
:picker-options=
"pickerOptions"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-3"
>
<selectTree
:treeData=
'memberList'
:defaultArray=
"returnString"
nodeKey=
"newId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门/人员"
@
getChild=
"getChild"
></selectTree>
</div>
</div>
</div>
<div
class=
"page-content"
>
</div>
</div>
</template>
<
script
>
import
selectTree
from
'../../../components/common/select-tree'
import
{
getEmployeeAddrBook
}
from
'../../../api/system/wechat'
;
export
default
{
components
:
{
selectTree
},
meta
:
{
title
:
"客户"
},
name
:
"customer"
,
data
()
{
return
{
loading
:
false
,
pickerOptions
:
{
shortcuts
:
[{
text
:
'今天'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'昨天'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
1
);
end
.
setTime
(
end
.
getTime
()
-
3600
*
1000
*
24
*
1
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近一周'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近一个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近三个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
}]
},
msg
:
{
Name
:
''
,
customerType
:
0
},
returnString
:[],
dateList
:
[],
//创建时间
ctypeList
:
[{
Id
:
0
,
Name
:
'全部客户'
},
{
Id
:
1
,
Name
:
'好友客户'
},],
memberList
:
[],
}
},
mounted
()
{
this
.
getEmployList
()
},
created
()
{
this
.
getEmployList
()
},
methods
:
{
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
e
this
.
getList
()
},
getList
()
{
},
getEmployList
()
{
getEmployeeAddrBook
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
memberList
=
res
.
Data
// 重组唯一id
if
(
this
.
memberList
&&
this
.
memberList
.
length
==
0
)
return
this
.
memberList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
){
this
.
getChildList
(
x
.
ChildList
)
}
})
}
}).
catch
(()
=>
{
})
},
getChildList
(
ChildList
){
ChildList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
){
this
.
getChildList
(
x
.
ChildList
)
}
})
},
getChild
(
deptArray
)
{
console
.
log
(
deptArray
)
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID
},
clearData
(){
}
}
}
</
script
>
<
style
>
.customer
.el-input
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.customer
.el-input__inner
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.customer
.el-range-input
{
background-color
:
transparent
!important
;
}
</
style
>
\ No newline at end of file
src/router/routes.js
View file @
02594cbf
...
...
@@ -1307,6 +1307,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/enterprise/customer/CSChild/addPhase"
)
},
{
path
:
"/enterprise/customer/customer"
,
//企微 客户管理 客户
component
:
()
=>
import
(
"pages/enterprise/customer/customer"
)
},
],
},
...
...
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