|
@@ -111,6 +111,18 @@
|
|
|
},
|
|
|
methods: {
|
|
|
submit(){
|
|
|
+ this.plateNumber = this.plateNumber.replace(/\s*/g,"");
|
|
|
+ var regex = /(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-HJ-NP-Z0-9]{5})|([A-HJ-NP-Z0-9]{6}))$)|(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-HJ-NP-Z0-9]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)/u;
|
|
|
+ if (regex.test(this.plateNumber)) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入正确车牌号',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
//this.convertToUpperCase(this.plateNumber)
|
|
|
if(!this.customerName){
|
|
|
uni.showToast({
|
|
@@ -132,17 +144,7 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
- var regex = /(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-HJ-NP-Z0-9]{5})|([A-HJ-NP-Z0-9]{6}))$)|(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-HJ-NP-Z0-9]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)/u;
|
|
|
- if (regex.test(this.plateNumber)) {
|
|
|
-
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: '请输入正确车牌号',
|
|
|
- icon: 'none',
|
|
|
- duration: 3000
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
+
|
|
|
if(!this.mobilePhone){
|
|
|
uni.showToast({
|
|
|
title: '请输入手机号',
|