Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
cf97a8dd
Commit
cf97a8dd
authored
Sep 24, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户阶段页面修改
parent
0ed441c5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
273 additions
and
75 deletions
+273
-75
wechat.js
src/api/system/wechat.js
+41
-0
addPhase.vue
src/pages/enterprise/customer/CSChild/addPhase.vue
+42
-6
choiceapprovalorbranch.vue
...se/customer/CSChild/components/choiceapprovalorbranch.vue
+111
-30
customerPhase.vue
src/pages/enterprise/customer/CSChild/customerPhase.vue
+26
-35
stageManagement.vue
src/pages/enterprise/customer/CSChild/stageManagement.vue
+53
-4
No files found.
src/api/system/wechat.js
View file @
cf97a8dd
...
...
@@ -514,6 +514,47 @@ export function SetSynvEduEmployee(data) {
data
})
}
/**
* 获取客户阶段流程详情
*
*/
export
function
getCustomerStageFlowInfo
(
data
)
{
return
request
({
url
:
'/QYCustomer/GetCustomerStageFlowInfo'
,
method
:
'post'
,
data
})
}
/**
* 设置客户阶段流程状态
*/
export
function
setCustomerStageFlowState
(
data
)
{
return
request
({
url
:
'/QYCustomer/SetCustomerStageFlowState'
,
method
:
'post'
,
data
})
}
/**
* 验证该阶段是否可以删除
*/
export
function
validataCustomerStageDel
(
data
)
{
return
request
({
url
:
'/QYCustomer/ValidataCustomerStageDel'
,
method
:
'post'
,
data
})
}
/**
* 验证阶段输单/无效的 原因选项是否可以删除
*/
export
function
validataCustomerCauseDel
(
data
)
{
return
request
({
url
:
'/QYCustomer/ValidataCustomerCauseDel'
,
method
:
'post'
,
data
})
}
...
...
src/pages/enterprise/customer/CSChild/addPhase.vue
View file @
cf97a8dd
...
...
@@ -138,8 +138,7 @@
</q-card-actions>
</div>
<!-- 人员/部门选择 -->
<choiceapprovalorbranch
v-if=
"outerVisible"
@
close=
"outerVisible = false"
@
success=
"getsuccess2"
:list=
showMember
:byval=
'defaultlist'
cptype=
"1"
></choiceapprovalorbranch>
<choiceapprovalorbranch
v-if=
"outerVisible"
@
close=
"outerVisible = false"
@
success=
"getsuccess2"
:list=
showMember
cptype=
"1"
></choiceapprovalorbranch>
</div>
</
template
>
...
...
@@ -147,7 +146,8 @@
import
choiceapprovalorbranch
from
'./components/choiceapprovalorbranch'
import
{
getCustomerStageList
,
setCustomerStageFlowInfo
setCustomerStageFlowInfo
,
getCustomerStageFlowInfo
}
from
'../../../../api/system/wechat'
;
export
default
{
meta
:
{
...
...
@@ -176,9 +176,11 @@
UseStageName
:
[],
getheight
:
270
,
gettypeoneList
:
[],
//跟进阶段的数量
FlowId
:
0
}
},
created
()
{
this
.
getCustomerStageList
()
},
methods
:
{
...
...
@@ -230,7 +232,6 @@
}
else
{
data
.
InvalidCause
=
''
}
console
.
log
(
data
)
this
.
loading
=
true
setCustomerStageFlowInfo
(
data
).
then
(
res
=>
{
this
.
loading
=
false
...
...
@@ -246,6 +247,37 @@
}
})
},
getdetails
()
{
//获取详情
getCustomerStageFlowInfo
({
FlowId
:
this
.
FlowId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
addMsg
=
res
.
Data
if
(
this
.
addMsg
.
UseStage
.
length
!=
''
)
{
this
.
addMsg
.
UseStage
=
this
.
addMsg
.
UseStage
.
split
(
','
).
map
(
Number
)
}
else
{
this
.
addMsg
.
UseStage
=
[]
}
if
(
this
.
addMsg
.
LoseCause
.
length
!=
''
)
{
this
.
addMsg
.
LoseCause
=
this
.
addMsg
.
LoseCause
.
split
(
','
).
map
(
Number
)
}
else
{
this
.
addMsg
.
LoseCause
=
[]
}
if
(
this
.
addMsg
.
InvalidCause
.
length
!=
''
)
{
this
.
addMsg
.
InvalidCause
=
this
.
addMsg
.
InvalidCause
.
split
(
','
).
map
(
Number
)
}
else
{
this
.
addMsg
.
InvalidCause
=
[]
}
this
.
showMember
=
[]
this
.
addMsg
.
DeptEmpList
.
forEach
(
x
=>
{
let
obj
=
{
DeptId
:
x
.
Id
,
DeptName
:
x
.
Name
,
DataType
:
x
.
Type
,
}
this
.
showMember
.
push
(
obj
)
})
}
})
},
getCustomerStageList
()
{
getCustomerStageList
({}).
then
(
res
=>
{
this
.
loading
=
false
...
...
@@ -264,13 +296,17 @@
this
.
getheight
=
71
+
Number
(
this
.
gettypeoneList
.
length
)
*
40
}
this
.
getusestageName
()
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
FlowId
)
{
//如果有的话 调接口
this
.
FlowId
=
this
.
$route
.
query
.
FlowId
this
.
getdetails
()
}
}
})
},
getsuccess2
(
list
,
defaultlist
)
{
getsuccess2
(
list
)
{
this
.
showMember
=
list
this
.
outerVisible
=
false
this
.
defaultlist
=
defaultlist
//
this.defaultlist = defaultlist
},
stageManagement
()
{
//跳转到阶段管理
...
...
src/pages/enterprise/customer/CSChild/components/choiceapprovalorbranch.vue
View file @
cf97a8dd
...
...
@@ -42,12 +42,22 @@
<el-tree
class=
'ApprovalProcessBg'
:filter-node-method=
"filterNode"
:data=
"memberList"
show-checkbox
ref=
"treeUser"
:props=
"defaultProps"
:render-after-expand=
"false"
node-key=
"DeptId"
@
check-change=
"handleNodeChange"
@
check=
'btncheck'
>
<span
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
<i
class=
"el-icon-folder"
v-if=
"data.DataType==1"
style=
"margin-right: 3px;color: var(--q-color-primary)!important;"
></i>
<i
class=
"el-icon-user-solid"
v-if=
"data.DataType==2"
style=
"margin-right: 3px;color: var(--q-color-primary)!important;"
></i>
{{
node
.
label
}}
</span>
</span>
</el-tree>
</div>
<div
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 20px 0;"
>
已选:
</p>
<div
class=
"Approval_yxList"
>
<li
v-for=
"item in newList"
>
{{
item
.
DeptName
}}
<li
v-for=
"item in newList"
>
<i
v-if=
"item.DataType==1"
class=
"el-icon-folder"
style=
"margin-right: 3px;color: var(--q-color-primary)!important;"
></i>
<i
v-if=
"item.DataType==2"
class=
"el-icon-user-solid"
style=
"margin-right: 3px;color: var(--q-color-primary)!important;"
></i>
{{
item
.
DeptName
}}
<i
@
click=
"mySetCheckedKeys(item)"
class=
"el-icon-circle-close showMemberIcon"
></i>
</li>
...
...
@@ -80,10 +90,10 @@
type
:
String
,
default
:
''
,
},
byval
:
{
type
:
Array
,
default
:
[],
},
//
byval: {
//
type: Array,
//
default: [],
//
},
cptype
:
{
//1是列表上使用2 新增使用
type
:
String
,
default
:
'1'
,
...
...
@@ -114,15 +124,14 @@
},
created
()
{
this
.
IsShow
=
true
if
(
this
.
byval
.
length
>
0
)
{
this
.
memberSetCheckedKeys
=
[];
this
.
showMember
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
byval
))
this
.
newList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
list
))
this
.
byval
.
forEach
(
x
=>
{
this
.
memberSetCheckedKeys
.
push
(
x
.
DeptId
)
})
}
// if (this.byval.length > 0) {
// this.memberSetCheckedKeys = [];
// this.showMember = JSON.parse(JSON.stringify(this.byval))
// this.byval.forEach(x => {
// this.memberSetCheckedKeys.push(x.DeptId)
// })
// }
this
.
getMember
()
//部门下面选择员工
},
mounted
()
{
...
...
@@ -134,12 +143,77 @@
},
},
methods
:
{
huoqucheckedkey
(){
//根据传过来的list 数据处理
let
newList
=
this
.
newList
;
this
.
memberList
.
forEach
(
x
=>
{
newList
.
forEach
(
z
=>
{
if
(
x
.
DeptId
==
z
.
DeptId
){
this
.
memberSetCheckedKeys
.
push
(
x
.
DeptId
)
this
.
showMember
.
push
(
x
)
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
){
x
.
ChildList
.
forEach
(
j
=>
{
this
.
memberSetCheckedKeys
.
push
(
j
.
DeptId
)
this
.
showMember
.
push
(
j
)
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
huoqucheckedkey_yes
(
j
.
ChildList
)
}
})
}
}
else
{
this
.
huoqucheckedkey_no
(
x
.
ChildList
,
z
.
DeptId
)
}
})
})
},
huoqucheckedkey_no
(
ChildList
,
id
){
if
(
ChildList
&&
ChildList
.
length
>
0
){
ChildList
.
forEach
(
x
=>
{
if
(
x
.
DeptId
==
id
){
this
.
memberSetCheckedKeys
.
push
(
x
.
DeptId
)
this
.
showMember
.
push
(
x
)
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
x
.
ChildList
.
forEach
(
j
=>
{
this
.
memberSetCheckedKeys
.
push
(
j
.
DeptId
)
this
.
showMember
.
push
(
j
)
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
huoqucheckedkey_yes
(
j
.
ChildList
)
}
})
}
}
else
{
this
.
huoqucheckedkey_no
(
x
.
ChildList
,
id
)
}
})
}
},
huoqucheckedkey_yes
(
ChildList
){
ChildList
.
forEach
(
j
=>
{
this
.
memberSetCheckedKeys
.
push
(
j
.
DeptId
)
this
.
showMember
.
push
(
j
)
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
huoqucheckedkey_yes
(
j
.
ChildList
)
}
})
},
getMember
()
{
let
_arr
=
this
.
sysUserKeys
.
concat
(
this
.
memberSetCheckedKeys
)
getEmployeeAddrBook
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
memberList
=
res
.
Data
let
_this
=
this
;
if
(
this
.
list
.
length
>
0
){
this
.
memberSetCheckedKeys
=
[];
this
.
showMember
=
[]
this
.
newList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
list
))
this
.
huoqucheckedkey
()
console
.
log
(
this
.
memberSetCheckedKeys
)
console
.
log
(
this
.
showMember
)
}
let
_arr
=
this
.
sysUserKeys
.
concat
(
this
.
memberSetCheckedKeys
)
_this
.
$refs
.
treeUser
.
setCheckedKeys
(
_arr
);
}
}).
catch
(()
=>
{
...
...
@@ -268,9 +342,13 @@
}
}
else
{
this
.
qudiaoziji2
(
x
.
ChildList
,
id
)
}
})
this
.
memberSetCheckedKeys
=
this
.
arrayWeightRemoval
(
this
.
memberSetCheckedKeys
,
this
.
rightobj
)
},
qudiaoziji_t
(
ChildList
)
{
...
...
@@ -282,21 +360,24 @@
})
},
qudiaoziji2
(
ChildList
,
id
){
ChildList
.
forEach
(
x
=>
{
if
(
x
.
DeptId
==
id
){
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
x
.
ChildList
.
forEach
(
j
=>
{
this
.
rightobj
.
push
(
j
.
DeptId
)
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
qudiaoziji_t
(
j
.
ChildList
)
}
})
if
(
ChildList
&&
ChildList
.
length
>
0
){
ChildList
.
forEach
(
x
=>
{
if
(
x
.
DeptId
==
id
){
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
x
.
ChildList
.
forEach
(
j
=>
{
this
.
rightobj
.
push
(
j
.
DeptId
)
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
qudiaoziji_t
(
j
.
ChildList
)
}
})
}
}
else
{
this
.
qudiaoziji2
(
x
.
ChildList
,
id
)
}
}
else
{
this
.
qudiaoziji2
(
x
.
ChildList
,
id
)
}
})
})
}
},
arrayWeightRemoval
(
array1
,
array2
)
{
//临时数组存放
...
...
@@ -321,7 +402,7 @@
this
.
$emit
(
'close'
)
},
saveOrderInfo
()
{
this
.
$emit
(
'success'
,
this
.
newList
,
this
.
showMember
)
this
.
$emit
(
'success'
,
this
.
newList
)
}
...
...
src/pages/enterprise/customer/CSChild/customerPhase.vue
View file @
cf97a8dd
...
...
@@ -27,18 +27,23 @@
<tr
v-for=
"(item,index) in data"
:key=
"index"
>
<td><span>
{{
item
.
FlowName
}}
</span></td>
<td>
<span
v-for=
"(x,y) in item.DeptEmpList"
:key=
'y'
>
<el-tag
type=
"danger"
v-if=
"x.Type==0"
>
{{
x
.
Name
}}
</el-tag>
<el-tag
type=
"success"
v-if=
"x.Type==1"
>
{{
x
.
Name
}}
</el-tag>
<el-tag
v-if=
"x.Type==2"
>
{{
x
.
Name
}}
</el-tag>
<span
v-if=
'item.DeptEmpList && item.DeptEmpList.length>0'
v-for=
"(x,y) in item.DeptEmpList"
:key=
'y'
>
<!--
<el-tag
type=
"danger"
v-if=
"x.Type==0"
>
{{
x
.
Name
}}
</el-tag>
<el-tag
type=
"success"
v-if=
"x.Type==1"
>
{{
x
.
Name
}}
</el-tag>
-->
<el-tag
style=
"margin-right: 15px;margin-bottom: 5px;"
v-if=
"x.Type==1"
><i
class=
"el-icon-folder"
style=
"margin-right: 3px;"
></i>
{{
x
.
Name
}}
</el-tag>
<el-tag
style=
"margin-right: 15px;margin-bottom: 5px"
type=
"success"
v-if=
"x.Type==2"
><i
class=
"el-icon-user-solid"
style=
"margin-right: 3px;"
></i>
{{
x
.
Name
}}
</el-tag>
<el-tag
v-if=
"x.Type==0"
>
{{
x
.
Name
}}
</el-tag>
</span>
<span
v-else
>
未适配其他规则的阶段
</span>
</td>
<td>
<q-toggle
v-if=
"item.IsDefault==1"
v-model=
"item.Enable"
:true-value=
"1"
:false-value=
"2"
<q-toggle
v-if=
"item.IsDefault==1"
v-model=
"item.Enable"
:true-value=
"1"
:false-value=
"2"
icon=
"lock"
disable
/>
<q-toggle
v-else
v-model=
"item.Enable"
:true-value=
"1"
:false-value=
"2"
@
input=
"godelete(item,1,index
)"
/>
@
input=
"setFiledState(item,1
)"
/>
</td>
<td>
<span
v-for=
"(x,y) in item.StageList"
:key=
'y'
>
...
...
@@ -53,7 +58,7 @@
<q-btn
v-if=
'item.IsDefault!=1'
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(item)"
/>
<q-btn
v-if=
'item.IsDefault!=1'
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"godelete(item
,3,index
)"
/>
label=
"删除"
@
click=
"godelete(item)"
/>
</td>
</tr>
...
...
@@ -71,7 +76,7 @@
import
addfield
from
"./components/addfield"
import
{
getCustomerStageFlowList
,
setCustomerStageFlowState
}
from
'../../../../api/system/wechat'
;
//部门
import
{
...
...
@@ -106,31 +111,17 @@
this
.
addMsg
=
null
},
goedit
(
item
)
{
this
.
Isadd
=
true
;
this
.
addMsg
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
},
godelete
(
item
,
type
,
index
)
{
//删除
let
text
=
''
if
(
type
==
1
)
{
//tyep等于1和2的时候 先让弹出提示 然后再给予掉接口 所以把原本的值暂时先赋值给本身
text
=
'确定修改启用状态'
if
(
item
.
Enable
==
2
)
{
this
.
data
[
index
].
Enable
=
1
}
else
{
this
.
data
[
index
].
Enable
=
2
}
}
else
if
(
type
==
2
)
{
text
=
'确定修改必填状态'
if
(
item
.
Required
==
2
)
{
this
.
data
[
index
].
Required
=
1
}
else
{
this
.
data
[
index
].
Required
=
2
this
.
$router
.
push
({
path
:
'/enterprise/customer/CSChild/addPhase'
,
query
:
{
FlowId
:
item
.
Id
}
}
else
if
(
type
==
3
)
{
text
=
'删除后字段不在显示,是否删除?'
}
}
);
},
godelete
(
item
)
{
//删除
this
.
$q
.
dialog
({
title
:
"提示信息"
,
message
:
text
,
message
:
'是否删除该阶段流程'
,
cancel
:
{
label
:
"取消"
,
flat
:
true
...
...
@@ -141,18 +132,18 @@
focus
:
true
}
}).
onOk
(()
=>
{
this
.
setFiledState
(
item
,
type
)
this
.
setFiledState
(
item
,
2
)
});
},
setFiledState
(
item
,
Type
)
{
setFiledState
(
item
,
Type
)
{
console
.
log
(
'2'
)
let
msg
=
{
Type
:
Type
,
FiledId
:
item
.
Id
,
SortFiledId
:
0
,
FlowId
:
item
.
Id
,
}
setCustomer
Filed
State
(
msg
).
then
(
res
=>
{
setCustomer
StageFlow
State
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
...
...
src/pages/enterprise/customer/CSChild/stageManagement.vue
View file @
cf97a8dd
...
...
@@ -49,7 +49,7 @@
<q-input
clearable
debounce
filled
maxlength=
"10"
counter
v-model=
"x.Name"
style=
"width:500px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
<q-btn
flat
size=
"sm"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
style=
"margin-left: 10px;"
label=
""
@
click=
"
followupStage.splice(y,1
)"
/>
@
click=
"
getStageDel(x,y
)"
/>
</li>
</div>
</ul>
...
...
@@ -89,7 +89,7 @@
<q-input
clearable
debounce
filled
maxlength=
"10"
counter
v-model=
"item.Name"
style=
"width:500px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
<q-btn
flat
size=
"sm"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
style=
"margin-left: 10px;"
label=
""
@
click=
"
reasonList[y].OptionsList.splice(index,1
)"
/>
@
click=
"
setCauseDel(y,index,x,item
)"
/>
</li>
</draggable>
</ul>
...
...
@@ -116,7 +116,9 @@
import
draggable
from
"vuedraggable"
import
{
getCustomerStageList
,
setCustomerStageInfo
setCustomerStageInfo
,
validataCustomerStageDel
,
validataCustomerCauseDel
}
from
'../../../../api/system/wechat'
;
export
default
{
meta
:
{
...
...
@@ -218,9 +220,12 @@
return
break
}
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
x
.
OptionsList
))
let
maxnum
=
list
.
sort
((
a
,
b
)
=>
{
return
b
.
Id
-
a
.
Id
})[
0
].
Id
for
(
let
j
=
0
;
j
<
x
.
OptionsList
.
length
;
j
++
)
{
let
z
=
x
.
OptionsList
[
j
]
z
.
Id
=
j
+
1
if
(
z
.
Name
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
@@ -231,6 +236,10 @@
return
break
}
if
(
z
.
Id
==
0
){
z
.
Id
=
maxnum
+
1
;
maxnum
++
}
}
}
this
.
addMsg
=
[]
...
...
@@ -253,6 +262,46 @@
this
.
loading
=
false
})
},
getStageDel
(
x
,
index
){
//判断阶段是否能删除
validataCustomerStageDel
({
StageId
:
x
.
Id
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
if
(
res
.
Data
.
UseState
==
false
){
this
.
followupStage
.
splice
(
index
,
1
)
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'不能删除'
,
position
:
'top'
})
}
}
}).
catch
((
e
)
=>
{
})
},
setCauseDel
(
y
,
index
,
x
,
item
){
//验证阶段输单/无效的 原因选项是否可以删除
console
.
log
(
y
,
index
,
x
,
item
)
let
Type
=
1
if
(
x
.
Name
==
'无效'
)
Type
=
2
let
data
=
{
CauseId
:
item
.
Id
,
Type
:
Type
}
validataCustomerCauseDel
(
data
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
if
(
res
.
Data
.
UseState
==
false
){
this
.
reasonList
[
y
].
OptionsList
.
splice
(
index
,
1
)
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'不能删除'
,
position
:
'top'
})
}
}
}).
catch
((
e
)
=>
{
})
}
}
}
</
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