车牌号必填

This commit is contained in:
bb_pan 2025-03-31 10:28:22 +08:00
parent 1132e835c9
commit 526f0c566e
1 changed files with 16 additions and 1 deletions

View File

@ -92,7 +92,7 @@
<span>{{ infoList.outNum }}</span> <span>{{ infoList.outNum }}</span>
</view> </view>
<view> <view>
<h4>车牌号</h4> <h4><span style="color: red;">*</span>车牌号</h4>
<!-- <uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/> --> <!-- <uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/> -->
<uni-easyinput <uni-easyinput
placeholder="请输入车牌号" placeholder="请输入车牌号"
@ -243,6 +243,14 @@
multiOut () { multiOut () {
let that = this let that = this
let posiIntReg = /^\+?[1-9]\d*$/ let posiIntReg = /^\+?[1-9]\d*$/
// carCode
if (!that.carCode) {
uni.showToast({
icon: 'none',
title: '请输入车牌号!'
})
return
}
if (!posiIntReg.test(that.multiNum)) { if (!posiIntReg.test(that.multiNum)) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -329,6 +337,13 @@
}, },
finishOut () { finishOut () {
let that = this let that = this
if (!that.carCode) {
uni.showToast({
icon: 'none',
title: '请输入车牌号!'
})
return
}
if (that.infoList.outNum > 0) { if (that.infoList.outNum > 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',