mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 后管修改车牌号接口、页面
This commit is contained in:
@@ -364,10 +364,15 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (!this.checkPlateNumber(this.form.plateNumber)) {
|
||||
this.$message('请输入正确的车牌号码');
|
||||
return;
|
||||
}
|
||||
const param = {
|
||||
memberId: this.memberId,
|
||||
licensePlateNumber: this.form
|
||||
licensePlateNumber: this.form.plateNumber
|
||||
}
|
||||
console.log("form:", this.form);
|
||||
this.$refs['form'].validate((valid) => {
|
||||
updatePlateNumber(param).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
@@ -447,6 +452,11 @@ export default {
|
||||
this.memberTransactionTotal = response.total;
|
||||
})
|
||||
},
|
||||
// 车牌号校验
|
||||
checkPlateNumber (plateNumber) {
|
||||
const re = /[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 A-Z]{1}[A-HJ-NP-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$/;
|
||||
return plateNumber.search(re) !== -1;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user