Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c38bbb99
authored
Jan 21, 2024
by
dhb52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 提取公共选项定义
parent
7c0c6515
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
47 deletions
+45
-47
src/views/crm/backlog/tables/FollowCustomer.vue
+4
-6
src/views/crm/backlog/tables/FollowLeads.vue
+5
-7
src/views/crm/backlog/tables/TodayCustomer.vue
+17
-34
src/views/crm/backlog/tables/common.ts
+19
-0
No files found.
src/views/crm/backlog/tables/FollowCustomer.vue
View file @
c38bbb99
<!-- 分配给我的客户 -->
<!-- 分配给我的客户 -->
<!-- WHERE followUpStatus = ? -->
<
template
>
<
template
>
<ContentWrap>
<ContentWrap>
<div
class=
"pb-5 text-xl"
>
分配给我的客户
</div>
<div
class=
"pb-5 text-xl"
>
分配给我的客户
</div>
...
@@ -108,16 +109,13 @@
...
@@ -108,16 +109,13 @@
</template>
</template>
<
script
setup
lang=
"ts"
name=
"FollowCustomer"
>
<
script
setup
lang=
"ts"
name=
"FollowCustomer"
>
import
*
as
CustomerApi
from
'@/api/crm/customer'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
CustomerApi
from
'@/api/crm/customer
'
import
{
FOLLOWUP_STATUS
}
from
'./common
'
const
{
push
}
=
useRouter
()
const
FOLLOWUP_STATUS
=
[
const
{
push
}
=
useRouter
()
{
label
:
'已跟进'
,
value
:
true
},
{
label
:
'待跟进'
,
value
:
false
}
]
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
...
...
src/views/crm/backlog/tables/FollowLeads.vue
View file @
c38bbb99
<!-- TODO: dhb52 待Clue页面更新后同步更新 -->
<!-- TODO: dhb52 待Clue页面更新后同步更新 -->
<!-- WHERE transformStatus = 0 AND followUpStatus = ? -->
<
template
>
<
template
>
<ContentWrap>
<ContentWrap>
<div
class=
"pb-5 text-xl"
>
分配给我的线索
</div>
<div
class=
"pb-5 text-xl"
>
分配给我的线索
</div>
...
@@ -81,14 +82,10 @@
...
@@ -81,14 +82,10 @@
</template>
</template>
<
script
setup
lang=
"ts"
name=
"FollowLeads"
>
<
script
setup
lang=
"ts"
name=
"FollowLeads"
>
import
*
as
ClueApi
from
'@/api/crm/clue'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
ClueApi
from
'@/api/crm/clue'
import
{
FOLLOWUP_STATUS
}
from
'./common'
const
FOLLOWUP_STATUS
=
[
{
label
:
'已跟进'
,
value
:
true
},
{
label
:
'待跟进'
,
value
:
false
}
]
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
...
@@ -96,7 +93,8 @@ const list = ref([]) // 列表的数据
...
@@ -96,7 +93,8 @@ const list = ref([]) // 列表的数据
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
followUpStatus
:
false
followUpStatus
:
false
,
transformStatus
:
false
// 固定为【未转移】
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
...
...
src/views/crm/backlog/tables/TodayCustomer.vue
View file @
c38bbb99
<
template
>
<
template
>
<ContentWrap>
<ContentWrap>
<div
class=
"pb-5 text-xl"
>
<div
class=
"pb-5 text-xl"
>
今日需联系客户
</div>
今日需联系客户
</div>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
<el-form
ref=
"queryFormRef"
ref=
"queryFormRef"
...
@@ -12,7 +10,12 @@
...
@@ -12,7 +10,12 @@
label-width=
"68px"
label-width=
"68px"
>
>
<el-form-item
label=
"状态"
prop=
"contactStatus"
>
<el-form-item
label=
"状态"
prop=
"contactStatus"
>
<el-select
v-model=
"queryParams.contactStatus"
class=
"!w-240px"
placeholder=
"状态"
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.contactStatus"
class=
"!w-240px"
placeholder=
"状态"
@
change=
"handleQuery"
>
<el-option
<el-option
v-for=
"(option, index) in CONTACT_STATUS"
v-for=
"(option, index) in CONTACT_STATUS"
:label=
"option.label"
:label=
"option.label"
...
@@ -22,7 +25,12 @@
...
@@ -22,7 +25,12 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"归属"
prop=
"sceneType"
>
<el-form-item
label=
"归属"
prop=
"sceneType"
>
<el-select
v-model=
"queryParams.sceneType"
class=
"!w-240px"
placeholder=
"归属"
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.sceneType"
class=
"!w-240px"
placeholder=
"归属"
@
change=
"handleQuery"
>
<el-option
<el-option
v-for=
"(option, index) in SCENE_TYPES"
v-for=
"(option, index) in SCENE_TYPES"
:label=
"option.label"
:label=
"option.label"
...
@@ -111,9 +119,12 @@
...
@@ -111,9 +119,12 @@
</template>
</template>
<
script
lang=
"ts"
setup
name=
"TodayCustomer"
>
<
script
lang=
"ts"
setup
name=
"TodayCustomer"
>
import
*
as
BacklogApi
from
'@/api/crm/backlog'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
BacklogApi
from
'@/api/crm/backlog'
import
{
CONTACT_STATUS
,
SCENE_TYPES
}
from
'./common'
const
{
push
}
=
useRouter
()
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
...
@@ -126,19 +137,6 @@ const queryParams = ref({
...
@@ -126,19 +137,6 @@ const queryParams = ref({
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
CONTACT_STATUS
=
[
{
label
:
'今日需联系'
,
value
:
1
},
{
label
:
'已逾期'
,
value
:
2
},
{
label
:
'已联系'
,
value
:
3
}
]
const
SCENE_TYPES
=
[
// TODO 芋艿:貌似可以搞成全局枚举
{
label
:
'我负责的'
,
value
:
1
},
{
label
:
'我参与的'
,
value
:
2
},
{
label
:
'下属负责的'
,
value
:
3
}
]
/** 查询列表 */
/** 查询列表 */
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
...
@@ -157,22 +155,7 @@ const handleQuery = () => {
...
@@ -157,22 +155,7 @@ const handleQuery = () => {
getList
()
getList
()
}
}
/** 重置按钮操作 */
const
resetQuery
=
(
func
:
Function
|
undefined
=
undefined
)
=>
{
queryFormRef
.
value
.
resetFields
()
queryParams
.
value
=
{
pageNo
:
1
,
pageSize
:
10
,
contactStatus
:
1
,
sceneType
:
1
}
// TODO @dbh52:这里的 func 是不是可以去掉哈;
func
&&
func
()
handleQuery
()
}
/** 打开客户详情 */
/** 打开客户详情 */
const
{
push
}
=
useRouter
()
const
openDetail
=
(
id
:
number
)
=>
{
const
openDetail
=
(
id
:
number
)
=>
{
push
({
name
:
'CrmCustomerDetail'
,
params
:
{
id
}
})
push
({
name
:
'CrmCustomerDetail'
,
params
:
{
id
}
})
}
}
...
...
src/views/crm/backlog/tables/common.ts
0 → 100644
View file @
c38bbb99
/** 跟进状态 */
export
const
FOLLOWUP_STATUS
=
[
{
label
:
'已跟进'
,
value
:
true
},
{
label
:
'待跟进'
,
value
:
false
}
]
/** 归属范围 */
export
const
SCENE_TYPES
=
[
{
label
:
'我负责的'
,
value
:
1
},
{
label
:
'我参与的'
,
value
:
2
},
{
label
:
'下属负责的'
,
value
:
3
}
]
/** 联系状态 */
export
const
CONTACT_STATUS
=
[
{
label
:
'今日需联系'
,
value
:
1
},
{
label
:
'已逾期'
,
value
:
2
},
{
label
:
'已联系'
,
value
:
3
}
]
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