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
0088259c
Commit
0088259c
authored
Dec 03, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户
parent
7def1715
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
491 additions
and
115 deletions
+491
-115
quasar.conf.js
quasar.conf.js
+1
-1
customer.ts
src/api/customer.ts
+34
-2
permission.ts
src/boot/permission.ts
+0
-1
import.vue
src/components/common/import.vue
+104
-0
customRight.vue
src/components/customer/customRight.vue
+26
-26
label-group.vue
src/components/customer/label-group.vue
+17
-7
request-group.vue
src/components/customer/request-group.vue
+3
-3
customerModule.ts
src/module/customer/customerModule.ts
+144
-48
groupingManageModule.ts
src/module/drainage/groupingManageModule.ts
+0
-3
customer.vue
src/pages/customerManage/customer.vue
+160
-22
customerSetup.vue
src/pages/customerManage/customerSet/customerSetup.vue
+2
-1
auth.ts
src/utils/auth.ts
+0
-1
No files found.
quasar.conf.js
View file @
0088259c
...
...
@@ -112,7 +112,7 @@ module.exports = configure(function (ctx) {
directives
:
[
'ClosePopup'
],
// Quasar plugins
plugins
:
[
'Notify'
,
'SessionStorage'
,
'Dialog'
]
plugins
:
[
'Notify'
,
'SessionStorage'
,
'Dialog'
,
'Meta'
]
},
animations
:
'all'
,
// --- includes all animations
...
...
src/api/customer.ts
View file @
0088259c
...
...
@@ -89,14 +89,22 @@ class CustomerService {
data
})
}
//
保存
客户标签
static
async
s
aveCustomLabel
(
data
:
any
):
Promise
<
HttpResponse
>
{
//
批量设置
客户标签
static
async
s
etCustomLabelBatch
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerLabelBatch'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
//设置单个客户企业标签
static
async
setCustomLabel
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerLabelSingle'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
//获取客户旅程类型枚举列表
static
async
getCustomerTripType
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/GetCustomerTripTypeEnumList'
,
{
...
...
@@ -121,6 +129,30 @@ class CustomerService {
data
})
}
//客户转移
static
async
setCustomerTransfer
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerTransfer'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
//客户放弃至公海
static
async
setCustomerAbandon
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerAbandon'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
//删除客户
static
async
delCustomerInfo
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/DelCustomerInfo'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
}
export
{
CutomerParams
}
export
default
CustomerService
src/boot/permission.ts
View file @
0088259c
...
...
@@ -28,7 +28,6 @@ router.beforeEach((to, from, next) => {
// 判断当前用户是否获取权限
loadAsyncRouter
=
true
const
allAuth
=
getUserAllMenu
()
console
.
log
(
'allAuth'
,
allAuth
)
next
({
...
to
,
replace
:
true
...
...
src/components/common/import.vue
0 → 100644
View file @
0088259c
<
template
>
<q-dialog
v-model=
"show"
class=
"col-6"
persistent
position=
"right"
full-width
maximized
@
hide=
"hideDialog"
>
<q-card
class=
"full-height"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
<slot
name=
"head"
>
导入
</slot>
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-card-section
class=
"q-pt-none"
>
<div
class=
"row"
style=
"width:800px ;max-width:800px"
>
</div>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white text-teal"
>
<q-btn
flat
label=
"取消"
v-close-popup
/>
<q-btn
color=
"primary"
unelevated
label=
"确定"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
ref
,
watch
}
from
'vue'
export
default
{
props
:
{
modelValue
:
{
type
:
Boolean
,
default
:
false
,
required
:
true
,
},
},
setup
(
props
,
ctx
)
{
let
show
=
ref
(
false
)
watch
(
()
=>
props
.
modelValue
,
val
=>
{
console
.
log
(
48
,
val
)
show
.
value
=
val
}
)
let
hideDialog
=
()
=>
{
ctx
.
emit
(
'update:modelValue'
,
false
)
}
return
{
show
,
hideDialog
}
}
}
</
script
>
<
style
scoped
>
::-webkit-scrollbar
{
height
:
7px
;
width
:
7px
;
}
::-webkit-scrollbar-thumb
{
/*滚动条里面小方块*/
border-radius
:
3px
;
background-color
:
#ddd
;
}
::-webkit-scrollbar-track-piece
{
background-color
:
#fff
;
-webkit-border-radius
:
12px
;
}
.list-title
{
height
:
50px
;
padding-bottom
:
10px
;
color
:
#606266
;
font-size
:
14px
;
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
}
.list-box
{
height
:
420px
;
overflow-y
:
scroll
;
}
.list-item
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
3px
0
0
10px
;
border-radius
:
5px
;
height
:
30px
;
}
</
style
>
src/components/c
ommon
/customRight.vue
→
src/components/c
ustomer
/customRight.vue
View file @
0088259c
...
...
@@ -445,7 +445,7 @@
>
{{ qItem.Name }}
</div>
</div>
<div
class=
"follow_Component"
style=
"flex-shrink:0"
>
<fileUpload
@
success=
"getCustomerPage
()
"
></fileUpload>
<fileUpload
@
success=
"getCustomerPage"
></fileUpload>
<!-- <div class="editer_input">
<q-input v-model="text" style="50px" maxlength="1000" type="textarea" placeholder="请填写跟进记录" />
</div>-->
...
...
@@ -497,9 +497,8 @@
<q-icon
name=
"iconfont icon-close"
size=
"15px"
/>
</div>
<labelgroup
v-
if
=
"isshowlabel"
v-
model
=
"isshowlabel"
:list=
"LableList"
@
close=
"isshowlabel = false"
@
submit=
"getlabel"
></labelgroup>
</div>
...
...
@@ -510,7 +509,7 @@ import {
ref
,
reactive
,
onMounted
,
provide
provide
,
}
from
'vue'
import
{
DownLoadFileByUrl
}
from
'@/utils/upload'
import
message
from
'@/utils/message'
...
...
@@ -546,7 +545,7 @@ export default {
provide
(
'CustomerId'
,
props
.
CustomerId
)
//客户信息保存数据
const
cutomMsg
=
reactive
<
dataParam
>
({
CustomerId
:
0
,
CustomerId
:
props
.
CustomerId
,
Type
:
2
,
CustomId
:
0
,
//自定义字段Id
Value
:
''
...
...
@@ -555,7 +554,7 @@ export default {
const
customTripMsg
=
reactive
<
dataParam
>
({
pageIndex
:
1
,
pageSize
:
10
,
CustomerId
:
0
,
CustomerId
:
props
.
CustomerId
,
Type
:
0
})
const
persistent
=
ref
(
true
)
...
...
@@ -575,8 +574,8 @@ export default {
TripPageCount
:
0
})
//获取详情数据
const
getCustomInfo
=
(
param
:
msgParam
)
=>
{
customer
.
getCustomInfo
(
param
).
then
(
res
=>
{
const
getCustomInfo
=
()
=>
{
customer
.
getCustomInfo
(
msg
).
then
(
res
=>
{
data
.
dataList
=
res
.
data
.
Data
;
data
.
FiledDetailList
=
res
.
data
.
Data
.
FiledDetailList
;
data
.
FiledDetailList
.
forEach
(
x
=>
{
...
...
@@ -595,8 +594,8 @@ export default {
})
}
//获取客户阶段下拉
const
getCustomStage
=
(
param
)
=>
{
customer
.
getCustomStageList
(
param
).
then
(
res
=>
{
const
getCustomStage
=
()
=>
{
customer
.
getCustomStageList
(
{}
).
then
(
res
=>
{
data
.
customData
=
res
.
data
.
Data
;
})
}
...
...
@@ -615,7 +614,7 @@ export default {
}
//点击单个保存自定义客户信息
const
saveCustomInfo
=
(
e
)
=>
{
cutomMsg
.
CustomerId
=
msg
.
CustomerId
;
cutomMsg
.
CustomerId
=
props
.
CustomerId
;
cutomMsg
.
CustomId
=
e
.
Id
;
cutomMsg
.
Type
=
2
;
if
(
e
.
Type
==
4
)
{
...
...
@@ -624,7 +623,7 @@ export default {
cutomMsg
.
Value
=
e
.
Value
;
}
customer
.
saveCustomInfo
(
cutomMsg
).
then
(
res
=>
{
getCustomInfo
(
msg
);
getCustomInfo
();
message
.
successMsg
(
res
.
data
.
Message
);
})
}
...
...
@@ -632,11 +631,11 @@ export default {
e
.
isShowEdit
=
!
e
.
isShowEdit
;
}
const
saveCustomGate
=
()
=>
{
cutomMsg
.
CustomerId
=
msg
.
CustomerId
;
cutomMsg
.
CustomerId
=
props
.
CustomerId
;
cutomMsg
.
Type
=
1
;
cutomMsg
.
CustomId
=
0
;
customer
.
saveCustomInfo
(
cutomMsg
).
then
(
res
=>
{
getCustomInfo
(
msg
);
getCustomInfo
();
data
.
isShowEdit
=
false
;
message
.
successMsg
(
res
.
data
.
Message
);
})
...
...
@@ -671,23 +670,23 @@ export default {
isshowlabel
.
value
=
false
;
console
.
log
(
list
);
const
labelMsg
=
reactive
<
dataParam
>
({
CustomerId
s
:
0
,
CustomerId
:
0
,
LableIds
:
''
})
labelMsg
.
CustomerId
s
=
msg
.
CustomerId
;
labelMsg
.
CustomerId
=
props
.
CustomerId
;
let
ckedArr
:
any
[]
=
[];
list
.
forEach
(
x
=>
{
ckedArr
.
push
(
x
.
Id
);
})
labelMsg
.
LableIds
=
ckedArr
.
toString
();
customer
.
s
ave
CustomLabel
(
labelMsg
).
then
(
res
=>
{
getCustomInfo
(
msg
);
customer
.
s
et
CustomLabel
(
labelMsg
).
then
(
res
=>
{
getCustomInfo
();
message
.
successMsg
(
res
.
data
.
Message
);
})
}
//获取客户旅程类型
const
getCustomerTripType
=
(
param
:
any
)
=>
{
customer
.
getCustomerTripType
(
param
).
then
(
res
=>
{
const
getCustomerTripType
=
()
=>
{
customer
.
getCustomerTripType
(
{}
).
then
(
res
=>
{
console
.
log
(
res
,
'trip数据'
);
data
.
tripTypeArr
=
res
.
data
.
Data
;
let
Obj
=
{
...
...
@@ -699,9 +698,9 @@ export default {
}
//点击旅客类型
const
getckedType
=
(
e
)
=>
{
console
.
log
(
e
,
'eee'
);
customTripMsg
.
CustomerId
=
msg
.
CustomerId
;
customTripMsg
.
Type
=
e
.
Id
;
console
.
log
(
customTripMsg
,
'customTripMsg'
);
getCustomerPage
();
}
//获取客户旅程分页列表
...
...
@@ -717,10 +716,10 @@ export default {
getCustomerPage
();
}
onMounted
(()
=>
{
getCustomInfo
(
msg
);
getCustomStage
({});
getCustomerTripType
({})
getCustomerPage
();
getCustomInfo
();
getCustomStage
();
getCustomerTripType
()
})
return
{
persistent
,
...
...
@@ -740,7 +739,8 @@ export default {
customTripMsg
,
getckedType
,
changePage
,
DownLoadFileByUrl
DownLoadFileByUrl
,
getCustomerPage
}
}
}
...
...
src/components/customer/label-group.vue
View file @
0088259c
...
...
@@ -19,7 +19,7 @@
</
style
>
<
template
>
<div
class=
"labelgroup"
>
<q-dialog
v-model=
"
alert
"
>
<q-dialog
v-model=
"
show"
@
hide=
"goclose
"
>
<q-card>
<q-card-section>
<div
class=
"text-h6"
>
标签
</div>
...
...
@@ -44,7 +44,7 @@
</div>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"goclose"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
v-close-popup
/>
<q-btn
label=
"确定"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"determine"
/>
</q-card-actions>
...
...
@@ -53,11 +53,16 @@
</div>
</
template
>
<
script
>
import
{
defineComponent
,
ref
,
onMounted
}
from
'vue'
import
{
defineComponent
,
ref
,
watch
,
onMounted
}
from
'vue'
import
customerSetService
from
'@/api/customerSet'
export
default
defineComponent
({
props
:
{
modelValue
:{
type
:
Boolean
,
default
:
false
,
required
:
true
},
list
:
{
type
:
Array
,
default
:
()
=>
[]
...
...
@@ -65,10 +70,17 @@
},
setup
(
props
,
ctx
)
{
let
show
=
ref
(
false
)
watch
(
()
=>
props
.
modelValue
,
val
=>
{
show
.
value
=
val
}
)
let
selectList
=
ref
(
props
.
list
)
let
LableList
=
ref
([])
const
goclose
=
()
=>
{
//关闭弹窗
ctx
.
emit
(
'
close'
)
ctx
.
emit
(
'
update:modelValue'
,
false
)
}
const
determine
=
()
=>
{
//确定并返回数据
ctx
.
emit
(
'submit'
,
selectList
.
value
)
...
...
@@ -126,10 +138,8 @@
onMounted
(()
=>
{
//进入页面就调用
getLabelList
()
})
return
{
alert
:
ref
(
true
)
,
show
,
goclose
,
determine
,
selectList
,
...
...
src/components/customer/request-group.vue
View file @
0088259c
...
...
@@ -90,7 +90,7 @@
</div>
<!-- StartValue -->
<div
v-if=
"x.Name == '标签' && (x.Direction == 1 || x.Direction == 2 || x.Direction == 3 || x.Direction == '')"
class=
"input_label"
@
click=
"showlabel(
x,
y)"
>
class=
"input_label"
@
click=
"showlabel(y)"
>
<div
style=
"display: flex"
v-if=
"lableList && lableList.length > 0"
>
<div
class=
"text-clamp-1 tag-select-input"
>
{{
lableList
[
0
].
Name
}}
</div>
<div
v-if=
"lableList.length > 1"
class=
"tag-select-input"
style=
"margin-left: 5px"
>
...
...
@@ -138,7 +138,7 @@
<div
class=
"border-bottom"
:style=
"
{ height: (addMsg.length * 48 - 8 - 46 - 40) / 2 + 'px' }">
</div>
</div>
</div>
<labelgroup
v-
if=
"isshowlabel"
:list=
"lableList"
@
close=
"isshowlabel = false"
@
submit=
"getlabel"
></labelgroup>
<labelgroup
v-
model=
"isshowlabel"
:list=
"lableList"
@
submit=
"getlabel"
></labelgroup>
</div>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -429,7 +429,7 @@
addMsg
.
value
.
push
(
obj
)
}
const
showlabel
=
(
x
,
y
)
=>
{
const
showlabel
=
(
y
)
=>
{
selectindex
.
value
=
y
isshowlabel
.
value
=
true
}
...
...
src/module/customer/customerModule.ts
View file @
0088259c
//
import message from '@/utils/message'
import
message
from
'@/utils/message'
import
dayjs
from
'dayjs'
import
{
Dialog
}
from
'quasar'
import
{
reactive
}
from
'vue'
import
customer
,
{
CutomerParams
}
from
'@/api/customer'
import
customer
Service
,
{
CutomerParams
}
from
'@/api/customer'
import
customerSetService
from
'@/api/customerSet'
import
{
ColumnDefaultState
}
from
'@/@types/enumHelper'
...
...
@@ -9,12 +10,12 @@ interface memberParams {
newId
:
number
|
string
DataType
:
number
|
string
DeptId
:
number
ChildList
:
Array
<
any
>
|
null
ChildList
:
Array
<
any
>
|
null
}
interface
dataParams
{
loading
:
boolean
columns
:
Array
<
any
>
sysColumns
:
Array
<
any
>
sysColumns
:
Array
<
any
>
showColumns
:
Array
<
any
>
allColumns
:
Array
<
any
>
dataList
:
Array
<
any
>
...
...
@@ -24,13 +25,14 @@ interface dataParams {
defaultArray
:
Array
<
number
|
string
>
customerCascaderValue
:
Array
<
any
>
|
string
deptCascaderValue
:
string
|
null
colLoadingFinish
:
boolean
colLoadingFinish
:
boolean
[
key
:
string
]:
any
}
const
CustomerModule
=
()
=>
{
//获取列表
const
getCustomerList
=
()
=>
{
data
.
loading
=
true
customer
.
getCustomerList
(
msg
).
then
(
res
=>
{
data
.
loading
=
true
customer
Service
.
getCustomerList
(
msg
).
then
(
res
=>
{
if
(
res
.
data
.
Code
==
1
)
{
data
.
loading
=
false
data
.
dataList
=
res
.
data
.
Data
.
PageData
...
...
@@ -40,7 +42,7 @@ const CustomerModule = () => {
}
//调用获取下拉
const
getWayList
=
(
param
:
any
)
=>
{
customer
.
getWayList
(
param
).
then
(
res
=>
{
customer
Service
.
getWayList
(
param
).
then
(
res
=>
{
if
(
res
.
data
.
Code
==
1
)
{
data
.
WayList
=
res
.
data
.
Data
}
...
...
@@ -48,7 +50,7 @@ const CustomerModule = () => {
}
//获取员工数据
const
getEmployeeData
=
()
=>
{
customer
.
getEmployeeData
({}).
then
(
res
=>
{
customer
Service
.
getEmployeeData
({}).
then
(
res
=>
{
data
.
EmployeeList
=
res
.
data
.
Data
// 重组唯一id
if
(
data
.
EmployeeList
.
length
==
0
)
return
...
...
@@ -63,7 +65,7 @@ const CustomerModule = () => {
})
})
}
const
getChildList
=
(
ChildList
:
Array
<
any
>
)
=>
{
const
getChildList
=
(
ChildList
:
Array
<
any
>
)
=>
{
ChildList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
DataType
===
2
)
{
...
...
@@ -81,6 +83,10 @@ const CustomerModule = () => {
const
data
=
reactive
<
dataParams
>
({
loading
:
false
,
isshowlabel
:
false
,
//设置标签弹窗
showTransfer
:
false
,
//转移客户弹窗
showAbandon
:
false
,
//放弃客户弹窗
showImport
:
false
,
//导入组件弹窗
columns
:
[
{
name
:
'CustomerName'
,
...
...
@@ -108,6 +114,16 @@ const CustomerModule = () => {
field
:
'carbs'
,
align
:
'left'
},
{
name
:
'CreateTime'
,
label
:
'创建时间'
,
field
:
'CreateTime'
,
align
:
'left'
,
sortable
:
true
,
sort
:
(
a
,
b
)
=>
{
return
Date
.
parse
(
a
)
-
Date
.
parse
(
b
)
}
},
{
name
:
'sodium'
,
label
:
'负责人'
,
...
...
@@ -130,7 +146,11 @@ const CustomerModule = () => {
name
:
'FriendTime'
,
label
:
'添加好友时间'
,
field
:
'FriendTime'
,
align
:
'left'
align
:
'left'
,
sortable
:
true
,
sort
:
(
a
,
b
)
=>
{
return
Date
.
parse
(
a
)
-
Date
.
parse
(
b
)
}
},
{
name
:
'CheckInNum'
,
...
...
@@ -171,7 +191,8 @@ const CustomerModule = () => {
OrderBy
:
1
,
//排序
AddCondition
:
0
//查询条件
})
const
TypeList
=
reactive
([{
const
TypeList
=
reactive
([
{
Name
:
'企业'
,
Id
:
0
},
...
...
@@ -188,7 +209,8 @@ const CustomerModule = () => {
Id
:
3
}
])
const
TimeList
=
reactive
([{
const
TimeList
=
reactive
([
{
Name
:
'客户创建时间'
,
Id
:
1
},
...
...
@@ -203,7 +225,7 @@ const CustomerModule = () => {
msg
.
FriendETime
=
''
msg
.
CreateSTime
=
''
msg
.
CreateETime
=
''
TimeObj
.
timeRange
=
null
TimeObj
.
timeRange
=
null
}
//选择时间范围
const
changeTimeRange
=
val
=>
{
...
...
@@ -218,18 +240,20 @@ const CustomerModule = () => {
msg
.
FriendETime
=
e
}
}
else
{
msg
.
FriendSTime
=
''
msg
.
FriendETime
=
''
msg
.
CreateSTime
=
''
msg
.
CreateETime
=
''
msg
.
FriendSTime
=
''
msg
.
FriendETime
=
''
msg
.
CreateSTime
=
''
msg
.
CreateETime
=
''
}
getCustomerList
()
}
//客户筛选
const
CustomList
=
reactive
([{
const
CustomList
=
reactive
([
{
label
:
'好友关系'
,
value
:
'1'
,
children
:
[{
children
:
[
{
label
:
'未添加'
,
value
:
'1-1'
},
...
...
@@ -249,11 +273,11 @@ const CustomerModule = () => {
}
])
const
SeletObj
=
reactive
({
const
SeletObj
=
reactive
({
selectVal
:
''
,
selectWay
:
0
})
const
TimeObj
=
reactive
({
const
TimeObj
=
reactive
({
timeWay
:
1
,
timeRange
:
null
})
...
...
@@ -298,34 +322,98 @@ const CustomerModule = () => {
data
.
showColumns
.
push
(
e
.
field
)
data
.
allColumns
.
push
({
name
:
e
.
label
,
value
:
e
.
field
,
visible
:
true
,
IsCustom
:
0
})
})
customerSetService
.
getCustomerFiledList
({
Enable
:
1
})
.
then
(
r
=>
{
const
tempCol
=
r
.
data
.
Data
if
(
tempCol
&&
tempCol
.
length
>
0
)
{
tempCol
.
sort
((
x
,
y
)
=>
{
return
x
.
Sort
-
y
.
Sort
})
tempCol
.
forEach
(
x
=>
{
const
tempRow
=
{
name
:
x
.
Name
,
label
:
x
.
Name
,
field
:
x
.
Name
,
align
:
'left'
}
data
.
columns
.
push
(
tempRow
)
if
(
x
.
IsDefault
==
ColumnDefaultState
.
Yes
)
{
data
.
showColumns
.
push
(
x
.
Name
)
}
data
.
allColumns
.
push
({
name
:
x
.
Name
,
value
:
x
.
Name
,
visible
:
x
.
IsDefault
==
ColumnDefaultState
.
Yes
,
data
:
x
,
IsCustom
:
1
})
})
}
//#region 添加菜单权限
data
.
columns
.
push
({
name
:
'setting'
,
label
:
'自定义列'
,
field
:
'setting'
,
align
:
'left'
})
data
.
showColumns
.
push
(
'setting'
)
//#endregion
customerSetService
.
getCustomerFiledList
({
Enable
:
1
})
.
then
(
r
=>
{
const
tempCol
=
r
.
data
.
Data
if
(
tempCol
&&
tempCol
.
length
>
0
)
{
tempCol
.
sort
((
x
,
y
)
=>
{
return
x
.
Sort
-
y
.
Sort
})
tempCol
.
forEach
(
x
=>
{
const
tempRow
=
{
name
:
x
.
Name
,
label
:
x
.
Name
,
field
:
x
.
Name
,
align
:
'left'
}
data
.
columns
.
push
(
tempRow
)
if
(
x
.
IsDefault
==
ColumnDefaultState
.
Yes
)
{
data
.
showColumns
.
push
(
x
.
Name
)
}
data
.
allColumns
.
push
({
name
:
x
.
Name
,
value
:
x
.
Name
,
visible
:
x
.
IsDefault
==
ColumnDefaultState
.
Yes
,
data
:
x
,
IsCustom
:
1
})
})
}
//#region 添加菜单权限
data
.
columns
.
push
({
name
:
'setting'
,
label
:
'自定义列'
,
field
:
'setting'
,
align
:
'left'
})
data
.
showColumns
.
push
(
'setting'
)
//#endregion
data
.
colLoadingFinish
=
true
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
()
})
})
}
return
{
getCustomerList
,
getWayList
,
...
...
@@ -344,6 +432,14 @@ const CustomerModule = () => {
CustomList
,
getDept
,
customerUpdateValue
,
showDialog
,
getlabel
,
setLabel
,
setTransfer
,
TransferMsg
,
AbandonMsg
,
setAbandon
,
delCustomer
}
}
...
...
src/module/drainage/groupingManageModule.ts
View file @
0088259c
...
...
@@ -33,9 +33,6 @@ const groupingManageModule = () => {
console
.
log
(
msg
.
Name
)
}
const
setTitle
=
(
pageTitle
:
string
,
suffix
=
true
)
=>
{
if
(
suffix
)
{
title
.
value
=
`
${
pageTitle
}
-
${
StaticConfig
.
appsuffix
}
`
...
...
src/pages/customerManage/customer.vue
View file @
0088259c
This diff is collapsed.
Click to expand it.
src/pages/customerManage/customerSet/customerSetup.vue
View file @
0088259c
...
...
@@ -35,7 +35,7 @@ import customerPhase from './components/customerPhase.vue'
import
customerlabel
from
'./components/customerlabel.vue'
import
CustomerOperation
from
"./components/CustomerOperation.vue"
import
router
from
'@/router/index'
import
{
useMeta
}
from
'quasar'
import
{
defineComponent
,
ref
...
...
@@ -51,6 +51,7 @@ export default defineComponent({
CustomerOperation
},
setup
()
{
useMeta
({
title
:
'客户设置'
})
let
tab
=
ref
<
string
>
(
'field'
)
if
(
router
.
currentRoute
.
value
.
query
&&
router
.
currentRoute
.
value
.
query
.
type
)
{
tab
.
value
=
router
.
currentRoute
.
value
.
query
.
type
as
string
...
...
src/utils/auth.ts
View file @
0088259c
...
...
@@ -16,6 +16,5 @@ export function getAuth() {
*/
export
function
getUserAllMenu
()
{
const
auths
=
getStoreGetter
<
UserGetter
>
(
'user'
,
'getUserAllAuth'
)
console
.
log
(
auths
)
return
auths
.
length
>
0
?
auths
:
ResultType
.
EmptyArray
}
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