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
Show 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,193 +26,39 @@
: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
)
},
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
()
}
})
beforeDestroy
()
{
},
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
)
}
}
}
methods
:
{
}
})
clickTitle
(
item
){
this
.
selectTitle
=
item
.
id
},
}
};
...
...
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
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
<
style
>
.drawer-box
{
.drawer-box
{
height
:
100%
;
}
.drawer-header
{
}
.drawer-header
{
height
:
83px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
30px
;
}
.drawer-header
.left
{
}
.drawer-header
.left
{
display
:
flex
;
align-items
:
center
;
}
.drawer-header
.left
img
{
}
.drawer-header
.left
img
{
display
:
inline-block
;
margin-right
:
10px
;
}
.drawer-body
{
}
.drawer-body
{
height
:
calc
(
100%
-
83px
);
}
.drawer-body
.top-info
{
}
.drawer-body
.top-info
{
height
:
115px
;
padding
:
30px
;
box-sizing
:
border-box
;
font-size
:
12px
;
background-color
:
#f6f4fc
;
}
.drawer-body
.top-info
.info-lable
{
}
.drawer-body
.top-info
.info-lable
{
display
:
inline-block
;
width
:
80px
;
color
:
#999999
;
}
.margin-bottom-25
{
}
.margin-bottom-25
{
margin-bottom
:
25px
;
}
.drawer-box
.el-tabs__nav-wrap
::after
{
}
.drawer-box
.el-tabs__nav-wrap
::after
{
height
:
0
;
}
.drawer-body
.el-tabs__header
{
}
.drawer-body
.el-tabs__header
{
padding
:
0
25px
;
margin-bottom
:
0
;
}
.drawer-body
>
.content
{
}
.drawer-body
>
.content
{
height
:
calc
(
100%
-
115px
);
}
.drawer-body
.el-tabs
{
}
.drawer-body
.el-tabs
{
height
:
100%
;
}
.drawer-body
.el-tabs__content
{
}
.drawer-body
.el-tabs__content
{
background-color
:
#f6f4fc
;
height
:
calc
(
100%
-
40px
);
box-sizing
:
border-box
;
}
.drawer-body
.el-tabs__content
.el-tab-pane
{
}
.drawer-body
.el-tabs__content
.el-tab-pane
{
height
:
100%
;
position
:
absolute
;
width
:
calc
(
100%
);
padding
:
17px
20px
;
box-sizing
:
border-box
;
}
}
</
style
>
<
template
>
<div
class=
"drawer-box"
v-if=
"loading"
>
...
...
@@ -69,8 +82,8 @@
<p>
{{
detailsData
.
SurName
+
detailsData
.
Name
}}
</p>
</div>
<div
class=
"right"
v-if=
"!hiddenMenu"
>
<el-button
class=
"crm-btn query-btn"
@
click=
"editCust"
>
编辑
</el-button>
<el-dropdown
@
command=
"handleCommand"
style=
"top: 1px;"
>
<el-button
class=
"crm-btn query-btn"
@
click=
"editCust"
>
编辑
</el-button>
<el-dropdown
@
command=
"handleCommand"
style=
"top: 1px;"
>
<el-button
class=
"crm-btn crm-btn-more easy-btn margin-right0"
>
<i
class=
"iconfont icongengduo"
></i>
</el-button>
...
...
@@ -84,32 +97,28 @@
<div
class=
"drawer-body"
>
<div
class=
"top-info"
>
<el-row
class=
"margin-bottom-25"
>
<el-col
:span=
"12"
>
<span
class=
"info-lable"
>
客户级别:
</span><span>
{{
detailsData
.
CustomerIdLevelStr
}}
</span>
</el-col>
<el-col
:span=
"12"
>
<span
class=
"info-lable"
>
创建时间:
</span><span>
{{
detailsData
.
CreateDate
?
detailsData
.
CreateDate
:
''
}}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<span
class=
"info-lable"
>
负责人:
</span><span>
{{
detailsData
.
PersonChargeStr
}}
</span>
</el-col>
<el-col
:span=
"12"
>
<span
class=
"info-lable"
>
更新时间:
</span><span>
{{
detailsData
.
UpdateTime
?
detailsData
.
UpdateTim
e
:
''
}}
</span>
<span
class=
"info-lable"
>
创建时间:
</span><span>
{{
detailsData
.
CreateDate
?
detailsData
.
CreateDat
e
:
''
}}
</span>
</el-col>
</el-row>
</div>
<div
class=
"content"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"活动"
name=
"1"
>
<Activity
v-if=
"activeName === '1'"
:CustomerId=
"CustomerId"
:showType=
"2"
/>
<Activity
v-if=
"activeName === '1'"
:CustomerId=
"CustomerId"
:showType=
"2"
/>
</el-tab-pane>
<el-tab-pane
label=
"详细资料"
name=
"2"
>
<Details
v-if=
"activeName === '2'"
:detailsData=
"detailsData"
/>
<Details
v-if=
"activeName === '2'"
:detailsData=
"detailsData"
/>
</el-tab-pane>
<el-tab-pane
label=
"团队"
name=
"10"
>
<guestTeam
v-if=
"activeName === '10'"
:ID=
"CustomerId"
/>
</el-tab-pane>
<el-tab-pane
label=
"商机"
name=
"5"
>
<Business
v-if=
"activeName === '5'"
:ID=
"CustomerId"
/>
<Business
v-if=
"activeName === '5'"
:ID=
"CustomerId"
/>
</el-tab-pane>
<el-tab-pane
label=
"订单"
name=
"6"
>
<Agreement
/>
...
...
@@ -118,10 +127,10 @@
<MoneyBack
/>
</el-tab-pane>
<el-tab-pane
label=
"附件"
name=
"8"
>
<Enclosure
:ID=
'CustomerId'
:type=
'1'
:isGuest=
"true"
v-if=
"activeName === '8'"
/>
<Enclosure
:ID=
'CustomerId'
:type=
'1'
:isGuest=
"true"
v-if=
"activeName === '8'"
/>
</el-tab-pane>
<el-tab-pane
label=
"操作记录"
name=
"9"
>
<Record
v-if=
"activeName === '9'"
:CustomerId=
"CustomerId"
/>
<Record
v-if=
"activeName === '9'"
:CustomerId=
"CustomerId"
/>
</el-tab-pane>
</el-tabs>
</div>
...
...
@@ -129,14 +138,15 @@
</div>
</
template
>
<
script
>
import
Activity
from
"./Activity"
;
import
Details
from
"./Details"
;
import
Business
from
"./Business"
;
import
Agreement
from
"./Agreement"
;
import
MoneyBack
from
"./MoneyBack"
;
import
Enclosure
from
"../clueManagement/Enclosure"
;
import
Record
from
"./Record"
;
export
default
{
import
Activity
from
"./Activity"
;
import
Details
from
"./Details"
;
import
Business
from
"./Business"
;
import
Agreement
from
"./Agreement"
;
import
MoneyBack
from
"./MoneyBack"
;
import
guestTeam
from
"./guestTeam"
;
import
Enclosure
from
"../clueManagement/Enclosure"
;
import
Record
from
"./Record"
;
export
default
{
components
:
{
Activity
,
Details
,
...
...
@@ -145,6 +155,7 @@ export default {
MoneyBack
,
Enclosure
,
Record
,
guestTeam
,
},
props
:
{
CustomerId
:
{
...
...
@@ -176,15 +187,16 @@ export default {
let
$this
=
this
;
$this
.
init
();
// 监听修改更新界面
this
.
MsgBus
.
$on
(
"RefreshInfoBox"
,
function
()
{
this
.
MsgBus
.
$on
(
"RefreshInfoBox"
,
function
()
{
$this
.
init
();
});
},
methods
:
{
init
()
{
this
.
apipost
(
"/api/Customer/GetAllGuesstCustomerModel"
,
{
ID
:
this
.
CustomerId
},
"/api/Customer/GetAllGuesstCustomerModel"
,
{
ID
:
this
.
CustomerId
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
...
...
@@ -224,8 +236,7 @@ export default {
handleCommand
(
command
)
{
if
(
command
===
"z"
)
{
this
.
$emit
(
"transferS"
,
3
);
}
else
if
(
command
===
"g"
)
{
}
}
else
if
(
command
===
"g"
)
{}
},
handleClick
(
tab
,
event
)
{},
editCust
()
{
...
...
@@ -235,5 +246,5 @@ export default {
done
();
},
},
};
};
</
script
>
\ No newline at end of file
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
...
...
@@ -6,14 +6,18 @@ export default {
apiurl
:
''
},
install
(
Vue
,
options
)
{
Vue
.
prototype
.
isOnline
=
function
()
{
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
"http://192.168.10.2:8098"
Vue
.
prototype
.
domainManager
=
function
()
{
//CRM API
let
domainUrl
=
""
;
domainUrl
=
"http://192.168.10.2:8098"
;
//domainUrl = "http://localhost:5003";
let
locationName
=
window
.
location
.
hostname
;
let
domainPostUrl
=
"http://192.168.10.2:8083"
//旅游ERPApi
let
domainPostUrl
=
"http://192.168.10.214"
if
(
this
.
isOnline
())
{
if
(
window
.
location
.
host
.
indexOf
(
'fcrmyx.oytour.com'
)
!=
-
1
)
{
domainUrl
=
"http://crm.oytour.com"
...
...
@@ -47,7 +51,7 @@ export default {
};
return
obj
;
},
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
timestamp
=
(
new
Date
()).
valueOf
();
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
...
...
@@ -83,10 +87,10 @@ export default {
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}).
catch
(
function
(
res
)
{});
},
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
...
...
@@ -99,7 +103,7 @@ export default {
return
x1
+
x2
;
},
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -107,7 +111,7 @@ export default {
});
},
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -116,7 +120,7 @@ export default {
},
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -124,7 +128,7 @@ export default {
});
},
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -132,7 +136,7 @@ export default {
});
},
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
...
...
@@ -152,7 +156,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
let
url
=
this
.
domainManager
().
UploadUrl
;
let
poise
=
'width='
;
w
=
w
?
w
:
''
...
...
@@ -165,13 +169,13 @@ export default {
return
path
.
split
(
'?'
)[
0
]
+
'?width='
+
w
;
}
//打开新窗口连接
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
if
(
URL
!=
''
)
{
window
.
open
(
'http://'
+
URL
,
'_blank'
);
}
}
//HTTP提交数据
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
//旅游ERP接口
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -218,7 +222,7 @@ export default {
}
},
faildCall
)
}
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -234,13 +238,11 @@ export default {
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"msg"
:
msg
,
// "cmd": cmd,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
}
if
(
localStorage
.
g
&&
localStorage
.
g
!=
'undefined'
)
{
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData
.
groupId
=
2
;
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -261,7 +263,7 @@ export default {
}
},
faildCall
)
},
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -270,8 +272,7 @@ export default {
this
.
apiurl
=
apiurl
;
var
token
=
""
;
var
key
=
""
;
// let userInfo = localStorage.userInfo ? JSON.parse(localStorage.userInfo) : ''
// let uid = userInfo.accountId ? userInfo.accountId : 0
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
token
;
key
=
this
.
getLocalStorage
().
secretKey
;
...
...
@@ -286,7 +287,7 @@ export default {
"sign"
:
md5Str
}
if
(
localStorage
.
g
&&
localStorage
.
g
!=
'undefined'
)
{
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData
.
groupId
=
2
;
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -297,11 +298,11 @@ export default {
})
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
// if (window.location.href.indexOf('IntegralMall') === -1 && window.location.href.indexOf('productDetail') === -1) {
this
.
$router
.
push
({
path
:
'/login'
})
// }
}
else
if
(
res
.
data
.
resultCode
==
10005
)
{
this
.
$router
.
go
(
-
1
)
}
else
{
...
...
@@ -312,16 +313,8 @@ export default {
}
},
faildCall
)
},
Vue
.
prototype
.
getAction
=
function
(
actionId
,
lineId
)
{
// if(actionId==1){
// console.log("浏览签证产品",actionId)
// }
// if(actionId==7){
// console.log("浏览跟团游",actionId)
// }
// if(actionId==9){
// console.log("浏览跟团游下单",actionId)
// }
Vue
.
prototype
.
getAction
=
function
(
actionId
,
lineId
)
{
let
msg
=
{};
msg
.
actionId
=
actionId
;
if
(
lineId
)
{
...
...
@@ -331,7 +324,6 @@ export default {
this
.
Travelload
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -339,7 +331,7 @@ export default {
}
//验证只能输入2位小数
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
)
{
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
)
{
var
value
=
""
;
if
(
typeof
item
[
filed
]
==
"string"
)
{
value
=
item
[
filed
];
...
...
@@ -360,7 +352,7 @@ export default {
item
[
filed
]
=
value
;
}
//验证只能输入整数
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
)
{
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
)
{
var
value
=
""
;
if
(
typeof
item
[
filed
]
==
"string"
)
{
value
=
item
[
filed
];
...
...
@@ -370,6 +362,5 @@ export default {
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
item
[
filed
]
=
value
;
}
}
}
\ No newline at end of file
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