29459
This commit is contained in:
@@ -613,13 +613,39 @@ export default {
|
||||
},
|
||||
|
||||
nextStep() {
|
||||
const rules = this.rules()
|
||||
// objectType: '请选择监测对象类型',
|
||||
// name: '请输入户主姓名',
|
||||
// idNumber: '请输入身份证号',
|
||||
// phone: '请输入联系方式',
|
||||
// currentAreaId: '请选择现住址',
|
||||
|
||||
for (let v of Object.keys(rules)) {
|
||||
if (!this.form[v]) {
|
||||
return this.$u.toast(rules[v])
|
||||
if(!id) {
|
||||
if(!this.form.objectType) {
|
||||
this.$u.toast('请选择监测对象类型')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!this.form.idNumber) {
|
||||
this.$u.toast('请输入身份证号')
|
||||
}
|
||||
if(!this.form.phone) {
|
||||
this.$u.toast('请输入联系方式')
|
||||
}
|
||||
if(!this.form.currentAreaId) {
|
||||
this.$u.toast('请选择现住址')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// const rules = this.rules()
|
||||
|
||||
// for (let v of Object.keys(rules)) {
|
||||
// if (!this.form[v]) {
|
||||
// return this.$u.toast(rules[v])
|
||||
// }
|
||||
// }
|
||||
let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
|
||||
if (this.form.phone.length == 11 && !regTel.test(this.form.phone)) {
|
||||
return this.$u.toast('请输入正确的手机号')
|
||||
|
||||
Reference in New Issue
Block a user