diff --git a/src/project/police/AppPeopleList/Add.vue b/src/project/police/AppPeopleList/Add.vue index 22bda7b0..f077f206 100644 --- a/src/project/police/AppPeopleList/Add.vue +++ b/src/project/police/AppPeopleList/Add.vue @@ -1,7 +1,7 @@ @@ -192,6 +202,7 @@ export default { currentAddressNo: '' }, showSelect: false, + dateShow: false, formName: '', selectList: [] } @@ -214,45 +225,46 @@ export default { methods: { submit() { if(this.form.residentType === '') { - return this.$u.toast('请选择居民类型') - } - if(this.form.householdName === '') { - return this.$u.toast('请选择是否户主') - } - if(this.form.householdName != 1 && !this.form.householdIdNumber) { - return this.$u.toast('请输入户主身份证') - } - if(this.form.householdName != 1 && this.form.householdRelation === '') { - return this.$u.toast('请选择与户主关系') + // return this.$u.toast('请选择居民类型') + this.form.residentType ='0' } + // if(this.form.householdName === '') { + // return this.$u.toast('请选择是否户主') + // } + // if(this.form.householdName != 1 && !this.form.householdIdNumber) { + // return this.$u.toast('请输入户主身份证') + // } + // if(this.form.householdName != 1 && this.form.householdRelation === '') { + // return this.$u.toast('请选择与户主关系') + // } if(!this.form.name) { return this.$u.toast('请输入姓名') } if(!this.form.idNumber) { return this.$u.toast('请输入身份证号') } - if(!this.form.sex) { - return this.$u.toast('请选择性别') - } - if(!this.form.birthDate) { - return this.$u.toast('请选择出生日期') - } - if(!this.form.currentAreaId) { - return this.$u.toast('请选择现住址') - } - if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) { - return this.$u.toast('现住址必须选到村级') - } - if(!this.form.currentAddressGroup) { - return this.$u.toast('请输入组') - } - if(!this.form.currentAddressNo) { - return this.$u.toast('请输入户') - } - if(this.form.householdAreaId && !/[^0]0{0,2}$/.test(this.form.householdAreaId)) { - return this.$u.toast('户籍地必须选到村级') - } - this.form.age = this.$calcAge(this.form.idNumber) + // if(!this.form.sex) { + // return this.$u.toast('请选择性别') + // } + // if(!this.form.birthDate) { + // return this.$u.toast('请选择出生日期') + // } + // if(!this.form.currentAreaId) { + // return this.$u.toast('请选择现住址') + // } + // if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) { + // return this.$u.toast('现住址必须选到村级') + // } + // if(!this.form.currentAddressGroup) { + // return this.$u.toast('请输入组') + // } + // if(!this.form.currentAddressNo) { + // return this.$u.toast('请输入户') + // } + // if(this.form.householdAreaId && !/[^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) { this.$u.toast('新增成功') @@ -276,6 +288,9 @@ export default { this.formName = formName this.showSelect = true }, + confirmTime(e) { + this.form.birthDate = `${e.year}-${e.month}-${e.day}` + }, changeIdNumber() { let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; if (this.form.idNumber.length == 18 && !reg.test(this.form.idNumber)) {