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 4f31d228
authored
Dec 11, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 客户信息车架号判断
1 parent
bd87d02f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
7 deletions
pages/equity/tool/components/UpdateOrderInfo.vue
pages/equity/tool/components/UpdateOrderInfo.vue
View file @
4f31d22
...
@@ -39,7 +39,7 @@ import GlCell from '../../../../components/Form/GlCell.vue'
...
@@ -39,7 +39,7 @@ import GlCell from '../../../../components/Form/GlCell.vue'
import
{
UpdateOrderInfo
,
popupTypeEnum
,
payTypeList
,
titleList
}
from
'../contant'
import
{
UpdateOrderInfo
,
popupTypeEnum
,
payTypeList
,
titleList
}
from
'../contant'
import
{
interceptionMixin
}
from
'@/mixin/index'
import
{
interceptionMixin
}
from
'@/mixin/index'
import
NoticePopup
from
'@/components/NoticePopup.vue'
import
NoticePopup
from
'@/components/NoticePopup.vue'
import
{
validateVin
,
formatVinInput
}
from
'@/utils/vinVaildate'
export
default
{
export
default
{
name
:
'CreateOrder'
,
name
:
'CreateOrder'
,
mixins
:
[
interceptionMixin
],
mixins
:
[
interceptionMixin
],
...
@@ -65,7 +65,8 @@ export default {
...
@@ -65,7 +65,8 @@ export default {
externalData
:
[],
externalData
:
[],
popupType
:
0
,
popupType
:
0
,
baseConfigData
:
{},
baseConfigData
:
{},
requiredList
:
[],
// 录单设置的必填项
requiredList
:
[],
validateState
:
true
,
// 录单设置的必填项
orderObj
:
{
orderObj
:
{
owner
:
''
,
owner
:
''
,
phone
:
''
,
phone
:
''
,
...
@@ -123,8 +124,19 @@ export default {
...
@@ -123,8 +124,19 @@ export default {
},
},
// 输入框失去焦点事件
// 输入框失去焦点事件
inputBlur
(
e
,
val
)
{
inputBlur
(
e
,
val
)
{
console
.
log
(
e
,
val
)
console
.
log
(
e
,
val
,
val
.
value
===
'carVin'
)
if
(
val
.
value
===
'carVin'
)
{
validateVin
(
this
.
orderObj
.
carVin
).
then
(
result
=>
{
console
.
log
(
'validateVin'
,
result
)
let
{
valid
}
=
result
.
data
this
.
validateState
=
valid
// 校验成功,所有提示已在公共方法中处理
console
.
log
(
'车架号校验成功:'
,
result
)
this
.
orderObj
.
carVin
=
formatVinInput
(
this
.
orderObj
.
carVin
)
})
}
else
{
this
.
orderObj
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
this
.
orderObj
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
}
},
},
// 校验必填等规则
// 校验必填等规则
checkRequired
()
{
checkRequired
()
{
...
@@ -151,10 +163,10 @@ export default {
...
@@ -151,10 +163,10 @@ export default {
// 如果是customerPhone,添加phoneRex校验
// 如果是customerPhone,添加phoneRex校验
if
(
item
.
value
===
'phone'
&&
!
phoneRex
.
test
(
value
))
throw
`请输入正确的
${
item
.
label
}
`
if
(
item
.
value
===
'phone'
&&
!
phoneRex
.
test
(
value
))
throw
`请输入正确的
${
item
.
label
}
`
}
}
if
(
orderObj
.
carVin
)
{
//
if (orderObj.carVin) {
const
vinRex
=
/^
(?=
.*
[
A-Za-z
])[
A-Za-z0-9
]{17}
$/
//
const vinRex = /^(?=.*[A-Za-z])[A-Za-z0-9]{17}$/
if
(
!
vinRex
.
test
(
orderObj
.
carVin
))
throw
'请输入正确的车架号'
//
if (!vinRex.test(orderObj.carVin)) throw '请输入正确的车架号'
}
//
}
if
(
orderObj
.
certificateNo
&&
orderObj
.
certificateNo
.
length
!=
18
)
throw
'请输入正确的18位证件号'
if
(
orderObj
.
certificateNo
&&
orderObj
.
certificateNo
.
length
!=
18
)
throw
'请输入正确的18位证件号'
return
true
return
true
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -169,6 +181,18 @@ export default {
...
@@ -169,6 +181,18 @@ export default {
// 提交
// 提交
async
submit
()
{
async
submit
()
{
if
(
!
this
.
checkRequired
()
||
(
await
this
.
checkDailyReport
()))
return
if
(
!
this
.
checkRequired
()
||
(
await
this
.
checkDailyReport
()))
return
if
(
this
.
orderObj
.
carVin
)
{
// 前置判断
if
(
this
.
orderObj
.
carVin
.
length
!==
17
)
{
uni
.
showToast
({
title
:
'请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)'
,
icon
:
'none'
})
return
false
}
// 根据接口校验结果判断
if
(
this
.
orderObj
.
carVin
.
length
===
17
&&
!
this
.
validateState
)
{
uni
.
showToast
({
title
:
'车架号校验不匹配,请核对后重新输入'
,
icon
:
'none'
})
return
false
}
}
let
params
=
{
let
params
=
{
id
:
this
.
orderObj
.
id
,
id
:
this
.
orderObj
.
id
,
notes
:
this
.
orderObj
.
notes
||
''
,
notes
:
this
.
orderObj
.
notes
||
''
,
...
...
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