From 99fb078b91c24672cdbe903beb00ebcad714af25 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 31 Jul 2024 14:09:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/components/price-select-tab.vue | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/BagStation/pages/components/price-select-tab.vue b/BagStation/pages/components/price-select-tab.vue index f67cc67..b81599a 100644 --- a/BagStation/pages/components/price-select-tab.vue +++ b/BagStation/pages/components/price-select-tab.vue @@ -73,7 +73,7 @@ - {{plateNumber?plateNumber:(plateNumberSel?plateNumberSel:'非必填')}} + {{plateNumber?plateNumber:(plateNumberSel?plateNumberSel:'输入车牌号')}} @@ -294,7 +294,7 @@ - 车牌号非必填 + @@ -673,14 +673,15 @@ checkInfo() { // console.log(this.radio) this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel) - // if (!this.testPlateResult) { - // this.plateNumber='' - // uni.showToast({ - // title: '车牌号校验不通过,自动将其置空,不影响加油', - // icon: 'none' - // }) - // // return false - // } + if (!this.testPlateResult) { + // this.plateNumber='' + uni.showToast({ + title: '车牌号不可为空或格式错误,请重新输入', + icon: 'none', + duration:2000 + }) + return false + } if (this.radio == null || !this.oilSitePriceDetailsVo[this.radio].priceId) { uni.showToast({ icon: 'none', @@ -833,14 +834,15 @@ beforeMake() { // console.log(this.radio, 'beforeMake') this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel) - // if (!this.testPlateResult) { - // this.plateNumber='' - // uni.showToast({ - // title: '车牌号校验不通过,自动将其置空,不影响加油', - // icon: 'none' - // }) - // // return false - // } + if (!this.testPlateResult) { + // this.plateNumber='' + uni.showToast({ + title: '车牌号不可为空或格式错误,请重新输入', + icon: 'none', + duration:2000 + }) + return false + } if (this.radio == null || !this.oilSitePriceDetailsVo[this.radio].priceId) { uni.showToast({ icon: 'none', @@ -946,7 +948,7 @@ }, tsetPlate(plateNumber) { this.testPlateResult = - /^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ + /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}[A-Z0-9挂学警港澳]{1}$)/ .test(plateNumber) }, // 获取渠道下价格等信息 @@ -1018,7 +1020,7 @@ }) this.vlom = '' // // console.log(this.radio) - console.log(this.oilSitePriceDetailsVo[this.radio]) + // console.log(this.oilSitePriceDetailsVo[this.radio]) }, tabSelect(e) { this.activeChannelCode = e.currentTarget.dataset.channelCode;