diff --git a/src/views/modules/user/househeadedit.vue b/src/views/modules/user/househeadedit.vue index 95abbb7..1152eb9 100644 --- a/src/views/modules/user/househeadedit.vue +++ b/src/views/modules/user/househeadedit.vue @@ -16,13 +16,13 @@
- + - + - + @@ -61,11 +61,11 @@ - + - +
@@ -97,7 +97,7 @@
- +

@@ -112,10 +112,10 @@ - + - +
@@ -166,15 +166,17 @@
- - + + - - {{item.dictName}} - + + + {{item.dictName}} + + @@ -226,6 +228,7 @@ export default { helpStatus: '', motorVehicleNum: '', motorVehicleCategory: '', + motorVehicleCategoryList: [], dogStatus: '', familyMemberNum: '', familyMemberOutNum: '', @@ -299,9 +302,6 @@ export default { helpStatus: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], - motorVehicleNum: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], dogStatus: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ] @@ -495,9 +495,16 @@ export default { } } } - if (this.dataForm.motorVehicleNum !== 0 && (this.dataForm.motorVehicleCategory === '' || this.dataForm.motorVehicleCategory === null)) { + if (this.dataForm.motorVehicleNum !== 0 && (this.dataForm.motorVehicleCategoryList.length === 0)) { return this.$message.error('请选择机动车类型') } + let motorVehicleCategoryStr = '' + if (this.dataForm.motorVehicleCategoryList.length > 0) { + for (let i = 0; i < this.dataForm.motorVehicleCategoryList.length; i++) { + motorVehicleCategoryStr += ',' + this.dataForm.motorVehicleCategoryList[i] + } + } + this.dataForm.motorVehicleCategory = motorVehicleCategoryStr.substr(1) this.dataForm.isSubmit = '0' this.$http[!this.dataForm.id ? 'post' : 'put']('/app-user/populationinformation/', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { diff --git a/src/views/modules/user/houseresidentInfo-add-or-update.vue b/src/views/modules/user/houseresidentInfo-add-or-update.vue index 31d2bd4..79af221 100644 --- a/src/views/modules/user/houseresidentInfo-add-or-update.vue +++ b/src/views/modules/user/houseresidentInfo-add-or-update.vue @@ -11,7 +11,7 @@ - + @@ -20,13 +20,13 @@ - + - + - - + +