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
0406a55a
Commit
0406a55a
authored
Dec 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
77822a16
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
197 additions
and
32 deletions
+197
-32
enumHelper.ts
src/@types/enumHelper.ts
+47
-2
App.vue
src/App.vue
+5
-0
clue.ts
src/api/clue.ts
+17
-1
clueHead.vue
src/components/clue/clueHead.vue
+7
-15
selectCard.vue
src/components/clue/selectCard.vue
+103
-0
whereList.vue
src/components/common/customWhere/whereList.vue
+2
-2
whereNodeValue.vue
src/components/common/customWhere/whereNodeValue.vue
+1
-1
svg-icon.vue
src/components/global/svg-icon.vue
+2
-1
clueModule.ts
src/module/customer/clueModule.ts
+3
-2
clue.vue
src/pages/customerManage/clue.vue
+10
-8
No files found.
src/@types/enumHelper.ts
View file @
0406a55a
...
...
@@ -35,7 +35,52 @@ export enum ScaleType {
/**
* @description 是否为默认的字段
*/
export
enum
ColumnDefaultState
{
export
enum
ColumnDefaultState
{
'Yes'
=
1
,
'No'
=
0
}
\ No newline at end of file
}
/**
* @description 线索状态处理
*/
export
enum
ClueStatus
{
/**
* @description 有效线索
*/
'Effective'
=
1
,
/**
* @description 无效线索
*/
'Invalid'
=
2
,
/**
* @description 待回访
*/
'Return'
=
3
,
/**
* @description 直接分配
*/
'Direct'
=
4
,
/**
* @description 重置无效线索
*/
'Override'
=
5
}
/**
* @description 线索分配方式
*/
export
enum
ClueDistribution
{
/**
* @description 手动
*/
Manual
=
1
,
/**
* @description 自动
*/
Auto
=
2
}
src/App.vue
View file @
0406a55a
...
...
@@ -23,4 +23,9 @@ export default defineComponent({
fill
:
#ddd
!
important
.all-borders
border
:
1px
solid
#ddd
.svg-icon-darkgrey
g
[
fill
]
transition
:
fill
0
.3s
ease
fill
:
#999
!
important
.group-select
.q-field__control
padding-left
:
0px
!
important
</
style
>
src/api/clue.ts
View file @
0406a55a
import
Axios
from
'./axios'
import
{
HttpResponse
}
from
'@/@types'
interface
ClueParams
{
ClueState
:
number
ClueState
:
number
PageIndex
:
number
PageSize
:
number
pageCount
:
number
...
...
@@ -31,6 +31,22 @@ class clueService {
data
})
}
//设置线索状态
static
async
setCustomerClueState
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/SetCustomerClueState'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
//设置线索状态
static
async
getClueRuleStatus
(
data
:
any
):
Promise
<
HttpResponse
>
{
return
Axios
(
'/QYCustomer/GetClueRuleStatus'
,
{
method
:
'post'
,
responseType
:
'json'
,
data
})
}
}
export
{
ClueParams
}
...
...
src/components/c
ustomer
/clueHead.vue
→
src/components/c
lue
/clueHead.vue
View file @
0406a55a
<
template
>
<div
class=
"row q-mx-md relative-position vt-header-box"
>
<div
class=
"row q-mx-md relative-position vt-header-box"
v-if=
"!selectColumns || selectColumns.length==0"
>
<search-box
v-model=
"queryMsg.searchKey"
@
blur=
"reloadDataHandler"
></search-box>
<q-input
class=
"q-ml-md"
outlined
dense
v-model=
"queryMsg.formatCreateDateRange"
placeholder=
"创建时间"
readonly
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
...
...
@@ -9,30 +9,24 @@
<vt-custom-btn
v-if=
"allColumn && allColumn.length > 0"
ref=
"vtBtn"
:page-code=
"pageCode"
:columns=
"allColumn"
@
empty-where=
"deleteWhereHandler(0)"
@
update-where=
"updateWhereHandler"
></vt-custom-btn>
<q-btn
class=
"q-ml-md q-px-md"
color=
"dark"
label=
"重置"
dense
outline
@
click=
"deleteWhereHandler(1)"
></q-btn>
</div>
<select-card></select-card>
</
template
>
<
script
>
import
searchBox
from
'../common/searchBox.vue'
import
{
formatDateTime
}
from
'@/utils/tools'
import
vtCustomBtn
from
'../common/customWhere/vtCustomBtn.vue'
import
{
reactive
,
computed
,
ref
}
from
'vue'
import
{
reactive
,
ref
,
inject
}
from
'vue'
import
{
GetLabelObject
,
GetChannelObject
}
from
'@/utils/customColumn'
import
selectCard
from
'./selectCard.vue'
export
default
{
props
:
{
/**
* @description 模式:0为未选择表格内容模式,1为选中了表格内容模式
*/
mode
:
{
type
:
Number
,
default
:
0
|
1
},
/**
* @description 列数组
*/
columns
:
Array
},
components
:
{
searchBox
,
vtCustomBtn
},
components
:
{
searchBox
,
vtCustomBtn
,
selectCard
},
setup
(
props
,
context
)
{
const
allColumn
=
ref
(
props
.
columns
)
allColumn
.
value
.
splice
(
0
,
0
,
GetLabelObject
())
...
...
@@ -58,9 +52,7 @@ export default {
AddCondition
:
1
})
const
modelType
=
computed
(()
=>
{
return
props
.
mode
})
const
selectColumns
=
inject
(
"selectList"
)
const
updateCreateRange
=
e
=>
{
if
(
e
.
from
&&
e
.
to
)
{
...
...
@@ -122,7 +114,7 @@ export default {
pushRelaodHandler
()
}
return
{
queryMsg
,
modelType
,
allColumn
,
updateCreateRange
,
optionsFn
,
vtBtn
,
qDateProxy
,
pageCode
,
updateWhereHandler
,
deleteWhereHandler
,
reloadDataHandler
}
return
{
queryMsg
,
selectColumns
,
allColumn
,
updateCreateRange
,
optionsFn
,
vtBtn
,
qDateProxy
,
pageCode
,
updateWhereHandler
,
deleteWhereHandler
,
reloadDataHandler
}
}
}
</
script
>
...
...
src/components/clue/selectCard.vue
0 → 100644
View file @
0406a55a
<
template
>
<q-card
v-if=
"selectList && selectList.length > 0"
class=
"row items-center bg-grey-2 q-px-md"
style=
"height: 40px; border-radius: 4px"
flat
>
<div
class=
"text-subtitle1 col"
>
已选中
{{
selectList
.
length
}}
项
</div>
<div
class=
"flex items-center"
>
<q-btn
class=
"q-px-md"
color=
"dark"
label=
"有效线索"
dense
outline
@
click=
"setCuleStatusHandler(ClueStatus.Effective)"
></q-btn>
<q-btn
class=
"q-ml-md q-px-md"
color=
"dark"
label=
"无效线索"
dense
outline
@
click=
"deleteWhereHandler(1)"
></q-btn>
<q-btn
class=
"q-ml-md q-px-md"
color=
"dark"
label=
"待回访"
dense
outline
@
click=
"deleteWhereHandler(1)"
></q-btn>
<q-btn
class=
"q-ml-md q-px-md"
color=
"dark"
dense
outline
@
click=
"deleteWhereHandler(1)"
>
<span>
直接分配
</span>
<svg-icon
icon=
"Code/Question-circle.svg"
:size=
"20"
color=
"svg-icon-darkgrey"
>
<q-tooltip
anchor=
"bottom middle"
max-width=
"200px"
class=
"bg-white text-dark shadow-3"
self=
"top middle"
:offset=
"[1, 5]"
>
<div
class=
"f12"
>
以下原因可能导致分配失败:
<br
/>
① 存在撞单的客户;
<br
/>
② 被分配的员工已有该客户;
<br
/>
③ 员工的私库已达到上限;
<br
/>
④ 客户已存在于公海;
<br
/>
⑤ 员工已经有该手机号的客户;
<br
/>
⑥ 撞单,其它员工已存在该手机号的客户;
<br
/>
⑦ 公海已存在该手机号的客户;
<br
/>
</div>
</q-tooltip>
</svg-icon>
</q-btn>
<q-separator
vertical
class=
"q-ml-md"
></q-separator>
<q-btn
class=
"q-ml-md q-px-md"
color=
"dark"
label=
"设置标签"
dense
outline
@
click=
"deleteWhereHandler(1)"
></q-btn>
<q-btn
class=
"q-ml-md q-px-md"
color=
"negative"
label=
"彻底删除"
dense
outline
@
click=
"deleteWhereHandler(1)"
></q-btn>
<svg-icon
icon=
"Code/Error-circle.svg"
size=
"20"
color=
"svg-icon-darkgrey q-ml-md cursor-pointer"
tips=
"清除选中"
@
click=
"clearSelectListHandler"
></svg-icon>
</div>
</q-card>
</
template
>
<
script
>
import
{
inject
,
ref
,
reactive
,
toRefs
}
from
'vue'
import
svgIcon
from
'../global/svg-icon.vue'
import
clueService
from
'@/api/clue'
import
customerSetService
from
'@/api/customerSet'
import
message
from
'@/utils/message'
import
{
ClueDistribution
,
ClueStatus
}
from
'@/@types/enumHelper'
import
{
useQuasar
}
from
'quasar'
export
default
{
components
:
{
svgIcon
},
setup
()
{
const
selectList
=
inject
(
'selectList'
)
const
ruleConfig
=
ref
(
null
)
const
$q
=
useQuasar
()
const
data
=
reactive
({
loading
:
false
,
ClueStatus
})
const
dataRefs
=
toRefs
(
data
)
customerSetService
.
getCustomerClueRuleConfig
({}).
then
(
r
=>
{
if
(
r
.
data
&&
r
.
data
.
Data
)
{
ruleConfig
.
value
=
r
.
data
.
Data
}
})
const
deleteWhereHandler
=
()
=>
{
console
.
log
(
'....'
)
}
const
clearSelectListHandler
=
()
=>
{
selectList
.
value
=
[]
}
const
setCuleStatusHandler
=
status
=>
{
if
(
selectList
.
value
&&
selectList
.
value
.
length
>
0
)
{
let
tempIds
=
''
selectList
.
value
.
forEach
(
x
=>
(
tempIds
+=
`,
${
x
.
Id
}
`
))
console
.
log
(
status
,
ClueStatus
.
Effective
,
ruleConfig
.
value
.
ClueType
)
if
(
status
==
ClueStatus
.
Effective
)
{
convertToEffectiveHandler
(
tempIds
)
}
}
else
{
message
.
warnMsg
(
'未选中任何线索'
)
}
}
const
convertToEffectiveHandler
=
tempIds
=>
{
let
data
=
{
CustomerIds
:
tempIds
,
Type
:
ClueStatus
.
Effective
,
EmpIds
:
''
}
if
(
ruleConfig
.
value
.
ClueType
==
ClueDistribution
.
Manual
)
{
//
}
else
{
$q
.
dialog
({
title
:
'删除提示'
,
html
:
'是否确认把所选线索认定为“有效线索”?确认后所选线索将会被转为“待分配客户”中。<span style="color:#FF7373">(当前已开启自动分配模式,将直接根据设定的规则分配客户)</span>'
,
cancel
:
true
,
persistent
:
true
}).
onOk
(()
=>
{
dataRefs
.
value
.
loading
=
true
})
}
}
return
{
selectList
,
deleteWhereHandler
,
clearSelectListHandler
,
setCuleStatusHandler
,
...
dataRefs
}
}
}
</
script
>
<
style
></
style
>
src/components/common/customWhere/whereList.vue
View file @
0406a55a
...
...
@@ -14,12 +14,12 @@
<div
class=
"row"
>
<q-btn
dense
flat
color=
"primary"
@
click=
"editorHandler(x.Id)"
>
<div
class=
"row items-center"
>
<svg-icon
style=
"margin-top: 6px"
icon=
"Design/Edit.svg"
size=
"16"
color=
"svg-icon-primary"
></svg-icon>
<svg-icon
icon=
"Design/Edit.svg"
size=
"16"
color=
"svg-icon-primary"
></svg-icon>
<span
class=
"q-ml-sm"
>
编辑
</span>
</div>
</q-btn>
<q-btn
dense
flat
color=
"negative"
class=
"q-ml-md"
@
click=
"deleteHandler(x.Id)"
>
<svg-icon
style=
"margin-top: 6px"
icon=
"Home/Trash.svg"
size=
"16"
color=
"svg-icon-negative"
></svg-icon>
<svg-icon
icon=
"Home/Trash.svg"
size=
"16"
color=
"svg-icon-negative"
></svg-icon>
<span
class=
"q-ml-sm"
>
删除
</span>
</q-btn>
</div>
...
...
src/components/common/customWhere/whereNodeValue.vue
View file @
0406a55a
...
...
@@ -20,7 +20,7 @@
<div
class=
"col"
v-else
>
<q-inner-loading
label=
"加载中..."
class=
"f12"
></q-inner-loading>
</div>
<div
class=
"q-ml-sm"
style=
"margin-bottom: -7px"
>
<div
class=
"q-ml-sm"
>
<svg-icon
icon=
"Navigation/Angle-down.svg"
color=
"svg-icon-grey"
size=
"18"
v-if=
"!checkModel.model || checkModel.model.length == 0"
></svg-icon>
<svg-icon
icon=
"Code/Error-circle.svg"
color=
"svg-icon-grey"
class=
"cursor-pointer"
@
click
.
stop=
"checkModel.clearLabelHandler"
size=
"18"
v-if=
"checkModel.model && checkModel.model.length > 0"
></svg-icon>
</div>
...
...
src/components/global/svg-icon.vue
View file @
0406a55a
<
template
>
<span>
<span
style=
"margin-bottom:-6px"
>
<inline-svg
:class=
"[`$
{color}`]" :src="require(`@/assets/svg/${icon}`)" :width="svgSize" :height="svgSize" :fill="svgColor" :stroke="svgColor" :title="tips" :aria-label="tips">
</inline-svg>
<slot></slot>
</span>
</
template
>
...
...
src/module/customer/clueModule.ts
View file @
0406a55a
...
...
@@ -54,6 +54,8 @@ const ClueModule = () => {
AddCondition
:
0
//查询条件
})
const
selected
=
ref
([])
const
data
=
reactive
({
columns
:
[
{
...
...
@@ -72,7 +74,6 @@ const ClueModule = () => {
],
showColumns
:
[
'Sys_CustomerName'
,
'CreateTime'
],
allColumns
:
[{
name
:
'创建时间'
,
value
:
'CreateTime'
,
visible
:
true
,
data
:
{},
IsCustom
:
0
}],
selected
:
[],
dataList
:
[],
WayList
:
[],
EmployeeList
:
[],
...
...
@@ -129,6 +130,6 @@ const ClueModule = () => {
getCluerList
()
}
return
{
useTab
,
msg
,
data
,
getCluerList
,
TypeList
,
SeletObj
,
reloadListHandler
}
return
{
useTab
,
msg
,
data
,
getCluerList
,
TypeList
,
SeletObj
,
reloadListHandler
,
selected
}
}
export
default
ClueModule
src/pages/customerManage/clue.vue
View file @
0406a55a
...
...
@@ -7,10 +7,10 @@
<q-tab
:name=
"3"
label=
"无效线索"
/>
<q-tab
:name=
"4"
label=
"已转客户"
/>
</q-tabs>
<clue-head
:columns=
"data.allColumns"
@
reload-data=
"reloadListHandler"
v-if=
"data.allColumns.length
>
0"
></clue-head>
<clue-head
:columns=
"data.allColumns"
@
reload-data=
"reloadListHandler"
v-if=
"data.allColumns.length
>
0"
></clue-head>
<div
class=
"page-content q-mt-lg col full-width"
>
<q-table
:rows=
"data.dataList"
:loading=
"data.dataLoding"
:columns=
"data.columns"
:visible-columns=
"data.showColumns"
flat
class=
"sticky-tow-column-table full-height sticky-right-column-table"
row-key=
"Id"
no-data-label=
"暂无相关数据"
selection=
"multiple"
v-if=
"data.colLoadingFinish"
separator=
"none"
style=
"max-width: 100%"
>
<q-table
:rows=
"data.dataList"
:loading=
"data.dataLoding"
v-model:selected=
"selected"
:columns=
"data.columns"
:visible-columns=
"data.showColumns"
flat
class=
"sticky-tow-column-table full-height sticky-right-column-table"
row-key=
"Id"
no-data-label=
"暂无相关数据"
selection=
"multiple"
v-if=
"data.colLoadingFinish"
separator=
"none"
style=
"max-width: 100%"
>
<template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.PageIndex"
color=
"primary"
:max=
"msg.pageCount"
:input=
"true"
/>
</
template
>
...
...
@@ -41,11 +41,11 @@
</
template
>
<
template
v-slot:header-cell-sys_setting=
"props"
>
<q-th
class=
"mysetting"
:props=
"props"
>
<
i
class=
"iconfont icon-tiaojieqi cursor-pointer"
style=
"font-size: 20px
"
>
<
svg-icon
icon=
"Layout/Layout-4-blocks.svg"
class=
"cursor-pointer"
size=
"20"
color=
"svg-icon-primary"
tips=
"自定义列
"
>
<q-popup-proxy>
<visible-columns
v-model=
"data.showColumns"
:allCol=
"data.allColumns"
></visible-columns>
</q-popup-proxy>
</
i
>
</
svg-icon
>
</q-th>
</
template
>
</q-table>
...
...
@@ -54,28 +54,30 @@
</div>
</template>
<
script
lang=
"ts"
>
import
{
toRefs
,
defineComponent
,
onMounted
}
from
'vue'
import
{
toRefs
,
defineComponent
,
onMounted
,
provide
}
from
'vue'
import
ClueModule
from
'@/module/customer/clueModule'
import
visibleColumns
from
'@/components/common/visibleColumns.vue'
import
ClueHead
from
'@/components/c
ustomer
/clueHead.vue'
import
ClueHead
from
'@/components/c
lue
/clueHead.vue'
import
useMetaModule
from
'@/module/meta/metaModule'
let
{
setTitle
}
=
useMetaModule
()
setTitle
(
'线索管理'
)
export
default
defineComponent
({
components
:
{
visibleColumns
,
ClueHead
},
setup
()
{
let
{
useTab
,
getCluerList
,
msg
,
data
,
SeletObj
,
reloadListHandler
}
=
ClueModule
()
let
{
useTab
,
getCluerList
,
msg
,
data
,
selected
,
SeletObj
,
reloadListHandler
}
=
ClueModule
()
let
[
tab
]
=
useTab
()
onMounted
(()
=>
{
getCluerList
()
})
provide
(
'selectList'
,
selected
)
return
{
tab
,
msg
,
getCluerList
,
data
,
selected
,
reloadListHandler
,
...
toRefs
(
SeletObj
)
}
...
...
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