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
8dda8584
Commit
8dda8584
authored
Nov 19, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
45faabd9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
191 additions
and
2 deletions
+191
-2
customer.ts
src/api/customer.ts
+22
-0
customerPhase.vue
src/pages/customer/components/customerPhase.vue
+163
-0
customerSetup.vue
src/pages/customer/customerSetup.vue
+6
-2
No files found.
src/api/customer.ts
View file @
8dda8584
...
...
@@ -118,7 +118,29 @@
data
})
}
//获取客户阶段流程列表
static
async
getCustomerStageFlowList
(
data
:
msg
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/GetCustomerStageFlowList'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
//设置客户阶段流程状态
static
async
setCustomerStageFlowState
(
data
:
{
Type
:
number
,
FlowId
:
number
}):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerStageFlowState'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
}
export
default
customerService
\ No newline at end of file
src/pages/customer/components/customerPhase.vue
0 → 100644
View file @
8dda8584
<
template
>
<div
class=
"customerPhase page-body"
>
<div
style=
"display: flex;align-items: center;justify-content: space-between;"
>
<div
style=
"display: flex;align-items: center;"
>
<q-btn
v-if=
"state.data.length
<20
"
color=
"accent"
style=
"margin-bottom: 10px;"
class=
"q-mr-md"
label=
"创建阶段流程"
@
click=
"goestablish()"
size=
"sm"
></q-btn>
<span
style=
"margin-left: 20px;color: rgb(133, 133, 152);"
>
已添加:
{{
state
.
data
.
length
}}
/20
</span>
</div>
<q-btn
color=
"white"
text-color=
"black"
style=
"margin-bottom: 10px;"
class=
"q-mr-md"
label=
"阶段管理"
size=
"sm"
@
click=
"stageManagement()"
></q-btn>
</div>
<table
class=
"payTable"
>
<thead>
<tr>
<th>
名称
</th>
<th>
适用范围
</th>
<th>
启用
</th>
<th>
阶段
</th>
<th
width=
"13%"
>
操作信息
</th>
<th
width=
"12%"
>
操作
</th>
</tr>
</thead>
<tr
v-if=
"state.data.length==0"
>
<td
:colspan=
"6"
align=
"center"
>
暂无数据
</td>
</tr>
<tr
v-for=
"(item,index) in state.data"
:key=
"index"
>
<td><span>
{{
item
.
FlowName
}}
</span></td>
<td>
<span
v-if=
'item.DeptEmpList && item.DeptEmpList.length>0'
v-for=
"(x,y) in item.DeptEmpList"
:key=
'y'
>
<q-chip
color=
"blue-1"
text-color=
"blue"
icon=
"folder"
size=
"sm"
v-if=
"x.Type==1"
>
{{
x
.
Name
}}
</q-chip>
<q-chip
color=
"green-1"
text-color=
"green"
icon=
"person"
size=
"sm"
v-if=
"x.Type==2"
>
{{
x
.
Name
}}
</q-chip>
</span>
<span
v-else
>
未适配其他规则的阶段
</span>
</td>
<td>
<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"
@
update:model-value=
"setFiledState(item.Id,1)"
/>
</td>
<td>
<span
v-for=
"(x,y) in item.StageList"
:key=
'y'
>
{{
x
}}{{
item
.
StageList
.
length
!=
y
+
1
?
'->'
:
''
}}
</span>
</td>
<td>
<div>
{{
item
.
UpdateByName
}}
</div>
<div>
{{
item
.
UpdateTime
}}
</div>
</td>
<td>
<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.Id)"
/>
</td>
</tr>
</table>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
,
reactive
}
from
'vue'
import
customerService
from
'@/api/customer'
import
{
useQuasar
}
from
'quasar'
export
default
defineComponent
({
setup
(){
const
$q
=
useQuasar
()
const
state
=
reactive
({
data
:[],
})
const
getList
=
()
=>
{
customerService
.
getCustomerStageFlowList
({
Enable
:
0
}).
then
((
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
state
.
data
=
res
.
data
.
Data
}
else
{
//如果移动失败 重新获取列表
}
})
}
const
godelete
=
(
Id
:
number
)
=>
{
$q
.
dialog
({
title
:
"提示信息"
,
message
:
'是否删除该阶段流程'
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
}
}).
onOk
(()
=>
{
setFiledState
(
Id
,
2
)
});
}
const
setFiledState
=
(
Id
:
number
,
Type
:
number
)
=>
{
console
.
log
(
Id
,
Type
)
let
msg
=
{
Type
:
Type
,
FlowId
:
Id
,
}
customerService
.
setCustomerStageFlowState
(
msg
).
then
((
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
data
.
Message
,
position
:
'top'
})
getList
()
}
else
{
//如果移动失败 重新获取列表
}
})
}
onMounted
(()
=>
{
getList
()
})
return
{
getList
,
state
,
setFiledState
,
godelete
}
}
})
</
script
>
<
style
>
.customerPhase
.payTable
{
width
:
100%
;
border-collapse
:
collapse
;
}
.customerPhase
.payTable
tr
th
{
background
:
#fff
;
height
:
40px
;
font-size
:
12px
;
font-weight
:
bold
;
color
:
#2D2D2D
;
background
:
#f5f5fa
;
}
.customerPhase
.payTable
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
40px
;
}
.customerPhase
.payTable
tr
td
{
font-size
:
13px
;
text-align
:
center
;
color
:
#2D2D2D
;
padding
:
10px
0
;
font-weight
:
bold
;
border-bottom
:
1px
solid
#E5E5E5
;
}
</
style
>
\ No newline at end of file
src/pages/customer/customerSetup.vue
View file @
8dda8584
...
...
@@ -14,10 +14,12 @@
<q-tab
name=
"field"
label=
"客户字段"
/>
<q-tab
name=
"label"
label=
"标签"
/>
<q-tab
name=
"clue"
label=
"线索分配规则"
/>
<q-tab
name=
"phase"
label=
"客户阶段"
/>
</q-tabs>
<div>
<customer-Field
v-if=
"tab == 'field'"
></customer-Field>
<clue-rule
v-if=
"tab == 'clue'"
></clue-rule>
<customer-phase
v-if=
"tab == 'phase'"
></customer-phase>
</div>
</q-page>
</div>
...
...
@@ -26,6 +28,7 @@
<
script
lang=
"ts"
>
import
customerField
from
'./components/customerField.vue'
import
clueRule
from
'./components/clueRule.vue'
import
customerPhase
from
'./components/customerPhase.vue'
import
{
defineComponent
,
ref
...
...
@@ -33,11 +36,12 @@ import {
export
default
defineComponent
({
components
:
{
customerField
,
clueRule
clueRule
,
customerPhase
},
setup
()
{
return
{
tab
:
ref
(
'
clu
e'
)
tab
:
ref
(
'
phas
e'
)
}
}
...
...
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