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 1ce4b37f
authored
Jul 09, 2026
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.8.3.2' into 'develop'
上线合并 See merge request
!834
2 parents
c4cda7d8
20d11e27
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
33 deletions
src/views/financeManage/pendingPaymentBill/components/detailDialog.vue
src/views/usedCarManagement/evaluationManagement/components/vehicleInfo.vue
src/views/usedCarManagement/evaluationManagement/components/vehicleInfoExpiry.js
src/views/usedCarManagement/evaluationManagement/components/vehicleInfoExpiry.spec.js
src/views/financeManage/pendingPaymentBill/components/detailDialog.vue
View file @
1ce4b37
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
:title=
"detailInfo.failReason"
>
:title=
"detailInfo.failReason"
>
原因:【
{{
detailInfo
.
failReason
?
(
detailInfo
.
failReason
.
length
>
40
?
(
`${detailInfo.failReason.slice(0, 40)
}
...`
)
:
detailInfo
.
failReason
)
:
'-'
}}
】
原因:【
{{
detailInfo
.
failReason
?
(
detailInfo
.
failReason
.
length
>
40
?
(
`${detailInfo.failReason.slice(0, 40)
}
...`
)
:
detailInfo
.
failReason
)
:
'-'
}}
】
<
/div
>
<
/div
>
<
div
class
=
"tipsBt"
>
<
div
v
-
if
=
"detailInfo.payType == 0"
class
=
"tipsBt"
>
<
el
-
button
size
=
"small"
<
el
-
button
size
=
"small"
type
=
"primary"
type
=
"primary"
@
click
=
"dataPush"
>
@
click
=
"dataPush"
>
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
el
-
form
class
=
"edit-sub-block"
<
el
-
form
class
=
"edit-sub-block"
:
inline
=
"true
"
label
-
width
=
"150px
"
label
-
width
=
"150px
"
>
:
inline
=
"true
"
>
<
div
class
=
"itemDiv"
>
<
div
class
=
"itemDiv"
>
<
el
-
form
-
item
class
=
"halfItem"
<
el
-
form
-
item
class
=
"halfItem"
label
=
"付款单时间:"
>
label
=
"付款单时间:"
>
...
...
src/views/usedCarManagement/evaluationManagement/components/vehicleInfo.vue
View file @
1ce4b37
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
<div
v-if=
"item.infoData && item.infoData.length"
class=
"form_div"
>
<div
v-if=
"item.infoData && item.infoData.length"
class=
"form_div"
>
<el-form
:ref=
"item.childRef"
<el-form
:ref=
"item.childRef"
class=
"edit-sub-block"
class=
"edit-sub-block"
:inline=
"true"
label-width=
"150px"
label-width=
"150px"
:inline=
"true"
:model=
"detailInfo"
:model=
"detailInfo"
:rules=
"rules"
>
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
detailInfo[item.key] && detailInfo[item.key].length
detailInfo[item.key] && detailInfo[item.key].length
"
"
class=
"photo-box"
>
class=
"photo-box"
>
<GlsxPreview
:image-url-arr=
"getImgPreviewUrls(item)
"
<GlsxPreview
limit=
"1
"
limit=
"1
"
:image-url-arr=
"getImgPreviewUrls(item)
"
:pic-options=
"
{ ...picOptions, type: item.otherType }"
:pic-options=
"
{ ...picOptions, type: item.otherType }"
:video-img="true">
:video-img="true">
</GlsxPreview>
</GlsxPreview>
...
@@ -113,34 +113,34 @@
...
@@ -113,34 +113,34 @@
<
template
v
-
if
=
"item.type == 'input'"
>
<
template
v
-
if
=
"item.type == 'input'"
>
<
el
-
input
v
-
model
=
"detailInfo[item.key]"
<
el
-
input
v
-
model
=
"detailInfo[item.key]"
class
=
"edit-form-item"
class
=
"edit-form-item"
size
=
"small"
:
maxlength
=
"item.maxLength || ''"
:
maxlength
=
"item.maxLength || ''"
:
placeholder
=
"
`请输入${item.label
}
`"
:
placeholder
=
"
`请输入${item.label
}
`">
size="
small
">
</el-input>
</el-input>
</template>
</template>
<template v-else-if="
item
.
type
==
'date'
">
<template v-else-if="
item
.
type
==
'date'
">
<el-date-picker v-model="
detailInfo
[
item
.
key
]
"
<el-date-picker v-model="
detailInfo
[
item
.
key
]
"
class="
edit
-
form
-
item
"
class="
edit
-
form
-
item
"
:picker-options="
item
.
pickerOptions
"
:placeholder="
item
.
label
"
size="
small
"
size="
small
"
type="
date
">
type="
date
"
:picker-options="
item
.
pickerOptions
"
:placeholder="
item
.
label
">
</el-date-picker>
</el-date-picker>
</template>
</template>
<template v-else-if="
item
.
type
==
'textarea'
">
<template v-else-if="
item
.
type
==
'textarea'
">
<el-input v-model="
detailInfo
[
item
.
key
]
"
<el-input v-model="
detailInfo
[
item
.
key
]
"
class="
edit
-
form
-
item
"
class="
edit
-
form
-
item
"
:maxlength="
item
.
maxLength
"
placeholder="
请输入
"
placeholder="
请输入
"
:rows="
3
"
type="
textarea
"
type="
textarea
">
:maxlength="
item
.
maxLength
"
:rows="
3
">
</el-input>
</el-input>
</template>
</template>
<template v-else-if="
item
.
type
==
'select'
">
<template v-else-if="
item
.
type
==
'select'
">
<el-select v-model="
detailInfo
[
item
.
key
]
"
<el-select v-model="
detailInfo
[
item
.
key
]
"
class="
edit
-
form
-
item
"
class="
edit
-
form
-
item
"
:placeholder="`请选择${item.label
}
`
"
size="
small
"
size="
small
">
:placeholder="`请选择${item.label
}
`
">
<el-option v-for="
item
in
item
.
options
"
<el-option v-for="
item
in
item
.
options
"
:key="
item
.
value
"
:key="
item
.
value
"
:label="
item
.
label
"
:label="
item
.
label
"
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
</template>
</template>
</template>
</template>
<template v-else>
<template v-else>
<div class="
flex
">
<div class="
flex
" :style="
getExpiryTextStyle
(
item
,
detailInfo
)
">
<div v-if="
item
.
className
&&
item
.
className
(
detailInfo
)
"
<div v-if="
item
.
className
&&
item
.
className
(
detailInfo
)
"
class="
dot
"
class="
dot
"
:style="
{
:style="
{
...
@@ -187,8 +187,8 @@
...
@@ -187,8 +187,8 @@
<
div
class
=
"detail-content"
>
<
div
class
=
"detail-content"
>
<
div
v
-
if
=
"item.subData && item.subData.length"
class
=
"form_div"
>
<
div
v
-
if
=
"item.subData && item.subData.length"
class
=
"form_div"
>
<
el
-
form
class
=
"edit-sub-block"
<
el
-
form
class
=
"edit-sub-block"
:
inline
=
"true
"
label
-
width
=
"150px
"
label
-
width
=
"150px
"
>
:
inline
=
"true
"
>
<
el
-
row
:
gutter
=
"20"
>
<
el
-
row
:
gutter
=
"20"
>
<
template
v
-
for
=
"(item, key) in item.subData"
>
<
template
v
-
for
=
"(item, key) in item.subData"
>
<
el
-
col
:
key
=
"key"
:
span
=
"item.col ? item.col : 12"
>
<
el
-
col
:
key
=
"key"
:
span
=
"item.col ? item.col : 12"
>
...
@@ -236,6 +236,7 @@ import {
...
@@ -236,6 +236,7 @@ import {
}
from
"@/common/constants.js"
;
}
from
"@/common/constants.js"
;
import
{
deepClone
}
from
"@/common/util"
;
import
{
deepClone
}
from
"@/common/util"
;
import
preview
from
"../../components/preview"
;
import
preview
from
"../../components/preview"
;
import
{
getExpiryTextStyle
}
from
"./vehicleInfoExpiry"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -308,10 +309,24 @@ export default {
...
@@ -308,10 +309,24 @@ export default {
}
,
}
,
}
,
}
,
{
{
title
:
"交强险到期"
,
key
:
"compulsoryInsuranceExpiry"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
compulsoryInsuranceExpiry
||
"-"
;
}
,
}
,
{
title
:
"表显里程"
,
title
:
"表显里程"
,
key
:
"mileageStr"
,
key
:
"mileageStr"
,
}
,
}
,
{
{
title
:
"年审到期"
,
key
:
"annualInspectionExpiry"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
annualInspectionExpiry
||
"-"
;
}
,
}
,
{
title
:
"使用性质"
,
title
:
"使用性质"
,
key
:
"carTypeName"
,
key
:
"carTypeName"
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
...
@@ -325,6 +340,13 @@ export default {
...
@@ -325,6 +340,13 @@ export default {
}
,
}
,
}
,
}
,
{
{
title
:
"商业险到期"
,
key
:
"commercialInsuranceExpiry"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
commercialInsuranceExpiry
||
"-"
;
}
,
}
,
{
title
:
"所有人性质"
,
title
:
"所有人性质"
,
key
:
"ownerType"
,
key
:
"ownerType"
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
...
@@ -494,9 +516,11 @@ export default {
...
@@ -494,9 +516,11 @@ export default {
}
;
}
;
}
,
}
,
methods
:
{
methods
:
{
getExpiryTextStyle
,
getStatusItem
(
baseData
,
optKey
,
row
,
rowKey
)
{
getStatusItem
(
baseData
,
optKey
,
row
,
rowKey
)
{
if
(
!
baseData
||
!
baseData
[
optKey
]
||
!
row
)
if
(
!
baseData
||
!
baseData
[
optKey
]
||
!
row
)
{
return
null
;
return
null
;
}
return
baseData
[
optKey
].
find
(
return
baseData
[
optKey
].
find
(
item
=>
item
.
confId
==
row
[
rowKey
],
// 使用严格相等
item
=>
item
.
confId
==
row
[
rowKey
],
// 使用严格相等
...
@@ -504,24 +528,29 @@ export default {
...
@@ -504,24 +528,29 @@ export default {
}
,
}
,
getFileTypeFromUrl
(
url
)
{
getFileTypeFromUrl
(
url
)
{
if
(
!
url
)
if
(
!
url
)
{
return
"file"
;
return
"file"
;
}
const
pathname
=
url
.
split
(
"?"
)[
0
];
const
pathname
=
url
.
split
(
"?"
)[
0
];
const
extension
=
pathname
.
split
(
"."
).
pop
()?.
toLowerCase
()
||
""
;
const
extension
=
pathname
.
split
(
"."
).
pop
()?.
toLowerCase
()
||
""
;
const
imageExtensions
=
[
"jpg"
,
"jpeg"
,
"png"
,
"gif"
,
"bmp"
,
"webp"
];
const
imageExtensions
=
[
"jpg"
,
"jpeg"
,
"png"
,
"gif"
,
"bmp"
,
"webp"
];
if
(
imageExtensions
.
includes
(
extension
))
if
(
imageExtensions
.
includes
(
extension
))
{
return
"image"
;
return
"image"
;
}
// 阿里云 OSS 图片处理:x-oss-process=image/format,jpg 表示图片
// 阿里云 OSS 图片处理:x-oss-process=image/format,jpg 表示图片
if
(
/x-oss-process=image
\/
format,
\w
+/
.
test
(
url
))
if
(
/x-oss-process=image
\/
format,
\w
+/
.
test
(
url
))
{
return
"image"
;
return
"image"
;
}
return
"file"
;
return
"file"
;
}
,
}
,
getOssImageUrl
(
url
)
{
getOssImageUrl
(
url
)
{
if
(
!
url
)
if
(
!
url
)
{
return
url
;
return
url
;
}
// 已经带有 x-oss-process 参数时不重复拼接
// 已经带有 x-oss-process 参数时不重复拼接
if
(
url
.
includes
(
"x-oss-process="
))
if
(
url
.
includes
(
"x-oss-process="
))
{
return
url
;
return
url
;
}
const
param
=
"x-oss-process=image/format,jpg/quality,q_100"
;
const
param
=
"x-oss-process=image/format,jpg/quality,q_100"
;
const
sep
=
url
.
includes
(
"?"
)
?
"&"
:
"?"
;
const
sep
=
url
.
includes
(
"?"
)
?
"&"
:
"?"
;
return
`${url
}
${sep
}
${param
}
`
;
return
`${url
}
${sep
}
${param
}
`
;
...
@@ -529,16 +558,19 @@ export default {
...
@@ -529,16 +558,19 @@ export default {
// imgList 类型(如 carImageUrls、carVideoUrls)预览使用的 URL 列表
// imgList 类型(如 carImageUrls、carVideoUrls)预览使用的 URL 列表
getImgPreviewUrls
(
item
)
{
getImgPreviewUrls
(
item
)
{
const
urls
=
this
.
detailInfo
&&
this
.
detailInfo
[
item
.
key
];
const
urls
=
this
.
detailInfo
&&
this
.
detailInfo
[
item
.
key
];
if
(
!
urls
||
!
Array
.
isArray
(
urls
))
if
(
!
urls
||
!
Array
.
isArray
(
urls
))
{
return
[];
return
[];
}
// 视频不加图片处理参数
// 视频不加图片处理参数
if
(
item
.
otherType
===
"video"
)
if
(
item
.
otherType
===
"video"
)
{
return
urls
;
return
urls
;
}
return
urls
.
map
(
url
=>
this
.
getOssImageUrl
(
url
));
return
urls
.
map
(
url
=>
this
.
getOssImageUrl
(
url
));
}
,
}
,
getFileNameFromUrlForDisplay
(
url
)
{
getFileNameFromUrlForDisplay
(
url
)
{
if
(
!
url
)
if
(
!
url
)
{
return
"未知文件"
;
return
"未知文件"
;
}
try
{
try
{
const
fileName
=
url
.
split
(
"/"
).
pop
().
split
(
"?"
)[
0
];
const
fileName
=
url
.
split
(
"/"
).
pop
().
split
(
"?"
)[
0
];
return
fileName
||
"未知文件"
;
return
fileName
||
"未知文件"
;
...
@@ -547,8 +579,9 @@ export default {
...
@@ -547,8 +579,9 @@ export default {
}
}
}
,
}
,
getFileNameFromUrl
(
url
)
{
getFileNameFromUrl
(
url
)
{
if
(
!
url
)
if
(
!
url
)
{
return
""
;
return
""
;
}
try
{
try
{
const
fileName
=
url
.
split
(
"/"
).
pop
().
split
(
"?"
)[
0
];
const
fileName
=
url
.
split
(
"/"
).
pop
().
split
(
"?"
)[
0
];
return
fileName
||
"未命名文件"
;
return
fileName
||
"未命名文件"
;
...
@@ -570,8 +603,9 @@ export default {
...
@@ -570,8 +603,9 @@ export default {
}
}
}
,
}
,
processFileLinks
(
fileString
)
{
processFileLinks
(
fileString
)
{
if
(
!
fileString
)
if
(
!
fileString
)
{
return
[];
return
[];
}
// 兼容数组;字符串时按"逗号+http"分割,避免 OSS query 中逗号误分割
// 兼容数组;字符串时按"逗号+http"分割,避免 OSS query 中逗号误分割
const
links
=
Array
.
isArray
(
fileString
)
const
links
=
Array
.
isArray
(
fileString
)
?
fileString
?
fileString
...
@@ -589,8 +623,9 @@ export default {
...
@@ -589,8 +623,9 @@ export default {
}
);
}
);
}
,
}
,
processFileUrls
(
fileUrls
)
{
processFileUrls
(
fileUrls
)
{
if
(
!
fileUrls
||
!
Array
.
isArray
(
fileUrls
))
if
(
!
fileUrls
||
!
Array
.
isArray
(
fileUrls
))
{
return
[];
return
[];
}
return
fileUrls
.
map
((
url
)
=>
{
return
fileUrls
.
map
((
url
)
=>
{
const
fileType
=
this
.
getFileTypeFromUrl
(
url
);
const
fileType
=
this
.
getFileTypeFromUrl
(
url
);
...
@@ -605,15 +640,17 @@ export default {
...
@@ -605,15 +640,17 @@ export default {
getImageFiles
(
fileUrls
)
{
getImageFiles
(
fileUrls
)
{
const
processedFiles
=
this
.
processFileUrls
(
fileUrls
);
const
processedFiles
=
this
.
processFileUrls
(
fileUrls
);
if
(
!
processedFiles
||
!
Array
.
isArray
(
processedFiles
))
if
(
!
processedFiles
||
!
Array
.
isArray
(
processedFiles
))
{
return
[];
return
[];
}
return
processedFiles
.
filter
(
file
=>
this
.
isImageType
(
file
));
return
processedFiles
.
filter
(
file
=>
this
.
isImageType
(
file
));
}
,
}
,
getNonImageFiles
(
fileUrls
)
{
getNonImageFiles
(
fileUrls
)
{
const
processedFiles
=
this
.
processFileUrls
(
fileUrls
);
const
processedFiles
=
this
.
processFileUrls
(
fileUrls
);
if
(
!
processedFiles
||
!
Array
.
isArray
(
processedFiles
))
if
(
!
processedFiles
||
!
Array
.
isArray
(
processedFiles
))
{
return
[];
return
[];
}
return
processedFiles
.
filter
(
file
=>
!
this
.
isImageType
(
file
));
return
processedFiles
.
filter
(
file
=>
!
this
.
isImageType
(
file
));
}
,
}
,
...
...
src/views/usedCarManagement/evaluationManagement/components/vehicleInfoExpiry.js
0 → 100644
View file @
1ce4b37
const
expiryKeys
=
[
"compulsoryInsuranceExpiry"
,
"annualInspectionExpiry"
,
"commercialInsuranceExpiry"
,
];
function
getLocalDate
(
value
)
{
if
(
!
value
)
{
return
null
;
}
if
(
value
instanceof
Date
)
{
return
new
Date
(
value
.
getFullYear
(),
value
.
getMonth
(),
value
.
getDate
());
}
const
matched
=
String
(
value
).
match
(
/^
(\d{4})[
-
/](\d{1,2})[
-
/](\d{1,2})
/
);
if
(
matched
)
{
return
new
Date
(
Number
(
matched
[
1
]),
Number
(
matched
[
2
])
-
1
,
Number
(
matched
[
3
]),
);
}
const
date
=
new
Date
(
value
);
if
(
Number
.
isNaN
(
date
.
getTime
()))
{
return
null
;
}
return
new
Date
(
date
.
getFullYear
(),
date
.
getMonth
(),
date
.
getDate
());
}
export
function
getExpiryTextStyle
(
item
,
row
)
{
if
(
!
item
||
!
expiryKeys
.
includes
(
item
.
key
)
||
!
row
)
{
return
{};
}
const
expiryDate
=
getLocalDate
(
row
[
item
.
key
]);
if
(
!
expiryDate
)
{
return
{};
}
const
now
=
new
Date
();
const
today
=
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
now
.
getDate
());
const
diffDays
=
Math
.
ceil
((
expiryDate
.
getTime
()
-
today
.
getTime
())
/
86400000
);
if
(
diffDays
<
0
)
{
return
{
color
:
"#EB4E4E"
};
}
if
(
diffDays
<=
30
)
{
return
{
color
:
"#FF8D1A"
};
}
return
{};
}
src/views/usedCarManagement/evaluationManagement/components/vehicleInfoExpiry.spec.js
0 → 100644
View file @
1ce4b37
import
{
getExpiryTextStyle
}
from
"./vehicleInfoExpiry"
;
describe
(
"vehicleInfo expiry date colors"
,
()
=>
{
beforeEach
(()
=>
{
jest
.
useFakeTimers
(
"modern"
);
jest
.
setSystemTime
(
new
Date
(
2026
,
6
,
6
));
});
afterEach
(()
=>
{
jest
.
useRealTimers
();
});
it
(
"marks expired expiry fields red"
,
()
=>
{
const
style
=
getExpiryTextStyle
(
{
key
:
"annualInspectionExpiry"
},
{
annualInspectionExpiry
:
"2026-07-05"
},
);
expect
(
style
).
toEqual
({
color
:
"#EB4E4E"
});
});
it
(
"marks expiry fields within thirty days orange"
,
()
=>
{
const
style
=
getExpiryTextStyle
(
{
key
:
"commercialInsuranceExpiry"
},
{
commercialInsuranceExpiry
:
"2026-08-05"
},
);
expect
(
style
).
toEqual
({
color
:
"#FF8D1A"
});
});
it
(
"keeps non-expiry fields and later dates default"
,
()
=>
{
expect
(
getExpiryTextStyle
(
{
key
:
"licensePlate"
},
{
licensePlate
:
"A12345"
},
)).
toEqual
({});
expect
(
getExpiryTextStyle
(
{
key
:
"compulsoryInsuranceExpiry"
},
{
compulsoryInsuranceExpiry
:
"2026-08-06"
},
)).
toEqual
({});
});
});
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