Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 200f23df
authored
Oct 06, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 车型bug修复
1 parent
fe6a8a7d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
291 additions
and
98 deletions
assets/css/sprite.scss
pages/evaluationForm/addEvaluationFrom.vue
pages/evaluationForm/components/GeneralPopup.vue
pages/evaluationForm/components/SelectCar.vue
pages/evaluationForm/evaluationFormDetails.vue
pages/evaluationForm/index.vue
pages/evaluationForm/signInfo.vue
assets/css/sprite.scss
View file @
200f23d
...
...
@@ -109,6 +109,8 @@
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.578005115089514
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-feedback
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.526001705029838
);}
.icon-feedbackIcon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011082693947144074
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011082693947144074
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5473145780051151
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4113384484228474
);}
.icon-ffdyj-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6952259164535379
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.3034953111679454
);}
.icon-filter
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
...
...
@@ -394,6 +396,4 @@
.icon-yw-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.015345268542199489
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.015345268542199489
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5221653878942881
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.45865302642796246
);}
.icon-zj-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.44075021312872975
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6717817561807332
);}
.icon-feedbackIcon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011082693947144074
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011082693947144074
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5473145780051151
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4113384484228474
);}
\ No newline at end of file
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.44075021312872975
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6717817561807332
);}
\ No newline at end of file
pages/evaluationForm/addEvaluationFrom.vue
View file @
200f23d
...
...
@@ -155,8 +155,10 @@ export default {
index
:
0
,
carList
:
[],
selectDate
:
''
,
currentIdentifiedBrandName
:
null
,
popupTypeEnum
,
title
:
'新增评估单'
,
selectedCarInfo
:
null
,
endDate
:
dayjs
().
format
(
'YYYY-MM-DD'
),
isExistSamePlate
:
false
,
formData
:
{
...
...
@@ -234,7 +236,7 @@ export default {
{
key
:
'registrationCity'
,
label
:
'上牌城市'
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'cityName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'registrationCityName'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'select'
,
showText
:
'shopMerchantName'
,
isCity
:
true
},
{
key
:
'registrationDate'
,
label
:
'上牌时间'
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'sellerName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'registrationDate'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'calendar'
,
showText
:
'shopMerchantName'
,
endDate
:
true
},
{
key
:
'carCity'
,
label
:
'车辆所在地'
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'carCityName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'carCityName'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'select'
,
isCarCity
:
true
},
{
key
:
'mileage'
,
label
:
'表显里程'
,
inputType
:
'number'
,
min
:
0
,
max
:
999999
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'sellerName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'mileage'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'input'
,
showText
:
'shopMerchantName'
,
pattern
:
'^[0-9]{0,6}$'
,
cell
:
'公里'
,
isCell
:
true
},
{
key
:
'mileage'
,
label
:
'表显里程'
,
inputType
:
'number'
,
min
:
0
,
max
:
999999
,
maxlength
:
6
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'sellerName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'mileage'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'input'
,
showText
:
'shopMerchantName'
,
pattern
:
'^[0-9]{0,6}$'
,
cell
:
'公里'
,
isCell
:
true
},
{
key
:
'usageType'
,
label
:
'使用性质'
,
...
...
@@ -383,7 +385,7 @@ export default {
]
},
{
key
:
'productionDate'
,
label
:
'生产日期'
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'sellerName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'productionDate'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'calendar'
,
endDate
:
true
},
{
key
:
'guidePrice'
,
label
:
'指导价'
,
inputType
:
'number'
,
min
:
0
,
max
:
999999
.99
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'sellerName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'guidePrice'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'input'
,
showText
:
'shopMerchantName'
,
pattern
:
'^[0-9]{0,6}$
'
,
cell
:
'元'
,
isCell
:
true
},
{
key
:
'guidePrice'
,
label
:
'指导价'
,
inputType
:
'number'
,
min
:
0
,
max
:
999999
9.99
,
maxlength
:
10
,
required
:
true
,
fullWidth
:
false
,
targetNameKey
:
'sellerName'
,
sourceNameKey
:
'staffName'
,
sourceKey
:
'uuid'
,
targetKey
:
'guidePrice'
,
targetObj
:
'carBaseReqDTO'
,
type
:
'input'
,
showText
:
'shopMerchantName'
,
pattern
:
'/^\d+(\.\d{1,2})?$/
'
,
cell
:
'元'
,
isCell
:
true
},
{
key
:
'buyNewCar'
,
label
:
'是否购买新车'
,
...
...
@@ -464,8 +466,8 @@ export default {
}
],
licenseFormFields
:
[
{
key
:
'keyCount'
,
label
:
'钥匙数'
,
required
:
true
,
fullWidth
:
false
,
targetKey
:
'keyCount'
,
targetObj
:
'carLicenseReqDTO'
,
type
:
'input'
,
inputType
:
'number'
,
min
:
0
,
max
:
9
,
pattern
:
'^[0-9]{1}$'
},
{
key
:
'transferCount'
,
label
:
'过户次数'
,
required
:
true
,
fullWidth
:
false
,
targetKey
:
'transferCount'
,
targetObj
:
'carLicenseReqDTO'
,
type
:
'input'
,
inputType
:
'number'
,
min
:
0
,
max
:
9
,
pattern
:
'^[0-9]{1}$'
},
{
key
:
'keyCount'
,
label
:
'钥匙数'
,
required
:
true
,
fullWidth
:
false
,
targetKey
:
'keyCount'
,
targetObj
:
'carLicenseReqDTO'
,
type
:
'input'
,
inputType
:
'number'
,
min
:
0
,
max
:
9
,
pattern
:
'^[0-9]{1}$'
,
maxlength
:
1
},
{
key
:
'transferCount'
,
label
:
'过户次数'
,
required
:
true
,
fullWidth
:
false
,
targetKey
:
'transferCount'
,
targetObj
:
'carLicenseReqDTO'
,
type
:
'input'
,
inputType
:
'number'
,
min
:
0
,
max
:
9
,
pattern
:
'^[0-9]{1}$'
,
maxlength
:
1
},
{
key
:
'compulsoryInsuranceExpiry'
,
label
:
'交强险到期'
,
required
:
true
,
fullWidth
:
false
,
type
:
'calendar'
,
targetKey
:
'compulsoryInsuranceExpiry'
,
targetObj
:
'carLicenseReqDTO'
,
endDate
:
false
},
{
key
:
'annualInspectionExpiry'
,
label
:
'年审到期'
,
required
:
true
,
fullWidth
:
false
,
type
:
'calendar'
,
targetKey
:
'annualInspectionExpiry'
,
targetObj
:
'carLicenseReqDTO'
,
endDate
:
false
},
{
key
:
'commercialInsuranceExpiry'
,
label
:
'商业险到期'
,
required
:
true
,
fullWidth
:
false
,
type
:
'calendar'
,
targetKey
:
'commercialInsuranceExpiry'
,
targetObj
:
'carLicenseReqDTO'
,
endDate
:
false
},
...
...
@@ -586,7 +588,24 @@ export default {
that
.
formData
.
carLicenseReqDTO
=
{
...
carLicense
}
that
.
formData
.
imageList
=
[...
images
]
that
.
formData
.
evalOrderNo
=
evalOrderNo
that
.
selectedCarInfo
=
{
brand
:
{
id
:
that
.
formData
.
carBaseReqDTO
.
carBrandId
,
name
:
that
.
formData
.
carBaseReqDTO
.
carBrand
},
series
:
{
id
:
that
.
formData
.
carBaseReqDTO
.
carChildsBrandId
,
name
:
that
.
formData
.
carBaseReqDTO
.
carChildsBrandName
},
model
:
{
id
:
that
.
formData
.
carBaseReqDTO
.
carSeriesId
,
name
:
that
.
formData
.
carBaseReqDTO
.
carSeriesName
},
year
:
{
id
:
that
.
formData
.
carBaseReqDTO
.
carTypeId
,
name
:
that
.
formData
.
carBaseReqDTO
.
carTypeName
}
}
that
.
formImagesData
=
{}
that
.
certificateImagesData
=
{}
that
.
carVideoData
=
{}
...
...
@@ -706,10 +725,10 @@ export default {
// 指导价验证 - 数字,0-999999
const
guidePrice
=
this
.
formData
.
carBaseReqDTO
.
guidePrice
const
priceRegex
=
/^
[
0-9
]{1,6}
$/
if
(
!
priceRegex
.
test
(
guidePrice
)
||
guidePrice
<
0
||
guidePrice
>
999999.99
)
{
const
priceRegex
=
/^
\d
+
(\.\d{1,2})?
$/
if
(
!
priceRegex
.
test
(
guidePrice
)
||
guidePrice
<
0
||
guidePrice
>
999999
9
.99
)
{
uni
.
showToast
({
title
:
'指导价必须为0-999999.99之间的数字'
,
title
:
'指导价必须为0-999999
9
.99之间的数字'
,
icon
:
'none'
})
return
...
...
@@ -783,17 +802,23 @@ export default {
},
handleCell
(
field
)
{
const
that
=
this
console
.
log
(
'handleCell'
,
field
)
this
.
currentField
=
field
if
(
field
.
key
===
'brandModel'
)
{
this
.
$refs
.
selectCar
.
open
()
}
else
if
(
field
.
key
===
'sellerUserId'
&&
field
.
type
==
'select'
)
{
this
.
$refs
.
orderPopup
.
open
()
}
else
if
(
field
.
key
===
'registrationCity'
)
{
if
(
field
.
isCar
)
{
// 处理车型选择
if
(
this
.
currentIdentifiedBrandName
)
{
// 识别场景:传入品牌名称
this
.
$refs
.
selectCar
.
open
(
this
.
currentIdentifiedBrandName
)
this
.
currentIdentifiedBrandName
=
null
}
else
{
// 新增/编辑场景:传入完整车型信息或null
this
.
$refs
.
selectCar
.
open
(
this
.
selectedCarInfo
||
null
)
}
}
else
if
(
field
.
isCity
)
{
// 处理城市选择
this
.
$refs
.
selectCity
.
open
()
}
else
if
(
field
.
key
===
'carCity'
)
{
}
else
if
(
field
.
isCarCity
)
{
this
.
$refs
.
selectCarCity
.
open
()
}
else
if
(
field
.
type
===
'calendar'
)
{
this
.
currentField
=
field
if
(
field
.
endDate
)
{
this
.
endDate
=
dayjs
().
format
(
'YYYY-MM-DD'
)
}
else
{
...
...
@@ -808,10 +833,14 @@ export default {
.
catch
(()
=>
{
console
.
log
(
'日期取消'
)
})
}
else
if
(
field
.
type
===
'select'
&&
field
.
targetObj
===
'evalOrderBasicReqDTO'
&&
field
.
targetKey
===
'sellerUserId'
)
{
this
.
currentField
=
field
this
.
$refs
.
orderPopup
.
open
()
}
},
handleCarSelected
(
date
)
{
console
.
log
(
'handleCarSelected'
,
date
)
this
.
selectedCarInfo
=
date
this
.
$set
(
this
.
formData
.
carBaseReqDTO
,
'carBrandId'
,
date
.
brand
.
id
)
this
.
$set
(
this
.
formData
.
carBaseReqDTO
,
'carBrand'
,
date
.
brand
.
name
)
this
.
$set
(
this
.
formData
.
carBaseReqDTO
,
'carChildsBrandId'
,
date
.
series
.
id
)
...
...
pages/evaluationForm/components/GeneralPopup.vue
View file @
200f23d
...
...
@@ -91,7 +91,7 @@ export default {
methods
:
{
open
()
{
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
$refs
)
console
.
log
(
this
.
$refs
.
publishPopup
)
if
(
this
.
$refs
.
publishPopup
)
{
this
.
$refs
.
publishPopup
.
open
()
}
...
...
@@ -112,6 +112,7 @@ export default {
this
.
$emit
(
'close'
)
},
confirm
()
{
console
.
log
(
'confirm'
,
this
.
autoClose
)
if
(
this
.
resolve
)
{
if
(
this
.
autoClose
)
{
this
.
$refs
.
publishPopup
.
close
()
...
...
pages/evaluationForm/components/SelectCar.vue
View file @
200f23d
<
template
>
<GeneralPopup
ref=
"carPopup"
popupClass=
"carPopup"
:list=
"list"
:title=
"title"
@
confirm=
"confirm"
>
<template
v-slot:content
>
<StepTab
:steps=
"steps"
:currentStep=
"currentStep"
:clickable=
"true"
@
step-change=
"onStepChange"
:isShowStepNumber=
"false"
></StepTab>
<StepTab
:steps=
"
steps.map(step => (
{
label: step.selectedText || step.label,
number: step.number
}))
"
:currentStep="currentStep"
:clickable="true"
@step-change="onStepChange"
:isShowStepNumber="false"
>
</StepTab>
<view
class=
"list-component"
>
<SortByNameList
:items=
"currentStepData"
:activeValue=
"currentSelectedId"
:activeField=
"'id'"
:itemNameField=
"'name'"
:groupKeyField=
"'letter'"
:itemsPerRow=
"3"
:itemSpacing=
"32"
@
item-click=
"handleItemClick"
:enableFastScroll=
"false"
/>
<SortByNameList
:items=
"currentStepData"
:activeValue=
"currentS
tep === 0 ? stepSelectedIds[0] || null : currentS
electedId"
:activeField=
"'id'"
:itemNameField=
"'name'"
:groupKeyField=
"'letter'"
:itemsPerRow=
"3"
:itemSpacing=
"32"
@
item-click=
"handleItemClick"
:enableFastScroll=
"false"
/>
</view>
</
template
>
</GeneralPopup>
...
...
@@ -33,20 +44,24 @@ export default {
data
()
{
return
{
currentStep
:
0
,
currentSelectedId
:
null
,
stepSelectedIds
:
[
null
,
null
,
null
,
null
]
,
steps
:
[
{
label
:
'品牌选择'
,
number
:
1
},
{
label
:
'系列选择'
,
number
:
2
},
{
label
:
'车型选择'
,
number
:
3
},
{
label
:
'年份选择'
,
number
:
4
}
{
label
:
'品牌选择'
,
number
:
1
,
selectedText
:
''
},
{
label
:
'系列选择'
,
number
:
2
,
selectedText
:
''
},
{
label
:
'车型选择'
,
number
:
3
,
selectedText
:
''
},
{
label
:
'年份选择'
,
number
:
4
,
selectedText
:
''
}
],
carBrandData
:
[],
selectedBrand
:
null
,
selectedSeries
:
null
,
selectedModel
:
null
,
selectedYear
:
null
,
loadingYearData
:
false
,
// 添加加载状态标记
selectionResult
:
null
loadingYearData
:
false
,
selectionResult
:
null
,
// 新增:保存上次选择结果,用于重复打开时回显
lastSelectedResult
:
null
,
// 新增:标记当前是否为编辑模式
isEditMode
:
false
}
},
created
()
{
...
...
@@ -55,9 +70,13 @@ export default {
computed
:
{
currentStepData
()
{
let
data
=
[]
console
.
log
(
this
.
carBrandData
)
console
.
log
(
this
.
selectedBrand
)
console
.
log
(
this
.
selectedSeries
)
console
.
log
(
this
.
selectedModel
)
switch
(
this
.
currentStep
)
{
case
0
:
data
=
this
.
carBrandData
data
=
this
.
carBrandData
||
[]
break
case
1
:
data
=
this
.
selectedBrand
?.
childs
||
[]
...
...
@@ -72,8 +91,15 @@ export default {
data
=
[]
}
console
.
log
(
`Step
${
this
.
currentStep
}
data:`
,
data
.
length
,
'items'
)
// 确保数据始终是数组
if
(
!
Array
.
isArray
(
data
))
{
data
=
[]
}
return
data
},
currentSelectedId
()
{
return
this
.
stepSelectedIds
[
this
.
currentStep
]
}
},
methods
:
{
...
...
@@ -89,7 +115,6 @@ export default {
}
const
secret
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const
signature
=
sign
(
params
,
secret
)
console
.
log
(
'签名结果:'
,
signature
)
uni
.
request
({
url
:
'http://qcdidicb.glsx.com.cn/router?method=glsx.accounts.base.car.brand.complete'
,
...
...
@@ -100,9 +125,7 @@ export default {
...
params
},
success
(
result
)
{
console
.
log
(
'请求结果:'
,
result
)
if
(
result
.
data
&&
result
.
data
.
code
===
'0'
&&
result
.
data
.
data
&&
result
.
data
.
data
.
carinfos
)
{
// 不再预先添加所有车型的年份数据
that
.
carBrandData
=
result
.
data
.
data
.
carinfos
}
else
{
console
.
error
(
'Invalid car data format:'
,
result
)
...
...
@@ -114,10 +137,7 @@ export default {
})
},
// 加载指定车型的年份数据
loadYearDataForModel
(
model
)
{
console
.
log
(
'loadYearDataForModel'
,
model
)
// 如果已经加载过数据,则不再重复加载
if
(
model
.
childs
&&
model
.
childs
.
length
>
0
)
{
return
Promise
.
resolve
(
model
.
childs
)
}
...
...
@@ -146,44 +166,187 @@ export default {
...
params
},
success
(
result
)
{
console
.
log
(
'请求结果:'
,
result
)
that
.
loadingYearData
=
false
if
(
result
.
data
&&
result
.
data
.
code
===
'0'
&&
result
.
data
.
data
&&
result
.
data
.
data
.
carinfos
)
{
model
.
childs
=
result
.
data
.
data
.
carinfos
||
[]
this
.
loadingYearData
=
false
resolve
(
model
.
childs
)
}
else
{
reject
(
new
Error
(
'Invalid car data format'
))
console
.
error
(
'无效的车型数据格式:'
,
result
)
model
.
childs
=
[]
resolve
([])
}
},
fail
(
error
)
{
console
.
log
(
error
,
'error'
)
that
.
loadingYearData
=
false
model
.
childs
=
[]
resolve
([])
}
})
})
},
open
()
{
console
.
log
(
'Opening car selector popup'
)
this
.
$refs
.
carPopup
.
open
()
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
resolve
=
resolve
this
.
reject
=
reject
open
(
carInfo
=
null
)
{
this
.
selectedBrand
=
null
this
.
selectedSeries
=
null
this
.
selectedModel
=
null
this
.
selectedYear
=
null
this
.
stepSelectedIds
=
[
null
,
null
,
null
,
null
]
this
.
steps
.
forEach
(
step
=>
(
step
.
selectedText
=
''
))
this
.
currentStep
=
0
this
.
isEditMode
=
false
const
ensureCarDataLoaded
=
()
=>
{
return
new
Promise
(
resolve
=>
{
if
(
this
.
carBrandData
.
length
>
0
)
{
resolve
()
}
else
{
const
checkInterval
=
setInterval
(()
=>
{
if
(
this
.
carBrandData
.
length
>
0
)
{
clearInterval
(
checkInterval
)
resolve
()
}
},
100
)
setTimeout
(()
=>
{
clearInterval
(
checkInterval
)
resolve
()
},
3000
)
}
})
}
ensureCarDataLoaded
().
then
(()
=>
{
// 编辑模式 - 传入了完整的车型信息对象
if
(
carInfo
&&
typeof
carInfo
===
'object'
&&
carInfo
.
brand
)
{
this
.
isEditMode
=
true
this
.
_handleEditMode
(
carInfo
)
}
// 识别模式 - 传入了品牌名称字符串
else
if
(
carInfo
&&
typeof
carInfo
===
'string'
)
{
this
.
_handleIdentifyMode
(
carInfo
)
}
//重复打开/新增模式 - 无参数或使用上次选择结果
else
if
(
!
carInfo
&&
this
.
lastSelectedResult
)
{
this
.
_handleRepeatOpenMode
()
}
return
this
.
$refs
.
carPopup
.
open
()
})
},
async
_handleEditMode
(
carInfo
)
{
// 设置品牌信息
if
(
carInfo
.
brand
&&
this
.
carBrandData
&&
Array
.
isArray
(
this
.
carBrandData
))
{
const
fullBrand
=
this
.
carBrandData
.
find
(
item
=>
item
.
id
===
carInfo
.
brand
.
id
||
item
.
name
===
carInfo
.
brand
.
name
)
if
(
fullBrand
)
{
this
.
selectedBrand
=
fullBrand
this
.
stepSelectedIds
[
0
]
=
fullBrand
.
id
this
.
steps
[
0
].
selectedText
=
fullBrand
.
name
}
else
{
this
.
selectedBrand
=
{
...
carInfo
.
brand
,
childs
:
[]
}
this
.
stepSelectedIds
[
0
]
=
carInfo
.
brand
.
id
this
.
steps
[
0
].
selectedText
=
carInfo
.
brand
.
name
}
}
// 设置系列信息
if
(
carInfo
.
series
&&
this
.
selectedBrand
&&
this
.
selectedBrand
.
childs
&&
Array
.
isArray
(
this
.
selectedBrand
.
childs
))
{
const
fullSeries
=
this
.
selectedBrand
.
childs
.
find
(
item
=>
item
.
id
===
carInfo
.
series
.
id
||
item
.
name
===
carInfo
.
series
.
name
)
if
(
fullSeries
)
{
this
.
selectedSeries
=
fullSeries
this
.
stepSelectedIds
[
1
]
=
fullSeries
.
id
this
.
steps
[
1
].
selectedText
=
fullSeries
.
name
this
.
currentStep
=
1
}
else
{
this
.
selectedSeries
=
{
...
carInfo
.
series
,
childs
:
[]
}
this
.
stepSelectedIds
[
1
]
=
carInfo
.
series
.
id
this
.
steps
[
1
].
selectedText
=
carInfo
.
series
.
name
this
.
currentStep
=
1
}
}
// 设置车型信息
if
(
carInfo
.
model
&&
this
.
selectedSeries
&&
this
.
selectedSeries
.
childs
&&
Array
.
isArray
(
this
.
selectedSeries
.
childs
))
{
const
fullModel
=
this
.
selectedSeries
.
childs
.
find
(
item
=>
item
.
id
===
carInfo
.
model
.
id
||
item
.
name
===
carInfo
.
model
.
name
)
if
(
fullModel
)
{
this
.
selectedModel
=
fullModel
this
.
stepSelectedIds
[
2
]
=
fullModel
.
id
this
.
steps
[
2
].
selectedText
=
fullModel
.
name
this
.
currentStep
=
2
// 加载年份数据
if
(
!
this
.
selectedModel
.
childs
||
this
.
selectedModel
.
childs
.
length
===
0
)
{
await
this
.
loadYearDataForModel
(
this
.
selectedModel
)
}
}
else
{
this
.
selectedModel
=
{
...
carInfo
.
model
,
childs
:
[]
}
this
.
stepSelectedIds
[
2
]
=
carInfo
.
model
.
id
this
.
steps
[
2
].
selectedText
=
carInfo
.
model
.
name
this
.
currentStep
=
2
}
}
console
.
log
(
'carInfo'
,
carInfo
)
console
.
log
(
'this.selectedModel:'
,
this
.
selectedModel
)
// 设置年份信息
if
(
carInfo
.
year
&&
this
.
selectedModel
&&
this
.
selectedModel
.
childs
&&
Array
.
isArray
(
this
.
selectedModel
.
childs
))
{
const
fullYear
=
this
.
selectedModel
.
childs
.
find
(
item
=>
item
.
id
===
carInfo
.
year
.
id
||
item
.
name
===
carInfo
.
year
.
name
)
if
(
fullYear
)
{
this
.
selectedYear
=
fullYear
this
.
stepSelectedIds
[
3
]
=
fullYear
.
id
this
.
steps
[
3
].
selectedText
=
fullYear
.
name
this
.
currentStep
=
3
}
else
{
this
.
selectedYear
=
{
...
carInfo
.
year
}
this
.
stepSelectedIds
[
3
]
=
carInfo
.
year
.
id
this
.
steps
[
3
].
selectedText
=
carInfo
.
year
.
name
this
.
currentStep
=
3
}
}
console
.
log
(
'this.currentStep:'
,
this
.
currentStep
)
},
// 新增:处理识别模式
_handleIdentifyMode
(
brandName
)
{
const
matchedBrand
=
this
.
carBrandData
.
find
(
item
=>
(
item
.
name
&&
brandName
&&
item
.
name
.
includes
(
brandName
))
||
item
.
name
===
brandName
)
if
(
matchedBrand
)
{
this
.
selectedBrand
=
matchedBrand
this
.
stepSelectedIds
[
0
]
=
matchedBrand
.
id
this
.
steps
[
0
].
selectedText
=
matchedBrand
.
name
this
.
selectedSeries
=
null
this
.
selectedModel
=
null
this
.
selectedYear
=
null
this
.
stepSelectedIds
[
1
]
=
this
.
stepSelectedIds
[
2
]
=
this
.
stepSelectedIds
[
3
]
=
null
this
.
steps
[
1
].
selectedText
=
this
.
steps
[
2
].
selectedText
=
this
.
steps
[
3
].
selectedText
=
''
}
},
// 新增:处理重复打开模式
_handleRepeatOpenMode
()
{
this
.
_handleEditMode
(
this
.
lastSelectedResult
)
},
confirm
()
{
console
.
log
(
this
.
selectionResult
)
this
.
lastSelectedResult
=
this
.
selectionResult
this
.
$emit
(
'car-selected'
,
this
.
selectionResult
)
this
.
$refs
.
carPopup
.
close
()
},
onStepChange
(
index
)
{
console
.
log
(
`Changing step from
${
this
.
currentStep
}
to
${
index
}
`
)
// 限制只能前进到已选择的下一级
if
(
index
===
0
)
{
this
.
currentStep
=
0
}
else
if
(
index
===
1
&&
this
.
selectedBrand
)
{
this
.
currentStep
=
1
// 确保selectedBrand有childs属性
if
(
!
this
.
selectedBrand
.
childs
)
{
this
.
selectedBrand
.
childs
=
[]
}
}
else
if
(
index
===
2
&&
this
.
selectedSeries
)
{
this
.
currentStep
=
2
// 确保selectedSeries有childs属性
if
(
!
this
.
selectedSeries
.
childs
)
{
this
.
selectedSeries
.
childs
=
[]
}
}
else
if
(
index
===
3
&&
this
.
selectedModel
)
{
// 如果还没有年份数据,则加载
if
(
!
this
.
selectedModel
.
childs
||
this
.
selectedModel
.
childs
.
length
===
0
)
{
...
...
@@ -194,57 +357,58 @@ export default {
this
.
currentStep
=
3
}
}
// 重置当前步骤的选中ID
this
.
currentSelectedId
=
null
},
// 处理项目点击事件
handleItemClick
(
item
)
{
console
.
log
(
'Item clicked:'
,
item
)
this
.
currentSelectedId
=
item
.
id
if
(
this
.
currentStep
===
0
)
{
this
.
selectedBrand
=
item
this
.
selectedSeries
=
null
this
.
selectedModel
=
null
this
.
selectedYear
=
null
this
.
currentStep
=
1
this
.
$emit
(
'brand-selected'
,
item
)
}
else
if
(
this
.
currentStep
===
1
)
{
this
.
selectedSeries
=
item
this
.
selectedModel
=
null
this
.
selectedYear
=
null
this
.
currentStep
=
2
this
.
$emit
(
'series-selected'
,
item
)
}
else
if
(
this
.
currentStep
===
2
)
{
this
.
selectedModel
=
item
this
.
selectedYear
=
null
const
isSameItem
=
this
.
stepSelectedIds
[
this
.
currentStep
]
===
item
.
id
this
.
stepSelectedIds
[
this
.
currentStep
]
=
item
.
id
// 当点击第三层车型选择时,才去请求第四级数据
this
.
loadYearDataForModel
(
item
).
then
(
years
=>
{
if
(
years
&&
years
.
length
>
0
)
{
this
.
currentStep
=
3
if
(
!
isSameItem
)
{
if
(
this
.
currentStep
===
0
)
{
this
.
selectedBrand
=
item
this
.
selectedSeries
=
null
this
.
selectedModel
=
null
this
.
selectedYear
=
null
this
.
steps
[
1
].
selectedText
=
''
this
.
steps
[
2
].
selectedText
=
''
this
.
steps
[
3
].
selectedText
=
''
}
else
if
(
this
.
currentStep
===
1
)
{
this
.
selectedSeries
=
item
this
.
selectedModel
=
null
this
.
selectedYear
=
null
this
.
steps
[
2
].
selectedText
=
''
this
.
steps
[
3
].
selectedText
=
''
}
else
if
(
this
.
currentStep
===
2
)
{
this
.
selectedModel
=
item
this
.
selectedYear
=
null
this
.
steps
[
3
].
selectedText
=
''
}
else
if
(
this
.
currentStep
===
3
)
{
this
.
selectedYear
=
item
this
.
selectionResult
=
{
brand
:
this
.
selectedBrand
,
series
:
this
.
selectedSeries
,
model
:
this
.
selectedModel
,
year
:
this
.
selectedYear
}
this
.
$emit
(
'model-selected'
,
item
)
})
}
else
if
(
this
.
currentStep
===
3
)
{
this
.
selectedYear
=
item
this
.
selectionResult
=
{
brand
:
this
.
selectedBrand
,
series
:
this
.
selectedSeries
,
model
:
this
.
selectedModel
,
year
:
this
.
selectedYear
}
}
// 可选:关闭弹窗
// this.$refs.carPopup.close();
this
.
steps
[
this
.
currentStep
].
selectedText
=
item
.
name
if
(
this
.
currentStep
<
3
)
{
this
.
currentStep
++
// 如果是第三步,需要加载年份数据
if
(
this
.
currentStep
===
3
&&
this
.
selectedModel
&&
(
!
this
.
selectedModel
.
childs
||
this
.
selectedModel
.
childs
.
length
===
0
))
{
this
.
loadYearDataForModel
(
this
.
selectedModel
)
}
}
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
::v-deep
.carPopup
{
.content
{
...
...
pages/evaluationForm/evaluationFormDetails.vue
View file @
200f23d
...
...
@@ -143,7 +143,7 @@
</view>
<view
v-else-if=
"activeTabKey == 'contract'"
>
<view
class=
"mb-32 upload-box"
v-if=
"detailsInfo.signingInfo.saleContract"
>
<view
class=
"tab-panel-title"
>
车辆买卖
协议
</view>
<view
class=
"tab-panel-title"
>
二手车转让
协议
</view>
<view
class=
"gridBoxNoPadding"
>
<view
v-for=
"(item, index) in vehicleItems"
:key=
"index"
:class=
"['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"
>
<view
class=
"title-label-see mr-16"
>
{{ item.label }}
</view>
...
...
@@ -185,7 +185,7 @@
</view>
</view>
<view
class=
"mb-32 upload-box"
v-if=
"detailsInfo.signingInfo.custodyContract"
>
<view
class=
"tab-panel-title"
>
车辆代管协议
</view>
<view
class=
"tab-panel-title"
>
车辆代
保
管协议
</view>
<view
class=
"gridBoxNoPadding"
>
<
template
v-for=
"(item, index) in vehicleManagementItems"
>
<view
v-if=
"formatValue(item, detailsInfo)"
:key=
"index"
:class=
"['flex align-start',
{ 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
...
...
@@ -685,9 +685,9 @@ export default {
if
(
item
.
map
&&
this
[
item
.
map
])
{
return
this
[
item
.
map
][
rawValue
]
||
rawValue
}
console
.
log
(
'rawValue:'
,
rawValue
,
item
.
key
)
console
.
log
(
'rawValue:'
,
rawValue
,
rawValue
==
0
,
item
.
key
)
return
rawValue
==
0
?
0
:
rawValue
||
'
'
return
rawValue
==
=
0
?
0
:
rawValue
||
'-
'
},
getImageBySubtype
(
subtype
)
{
if
(
!
this
.
detailsInfo
.
images
)
return
[]
...
...
pages/evaluationForm/index.vue
View file @
200f23d
...
...
@@ -628,6 +628,7 @@ export default {
font-weight
:
400
;
padding
:
toRpx
(
16
)
toRpx
(
64
);
line-height
:
toRpx
(
48
);
text-align
:
center
;
text
{
color
:
#347bff
;
}
...
...
pages/evaluationForm/signInfo.vue
View file @
200f23d
...
...
@@ -146,7 +146,7 @@
</view>
<view
class=
"checkbox-name"
>
{{
item
.
name
}}
</view>
<input
class=
"checkbox-input"
v-if=
"item.isShowInput && item.key != 'other'"
v-model=
"formData[item.inputValue]"
placeholder=
"请输入"
type=
"number"
maxlength=
"1"
/>
<input
class=
"checkbox-input"
v-if=
"item.isShowInput && item.key == 'other'"
v-model=
"formData[item.inputValue]"
placeholder=
"请输入"
maxlength=
"100"
/>
<input
class=
"checkbox-input"
@
click
.
stop=
""
v-if=
"item.isShowInput && item.key == 'other'"
v-model=
"formData[item.inputValue]"
placeholder=
"请输入"
maxlength=
"100"
/>
</label>
</checkbox-group>
</
template
>
...
...
@@ -259,11 +259,6 @@
</view>
</view>
<order-popup
ref=
"openDate"
popupType=
"13"
@
onConfirm=
"confirmDate"
/>
<GeneralPopup
ref=
"calendarGeneralPopup"
popupClass=
"calendarGeneralPopup"
:showClose=
"false"
:showTitle=
"false"
@
confirm=
"confirmCalendar"
>
<
template
#
content
>
<uni-calendar
class=
"calendar"
:showMonth=
"false"
:endDate=
"endDate"
@
change=
"calendarChange"
/>
</
template
>
</GeneralPopup>
<NoticePopup
ref=
"notice"
title=
"重要提示"
text=
"当前页面暂未保存,是否确认退出"
type=
"warning"
></NoticePopup>
</view>
</template>
...
...
@@ -363,7 +358,8 @@ export default {
value
:
'transferPhoto'
,
name
:
'过户授权委托书照片'
,
key
:
'transferPhoto'
,
checked
:
false
checked
:
true
,
disabled
:
true
},
{
value
:
'other'
,
...
...
@@ -598,6 +594,8 @@ export default {
targetObj
:
''
,
type
:
'input'
,
cell
:
'元'
,
inputType
:
'number'
,
disabled
:
false
,
isCell
:
true
,
pattern
:
'^\\d*$'
// 只允许数字输入
},
...
...
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