diff --git a/src/apps/AppPeopleList/Add.vue b/src/apps/AppPeopleList/Add.vue index 2e38768a..abdda7f7 100644 --- a/src/apps/AppPeopleList/Add.vue +++ b/src/apps/AppPeopleList/Add.vue @@ -220,6 +220,12 @@ export default { if(!this.form.currentAreaId) { return this.$u.toast('请选择现住址') } + if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) { + return this.$u.toast('现住址必须选到村级') + } + if(!/[^0]0{0,2}$/.test(this.form.householdAreaId)) { + return this.$u.toast('户籍地必须选到村级') + } this.form.age = this.$calcAge(this.form.idNumber) this.$http.post('/app/appresident/addOrUpdate', this.form).then(res => { if (res.code === 0) { @@ -229,6 +235,8 @@ export default { delta: 1 }) } + }).catch((err) => { + this.$u.toast(err) }) },