From 8987b09157227820b63f0f096117a1bed4e1df9c Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Fri, 29 Apr 2022 17:16:03 +0800 Subject: [PATCH] 29459 --- src/apps/AppMonitoringObject/Add.vue | 34 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 58693ba8..d6a8272d 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -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('请输入正确的手机号')