diff --git a/src/views/index/vehicleAdd.vue b/src/views/index/vehicleAdd.vue index e707d2de..670d5e2a 100644 --- a/src/views/index/vehicleAdd.vue +++ b/src/views/index/vehicleAdd.vue @@ -675,8 +675,21 @@ export default { this.vehicleLicenseInfo.issueDate = frontInfo?.issueDate; this.vehicleLicenseInfo.issueAuthority = frontInfo?.seal; this.setDefault(); + this.checkDisabledItems(); } }, + checkDisabledItems() { + let _arr = []; + this.selectedOption.map(item => { + let _tempArr = this.vehicleTypes.filter(_item => _item.disabled && _item.value == item); + _arr = [..._arr, ..._tempArr] + }) + if (_arr.length > 0) { + this.$toast(`车辆类别数据不合法:${_arr.map(item => item.name).join('、')}`) + return false + } + return true + }, async vehicleBackOcrHandler() { // 行驶证副页 ocr 识别 this.vehicleLicenseInfo.recordNumber = ''; this.vehicleLicenseInfo.passengerCapacity = ''; @@ -829,6 +842,10 @@ export default { this.$toast('车辆类别不能为空') return } + let res = this.checkDisabledItems(); + if(!res) { + return false + } if( !this.virtualVehicle ) { this.$toast('车辆属性不能为空') return