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 375d17db
authored
Dec 11, 2025
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 权益提单动态校验车架号
1 parent
22387562
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
14 deletions
pages/equity/tool/components/CreateEquity.vue
pages/equity/tool/components/CreateOrder.vue
pages/equity/tool/components/CreateEquity.vue
View file @
375d17d
...
@@ -96,7 +96,6 @@
...
@@ -96,7 +96,6 @@
:type=
"noticeObj.type || 'success'"
:type=
"noticeObj.type || 'success'"
:buttons=
"noticeObj.buttons"
:buttons=
"noticeObj.buttons"
></NoticePopup>
></NoticePopup>
<EquityVinCheck
ref=
"vinCheckRef"
/>
</view>
</view>
</template>
</template>
...
@@ -122,8 +121,7 @@ import EquityUpload from './EquityForm/EquityUpload.vue'
...
@@ -122,8 +121,7 @@ import EquityUpload from './EquityForm/EquityUpload.vue'
import
EquityConversion
from
'./EquityForm/EquityConversion.vue'
import
EquityConversion
from
'./EquityForm/EquityConversion.vue'
import
NP
from
'number-precision'
import
NP
from
'number-precision'
import
NoticePopup
from
'@/components/NoticePopup.vue'
import
NoticePopup
from
'@/components/NoticePopup.vue'
import
EquityVinCheck
from
'./EquityForm/EquityVinCheck.vue'
import
{
validateVin
,
formatVinInput
}
from
'@/utils/vinVaildate'
const
codeToAttr
=
{
const
codeToAttr
=
{
YB0001
:
'invoice'
,
YB0001
:
'invoice'
,
YB0003
:
'driveFront'
,
YB0003
:
'driveFront'
,
...
@@ -162,8 +160,7 @@ export default {
...
@@ -162,8 +160,7 @@ export default {
EquityTire
,
EquityTire
,
EquityUpload
,
EquityUpload
,
EquityConversion
,
EquityConversion
,
NoticePopup
,
NoticePopup
EquityVinCheck
},
},
props
:
{
props
:
{
transmissionOfData
:
{
transmissionOfData
:
{
...
@@ -203,10 +200,25 @@ export default {
...
@@ -203,10 +200,25 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
// this.$refs.vinCheckRef.open()
},
},
methods
:
{
methods
:
{
// 车架号动态校验
validateVin
()
{
let
carVinVal
=
this
.
orderObj
.
vin
;
if
(
carVinVal
)
{
this
.
orderObj
.
carVin
=
formatVinInput
(
carVinVal
)
validateVin
(
this
.
orderObj
.
carVin
).
then
(
result
=>
{
console
.
log
(
"validateVin"
,
result
);
let
{
valid
}
=
result
.
data
;
this
.
validateState
=
valid
// 校验成功,所有提示已在公共方法中处理
console
.
log
(
'车架号校验成功:'
,
result
)
}).
catch
(
err
=>
{
console
.
log
(
"validateVinErr"
,
result
);
})
}
},
// 单选框change事件
// 单选框change事件
radioChange
(
e
,
val
)
{
radioChange
(
e
,
val
)
{
this
.
$set
(
this
.
orderObj
,
val
.
value
,
e
.
detail
.
value
)
this
.
$set
(
this
.
orderObj
,
val
.
value
,
e
.
detail
.
value
)
...
@@ -243,6 +255,8 @@ export default {
...
@@ -243,6 +255,8 @@ export default {
},
},
inputBlur
(
e
,
val
)
{
inputBlur
(
e
,
val
)
{
this
.
orderObj
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
this
.
orderObj
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
// VIN车架号动态校验:车架号字段,动态转换为大写
if
(
val
.
value
===
'vin'
)
this
.
validateVin
()
},
},
async
getServiceInfoDetail
(
contractNo
)
{
async
getServiceInfoDetail
(
contractNo
)
{
try
{
try
{
...
@@ -401,6 +415,21 @@ export default {
...
@@ -401,6 +415,21 @@ export default {
this
.
viewKey
=
Date
.
now
()
this
.
viewKey
=
Date
.
now
()
},
},
async
submit
(
operationType
)
{
async
submit
(
operationType
)
{
// VIN车架号-动态校验
const
carVin
=
this
.
orderObj
.
vin
console
.
log
(
"validateState"
,
this
.
orderObj
);
if
(
carVin
)
{
// 前置判断
if
(
carVin
.
length
!==
17
)
{
uni
.
showToast
({
title
:
'请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)'
,
icon
:
'none'
})
return
false
}
// 根据接口校验结果判断
if
(
carVin
.
length
===
17
&&
!
this
.
validateState
)
{
uni
.
showToast
({
title
:
'车架号校验不匹配,请核对后重新输入'
,
icon
:
'none'
})
return
false
}
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'提交中...'
,
title
:
'提交中...'
,
mask
:
true
mask
:
true
...
@@ -531,7 +560,6 @@ export default {
...
@@ -531,7 +560,6 @@ export default {
if
(
res
&&
res
.
message
)
throw
res
.
message
if
(
res
&&
res
.
message
)
throw
res
.
message
}
}
}
}
})
})
}
}
})
})
...
@@ -591,10 +619,6 @@ export default {
...
@@ -591,10 +619,6 @@ export default {
this
.
$emit
(
'jump'
,
'EquityManagement'
)
this
.
$emit
(
'jump'
,
'EquityManagement'
)
},
1500
)
},
1500
)
}
else
{
}
else
{
uni
.
showLoading
({
mask
:
true
})
setTimeout
(
async
()
=>
{
// 从URL获取文件名
// 从URL获取文件名
const
getFileNameFromUrl
=
(
url
)
=>
{
const
getFileNameFromUrl
=
(
url
)
=>
{
return
url
.
split
(
'/'
).
pop
().
split
(
'?'
)[
0
]
||
'未知文件'
return
url
.
split
(
'/'
).
pop
().
split
(
'?'
)[
0
]
||
'未知文件'
...
@@ -627,8 +651,6 @@ export default {
...
@@ -627,8 +651,6 @@ export default {
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
$refs
.
reportNotice
.
open
()
this
.
$refs
.
reportNotice
.
open
()
},
100
)
},
100
)
},
1500
)
}
}
}
else
throw
message
}
else
throw
message
...
...
pages/equity/tool/components/CreateOrder.vue
View file @
375d17d
...
@@ -508,7 +508,6 @@ export default {
...
@@ -508,7 +508,6 @@ export default {
},
},
// 输入框失去焦点事件
// 输入框失去焦点事件
inputBlur
(
e
,
val
)
{
inputBlur
(
e
,
val
)
{
console
.
log
(
"SSSSSS"
);
console
.
log
(
e
,
val
)
console
.
log
(
e
,
val
)
if
(
val
.
value
==
'price'
)
{
if
(
val
.
value
==
'price'
)
{
this
.
orderObj
[
val
.
value
]
=
parseFloat
(
this
.
orderObj
[
val
.
value
])
>
2000000
?
2000000
:
this
.
orderObj
[
val
.
value
]
this
.
orderObj
[
val
.
value
]
=
parseFloat
(
this
.
orderObj
[
val
.
value
])
>
2000000
?
2000000
:
this
.
orderObj
[
val
.
value
]
...
...
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