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
b6030ed5
Commit
b6030ed5
authored
Dec 07, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拆分客户页搜索栏
parent
0f4e7b9b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
506 additions
and
353 deletions
+506
-353
customerHead.vue
src/components/customer/customerHead.vue
+485
-0
customerModule.ts
src/module/customer/customerModule.ts
+6
-118
customer.vue
src/pages/customerManage/customer.vue
+15
-235
No files found.
src/components/customer/customerHead.vue
0 → 100644
View file @
b6030ed5
This diff is collapsed.
Click to expand it.
src/module/customer/customerModule.ts
View file @
b6030ed5
import
message
from
'@/utils/message'
import
dayjs
from
'dayjs'
import
{
Dialog
}
from
'quasar'
import
{
reactive
}
from
'vue'
import
customerService
,
{
CutomerParams
}
from
'@/api/customer'
import
customerSetService
from
'@/api/customerSet'
...
...
@@ -23,8 +21,6 @@ interface dataParams {
selected
:
Array
<
any
>
EmployeeList
:
Array
<
memberParams
>
defaultArray
:
Array
<
number
|
string
>
customerCascaderValue
:
Array
<
any
>
|
string
deptCascaderValue
:
string
|
null
colLoadingFinish
:
boolean
[
key
:
string
]:
any
}
...
...
@@ -83,14 +79,6 @@ const CustomerModule = () => {
const
data
=
reactive
<
dataParams
>
({
loading
:
false
,
isshowlabel
:
false
,
//设置标签弹窗
showTransfer
:
false
,
//转移客户弹窗
showAbandon
:
false
,
//放弃客户弹窗
showImport
:
false
,
//导入组件弹窗
showDptDialog
:
false
,
//部门弹窗
DptDialogArr
:
[],
DistributionRule
:
1
,
importTab
:
1
,
columns
:
[
{
name
:
'CustomerName'
,
...
...
@@ -169,9 +157,7 @@ const CustomerModule = () => {
dataList
:
[],
WayList
:
[],
EmployeeList
:
[],
defaultArray
:
[],
//
deptCascaderValue
:
null
,
customerCascaderValue
:
''
,
defaultArray
:
[],
colLoadingFinish
:
false
})
const
msg
=
reactive
<
CutomerParams
>
({
...
...
@@ -309,18 +295,7 @@ const CustomerModule = () => {
msg
.
PageIndex
=
val
getCustomerList
()
}
const
getDept
=
(
id
:
any
)
=>
{
//数据处理 获取id是 1-id,2-id 前面1代表部门2代表人员 后面是原生ID
if
(
id
)
{
msg
.
EmpId
=
id
.
slice
(
2
)
}
else
{
msg
.
EmpId
=
0
}
getCustomerList
()
}
const
customerUpdateValue
=
val
=>
{
console
.
log
(
'customerUpdateValue'
,
val
)
}
data
.
sysColumns
.
map
(
e
=>
{
data
.
columns
.
push
(
e
)
data
.
showColumns
.
push
(
e
.
field
)
...
...
@@ -352,84 +327,10 @@ const CustomerModule = () => {
data
.
colLoadingFinish
=
true
})
const
showDialog
=
(
dialogName
)
=>
{
data
[
dialogName
]
=
true
}
const
getlabel
=
val
=>
{
const
ids
=
val
.
map
(
e
=>
e
.
Id
).
toString
()
setLabel
(
ids
)
}
const
setLabel
=
(
id
)
=>
{
const
labelMsg
=
{
CustomerIds
:
data
.
selected
.
map
(
e
=>
e
.
Id
).
toString
(),
LableIds
:
id
}
customerService
.
setCustomLabelBatch
(
labelMsg
).
then
(
res
=>
{
message
.
successMsg
(
res
.
data
.
Message
)
getCustomerList
()
})
}
const
TransferMsg
=
reactive
({
CustomerIds
:
''
,
EmpId
:
0
})
const
setTransfer
=
async
()
=>
{
TransferMsg
.
CustomerIds
=
data
.
selected
.
map
(
e
=>
e
.
Id
).
toString
()
await
customerService
.
setCustomerTransfer
(
TransferMsg
).
then
(
res
=>
{
message
.
successMsg
(
res
.
data
.
Message
)
getCustomerList
()
data
.
showTransfer
=
false
})
TransferMsg
.
EmpId
=
0
}
const
AbandonMsg
=
reactive
({
CustomerIds
:
''
,
Reason
:
""
})
const
setAbandon
=
async
()
=>
{
AbandonMsg
.
CustomerIds
=
data
.
selected
.
map
(
e
=>
e
.
Id
).
toString
()
await
customerService
.
setCustomerAbandon
(
AbandonMsg
).
then
(
res
=>
{
message
.
successMsg
(
res
.
data
.
Message
)
getCustomerList
()
data
.
showAbandon
=
false
})
AbandonMsg
.
Reason
=
''
}
const
delCustomer
=
()
=>
{
Dialog
.
create
({
title
:
'确认删除?'
,
message
:
"请输入'删除'"
,
prompt
:
{
model
:
''
,
isValid
:
val
=>
val
==
'删除'
,
// << here is the magic
outlined
:
true
},
cancel
:
'取消'
,
ok
:
'确认'
}).
onOk
(()
=>
{
const
delMsg
=
{
CustomerIds
:
data
.
selected
.
map
(
e
=>
e
.
Id
).
toString
()
}
customerService
.
delCustomerInfo
(
delMsg
).
then
(
res
=>
{
message
.
successMsg
(
res
.
data
.
Message
)
data
.
selected
=
[]
getCustomerList
()
})
})
}
const
getFile
=
(
val
)
=>
{
console
.
log
(
"文件"
,
val
)
}
const
showdept
=
()
=>
{
data
.
showDptDialog
=
true
}
//导入是获取部门arr
const
getDeptDig
=
(
arr
:
any
)
=>
{
//数据处理 获取id是 1-id,2-id 前面1代表部门2代表人员 后面是原生ID
console
.
log
(
425
,
arr
)
data
.
DptDialogArr
=
arr
}
return
{
getCustomerList
,
getWayList
,
...
...
@@ -446,19 +347,6 @@ const CustomerModule = () => {
changePage
,
pagination
,
CustomList
,
getDept
,
customerUpdateValue
,
showDialog
,
getlabel
,
setLabel
,
setTransfer
,
TransferMsg
,
AbandonMsg
,
setAbandon
,
delCustomer
,
getFile
,
getDeptDig
,
showdept
}
}
...
...
src/pages/customerManage/customer.vue
View file @
b6030ed5
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