Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
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
华国豪
CRM
Commits
92b88e3c
Commit
92b88e3c
authored
Apr 24, 2022
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/crm
parents
ca09eb14
71ca592a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
2147 additions
and
1347 deletions
+2147
-1347
clueManagement.vue
src/components/clueManagement/clueManagement.vue
+52
-3
customerConfiguration.vue
src/components/customerManage/customerConfiguration.vue
+16
-274
customerSource.vue
src/components/customerManage/customerSource.vue
+294
-0
distributionRules.vue
src/components/customerManage/distributionRules.vue
+155
-0
addCustomer.vue
src/components/dialogModel/addCustomer.vue
+1
-1
addDistributionRules.vue
src/components/dialogModel/addDistributionRules.vue
+243
-0
editGuestTeam.vue
src/components/dialogModel/editGuestTeam.vue
+196
-0
editGuestTeamPower.vue
src/components/dialogModel/editGuestTeamPower.vue
+131
-0
Details.vue
src/components/guestManagement/Details.vue
+0
-1
TeamMembers.vue
src/components/guestManagement/TeamMembers.vue
+0
-205
customerInfoBox.vue
src/components/guestManagement/customerInfoBox.vue
+236
-225
guestManagement.vue
src/components/guestManagement/guestManagement.vue
+260
-260
guestTeam.vue
src/components/guestManagement/guestTeam.vue
+186
-0
index.js
src/plugins/index.js
+55
-64
login.vue
src/views/login.vue
+322
-314
No files found.
src/components/clueManagement/clueManagement.vue
View file @
92b88e3c
...
...
@@ -146,18 +146,21 @@
v-if=
"queryType[0].show"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
@
click=
"openDetails(scope)"
class=
"font-color-link cp"
>
{{
scope
.
row
.
Clue
Name
}}
</p>
<p
@
click=
"openDetails(scope)"
class=
"font-color-link cp"
>
{{
msg
.
CustomerType
===
1
?
scope
.
row
.
ClueName
:
scope
.
row
.
Customer
Name
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"CustomerSourceTypeStr"
label=
"线索来源"
v-if=
"queryType[1].show"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerSource"
label=
"来源细分"
v-if=
"queryType[2].show && msg.CustomerType === 1"
show-overflow-tooltip
>
<!-- CustomerSource 其他的来源 -->
<el-table-column
prop=
"SourceAccountName"
label=
"来源细分"
v-if=
"queryType[2].show && msg.CustomerType === 1"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"ClueDemand"
label=
"需求"
v-if=
"queryType[3].show && msg.CustomerType === 1"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerLevelStr"
label=
"客户级别"
sortable
width=
"100"
v-if=
"queryType[4].show && msg.CustomerType === 0"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerName"
label=
"联系人"
v-if=
"queryType[5].show"
show-overflow-tooltip
>
<el-table-column
prop=
"Contact"
label=
"联系人"
v-if=
"queryType[5].show&&msg.CustomerType!=1"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"CustomerName"
label=
"联系人"
v-if=
"queryType[5].show&&msg.CustomerType===1"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"MobilePhone"
label=
"联系电话"
sortable
v-if=
"queryType[6].show"
show-overflow-tooltip
>
</el-table-column>
...
...
@@ -255,6 +258,7 @@
},
data
()
{
return
{
ruleList
:[],
guestDialogBoxShow
:
false
,
drawer2
:
false
,
activeMenu
:
1
,
...
...
@@ -583,6 +587,37 @@
this
.
multipleSelection
.
push
(
this
.
CustomerId
)
}
this
.
transferVisible
=
true
return
if
(
this
.
ruleList
.
length
==
0
){
this
.
transferVisible
=
true
}
else
{
let
tips
=
'系统已开启自动分配,无法指定推送,是否继续推送?'
this
.
$confirm
(
tips
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
ids
if
(
this
.
CustomerId
){
ids
=
this
.
CustomerId
}
else
{
ids
=
this
.
multipleSelection
.
join
(
','
)
}
this
.
apipost
(
'/api/Customer/AutoTransferCustomer'
,
{
IDs
:
ids
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
}
}
else
{
if
(
this
.
transferMsg
.
EmpId
===
''
)
{
return
this
.
$message
.
error
(
'请选择变更负责人!'
)
...
...
@@ -635,6 +670,15 @@
this
.
drawer2
=
true
}
},
// 获取是否开启规则
GetCustomerAllotRule
(){
this
.
apipost
(
'/api/Customer/GetCustomerAllotRule'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ruleList
=
res
.
data
.
data
.
EmpList
}
})
},
handleSizeChange
(
val
)
{
this
.
msg
.
pageSize
=
val
this
.
getList
();
...
...
@@ -656,6 +700,11 @@
this
.
loading
=
false
;
}
})
if
(
this
.
msg
.
CustomerType
==
1
){
// 获取是否开启规则
this
.
GetCustomerAllotRule
()
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
x
=>
...
...
src/components/customerManage/customerConfiguration.vue
View file @
92b88e3c
...
...
@@ -18,110 +18,6 @@
padding
:
0
20px
;
background-color
:
#fff
;
}
/* .customerManage .tools{
padding-top: 20px;
} */
.vux-flexbox
{
width
:
100%
;
text-align
:
left
;
display
:
flex
;
box-align
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
}
.vux-flex-row
{
box-direction
:
row
;
box-orient
:
horizontal
;
-webkit-box-orient
:
horizontal
;
-ms-flex-direction
:
row
;
flex-direction
:
row
;
}
.el-table__fixed-body-wrapper
table
{
padding-bottom
:
8px
!important
;
}
.scene-container
{
position
:
relative
;
width
:
180px
;
}
.scene-list
{
max-height
:
240px
;
overflow-y
:
auto
;
font-size
:
12px
;
margin-bottom
:
10px
;
}
.scene-list
.scene-list-item
{
color
:
#333
;
padding
:
10px
15px
;
cursor
:
pointer
;
background-color
:
#fff
;
}
.scene-list
.scene-list-item-select
,
.scene-list
.scene-list-item
::before
{
background-color
:
#f7f8fa
;
color
:
#2362fb
;
}
.handle-interval
{
border-top
:
1px
solid
#efefef
;
}
.handle-button
{
padding
:
6px
20px
;
font-size
:
12px
;
cursor
:
pointer
;
color
:
#2362fb
;
}
.handle-button
.handle-button-icon
{
margin-right
:
8px
;
margin-top
:
3px
;
}
.handle-button
.handle-button-name
{
font-size
:
12px
;
}
.popover-class
{
padding
:
0
!important
;
}
.select-no
{
display
:
none
;
}
.scene-wrapper
{
min-height
:
50px
;
background
:
#fff
;
border-top
:
1px
solid
#e1e1e1
;
font-size
:
13px
;
overflow-x
:
scroll
;
color
:
#aaa
;
margin-top
:
20px
;
}
.scene-wrapper
.list
,
.scene-wrapper
{
width
:
100%
;
display
:
flex
;
-webkit-box-pack
:
start
;
-ms-flex-pack
:
start
;
justify-content
:
flex-start
;
}
.scene-wrapper
.list
{
-ms-flex-negative
:
0
;
flex-shrink
:
0
;
}
.scene-wrapper
.list
.list-item
{
height
:
30px
;
padding
:
0
10px
;
margin
:
10px
15px
0
0
;
border
:
1px
solid
#e1e1e1
;
border-radius
:
3px
;
-ms-flex-negative
:
0
;
flex-shrink
:
0
;
display
:
flex
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
}
.scene-wrapper
.list
.list-item
.icon
{
margin-left
:
20px
;
cursor
:
pointer
;
}
</
style
>
<
template
>
<div
class=
"customerManage"
>
...
...
@@ -130,194 +26,40 @@
:class=
"selectTitle==item.id?'active':''"
@
click=
"clickTitle(item)"
>
{{
item
.
title
}}
</div>
</div>
<div
class=
"tools"
></div>
<div
class=
"page-content"
>
<el-table
v-loading=
"loading"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
:height=
"sceneList.length > 0 ? '600' : '660'"
border
row-class-name=
"font-size-12"
>
<el-table-column
fixed
prop=
"CustomerName"
label=
"渠道"
width=
"120"
align=
"center"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
class=
"cp"
>
{{
scope
.
row
.
Name
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"IsAppLogin"
label=
"账号"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<div
class=
"SelectedAccount_box"
>
<el-tag
class=
"SelectedAccount"
v-for=
"(item,index) in scope.row.list"
:key=
"index"
closable
@
click=
"editAccount(item)"
@
close=
"handleClose(item)"
>
{{
item
.
Name
}}
</el-tag>
</div>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"IsCarefor"
fixed=
"right"
width=
"100"
label=
"新建"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"button-new-tag"
size=
"small"
@
click=
"addAccount(scope.row)"
>
+ 账号
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<div>
</div>
<!-- 添加账号弹窗 -->
<div
v-if=
"addCustomerShow"
>
<addCustomer
:obj=
"newObj"
@
addCustomerOk=
"addCustomerOk"
/>
</div>
<!-- 客户来源 -->
<customerSource
v-if=
"selectTitle==1"
></customerSource>
<!-- 分配规则 -->
<distributionRules
v-if=
"selectTitle==2"
></distributionRules>
</div>
</
template
>
<
script
>
import
addCustomer
from
"../dialogModel/addCustomer"
;
import
customerSource
from
"./customerSource"
;
import
distributionRules
from
"./distributionRules"
;
export
default
{
components
:
{
addCustomer
customerSource
,
distributionRules
},
data
()
{
return
{
newObj
:{},
list
:[],
selectTitle
:
1
,
headerList
:[
{
title
:
'客户来源'
,
id
:
1
}
],
visible
:
false
,
CustomerId
:
0
,
CustomerIdStr
:
''
,
addCustomerShow
:
false
,
loading
:
false
,
tableData
:[],
sceneList
:[]
{
title
:
'客户来源'
,
id
:
1
},
{
title
:
'分配规则'
,
id
:
2
},
]
};
},
mounted
()
{
this
.
getList
()
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeCustomerDialogBox'
,
function
(){
$this
.
dialogTableVisible
=
false
})
this
.
MsgBus
.
$on
(
'closeaaddCustomer'
,
function
(){
$this
.
addCustomerShow
=
false
})
},
beforeDestroy
()
{
this
.
MsgBus
.
$off
(
'sceneSave'
);
this
.
MsgBus
.
$off
(
'editScene'
);
},
methods
:
{
addCustomerOk
(){
this
.
addCustomerShow
=
false
this
.
getList
()
},
editAccount
(
row
){
this
.
newObj
=
{
ID
:
row
.
ID
,
SNO
:
row
.
SNO
,
Name
:
row
.
Name
,
title
:
'编辑账号'
}
setTimeout
(()
=>
{
this
.
addCustomerShow
=
true
},
100
)
},
addAccount
(
row
){
this
.
newObj
=
{
ID
:
row
.
ID
,
title
:
'新建账号'
}
setTimeout
(()
=>
{
this
.
addCustomerShow
=
true
},
100
)
beforeDestroy
()
{
},
},
methods
:
{
clickTitle
(
item
){
this
.
selectTitle
=
item
.
id
},
//删除
handleClose
(
row
){
let
tips
=
'确定将这条账号删除?'
tips
=
'是否把账号“'
+
row
.
Name
+
'”删除?'
this
.
$confirm
(
tips
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'/api/Customer/DelGuestSourceAccount'
,
{
SAccountId
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
getList
:
function
(){
this
.
tableData
=
[]
this
.
loading
=
true
this
.
apipost
(
'/api/Customer/GetCustomerSourceEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
list
=
[]
});
};
addList
(
data
);
this
.
tableData
=
res
.
data
.
data
;
this
.
loading
=
false
;
this
.
getGetGuestSourceAccountList
()
}
})
},
getGetGuestSourceAccountList
(){
this
.
apipost
(
'/api/Customer/GetGuestSourceAccountList'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
list
=
res
.
data
.
data
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
list
.
length
;
j
++
){
if
(
this
.
tableData
[
i
].
ID
==
this
.
list
[
j
].
SNO
){
let
obj
=
{
ID
:
this
.
list
[
j
].
ID
,
Name
:
this
.
list
[
j
].
Name
,
SNO
:
this
.
list
[
j
].
SNO
,
UpdateBy
:
this
.
list
[
j
].
UpdateBy
,
UpdateDate
:
this
.
list
[
j
].
UpdateDate
,
}
this
.
tableData
[
i
].
list
.
push
(
obj
)
}
}
}
}
})
},
}
};
</
script
>
src/components/customerManage/customerSource.vue
0 → 100644
View file @
92b88e3c
<
style
>
@import
'../../assets/css/customerManage.css'
;
.SelectedAccount_box
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.SelectedAccount
{
margin
:
5px
;
}
.vux-flexbox
{
width
:
100%
;
text-align
:
left
;
display
:
flex
;
box-align
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
}
.vux-flex-row
{
box-direction
:
row
;
box-orient
:
horizontal
;
-webkit-box-orient
:
horizontal
;
-ms-flex-direction
:
row
;
flex-direction
:
row
;
}
.el-table__fixed-body-wrapper
table
{
padding-bottom
:
8px
!important
;
}
.scene-container
{
position
:
relative
;
width
:
180px
;
}
.scene-list
{
max-height
:
240px
;
overflow-y
:
auto
;
font-size
:
12px
;
margin-bottom
:
10px
;
}
.scene-list
.scene-list-item
{
color
:
#333
;
padding
:
10px
15px
;
cursor
:
pointer
;
background-color
:
#fff
;
}
.scene-list
.scene-list-item-select
,
.scene-list
.scene-list-item
::before
{
background-color
:
#f7f8fa
;
color
:
#2362fb
;
}
.handle-interval
{
border-top
:
1px
solid
#efefef
;
}
.handle-button
{
padding
:
6px
20px
;
font-size
:
12px
;
cursor
:
pointer
;
color
:
#2362fb
;
}
.handle-button
.handle-button-icon
{
margin-right
:
8px
;
margin-top
:
3px
;
}
.handle-button
.handle-button-name
{
font-size
:
12px
;
}
.popover-class
{
padding
:
0
!important
;
}
.select-no
{
display
:
none
;
}
.scene-wrapper
{
min-height
:
50px
;
background
:
#fff
;
border-top
:
1px
solid
#e1e1e1
;
font-size
:
13px
;
overflow-x
:
scroll
;
color
:
#aaa
;
margin-top
:
20px
;
}
.scene-wrapper
.list
,
.scene-wrapper
{
width
:
100%
;
display
:
flex
;
-webkit-box-pack
:
start
;
-ms-flex-pack
:
start
;
justify-content
:
flex-start
;
}
.scene-wrapper
.list
{
-ms-flex-negative
:
0
;
flex-shrink
:
0
;
}
.scene-wrapper
.list
.list-item
{
height
:
30px
;
padding
:
0
10px
;
margin
:
10px
15px
0
0
;
border
:
1px
solid
#e1e1e1
;
border-radius
:
3px
;
-ms-flex-negative
:
0
;
flex-shrink
:
0
;
display
:
flex
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
}
.scene-wrapper
.list
.list-item
.icon
{
margin-left
:
20px
;
cursor
:
pointer
;
}
</
style
>
<
template
>
<div
class=
"customerManage"
>
<div
class=
"page-content"
>
<el-table
v-loading=
"loading"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
:height=
"sceneList.length > 0 ? '600' : '660'"
border
row-class-name=
"font-size-12"
>
<el-table-column
fixed
prop=
"CustomerName"
label=
"渠道"
width=
"120"
align=
"center"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
class=
"cp"
>
{{
scope
.
row
.
Name
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"IsAppLogin"
label=
"账号"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<div
class=
"SelectedAccount_box"
>
<el-tag
class=
"SelectedAccount"
v-for=
"(item,index) in scope.row.list"
:key=
"index"
closable
@
click=
"editAccount(item)"
@
close=
"handleClose(item)"
>
{{
item
.
Name
}}
</el-tag>
</div>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"IsCarefor"
fixed=
"right"
width=
"100"
label=
"新建"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"button-new-tag"
size=
"small"
@
click=
"addAccount(scope.row)"
>
+ 账号
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<div>
</div>
<!-- 添加账号弹窗 -->
<div
v-if=
"addCustomerShow"
>
<addCustomer
:obj=
"newObj"
@
addCustomerOk=
"addCustomerOk"
/>
</div>
</div>
</template>
<
script
>
import
addCustomer
from
"../dialogModel/addCustomer"
;
export
default
{
components
:
{
addCustomer
},
data
()
{
return
{
newObj
:{},
list
:[],
visible
:
false
,
CustomerId
:
0
,
CustomerIdStr
:
''
,
addCustomerShow
:
false
,
loading
:
false
,
tableData
:[],
sceneList
:[]
};
},
mounted
()
{
this
.
getList
()
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeaaddCustomer'
,
function
(){
$this
.
addCustomerShow
=
false
})
},
beforeDestroy
()
{
this
.
MsgBus
.
$off
(
'sceneSave'
);
this
.
MsgBus
.
$off
(
'editScene'
);
},
methods
:
{
addCustomerOk
(){
this
.
addCustomerShow
=
false
this
.
getList
()
},
editAccount
(
row
){
this
.
newObj
=
{
ID
:
row
.
ID
,
SNO
:
row
.
SNO
,
Name
:
row
.
Name
,
title
:
'编辑账号'
}
setTimeout
(()
=>
{
this
.
addCustomerShow
=
true
},
100
)
},
addAccount
(
row
){
this
.
newObj
=
{
ID
:
row
.
ID
,
title
:
'新建账号'
}
setTimeout
(()
=>
{
this
.
addCustomerShow
=
true
},
100
)
},
//删除
handleClose
(
row
){
let
tips
=
'确定将这条账号删除?'
tips
=
'是否把账号“'
+
row
.
Name
+
'”删除?'
this
.
$confirm
(
tips
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'/api/Customer/DelGuestSourceAccount'
,
{
SAccountId
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
getList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
getList
:
function
(){
this
.
tableData
=
[]
this
.
loading
=
true
this
.
apipost
(
'/api/Customer/GetCustomerSourceEnum'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
list
=
[]
});
};
addList
(
data
);
this
.
tableData
=
res
.
data
.
data
;
this
.
loading
=
false
;
this
.
getGetGuestSourceAccountList
()
}
})
},
getGetGuestSourceAccountList
(){
this
.
apipost
(
'/api/Customer/GetGuestSourceAccountList'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
list
=
res
.
data
.
data
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
list
.
length
;
j
++
){
if
(
this
.
tableData
[
i
].
ID
==
this
.
list
[
j
].
SNO
){
let
obj
=
{
ID
:
this
.
list
[
j
].
ID
,
Name
:
this
.
list
[
j
].
Name
,
SNO
:
this
.
list
[
j
].
SNO
,
UpdateBy
:
this
.
list
[
j
].
UpdateBy
,
UpdateDate
:
this
.
list
[
j
].
UpdateDate
,
}
this
.
tableData
[
i
].
list
.
push
(
obj
)
}
}
}
}
})
},
}
};
</
script
>
src/components/customerManage/distributionRules.vue
0 → 100644
View file @
92b88e3c
<
style
scoped
>
.distributionRules
{
}
.distributionRules_title
{
font-weight
:
bold
;
font-size
:
18px
;
font-family
:
perfectFont
;
padding
:
20px
0
;
}
.page-content
{
background-color
:
#fff
;
padding
:
20px
;
}
.distributionRules_text
{
padding
:
0
0
20px
0
;
}
.text-negative
{
color
:
#f5576c
}
.distributionRules_num
{
display
:
flex
;
justify-content
:
space-between
;
}
.distributionRules_num
div
{
flex
:
1
;
}
.dataText
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
10px
0
;
}
.dataText_text
{
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.select-radio
{
display
:
flex
;
align-items
:
center
;
}
</
style
>
<
template
>
<div
class=
"customerManage"
>
<h1
class=
"distributionRules_title"
>
分配给以下部门/成员
</h1>
<div
class=
"page-content"
>
<div
class=
"distributionRules_text"
>
<span>
使用部门/成员
</span>
<span
class=
"text-negative"
>
*
</span>
</div>
<div
class=
"distributionRules_num"
>
<div>
<el-button
@
click=
"clickSelectPeople"
>
选择部门/成员
</el-button>
</div>
<div><span>
已选择:
{{
list
.
length
}}
人
</span></div>
</div>
<div
class=
"dataText"
>
<el-tag
v-for=
"(item,index) in list"
:key=
"index"
class=
"dataText_text"
>
{{
item
.
EmName
}}
</el-tag>
</div>
<h1
class=
"distributionRules_title"
>
设置分配规则
</h1>
<div
class=
"select-radio"
>
<span>
选择设置分配:
</span>
<el-radio-group
v-model=
"msg.SNO"
>
<el-radio
v-for=
"(item,index) in radioList"
:key=
"index"
:label=
"item.id"
>
{{
item
.
name
}}
</el-radio>
</el-radio-group>
</div>
<br/><br/>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"saveNow"
:disabled=
"disabledOff"
>
立即保存
</el-button>
</div>
<!-- 添加账号弹窗 -->
<div
v-if=
"addDistributionRulesShow"
>
<addDistributionRules
:obj=
"newObj"
@
addCustomerOk=
"addCustomerOk"
/>
</div>
</div>
</
template
>
<
script
>
import
addDistributionRules
from
"../dialogModel/addDistributionRules"
;
export
default
{
components
:
{
addDistributionRules
},
data
()
{
return
{
disabledOff
:
false
,
newObj
:{},
radioList
:[
{
name
:
'顺序分配'
,
id
:
1
},
{
name
:
'随机分配'
,
id
:
2
},
],
list
:[],
addDistributionRulesShow
:
false
,
loading
:
false
,
tableData
:[],
msg
:{
SNO
:
0
,
Content
:
''
}
};
},
mounted
()
{
this
.
GetCustomerAllotRule
()
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeaaddDistributionRules'
,
function
(){
$this
.
addDistributionRulesShow
=
false
})
},
beforeDestroy
()
{
this
.
MsgBus
.
$off
(
'sceneSave'
);
this
.
MsgBus
.
$off
(
'editScene'
);
},
methods
:
{
saveNow
(){
let
ids
=
[]
this
.
list
.
forEach
(
item
=>
{
ids
.
push
(
item
.
EmployeeId
)
})
this
.
msg
.
Content
=
ids
.
join
(
','
)
console
.
log
(
this
.
msg
)
this
.
disabledOff
=
true
this
.
apipost
(
'/api/Customer/SetCustomerAllotRule'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
)
this
.
disabledOff
=
false
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
this
.
disabledOff
=
false
}
})
},
addCustomerOk
(){
this
.
addDistributionRulesShow
=
false
},
clickSelectPeople
(){
this
.
addDistributionRulesShow
=
true
},
// 获取规则详情
GetCustomerAllotRule
(){
this
.
apipost
(
'/api/Customer/GetCustomerAllotRule'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
msg
=
{
SNO
:
res
.
data
.
data
.
SNO
,
Content
:
res
.
data
.
data
.
Content
};
this
.
list
=
res
.
data
.
data
.
EmpList
this
.
newObj
=
res
.
data
.
data
}
})
},
}
};
</
script
>
src/components/dialogModel/addCustomer.vue
View file @
92b88e3c
...
...
@@ -51,7 +51,7 @@
<el-form
:model=
"form"
ref=
"form"
class=
"MyEditForm"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"账号"
class=
"label-pad-left"
prop=
"Name"
>
<el-input
placeholder=
"请输入账号"
v-model=
"form.Name"
clearable
></el-input>
<el-input
placeholder=
"请输入账号"
v-model=
"form.Name"
clearable
></el-input>
</el-form-item>
</div>
</el-form>
...
...
src/components/dialogModel/addDistributionRules.vue
0 → 100644
View file @
92b88e3c
<
style
scoped
>
.addDistributionRules
.add-tit
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
20px
;
}
.addDistributionRules
.add-tit
p
{
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
color
:
rgba
(
17
,
17
,
17
,
1
);
font-size
:
14px
;
}
.addDistributionRules
.add-tit
p
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
rgba
(
13
,
36
,
129
,
1
);
border-radius
:
50%
;
margin-right
:
10px
;
}
.addDistributionRules
.el-dialog__header
{
padding
:
15px
20px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
}
.add_box
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
}
.addSearch
{
display
:
flex
;
flex-direction
:
column
;
}
.addSearch-left
{
height
:
40px
;
flex
:
1
;
display
:
flex
;
align-items
:
center
;
}
.addSearch-left
span
{
flex-shrink
:
0
;
}
.addSearch-s
{
height
:
40px
;
line-height
:
4px
;
display
:
flex
;
align-items
:
center
;
}
.addCenter
{
margin-left
:
20px
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
}
.addCenter-left
,
.addCenter-right
{
flex
:
1
;
margin-top
:
20px
;
background-color
:
#fff
;
padding
:
10px
;
}
.addCenter-left
,
.addCenter-right
{
min-height
:
400px
;
max-height
:
400px
;
overflow
:
hidden
;
}
.addCenter-right-box
{
width
:
50%
;
float
:
left
;
margin-bottom
:
10px
;
}
.addCenter-hidden
{
min-height
:
400px
;
max-height
:
400px
;
overflow
:
scroll
;
}
</
style
>
<
template
>
<el-dialog
@
closed=
"closedDialog"
:modal=
"false"
:visible
.
sync=
"dialogTableVisible"
width=
"600px"
:close-on-click-modal=
"false"
class=
"addCustomer"
>
<div
class=
"add-tit"
slot=
"title"
>
<p><span></span>
分配规则
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<div
class=
"add_box"
>
<div
class=
"addSearch"
>
<div
class=
"addSearch-left"
>
<span>
选择:
</span>
<el-input
placeholder=
"关键词进行过滤"
v-model=
"filterText"
/>
</div>
<div
class=
"addCenter-left"
>
<div
class=
"addCenter-hidden"
>
<el-tree
v-loading=
"loading"
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
:default-checked-keys=
"memberSetCheckedUserKeys"
ref=
"tree"
:props=
"defaultProps"
:render-after-expand=
"false"
node-key=
"DepartmentId"
@
check-change=
"handleNodeChange"
>
</el-tree>
</div>
</div>
</div>
<div
class=
"addCenter"
>
<div
class=
"addSearch-s"
>
<span>
已选:
</span>
</div>
<div
class=
"addCenter-right"
>
<div
class=
"addCenter-hidden"
>
<div
class=
"addCenter-right-box"
v-for=
"(item,index) in showMember"
:key=
"index"
>
<el-tag
closable
@
close=
"mySetCheckedKeys(item.EmployeeId)"
>
{{
item
.
EmName
}}
</el-tag>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"add_box-btn"
@
click=
"clickSure"
>
确 定
</el-button>
<el-button
class=
"add_box-btn add_box-cancel"
@
click=
"dialogTableVisible = false"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
obj
:
Object
},
data
()
{
return
{
loading
:
false
,
filterText
:
""
,
memberSetCheckedUserKeys
:[],
showMember
:[],
defaultProps
:
{
children
:
'ChildList'
,
label
:
'DepartmentName'
,
},
memberList
:[],
dialogTableVisible
:
false
,
};
},
watch
:{
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
}
},
mounted
()
{
this
.
getMember
()
if
(
this
.
obj
.
EmpList
){
this
.
showMember
=
this
.
obj
.
EmpList
this
.
showMember
.
forEach
(
item
=>
{
this
.
memberSetCheckedUserKeys
.
push
(
item
.
EmployeeId
)
})
}
let
$this
=
this
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
},
50
)
},
methods
:
{
// 获取部门成员列表
getMember
()
{
this
.
loading
=
true
this
.
apipost2
(
'WorkFlow_get_GetTempLateDepartMentEmployee'
,
{},
res
=>
{
this
.
memberList
=
res
.
data
.
data
this
.
loading
=
false
},
err
=>
{})
},
// 删除指定人员
mySetCheckedKeys
(
id
)
{
if
(
this
.
memberSetCheckedUserKeys
.
length
==
0
)
return
this
.
showMember
.
splice
(
this
.
showMember
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
),
1
)
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
id
),
1
)
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
memberSetCheckedUserKeys
);
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
DepartmentName
.
indexOf
(
value
)
!==
-
1
;
},
handleNodeChange
(
data
,
checked
)
{
//操作选中
data
.
IsCheck
=
checked
;
if
(
data
.
Type
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
let
isExsit
=
false
this
.
showMember
.
forEach
(
x
=>
{
if
(
x
.
EmployeeId
==
data
.
DepartmentId
)
{
isExsit
=
true
return
false
}
})
if
(
!
isExsit
)
{
this
.
showMember
.
push
({
EmName
:
data
.
DepartmentName
,
EmployeeId
:
data
.
DepartmentId
,
Sort
:
this
.
showMember
.
length
+
1
})
this
.
memberSetCheckedUserKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
showMember
.
splice
(
this
.
showMember
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
),
1
)
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
if
(
data
.
Type
!=
2
&&
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
==
-
1
)
{
this
.
memberSetCheckedUserKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
},
closedDialog
(){
this
.
MsgBus
.
$emit
(
'closeaaddDistributionRules'
)
},
clickSure
()
{
this
.
dialogTableVisible
=
false
},
}
}
</
script
>
\ No newline at end of file
src/components/dialogModel/editGuestTeam.vue
0 → 100644
View file @
92b88e3c
<
style
>
.editGuestTeam
.add-tit
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
20px
;
}
.editGuestTeam
.add-tit
p
{
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
color
:
rgba
(
17
,
17
,
17
,
1
);
font-size
:
14px
;
}
.editGuestTeam
.add-tit
p
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
#409efe
;
border-radius
:
50%
;
margin-right
:
10px
;
}
.editGuestTeam
.el-dialog__header
{
padding
:
15px
20px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
}
.editGuestTeam
.dialog-footer
{
text-align
:
center
;
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-bottom
:
20px
;
}
.editGuestTeam
.el-dialog__footer
{
padding
:
0
;
}
.editGuestTeam
.el-tag.el-tag--info
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
border-color
:
rgba
(
0
,
0
,
0
,
0
);
display
:
inline-block
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
</
style
>
<
template
>
<el-dialog
@
closed=
"closedDialog"
:modal=
"false"
:visible
.
sync=
"dialogTableVisible"
width=
"450px"
:close-on-click-modal=
"false"
class=
"editGuestTeam"
>
<div
class=
"add-tit"
slot=
"title"
>
<p><span></span>
添加团队成员
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<div
class=
"form-box"
>
<el-form
:model=
"form"
ref=
"form"
class=
"MyEditForm"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"成员"
class=
"label-pad-left"
prop=
"ContactDuty"
>
<el-select
multiple
filterable
v-model=
"EmpIdsS"
placeholder=
"请选择"
>
<el-option
v-for=
"item in EmployeeList"
:label=
'item.EmName'
:value=
'item.EmployeeId'
:key=
'item.EmployeeId'
>
</el-option>
</el-select>
</el-form-item>
</div>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"权限"
class=
"label-pad-left form-check"
>
<div
class=
"pad-left-10"
>
<el-radio
v-model=
"form.IsRead"
:label=
"0"
>
只读
</el-radio>
<el-radio
v-model=
"form.IsRead"
:label=
"1"
>
读写
</el-radio>
</div>
</el-form-item>
</div>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"同时添加至"
class=
"label-pad-left form-check"
>
<div
class=
"pad-left-10"
>
<el-checkbox-group
v-model=
"TransferOther"
>
<el-checkbox
:value=
"4"
:label=
"4"
>
订单
</el-checkbox>
<el-checkbox
:value=
"2"
:label=
"2"
>
商机
</el-checkbox>
<el-checkbox
:value=
"3"
:label=
"3"
>
合同
</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
</div>
</el-form>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"add-box-btn"
@
click=
"submitForm('form')"
>
确 定
</el-button>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"dialogTableVisible = false, resetForm('form')"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
[
"ID"
],
data
()
{
return
{
dialogTableVisible
:
true
,
EmployeeList
:
[],
EmpIdsS
:
[],
TransferOther
:
[],
form
:
{
CustomerIds
:
0
,
EmpIds
:
""
,
IsRead
:
0
,
TransferOther
:
""
,
},
};
},
watch
:
{},
mounted
()
{
this
.
Employee
();
let
$this
=
this
;
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
;
},
50
);
},
methods
:
{
closedDialog
()
{
this
.
MsgBus
.
$emit
(
"closeeditGuestTeam"
);
},
addData
()
{
this
.
form
.
CustomerIds
=
this
.
ID
;
if
(
this
.
EmpIdsS
.
length
<
1
)
{
return
this
.
$message
.
error
(
"请选择成员"
);
}
else
{
let
str
=
""
;
this
.
EmpIdsS
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
","
;
});
this
.
form
.
EmpIds
=
str
.
substring
(
0
,
str
.
length
-
1
);
}
if
(
this
.
TransferOther
.
length
<
1
)
{
let
str2
=
""
;
this
.
TransferOther
.
map
((
x
,
i
)
=>
{
str2
=
str2
+
x
+
","
;
});
this
.
form
.
TransferOther
=
str2
.
substring
(
0
,
str2
.
length
-
1
);
}
this
.
apipost
(
"/api/SellEvent/SetGuestTeam"
,
this
.
form
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
resetForm
(
"form"
);
this
.
dialogTableVisible
=
false
;
this
.
$emit
(
"editGuestTeamOk"
);
this
.
$message
.
success
(
res
.
data
.
message
);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
});
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addData
();
}
else
{
return
false
;
}
});
},
Employee
()
{
let
userInfo
=
this
.
getLocalStorage
();
let
msg
=
{
RB_Group_id
:
userInfo
.
RB_Group_id
,
BranchId
:
-
1
,
DepartmentId
:
0
,
PostId
:
0
,
IsLeave
:
0
,
};
this
.
apipost2
(
"admin_get_EmployeeGetList"
,
this
.
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
EmployeeList
=
res
.
data
.
data
;
}
else
{}
},
(
err
)
=>
{}
);
},
resetForm
(
formName
)
{
// 重置表单
this
.
form
=
{
CustomerId
:
0
,
EmpIds
:
[],
IsRead
:
0
,
TransferOther
:
[],
};
this
.
$refs
[
formName
].
resetFields
();
},
},
};
</
script
>
\ No newline at end of file
src/components/dialogModel/editGuestTeamPower.vue
0 → 100644
View file @
92b88e3c
<
style
>
.editGuestTeamPower
.add-tit
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
20px
;
}
.editGuestTeamPower
.add-tit
p
{
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
color
:
rgba
(
17
,
17
,
17
,
1
);
font-size
:
14px
;
}
.editGuestTeamPower
.add-tit
p
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
#409efe
;
border-radius
:
50%
;
margin-right
:
10px
;
}
.editGuestTeamPower
.el-dialog__header
{
padding
:
15px
20px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
}
.editGuestTeamPower
.dialog-footer
{
text-align
:
center
;
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-bottom
:
20px
;
}
.editGuestTeamPower
.el-dialog__footer
{
padding
:
0
;
}
</
style
>
<
template
>
<el-dialog
@
closed=
"closedDialog"
:modal=
"false"
width=
"400px"
:visible
.
sync=
"dialogTableVisible"
:close-on-click-modal=
"false"
class=
"editGuestTeamPower"
>
<div
class=
"add-tit"
slot=
"title"
>
<p><span></span>
编辑权限
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<div
class=
"form-box"
>
<el-form
:model=
"form"
ref=
"form"
class=
"MyEditForm"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"权限"
class=
"label-pad-left form-check"
>
<div
class=
"pad-left-10"
>
<el-radio
v-model=
"form.IsRead"
:label=
"1"
>
只读
</el-radio>
<el-radio
v-model=
"form.IsRead"
:label=
"0"
>
读写
</el-radio>
</div>
</el-form-item>
</div>
</el-form>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"add-box-btn"
@
click=
"submitForm('form')"
>
确 定
</el-button>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"dialogTableVisible = false, resetForm('form')"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
ID
:
{
type
:
""
,
default
:
0
,
},
CustomerId
:
{
type
:
Number
,
default
:
0
,
},
},
data
()
{
return
{
dialogTableVisible
:
true
,
zwList
:
[],
form
:
{
CustomerId
:
0
,
ID
:
""
,
IsRead
:
1
,
},
};
},
watch
:
{},
mounted
()
{
let
$this
=
this
;
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
;
},
50
);
},
methods
:
{
closedDialog
()
{
this
.
MsgBus
.
$emit
(
"closeeditGuestTeamPower"
);
},
addData
()
{
this
.
form
.
CustomerId
=
this
.
CustomerId
;
this
.
form
.
IDs
=
this
.
ID
;
this
.
apipost
(
"/api/Customer/EditCustomerJurisdiction"
,
this
.
form
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
resetForm
(
"form"
);
this
.
dialogTableVisible
=
false
;
this
.
$emit
(
"addTeammanOk"
);
}
}
);
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addData
();
}
else
{
return
false
;
}
});
},
resetForm
(
formName
)
{
// 重置表单
this
.
form
=
{
CustomerId
:
0
,
ID
:
""
,
IsRead
:
0
,
};
this
.
$refs
[
formName
].
resetFields
();
},
},
};
</
script
>
src/components/guestManagement/Details.vue
View file @
92b88e3c
...
...
@@ -31,7 +31,6 @@
<div
class=
"Details"
>
<div
class=
"Details_box"
>
<p
class=
"tit"
>
基本信息
</p>
<el-row
:gutter=
"40"
class=
"Details_box_row"
>
<el-col
:span=
"12"
>
<el-row>
...
...
src/components/guestManagement/TeamMembers.vue
deleted
100644 → 0
View file @
ca09eb14
<
style
>
.addTeamman-ctrl
{
text-align
:
right
;
padding
:
0
0
20px
0
;
}
</
style
>
<
template
>
<div
class=
"addTeamman"
>
<div
class=
"addTeamman-ctrl"
>
<el-button
icon=
"el-icon-plus"
class=
"crm-btn crm-btn-mini query-btn"
@
click=
"addTeammanShow=true"
v-if=
"IsRead === 0"
>
团队成员
</el-button>
<el-button
class=
"crm-btn query-btn crm-btn-mini easy-btn"
@
click=
"bianji"
v-if=
"IsRead === 0"
>
编辑
</el-button>
<el-button
class=
"crm-btn query-btn crm-btn-mini easy-btn"
@
click=
"yichu"
v-if=
"IsRead === 0"
>
移除
</el-button>
<el-button
class=
"crm-btn query-btn crm-btn-mini org-btn margin-right0"
@
click=
"tuichu"
>
退出团队
</el-button>
</div>
<el-table
v-loading=
"loading"
stripe
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
row-class-name=
"font-size-12"
>
<el-table-column
:selectable=
'checkboxT'
fixed
type=
"selection"
width=
"40"
></el-table-column>
<el-table-column
prop=
"EmpName"
label=
"销售名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"PostName"
label=
"岗位"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"RoleName"
label=
"角色名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"RoleType"
label=
"角色属性"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.RoleType === 1"
>
负责人
</p>
<p
v-else
>
普通员工
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"JurisdictionName"
label=
"权限"
show-overflow-tooltip
>
</el-table-column>
</el-table>
<div
v-if=
"addTeammanShow"
>
<addTeamman
:ID=
"CustomerId"
@
addTeammanOk=
"addTeammanOk"
/>
</div>
<div
v-if=
"editTeamPowerShow"
>
<editTeamPower
:CustomerId=
"CustomerId"
:ID=
"IDs"
@
addTeammanOk=
"addTeammanOk"
/>
</div>
</div>
</template>
<
script
>
import
addTeamman
from
"../dialogModel/addTeamman"
;
import
editTeamPower
from
"../dialogModel/editTeamPower"
;
export
default
{
components
:
{
addTeamman
,
editTeamPower
},
props
:{
CustomerId
:
{
type
:
Number
,
default
:
0
},
IsRead
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
loading
:
false
,
addTeammanShow
:
false
,
editTeamPowerShow
:
false
,
dataList
:
[],
multipleSelection
:
[],
IDs
:
''
};
},
watch
:{
CustomerId
:
{
handler
(
val
,
oldVal
){
console
.
log
(
val
)
this
.
GetCustomerTeamList
()
},
deep
:
true
}
},
mounted
()
{
this
.
GetCustomerTeamList
()
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeaddTeamman'
,
function
(){
$this
.
addTeammanShow
=
false
})
this
.
MsgBus
.
$on
(
'closeeditTeamPower'
,
function
(){
$this
.
editTeamPowerShow
=
false
})
},
methods
:
{
tuichu
(){
this
.
$confirm
(
'确定退出团队?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
str
=
''
this
.
multipleSelection
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
','
})
let
msg
=
{
CustomerId
:
this
.
CustomerId
,
IDs
:
str
.
substring
(
0
,
str
.
length
-
1
)
}
this
.
apipost
(
'/api/Customer/ExitCustomerJurisdiction'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
GetCustomerTeamList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
yichu
(){
if
(
this
.
multipleSelection
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请勾选需要操作的团队成员'
)
}
this
.
$confirm
(
'此操作将移除这些团队成员是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
str
=
''
this
.
multipleSelection
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
','
})
let
msg
=
{
CustomerId
:
this
.
CustomerId
,
IDs
:
str
.
substring
(
0
,
str
.
length
-
1
)
}
this
.
apipost
(
'/api/Customer/RemoveCustomerListJurisdiction'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
GetCustomerTeamList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
bianji
(){
if
(
this
.
multipleSelection
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请勾选需要操作的团队成员'
)
}
let
str
=
''
this
.
multipleSelection
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
','
})
this
.
IDs
=
str
.
substring
(
0
,
str
.
length
-
1
)
this
.
editTeamPowerShow
=
true
},
checkboxT
(
row
,
index
){
if
(
row
.
JurisdictionName
===
'负责人权限'
){
return
0
;
}
else
{
return
1
;
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
x
=>
x
.
ID
)
},
addTeammanOk
(){
this
.
GetCustomerTeamList
()
},
GetCustomerTeamList
(){
if
(
this
.
CustomerId
===
0
)
return
this
.
loading
=
true
this
.
apipost
(
'/api/Customer/GetCustomerTeamList'
,
{
CustomerId
:
this
.
CustomerId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
this
.
dataList
=
res
.
data
.
data
}
})
},
}
}
</
script
>
\ No newline at end of file
src/components/guestManagement/customerInfoBox.vue
View file @
92b88e3c
This diff is collapsed.
Click to expand it.
src/components/guestManagement/guestManagement.vue
View file @
92b88e3c
This diff is collapsed.
Click to expand it.
src/components/guestManagement/guestTeam.vue
0 → 100644
View file @
92b88e3c
<
style
>
.addTeamman-ctrl
{
text-align
:
right
;
padding
:
0
0
20px
0
;
}
</
style
>
<
template
>
<div
class=
"addTeamman"
>
<div
class=
"addTeamman-ctrl"
>
<el-button
icon=
"el-icon-plus"
class=
"crm-btn crm-btn-mini query-btn"
@
click=
"addTeammanShow=true"
v-if=
"IsRead === 0"
>
团队成员
</el-button>
<el-button
class=
"crm-btn query-btn crm-btn-mini easy-btn"
@
click=
"bianji"
v-if=
"IsRead === 0"
>
编辑
</el-button>
<el-button
class=
"crm-btn query-btn crm-btn-mini easy-btn"
@
click=
"yichu"
v-if=
"IsRead === 0"
>
移除
</el-button>
<el-button
class=
"crm-btn query-btn crm-btn-mini org-btn margin-right0"
@
click=
"tuichu"
>
退出团队
</el-button>
</div>
<el-table
v-loading=
"loading"
stripe
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
row-class-name=
"font-size-12"
>
<el-table-column
:selectable=
'checkboxT'
fixed
type=
"selection"
width=
"40"
></el-table-column>
<el-table-column
prop=
"EmpName"
label=
"销售名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"PostName"
label=
"岗位"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"RoleName"
label=
"角色名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"RoleType"
label=
"角色属性"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.RoleType === 1"
>
负责人
</p>
<p
v-else
>
普通员工
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"JurisdictionName"
label=
"权限"
show-overflow-tooltip
>
</el-table-column>
</el-table>
<div
v-if=
"addTeammanShow"
>
<editGuestTeam
:ID=
"CustomerId"
@
addTeammanOk=
"addTeammanOk"
/>
</div>
<div
v-if=
"editTeamPowerShow"
>
<editGuestTeamPower
:CustomerId=
"CustomerId"
:ID=
"IDs"
@
addTeammanOk=
"addTeammanOk"
/>
</div>
</div>
</template>
<
script
>
import
editGuestTeam
from
"../dialogModel/editGuestTeam"
;
import
editGuestTeamPower
from
"../dialogModel/editGuestTeamPower"
;
export
default
{
components
:
{
editGuestTeam
,
editGuestTeamPower
},
props
:
{
CustomerId
:
{
type
:
Number
,
default
:
0
},
IsRead
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
loading
:
false
,
addTeammanShow
:
false
,
editTeamPowerShow
:
false
,
dataList
:
[],
multipleSelection
:
[],
IDs
:
''
};
},
watch
:
{
CustomerId
:
{
handler
(
val
,
oldVal
)
{
this
.
GetGuestTeamList
()
},
deep
:
true
}
},
mounted
()
{
this
.
GetGuestTeamList
()
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeaddTeamman'
,
function
()
{
$this
.
addTeammanShow
=
false
})
this
.
MsgBus
.
$on
(
'closeeditTeamPower'
,
function
()
{
$this
.
editTeamPowerShow
=
false
})
},
methods
:
{
tuichu
()
{
this
.
$confirm
(
'确定退出团队?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
str
=
''
this
.
multipleSelection
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
','
})
let
msg
=
{
CustomerId
:
this
.
CustomerId
,
IDs
:
str
.
substring
(
0
,
str
.
length
-
1
)
}
this
.
apipost
(
'/api/Customer/ExitCustomerJurisdiction'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
GetGuestTeamList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
yichu
()
{
if
(
this
.
multipleSelection
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请勾选需要操作的团队成员'
)
}
this
.
$confirm
(
'此操作将移除这些团队成员是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
str
=
''
this
.
multipleSelection
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
','
})
let
msg
=
{
CustomerId
:
this
.
CustomerId
,
IDs
:
str
.
substring
(
0
,
str
.
length
-
1
)
}
this
.
apipost
(
'/api/Customer/RemoveCustomerListJurisdiction'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
GetGuestTeamList
()
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
bianji
()
{
if
(
this
.
multipleSelection
.
length
<
1
)
{
return
this
.
$message
.
error
(
'请勾选需要操作的团队成员'
)
}
let
str
=
''
this
.
multipleSelection
.
map
((
x
,
i
)
=>
{
str
=
str
+
x
+
','
})
this
.
IDs
=
str
.
substring
(
0
,
str
.
length
-
1
)
this
.
editTeamPowerShow
=
true
},
checkboxT
(
row
,
index
)
{
if
(
row
.
JurisdictionName
===
'负责人权限'
)
{
return
0
;
}
else
{
return
1
;
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
.
map
(
x
=>
x
.
ID
)
},
addTeammanOk
()
{
this
.
GetGuestTeamList
()
},
GetGuestTeamList
()
{
if
(
this
.
CustomerId
===
0
)
return
this
.
loading
=
true
this
.
apipost
(
'/api/SellEvent/GetGuestTeamPage'
,
{
GuestId
:
this
.
CustomerId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
this
.
dataList
=
res
.
data
.
data
}
})
},
}
}
</
script
>
\ No newline at end of file
src/plugins/index.js
View file @
92b88e3c
This diff is collapsed.
Click to expand it.
src/views/login.vue
View file @
92b88e3c
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