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
bddaf54d
Commit
bddaf54d
authored
Nov 30, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
47ff3e98
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
507 additions
and
486 deletions
+507
-486
package.json
package.json
+1
-0
quasar.conf.js
quasar.conf.js
+1
-1
Cascader.vue
src/components/common/Cascader.vue
+0
-1
departmentStaff.vue
src/components/common/departmentStaff.vue
+3
-3
customerModule.ts
src/module/customer/customerModule.ts
+137
-57
CustomerOperation.vue
src/pages/customer/components/CustomerOperation.vue
+230
-206
customer.vue
src/pages/customerManage/customer.vue
+135
-218
No files found.
package.json
View file @
bddaf54d
...
...
@@ -22,6 +22,7 @@
"
lockr
"
:
"^0.9.0-beta.0"
,
"
lodash
"
:
"^4.17.21"
,
"
mermaid
"
:
"^8.12.1"
,
"
naive-ui
"
:
"^2.21.2"
,
"
quasar
"
:
"^2.0.0"
,
"
quasar-tiptap-branch
"
:
"^1.8.1"
,
"
vue-i18n
"
:
"^9.0.0"
,
...
...
quasar.conf.js
View file @
bddaf54d
...
...
@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot
:
[
'i18n'
,
'axios'
,
'dict'
,
'permission'
,
'globalcmp'
,
'antDesign'
],
boot
:
[
'i18n'
,
'axios'
,
'dict'
,
'permission'
,
'globalcmp'
,
'antDesign'
,
'naiveUI'
],
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css
:
[
'app.scss'
],
...
...
src/components/common/Cascader.vue
View file @
bddaf54d
...
...
@@ -245,7 +245,6 @@ export default {
const
index
=
checkbox
.
value
.
indexOf
(
checkVal
)
//父级id数组
arr
.
map
(
e
=>
{
const
child
=
e
[
props
.
optionChildren
]
if
(
checkVal
==
e
[
props
.
optionValue
])
{
if
(
index
>
-
1
)
{
...
...
src/components/common/departmentStaff.vue
View file @
bddaf54d
...
...
@@ -10,7 +10,7 @@
>
<q-card
style=
"width: 600px;height:600px; max-width: 80vw;"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
选择部门
/员工
</div>
<div
class=
"text-h6"
>
选择部门
<span
v-if=
"showType===0"
>
/员工
</span>
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
...
...
@@ -50,7 +50,7 @@
/>
</div>
<div
class=
"col-6 q-px-sm"
>
<div
class=
"list-title"
>
已选择的部门
或成员
</div>
<div
class=
"list-title"
>
已选择的部门
<span
v-if=
"showType===0"
>
或成员
</span>
</div>
<div
class=
"q-pb-none col-12 list-box"
>
<div
v-for=
"(item,index) in selectArray"
:key=
"index"
class=
"list-item"
>
<div
class=
"flex-center"
>
...
...
@@ -75,7 +75,7 @@
<q-card-actions
align=
"right"
class=
"bg-white text-teal"
>
<q-btn
flat
label=
"取消"
v-close-popup
/>
<q-btn
color=
"primary"
@
click=
"goback"
label=
"确定"
/>
<q-btn
color=
"primary"
@
click=
"goback"
flat
label=
"确定"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
src/module/customer/customerModule.ts
View file @
bddaf54d
...
...
@@ -5,9 +5,16 @@
// import { UserGetter } from '@/store/modules/user/getters'
// import { dispatchAction, getStoreGetter, setStoreState } from '@/store/utils'
// import message from '@/utils/message'
import
{
StaticConfig
}
from
'@/config/app'
import
{
ref
,
reactive
}
from
'vue'
import
customer2
,
{
CutomerParams
}
from
'@/api/customer2'
import
{
StaticConfig
}
from
'@/config/app'
import
{
ref
,
reactive
}
from
'vue'
import
customer2
,
{
CutomerParams
}
from
'@/api/customer2'
interface
Params
{
selectVal
:
string
selectWay
:
number
...
...
@@ -19,22 +26,23 @@ interface customParams {
customWay
:
number
}
interface
friendParams
{
frendArr
:
Array
<
number
>
wayArr
:
Array
<
number
>
frendArr
:
Array
<
number
>
wayArr
:
Array
<
number
>
}
interface
memberParams
{
newId
:
number
|
string
DataType
:
number
|
string
DeptId
:
number
ChildList
:
Array
<
any
>
ChildList
:
Array
<
any
>|
null
}
interface
dataParams
{
columns
:
Array
<
any
>
dataList
:
Array
<
any
>
WayList
:
Array
<
any
>
selected
:
Array
<
any
>
EmployeeList
:
Array
<
memberParams
>
defaultArray
:
Array
<
number
|
string
>
columns
:
Array
<
any
>
dataList
:
Array
<
any
>
WayList
:
Array
<
any
>
selected
:
Array
<
any
>
EmployeeList
:
Array
<
memberParams
>
defaultArray
:
Array
<
number
|
string
>
CascaderValue
:
Array
<
any
>
|
string
}
const
CustomerModule
=
()
=>
{
//调用方法
...
...
@@ -64,15 +72,21 @@ const CustomerModule = () => {
if
(
data
.
EmployeeList
.
length
==
0
)
return
data
.
EmployeeList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
if
(
x
.
DataType
===
2
)
{
x
.
ChildList
=
null
}
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
})
})
}
const
getChildList
=
(
ChildList
:
Array
<
any
>
)
=>
{
const
getChildList
=
(
ChildList
:
Array
<
any
>
)
=>
{
ChildList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
DataType
===
2
)
{
x
.
ChildList
=
null
}
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
...
...
@@ -85,31 +99,76 @@ const CustomerModule = () => {
})
//日期对象
// const daySelect =
const
data
=
reactive
<
dataParams
>
({
columns
:
[
{
const
data
=
reactive
<
dataParams
>
({
columns
:
[{
name
:
'CustomerName'
,
label
:
'客户'
,
field
:
'CustomerName'
,
align
:
'left'
},
{
name
:
'StageName'
,
align
:
'center'
,
field
:
'StageName'
,
label
:
'客户阶段'
},
{
name
:
'LableList'
,
label
:
'客户标签'
,
field
:
'LableList'
,
align
:
'left'
},
{
name
:
'carbs'
,
label
:
'内容标签'
,
field
:
'carbs'
,
align
:
'left'
},
{
name
:
'CreateTime'
,
label
:
'创建时间'
,
field
:
'CreateTime'
,
align
:
'left'
},
{
name
:
'sodium'
,
label
:
'负责人'
,
field
:
'sodium'
,
align
:
'left'
},
{
name
:
'LastFollowUpTime'
,
label
:
'上次跟进'
,
field
:
'LastFollowUpTime'
,
align
:
'left'
},
{
name
:
'Source'
,
label
:
'渠道活码来源'
,
field
:
'Source'
,
align
:
'left'
},
{
name
:
'StageName'
,
align
:
'center'
,
field
:
'StageName'
,
label
:
'客户阶段'
},
{
name
:
'LableList'
,
label
:
'客户标签'
,
field
:
'LableList'
,
align
:
'left'
},
{
name
:
'carbs'
,
label
:
'内容标签'
,
field
:
'carbs'
,
align
:
'left'
},
{
name
:
'CreateTime'
,
label
:
'创建时间'
,
field
:
'CreateTime'
,
align
:
'left'
},
{
name
:
'sodium'
,
label
:
'负责人'
,
field
:
'sodium'
,
align
:
'left'
},
{
name
:
'LastFollowUpTime'
,
label
:
'上次跟进'
,
field
:
'LastFollowUpTime'
,
align
:
'left'
},
{
name
:
'Source'
,
label
:
'渠道活码来源'
,
field
:
'Source'
,
align
:
'left'
},
// { name: 'num', label: '7日内客户回复消息数', align: 'left'},
// { name: 'num', label: '7日内员工发送消息数', align: 'left'},
{
name
:
'FriendTime'
,
label
:
'添加好友时间'
,
field
:
'FriendTime'
,
align
:
'left'
},
{
name
:
'CheckInNum'
,
label
:
'签到拜访'
,
field
:
'CheckInNum'
,
align
:
'left'
}
{
name
:
'FriendTime'
,
label
:
'添加好友时间'
,
field
:
'FriendTime'
,
align
:
'left'
},
{
name
:
'CheckInNum'
,
label
:
'签到拜访'
,
field
:
'CheckInNum'
,
align
:
'left'
}
],
selected
:
[],
dataList
:
[],
WayList
:
[],
EmployeeList
:
[],
defaultArray
:
[]
//
defaultArray
:
[],
//
CascaderValue
:
""
})
const
msg
=
reactive
({
PageIndex
:
1
,
...
...
@@ -133,8 +192,7 @@ const CustomerModule = () => {
OrderBy
:
1
,
//排序
AddCondition
:
0
//查询条件
})
const
TypeList
=
reactive
([
{
const
TypeList
=
reactive
([{
Name
:
'企业'
,
Id
:
0
},
...
...
@@ -151,8 +209,7 @@ const CustomerModule = () => {
Id
:
3
}
])
const
TimeList
=
reactive
([
{
const
TimeList
=
reactive
([{
Name
:
'客户创建时间'
,
Id
:
1
},
...
...
@@ -162,8 +219,7 @@ const CustomerModule = () => {
}
])
//自定义客户筛选
const
CustomList
=
reactive
([
{
const
CustomList
=
reactive
([{
Name
:
'好友关系'
,
Id
:
1
},
...
...
@@ -176,8 +232,7 @@ const CustomerModule = () => {
Id
:
3
}
])
const
friendOptions
=
reactive
([
{
const
friendOptions
=
reactive
([{
Name
:
'好友客户'
,
Id
:
1
},
...
...
@@ -190,17 +245,17 @@ const CustomerModule = () => {
Id
:
3
}
])
const
SeletObj
=
reactive
<
Params
>
({
const
SeletObj
=
reactive
<
Params
>
({
selectVal
:
''
,
selectWay
:
0
})
const
TimeObj
=
reactive
<
timeParams
>
({
const
TimeObj
=
reactive
<
timeParams
>
({
timeWay
:
1
})
const
customSetObj
=
reactive
<
customParams
>
({
const
customSetObj
=
reactive
<
customParams
>
({
customWay
:
1
})
const
friendObj
=
reactive
<
friendParams
>
({
const
friendObj
=
reactive
<
friendParams
>
({
frendArr
:
[],
wayArr
:
[]
})
...
...
@@ -229,34 +284,59 @@ const CustomerModule = () => {
getCustomerList
(
msg
)
}
const
getChild
=
(
deptArray
:
any
)
=>
{
//数据处理 获取夏利是 1-2 前面代表部门还是人员
后面是原生ID
if
(
deptArray
.
_value
)
{
const
Type
=
deptArray
.
_value
.
split
(
'-'
)[
0
]
;
const
MyId
=
deptArray
.
_value
.
split
(
'-'
)[
1
]
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID
if
(
deptArray
.
_value
)
{
const
Type
=
deptArray
.
_value
.
split
(
'-'
)[
0
]
const
MyId
=
deptArray
.
_value
.
split
(
'-'
)[
1
]
//1部门
if
(
Type
==
1
)
{
if
(
Type
==
1
)
{
msg
.
DeptId
=
MyId
}
//2人员
if
(
Type
==
2
)
{
if
(
Type
==
2
)
{
msg
.
EmpId
=
MyId
}
}
else
{
msg
.
DeptId
=
0
;
msg
.
EmpId
=
0
;
}
else
{
msg
.
DeptId
=
0
msg
.
EmpId
=
0
}
getCustomerList
(
msg
)
}
const
getCkedFriend
=
(
e
:
any
)
=>
{
const
Ids
=
e
.
map
((
x
:
any
)
=>
{
return
x
.
Id
}).
toString
();
msg
.
Q_Friends
=
Ids
;
const
getCkedFriend
=
(
e
:
any
)
=>
{
const
Ids
=
e
.
map
((
x
:
any
)
=>
{
return
x
.
Id
})
.
toString
()
msg
.
Q_Friends
=
Ids
getCustomerList
(
msg
)
}
const
CascaderUpdateValue
=
(
val
)
=>
{
console
.
log
(
'val'
,
val
)
}
return
{
getCustomerList
,
getWayList
,
getEmployeeData
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
,
CustomList
,
customSetObj
,
friendObj
,
friendOptions
,
getChild
,
getCkedFriend
}
return
{
getCustomerList
,
getWayList
,
getEmployeeData
,
data
,
msg
,
title
,
TypeList
,
SeletObj
,
getSelectWay
,
TimeObj
,
TimeList
,
changePage
,
pagination
,
CustomList
,
customSetObj
,
friendObj
,
friendOptions
,
getChild
,
getCkedFriend
,
CascaderUpdateValue
}
}
export
default
CustomerModule
src/pages/customer/components/CustomerOperation.vue
View file @
bddaf54d
This diff is collapsed.
Click to expand it.
src/pages/customerManage/customer.vue
View file @
bddaf54d
This diff is collapsed.
Click to expand it.
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