Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ujia
/
uj-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b671c4e2
authored
Nov 23, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化录线索人员字段的选项处理,提取常量并简化渲染逻辑
1 parent
8472f9bc
Pipeline
#587
for
b671c4e2
failed
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
apps/web/subapps/usedcar/src/pages/Leads/index.tsx
apps/web/subapps/usedcar/src/pages/Leads/index.tsx
View file @
b671c4e
...
@@ -57,6 +57,10 @@ const FOLLOW_STATUS = [
...
@@ -57,6 +57,10 @@ const FOLLOW_STATUS = [
{ value: '2', label: '已超期' },
{ value: '2', label: '已超期' },
{ value: '0', label: '正常' },
{ value: '0', label: '正常' },
];
];
const ENTER_TYPES = [
{ value: '1', label: '销售' },
{ value: '2', label: '评估师' },
];
const levelDescription: Record<string, string> = {
const levelDescription: Record<string, string> = {
O: '客情回复,确认交车时间',
O: '客情回复,确认交车时间',
H: '1日内跟进',
H: '1日内跟进',
...
@@ -250,10 +254,7 @@ export default function Leads() {
...
@@ -250,10 +254,7 @@ export default function Leads() {
name: 'enterType',
name: 'enterType',
label: '录线索人员',
label: '录线索人员',
type: 'select',
type: 'select',
options: [
options: ENTER_TYPES,
{ value: '1', label: '销售' },
{ value: '2', label: '评估师' },
],
},
},
{
{
name: 'carModel',
name: 'carModel',
...
@@ -361,7 +362,7 @@ export default function Leads() {
...
@@ -361,7 +362,7 @@ export default function Leads() {
title: '录线索人员',
title: '录线索人员',
dataIndex: 'enterType',
dataIndex: 'enterType',
width: 120,
width: 120,
render:
(v: unknown) => (String(v) === '1' ? '销售' : String(v) === '2' ? '评估师' : '-')
,
render:
enterTypeText
,
},
},
{ title: '评估师', dataIndex: 'conversionName', width: 120, render: (v: unknown) => v || '-' },
{ title: '评估师', dataIndex: 'conversionName', width: 120, render: (v: unknown) => v || '-' },
];
];
...
@@ -483,3 +484,7 @@ function followResultText(value: unknown): string {
...
@@ -483,3 +484,7 @@ function followResultText(value: unknown): string {
)[Number(value)] ?? '其他'
)[Number(value)] ?? '其他'
);
);
}
}
function enterTypeText(value: unknown): string {
return ENTER_TYPES.find((option) => option.value === String(value))?.label ?? '-';
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment