|
@@ -93,6 +93,12 @@ export default {
|
|
|
if (valid) {
|
|
|
const formData = JSON.parse(JSON.stringify(_this.form))
|
|
|
formData.id = _this.itemId ? _this.itemId : undefined
|
|
|
+ const re = /^[\u4E00-\u9FA5A-Za-z].{2,20}$/
|
|
|
+ const r = re.test(formData.brandName)
|
|
|
+ if (!r) {
|
|
|
+ this.$message.info('品牌名称只能以汉字或字母开头')
|
|
|
+ return false
|
|
|
+ }
|
|
|
dealerProductBrandSave(formData).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|