diff --git a/src/views/index/vehicleAdd.vue b/src/views/index/vehicleAdd.vue index c1a635d2..5118beef 100644 --- a/src/views/index/vehicleAdd.vue +++ b/src/views/index/vehicleAdd.vue @@ -470,8 +470,8 @@ export default { maxDate: new Date(2099, 11, 31), // 设置最大可选日期(2099年12月31日) checkList: [], virtualVehicle: '', - vehicleStatus: '', - potentialFlag: '', + potentialFlag: new URLSearchParams(window.location.search).get('potentialFlag') || '', + vehicleStatus: new URLSearchParams(window.location.search).get('potentialFlag') === '1' ? 2 : '', showDatePicker: false, dateVal: '', trailerService: '',//拖车服务 @@ -693,7 +693,6 @@ export default { const urlParams = new URLSearchParams(window.location.search); const rawId = this.$route.query.supplierId || urlParams.get('supplierId'); this.supplierId = rawId ? Number(rawId) : ''; - this.potentialFlag = this.$route.query.potentialFlag || urlParams.get('potentialFlag') || ''; await this.getSupplierServiceTree(); await this.getTypeList(); if( this.id){ @@ -710,9 +709,6 @@ export default { liabilityInsuranceEndTime:'', insurancePicturePhoto:'' } - if(this.potentialFlag === '1') { - this.vehicleStatus = 2; - } } }, methods:{