发货添加错误反馈
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="120px">
|
||||
<el-form-item label="电话" prop="tel">
|
||||
<el-input v-model="dataForm.tel" placeholder="电话"></el-input>
|
||||
<el-input v-model="dataForm.tel" placeholder="电话" type="number"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="dataForm.email" placeholder="邮箱"></el-input>
|
||||
@@ -238,24 +238,24 @@
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
if (!this.dataForm.email && !this.dataForm.tel) {
|
||||
this.$message.error("手机号或邮箱不为空!")
|
||||
return
|
||||
}
|
||||
// if (!this.dataForm.email && !this.dataForm.tel) {
|
||||
/// this.$message.error("手机号或邮箱不为空!")
|
||||
// return
|
||||
// }
|
||||
|
||||
if (this.dataForm.email) {
|
||||
if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){
|
||||
this.$message.error("邮箱格式错误!")
|
||||
return
|
||||
}
|
||||
}
|
||||
// if (this.dataForm.email) {
|
||||
// if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){
|
||||
// this.$message.error("邮箱格式错误!")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
if (this.dataForm.tel) {
|
||||
if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) {
|
||||
this.$message.error("手机格式错误!")
|
||||
return
|
||||
}
|
||||
}
|
||||
// if (this.dataForm.tel) {
|
||||
// if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) {
|
||||
// this.$message.error("手机格式错误!")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
let myData = {}
|
||||
if (!this.dataForm.id) {
|
||||
|
||||
Reference in New Issue
Block a user