Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 5ce19c19
authored
Jun 23, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug修复
1 parent
de305ef6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
35 deletions
src/views/customer/components/CustomerBasicInfoCard.vue
src/views/customer/customerList.vue
src/views/customer/utils/customerSnapshot.js
src/views/customer/components/CustomerBasicInfoCard.vue
View file @
5ce19c1
...
@@ -18,13 +18,7 @@
...
@@ -18,13 +18,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapBasicInfoFromRow
}
from
"../utils/customerSnapshot"
;
import
{
CUSTOMER_STATUS_LIST
,
mapBasicInfoFromRow
}
from
"../utils/customerSnapshot"
;
const
DEFAULT_STATUS_LIST
=
[
{
confId
:
1
,
confLabel
:
"未完成"
},
{
confId
:
2
,
confLabel
:
"已完成"
},
{
confId
:
3
,
confLabel
:
"已评价"
},
];
export
default
{
export
default
{
name
:
"CustomerBasicInfoCard"
,
name
:
"CustomerBasicInfoCard"
,
...
@@ -39,7 +33,7 @@ export default {
...
@@ -39,7 +33,7 @@ export default {
},
},
statusList
:
{
statusList
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
DEFAULT
_STATUS_LIST
,
default
:
()
=>
CUSTOMER
_STATUS_LIST
,
},
},
},
},
computed
:
{
computed
:
{
...
...
src/views/customer/customerList.vue
View file @
5ce19c1
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"客户状态"
align=
"center"
width=
"90"
>
<el-table-column
label=
"客户状态"
align=
"center"
width=
"90"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
:class=
"
{ 'red': scope.row.
s
tatus === 1 }">
{{
formatCustomerStatusLabel
(
scope
.
row
)
}}
</span>
<span
:class=
"
{ 'red': scope.row.
customerS
tatus === 1 }">
{{
formatCustomerStatusLabel
(
scope
.
row
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"车型"
align=
"center"
min-width=
"150"
>
<el-table-column
label=
"车型"
align=
"center"
min-width=
"150"
>
...
@@ -94,6 +94,7 @@ import { getList, orderCount } from '@api/customerList'
...
@@ -94,6 +94,7 @@ import { getList, orderCount } from '@api/customerList'
import
{
getServiceStore
,
getParkStore
}
from
'@api/editCustomer'
import
{
getServiceStore
,
getParkStore
}
from
'@api/editCustomer'
import
{
import
{
saveCustomerSnapshot
,
saveCustomerSnapshot
,
CUSTOMER_STATUS_LIST
,
formatListPhone
,
formatListPhone
,
formatCustomerClass
,
formatCustomerClass
,
formatCarModelForList
,
formatCarModelForList
,
...
@@ -187,12 +188,6 @@ export default {
...
@@ -187,12 +188,6 @@ export default {
},
},
// 表格
// 表格
tableData
:
[],
tableData
:
[],
// 搜索下拉框
// 客户状态;1-未完成;2-已完成
// customerStatusObj: {
// 1: [1, 3],
// 2: [2, 4, 6]
// },
// 创建方式;1-系统录入;2-现场升级;5-核销抵扣
// 创建方式;1-系统录入;2-现场升级;5-核销抵扣
sourceStatusObj
:
{
sourceStatusObj
:
{
1
:
[
1
,
2
,
6
],
1
:
[
1
,
2
,
6
],
...
@@ -202,16 +197,7 @@ export default {
...
@@ -202,16 +197,7 @@ export default {
baseData
:
{
baseData
:
{
parkServiceList
:
[],
parkServiceList
:
[],
storeIdList
:
[],
storeIdList
:
[],
customerStatusList
:
[{
customerStatusList
:
CUSTOMER_STATUS_LIST
.
slice
(),
confId
:
1
,
confLabel
:
'未完成'
},
{
confId
:
2
,
confLabel
:
'已完成'
},
{
confId
:
3
,
confLabel
:
'已评价'
}],
upgradeList
:
[{
upgradeList
:
[{
confId
:
'Y'
,
confId
:
'Y'
,
confLabel
:
'已升级'
confLabel
:
'已升级'
...
@@ -294,7 +280,7 @@ export default {
...
@@ -294,7 +280,7 @@ export default {
// upgradeFinishFlag: this.searchForm.upgradeFinishFlag
// upgradeFinishFlag: this.searchForm.upgradeFinishFlag
}
}
// this.searchForm.baseGoodsId && (params.baseGoodsCodeList = [this.searchForm.baseGoodsId])
// this.searchForm.baseGoodsId && (params.baseGoodsCodeList = [this.searchForm.baseGoodsId])
this
.
searchForm
.
customerStatus
&&
(
params
.
statusList
=
this
.
searchForm
.
customerStatus
)
this
.
searchForm
.
customerStatus
&&
(
params
.
customerStatus
=
this
.
searchForm
.
customerStatus
)
this
.
searchForm
.
source
&&
(
params
.
sourceList
=
this
.
sourceStatusObj
[
this
.
searchForm
.
source
])
this
.
searchForm
.
source
&&
(
params
.
sourceList
=
this
.
sourceStatusObj
[
this
.
searchForm
.
source
])
if
(
this
.
searchForm
.
successTime
)
{
if
(
this
.
searchForm
.
successTime
)
{
params
.
paySuccessStartDate
=
new
Date
(
this
.
searchForm
.
successTime
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
params
.
paySuccessStartDate
=
new
Date
(
this
.
searchForm
.
successTime
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
...
@@ -414,7 +400,7 @@ export default {
...
@@ -414,7 +400,7 @@ export default {
query
:
{
query
:
{
customerId
:
row
.
id
,
customerId
:
row
.
id
,
customerClass
:
row
.
customerClass
||
''
,
customerClass
:
row
.
customerClass
||
''
,
status
:
row
.
status
!=
null
?
String
(
row
.
s
tatus
)
:
''
,
customerStatus
:
row
.
customerStatus
!=
null
?
String
(
row
.
customerS
tatus
)
:
''
,
},
},
})
})
},
},
...
@@ -429,7 +415,7 @@ export default {
...
@@ -429,7 +415,7 @@ export default {
query
:
{
query
:
{
customerId
:
row
.
id
,
customerId
:
row
.
id
,
customerClass
:
row
.
customerClass
||
''
,
customerClass
:
row
.
customerClass
||
''
,
status
:
row
.
status
!=
null
?
String
(
row
.
s
tatus
)
:
''
,
customerStatus
:
row
.
customerStatus
!=
null
?
String
(
row
.
customerS
tatus
)
:
''
,
},
},
})
})
},
},
...
...
src/views/customer/utils/customerSnapshot.js
View file @
5ce19c1
const
SNAPSHOT_KEY
=
"customerDetailSnapshot"
;
const
SNAPSHOT_KEY
=
"customerDetailSnapshot"
;
export
const
CUSTOMER_STATUS_LIST
=
[
{
confId
:
1
,
confLabel
:
"待跟进"
},
{
confId
:
2
,
confLabel
:
"已升级"
},
{
confId
:
3
,
confLabel
:
"战败"
},
{
confId
:
4
,
confLabel
:
"已退款"
},
];
export
function
saveCustomerSnapshot
(
row
)
{
export
function
saveCustomerSnapshot
(
row
)
{
if
(
!
row
)
{
if
(
!
row
)
{
return
;
return
;
...
@@ -26,8 +33,8 @@ export function resolveCustomerRowFromRoute(route = {}, snapshotRow = {}) {
...
@@ -26,8 +33,8 @@ export function resolveCustomerRowFromRoute(route = {}, snapshotRow = {}) {
if
(
route
.
query
&&
route
.
query
.
customerClass
)
{
if
(
route
.
query
&&
route
.
query
.
customerClass
)
{
row
.
customerClass
=
route
.
query
.
customerClass
;
row
.
customerClass
=
route
.
query
.
customerClass
;
}
}
if
(
route
.
query
&&
route
.
query
.
status
!==
undefined
&&
route
.
query
.
s
tatus
!==
""
)
{
if
(
route
.
query
&&
route
.
query
.
customerStatus
!==
undefined
&&
route
.
query
.
customerS
tatus
!==
""
)
{
row
.
status
=
route
.
query
.
s
tatus
;
row
.
customerStatus
=
route
.
query
.
customerS
tatus
;
}
}
return
row
;
return
row
;
}
}
...
@@ -103,12 +110,12 @@ export function formatReferrer(row = {}) {
...
@@ -103,12 +110,12 @@ export function formatReferrer(row = {}) {
||
""
;
||
""
;
}
}
export
function
formatCustomerStatus
(
row
=
{},
statusList
=
[]
)
{
export
function
formatCustomerStatus
(
row
=
{},
statusList
=
CUSTOMER_STATUS_LIST
)
{
const
status
=
row
.
s
tatus
;
const
customerStatus
=
row
.
customerS
tatus
;
if
(
status
==
null
||
s
tatus
===
""
)
{
if
(
customerStatus
==
null
||
customerS
tatus
===
""
)
{
return
"-"
;
return
"-"
;
}
}
const
matched
=
statusList
.
find
((
item
)
=>
Number
(
item
.
confId
)
===
Number
(
s
tatus
));
const
matched
=
statusList
.
find
((
item
)
=>
Number
(
item
.
confId
)
===
Number
(
customerS
tatus
));
return
matched
?
matched
.
confLabel
:
"-"
;
return
matched
?
matched
.
confLabel
:
"-"
;
}
}
...
@@ -150,7 +157,7 @@ export function formatCreateTime(row = {}) {
...
@@ -150,7 +157,7 @@ export function formatCreateTime(row = {}) {
return
formatDateValue
(
row
.
createdDate
);
return
formatDateValue
(
row
.
createdDate
);
}
}
export
function
mapBasicInfoFromRow
(
row
=
{},
statusList
=
[]
)
{
export
function
mapBasicInfoFromRow
(
row
=
{},
statusList
=
CUSTOMER_STATUS_LIST
)
{
const
deliveryTime
=
formatDeliveryTime
(
row
);
const
deliveryTime
=
formatDeliveryTime
(
row
);
const
referrer
=
formatReferrer
(
row
);
const
referrer
=
formatReferrer
(
row
);
const
recorder
=
formatRecorder
(
row
);
const
recorder
=
formatRecorder
(
row
);
...
...
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