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
9eb4ebe6
Commit
9eb4ebe6
authored
Apr 22, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
79009084
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
773 additions
and
276 deletions
+773
-276
customerConfiguration.vue
src/components/customerManage/customerConfiguration.vue
+17
-275
customerSource.vue
src/components/customerManage/customerSource.vue
+294
-0
distributionRules.vue
src/components/customerManage/distributionRules.vue
+194
-0
addCustomer.vue
src/components/dialogModel/addCustomer.vue
+1
-1
addDistributionRules.vue
src/components/dialogModel/addDistributionRules.vue
+267
-0
No files found.
src/components/customerManage/customerConfiguration.vue
View file @
9eb4ebe6
...
...
@@ -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
,
selectTitle
:
2
,
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 @
9eb4ebe6
<
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 @
9eb4ebe6
<
style
>
.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
;
}
.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"
>
立即保存
</el-button>
</div>
<!-- 添加账号弹窗 -->
<div
v-if=
"addCustomerShow"
>
<addDistributionRules
:obj=
"newObj"
@
addCustomerOk=
"addCustomerOk"
/>
</div>
</div>
</
template
>
<
script
>
import
addDistributionRules
from
"../dialogModel/addDistributionRules"
;
export
default
{
components
:
{
addDistributionRules
},
data
()
{
return
{
newObj
:{},
radioList
:[
{
name
:
'顺序分配'
,
id
:
1
},
{
name
:
'随机分配'
,
id
:
2
},
],
newObj
:{},
list
:[],
visible
:
false
,
CustomerId
:
0
,
CustomerIdStr
:
''
,
addCustomerShow
:
false
,
loading
:
false
,
tableData
:[],
sceneList
:[],
msg
:{
SNO
:
''
,
Content
:
''
}
};
},
mounted
()
{
this
.
GetCustomerAllotRule
()
let
$this
=
this
this
.
MsgBus
.
$on
(
'closeaaddCustomer'
,
function
(){
$this
.
addCustomerShow
=
false
})
},
beforeDestroy
()
{
this
.
MsgBus
.
$off
(
'sceneSave'
);
this
.
MsgBus
.
$off
(
'editScene'
);
},
methods
:
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
DepartmentName
.
indexOf
(
value
)
!==
-
1
;
},
addCustomerOk
(){
this
.
addCustomerShow
=
false
this
.
getList
()
},
clickSelectPeople
(){
this
.
addCustomerShow
=
true
},
//删除
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
:
'已取消'
});
});
},
GetCustomerAllotRule
(){
this
.
tableData
=
[]
this
.
loading
=
true
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
}
})
},
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/dialogModel/addCustomer.vue
View file @
9eb4ebe6
...
...
@@ -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 @
9eb4ebe6
<
style
>
.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
;
align-items
:
baseline
}
.addSearch
{
flex
:
1
;
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=
"450px"
: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=
"关键词进行过滤"
/>
</div>
<div
class=
"addCenter-left"
>
<div
class=
"addCenter-hidden"
>
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
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 myAuditUserList"
:key=
"index"
>
<el-tag
closable
@
close=
"deleteUser(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=
"submitForm"
>
确 定
</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
{
filterText
:
""
,
memberSetCheckedUserKeys
:[],
myAuditUserList
:[],
defaultProps
:
{
children
:
'ChildList'
,
label
:
'DepartmentName'
,
},
memberList
:[],
title
:
""
,
dialogTableVisible
:
false
,
TransferOther
:
[],
form
:
{
Name
:
''
,
SNO
:
''
,
ID
:
0
,
}
};
},
watch
:{
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
}
},
mounted
()
{
this
.
GetCustomerAllotRule
()
this
.
getMember
()
if
(
this
.
obj
.
EmpList
){
this
.
myAuditUserList
=
this
.
obj
.
EmpList
console
.
log
(
this
.
myAuditUserList
,
''
)
}
let
$this
=
this
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
},
50
)
},
methods
:
{
getMember
()
{
// 获取指定成员列表
this
.
apipost2
(
'WorkFlow_get_GetTempLateDepartMentEmployee'
,
{},
res
=>
{
this
.
memberList
=
res
.
data
.
data
},
err
=>
{})
},
mySetCheckedKeys
(
id
)
{
if
(
this
.
memberSetCheckedKeys
.
length
==
0
)
return
if
(
id
==
-
1
)
{
this
.
$refs
.
treeUser
.
setCheckedKeys
(
this
.
memberSetCheckedKeys
)
return
}
this
.
showMember
.
splice
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DepartmentId
===
id
),
1
)
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
id
),
1
)
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
memberSetCheckedKeys
);
},
// 获取
GetCustomerAllotRule
(){
this
.
apipost
(
'/api/Customer/GetCustomerAllotRule'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
// this.userList = res.data.data.EmpList
// console.log(res.data.data.EmpList, '')
}
})
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
DepartmentName
.
indexOf
(
value
)
!==
-
1
;
},
deleteUser
(
id
){
// 删除人员
if
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
id
)
!=-
1
){
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
id
),
1
)
}
if
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
)
!=-
1
)
{
this
.
myAuditUserList
.
splice
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
id
),
1
)
}
},
handleNodeChange
(
data
,
checked
)
{
//抄送人操作选中
data
.
IsCheck
=
checked
;
if
(
data
.
Type
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
let
isExsit
=
false
this
.
myAuditUserList
.
forEach
(
x
=>
{
if
(
x
.
EmployeeId
==
data
.
DepartmentId
)
{
isExsit
=
true
return
false
}
})
if
(
!
isExsit
)
{
this
.
myAuditUserList
.
push
({
EmName
:
data
.
DepartmentName
,
EmployeeId
:
data
.
DepartmentId
,
Sort
:
this
.
myAuditUserList
.
length
+
1
})
this
.
memberSetCheckedUserKeys
.
push
(
data
.
DepartmentId
)
}
}
else
if
(
data
.
Type
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
)
!=
-
1
)
{
this
.
myAuditUserList
.
splice
(
this
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
DepartmentId
),
1
)
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
DepartmentId
),
1
)
if
(
this
.
myAuditUserList
.
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
.
myAuditUserList
.
findIndex
(
item
=>
item
.
EmployeeId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedUserKeys
.
splice
(
this
.
memberSetCheckedUserKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
},
closedDialog
(){
this
.
MsgBus
.
$emit
(
'closeaaddCustomer'
)
},
addData
(){
},
submitForm
()
{
},
resetForm
()
{
// 重置表单
},
}
}
</
script
>
\ No newline at end of file
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