Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
horse
Commits
74e9e55a
Commit
74e9e55a
authored
Nov 23, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9d30a91a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
350 additions
and
136 deletions
+350
-136
customer.ts
src/api/customer.ts
+25
-0
departmentStaff.vue
src/components/common/departmentStaff.vue
+16
-6
customerPhase.vue
src/pages/customer/components/customerPhase.vue
+187
-123
createStageRange.vue
src/pages/editor/createStageRange.vue
+122
-7
No files found.
src/api/customer.ts
View file @
74e9e55a
...
...
@@ -206,6 +206,31 @@ class customerService {
data
})
}
// 保存客户阶段流程
static
async
setCustomerStageFlowInfo
(
data
:
{
Id
:
number
,
FlowName
:
string
,
DeptEmpList
:
Array
<
{
Id
:
number
,
Name
:
string
,
Type
:
number
}
>
,
UseStage
:
string
,
LoseCause
:
string
,
InvalidCause
:
string
,
}):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerStageFlowInfo'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
// 获取客户阶段流程详情
static
async
getCustomerStageFlowInfo
(
data
:
{
FlowId
:
number
,
}):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/GetCustomerStageFlowInfo'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
}
export
default
customerService
src/components/common/departmentStaff.vue
View file @
74e9e55a
...
...
@@ -57,12 +57,12 @@
<q-icon
name=
"work"
color=
"primary"
v-if=
"item.Id.slice(0, 1) ==
1
"
v-if=
"item.Id.slice(0, 1) ==
'1'
"
/>
<q-icon
name=
"person"
color=
"accent"
v-if=
"item.Id.slice(0, 1) ==
2
"
v-if=
"item.Id.slice(0, 1) ==
'2'
"
/>
<span
class=
"q-ml-sm"
>
{{ item.Name }}
</span>
</div>
...
...
@@ -75,7 +75,7 @@
<q-card-actions
align=
"right"
class=
"bg-white text-teal"
>
<q-btn
flat
label=
"取消"
v-close-popup
/>
<q-btn
color=
"primary"
v-close-popup
label=
"确定"
/>
<q-btn
color=
"primary"
@
click=
"goback"
label=
"确定"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
@@ -88,7 +88,8 @@ interface parmas {
}
interface
SelectParams
{
Id
:
string
,
Name
:
string
Name
:
string
,
Type
:
number
}
export
default
{
props
:
{
...
...
@@ -162,9 +163,11 @@ export default {
if
(
e
.
slice
(
0
,
1
)
==
1
)
{
const
node
=
tree
.
value
.
getNodeByKey
(
e
)
if
(
node
[
props
.
childrenKey
]
&&
node
[
props
.
childrenKey
].
length
>
0
)
{
// eslint-disable-next-line vue/no-mutating-props
props
.
defaultArray
.
splice
(
i
,
1
)
findChild
(
node
[
props
.
childrenKey
])
}
else
{
// eslint-disable-next-line vue/no-mutating-props
props
.
defaultArray
.
push
(
node
.
DataType
+
'-'
+
node
.
DeptId
)
}
}
...
...
@@ -178,10 +181,12 @@ export default {
if
(
e
[
props
.
childrenKey
]
&&
e
[
props
.
childrenKey
].
length
>
0
)
{
findChild
(
e
[
props
.
childrenKey
])
}
else
{
// eslint-disable-next-line vue/no-mutating-props
props
.
defaultArray
.
push
(
e
.
DataType
+
'-'
+
e
.
DeptId
)
}
})
}
let
showDialog
=
()
=>
{
initDefault
()
getselectArray
(
props
.
treeData
)
...
...
@@ -191,7 +196,7 @@ export default {
let
j
=
arr
[
i
]
let
flag
=
tree
.
value
.
isTicked
(
j
[
props
.
nodeKey
])
if
(
flag
==
true
)
{
selectArray
.
value
.
push
({
Id
:
j
[
props
.
nodeKey
],
Name
:
j
.
DeptName
})
selectArray
.
value
.
push
({
Id
:
j
[
props
.
nodeKey
],
Name
:
j
.
DeptName
,
Type
:
j
.
DataType
})
}
else
{
if
(
j
[
props
.
childrenKey
]
&&
j
[
props
.
childrenKey
].
length
>
0
)
{
getselectArray
(
j
[
props
.
childrenKey
])
...
...
@@ -244,6 +249,10 @@ export default {
watch
(()
=>
[...
selectArray
.
value
],
(
val
)
=>
{
ctx
.
emit
(
'select'
,
[...
val
])
},
{
deep
:
true
})
let
goback
=
()
=>
{
ctx
.
emit
(
'select_t'
,
selectArray
.
value
)
// eslint-disable-next-line vue/no-mutating-props
}
return
{
myFilterMethod
,
filter
,
...
...
@@ -257,7 +266,8 @@ export default {
selectArray
,
delItemArray
,
delItemitem
,
showDialog
showDialog
,
goback
}
}
...
...
src/pages/customer/components/customerPhase.vue
View file @
74e9e55a
This diff is collapsed.
Click to expand it.
src/pages/editor/createStageRange.vue
View file @
74e9e55a
...
...
@@ -24,8 +24,29 @@
</div>
<div
class=
"content-block"
>
<div
class=
"bold"
>
阶段适用范围
</div>
<q-btn
color=
"accent"
label=
"选择部门/成员"
@
click=
"choicemember"
/>
<div
class=
"user_lists"
v-if=
"state.addMsg.DeptEmpList && state.addMsg.DeptEmpList.length > 0"
>
<div
v-for=
"(x,y) in state.addMsg.DeptEmpList"
:key=
"y"
>
<q-chip
color=
"primary"
v-if=
"x.Id.slice(0, 1) == '1'"
text-color=
"white"
icon=
"work"
:label=
"x.Name"
></q-chip>
<q-chip
color=
"primary"
v-if=
"x.Id.slice(0, 1) == '2'"
text-color=
"white"
icon=
"person"
:label=
"x.Name"
></q-chip>
</div>
</div>
</div>
<div
class=
"content-block"
>
<div
class=
"bold"
>
...
...
@@ -53,7 +74,7 @@
</div>
</div>
<div
class=
"right-arrow"
>
<i
class=
"
el-icon-arrow-right
"
></i>
<i
class=
"
arrow_forward_ios
"
></i>
</div>
<div
class=
"all-stage"
:style=
"
{ height: state.getheight + 'px' }">
<p
class=
"select-item-title"
>
已选阶段
</p>
...
...
@@ -132,6 +153,7 @@
childrenKey=
"ChildList"
strategy=
"leaf"
:treeData=
"state.dataTree"
@
select_t=
"getdpt"
/>
</div>
</
template
>
...
...
@@ -143,6 +165,7 @@ import departmentStaff from '@/components/common/departmentStaff.vue'
import
customerService2
from
'@/api/customer2'
import
{
useQuasar
}
from
'quasar'
import
{
xorWith
}
from
'lodash'
export
default
defineComponent
({
...
...
@@ -168,6 +191,7 @@ export default defineComponent({
showDialog
:
false
,
defaultArray
:
[],
dataTree
:
[],
FlowId
:
0
,
//编辑上个页面带过来的
})
const
jumpBeforePage
=
()
=>
{
router
.
push
({
...
...
@@ -233,11 +257,65 @@ export default defineComponent({
})
}
const
savemove
=
()
=>
{
$q
.
notify
({
type
:
'negative'
,
message
:
'不能删除'
,
position
:
'top'
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
addMsg
))
if
(
data
.
FlowName
==
''
)
{
$q
.
notify
({
type
:
'negative'
,
message
:
'请填写名称'
,
position
:
'top'
})
return
}
if
(
data
.
DeptEmpList
.
length
==
0
)
{
//判断部门
$q
.
notify
({
type
:
'negative'
,
message
:
'请选择阶段适用范围'
,
position
:
'top'
})
return
}
else
{
data
.
DeptEmpList
=
[];
if
(
state
.
addMsg
.
DeptEmpList
&&
state
.
addMsg
.
DeptEmpList
.
length
>
0
)
{
state
.
addMsg
.
DeptEmpList
.
forEach
(
x
=>
{
let
obj
=
{
Id
:
x
.
Id
.
split
(
'-'
)[
1
],
Name
:
x
.
Name
,
Type
:
x
.
Type
,
}
data
.
DeptEmpList
.
push
(
obj
)
})
}
}
if
(
data
.
UseStage
.
length
>
0
)
{
data
.
UseStage
=
data
.
UseStage
.
join
(
','
)
}
else
{
data
.
UseStage
=
''
}
if
(
data
.
LoseCause
.
length
>
0
)
{
data
.
LoseCause
=
data
.
LoseCause
.
join
(
','
)
}
else
{
data
.
LoseCause
=
''
}
if
(
data
.
InvalidCause
.
length
>
0
)
{
data
.
InvalidCause
=
data
.
InvalidCause
.
join
(
','
)
}
else
{
data
.
InvalidCause
=
''
}
customerService
.
setCustomerStageFlowInfo
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
Code
==
1
)
{
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
data
.
Message
,
position
:
'top'
})
jumpBeforePage
()
}
})
}
let
choicemember
=
()
=>
{
state
.
showDialog
=
true
...
...
@@ -264,9 +342,44 @@ export default defineComponent({
}
})
}
let
getdpt
=
(
val
)
=>
{
state
.
addMsg
.
DeptEmpList
=
val
state
.
showDialog
=
false
}
let
getdetails
=
(
Id
:
number
)
=>
{
customerService
.
getCustomerStageFlowInfo
({
FlowId
:
Id
}).
then
(
res
=>
{
if
(
res
.
data
.
Code
==
1
)
{
state
.
addMsg
=
res
.
data
.
Data
if
(
state
.
addMsg
.
UseStage
.
length
!=
''
)
{
state
.
addMsg
.
UseStage
=
state
.
addMsg
.
UseStage
.
split
(
','
).
map
(
Number
)
}
else
{
state
.
addMsg
.
UseStage
=
[]
}
if
(
state
.
addMsg
.
LoseCause
.
length
!=
''
)
{
state
.
addMsg
.
LoseCause
=
state
.
addMsg
.
LoseCause
.
split
(
','
).
map
(
Number
)
}
else
{
state
.
addMsg
.
LoseCause
=
[]
}
if
(
state
.
addMsg
.
InvalidCause
.
length
!=
''
)
{
state
.
addMsg
.
InvalidCause
=
state
.
addMsg
.
InvalidCause
.
split
(
','
).
map
(
Number
)
}
else
{
state
.
addMsg
.
InvalidCause
=
[]
}
state
.
defaultArray
=
[]
state
.
addMsg
.
DeptEmpList
.
forEach
(
x
=>
{
x
.
Id
=
x
.
Id
+
'-'
+
x
.
Type
state
.
defaultArray
.
push
(
x
.
Id
+
'-'
+
x
.
Type
)
})
}
})
}
onMounted
(()
=>
{
getList
()
getEmployeeData
()
if
(
router
.
currentRoute
.
value
.
query
&&
router
.
currentRoute
.
value
.
query
.
FlowId
)
{
state
.
FlowId
=
router
.
currentRoute
.
value
.
query
.
FlowId
as
string
getdetails
(
state
.
FlowId
)
}
})
return
{
state
,
...
...
@@ -278,7 +391,9 @@ export default defineComponent({
savemove
,
choicemember
,
getEmployeeData
,
getChildList
getChildList
,
getdpt
,
getdetails
}
}
...
...
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