From 57f839166eb6c87fb5cddc7ffe20f2ca6f7bb8d8 Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Tue, 9 Jun 2026 11:06:48 +0800 Subject: [PATCH] =?UTF-8?q?CRM=5F26-04-22#story#8495,=E6=BD=9C=E5=9C=A8?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86H5=E9=A1=B5=E9=9D=A2=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BF=A1=E6=81=AF=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=EF=BC=8C=E6=8F=90=E4=BA=A4=E8=A1=A5=E5=85=85=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8E=E9=80=80=E5=9B=9E=E7=90=86=E7=94=B1=E7=9A=84?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8E=E4=BF=AE=E5=A4=8D(=E5=81=9C?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E4=BF=AE=E6=94=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/driverAdd.vue | 6 ++++++ src/views/index/driverManage.vue | 5 ++++- src/views/index/supplierAdd.vue | 4 ++++ src/views/index/supplierInfo.vue | 4 ++-- src/views/index/vehicleAdd.vue | 6 ++++++ src/views/index/vehicleManage.vue | 9 ++++++--- 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index 0d7172c5..bf3e2041 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -222,6 +222,12 @@ export default { this.identityCardFront = this.$route.params?.identityCardFront; this.driverInfo.lssueDate = this.$route.params?.lssueDate; this.drivingLicenceName = this.$route.params?.drivingLicenceName; + // 获取 fromSupplierAdd 标识 + const fromSupplierAdd = this.$route.params?.fromSupplierAdd; + // 如果从 supplierAdd 进入且不是修改模式,默认设置为停用状态 + if(!this.id && fromSupplierAdd === 'true') { + this.states = 0; + } if( this.identityCardFront ) { this.identityCardFrontList = [{ url : this.identityCardFront }]; } diff --git a/src/views/index/driverManage.vue b/src/views/index/driverManage.vue index c0277129..65222bd5 100644 --- a/src/views/index/driverManage.vue +++ b/src/views/index/driverManage.vue @@ -137,6 +137,7 @@ export default { supplierId: '', routeId: '', initialized: false, + fromSupplierAdd: '', // 是否从 supplierAdd 进入 supplierType:'', count: 0, isLoading: false, @@ -186,6 +187,8 @@ export default { this.supplierId = rawId ? Number(rawId) : ''; const potentialId = this.$route.query.potentialId || urlParams.get('potentialId'); this.routeId = potentialId; + // 获取 fromSupplierAdd 标识 + this.fromSupplierAdd = this.$route.query.fromSupplierAdd || urlParams.get('fromSupplierAdd') || ''; if(!rawId) { this.getPermissions(); } @@ -255,7 +258,7 @@ export default { }else{ this.$router.push({ name: 'driverAdd', - params: this.supplierId ? { supplierId: this.supplierId } : {} + params: this.supplierId ? { supplierId: this.supplierId, fromSupplierAdd: this.fromSupplierAdd } : {} }) } }, diff --git a/src/views/index/supplierAdd.vue b/src/views/index/supplierAdd.vue index 39c69048..6d0e927f 100644 --- a/src/views/index/supplierAdd.vue +++ b/src/views/index/supplierAdd.vue @@ -323,6 +323,10 @@ }); this.wechatId = res?.data?.wechatId }, + isFromSupplierAdd() { + // 判断是否从 supplierAdd 进入 + return this.$route.name === 'supplierAdd' || this.$route.query.fromSupplierAdd === 'true'; + }, async saveHandler() { if( this.clickFlag ) { try { diff --git a/src/views/index/supplierInfo.vue b/src/views/index/supplierInfo.vue index 47aa81d8..c222cffc 100644 --- a/src/views/index/supplierInfo.vue +++ b/src/views/index/supplierInfo.vue @@ -166,8 +166,8 @@ methods: { goAddVehicle() { const supplierId = this.id - localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId } })); - this.goPage('vehicleManage', { id: supplierId }); + localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId, fromSupplierAdd: 'true' } })); + this.goPage('vehicleManage', { id: supplierId, fromSupplierAdd: 'true' }); }, goModifyPage() { this.goPage('supplierAdd', { id : this.id }) diff --git a/src/views/index/vehicleAdd.vue b/src/views/index/vehicleAdd.vue index 1e0399ac..305a1a43 100644 --- a/src/views/index/vehicleAdd.vue +++ b/src/views/index/vehicleAdd.vue @@ -689,6 +689,8 @@ export default { const urlParams = new URLSearchParams(window.location.search); const rawId = this.$route.query.supplierId || urlParams.get('supplierId'); this.supplierId = rawId ? Number(rawId) : ''; + // 获取 fromSupplierAdd 标识 + const fromSupplierAdd = this.$route.query.fromSupplierAdd || urlParams.get('fromSupplierAdd'); await this.getSupplierServiceTree(); await this.getTypeList(); if( this.id){ @@ -705,6 +707,10 @@ export default { liabilityInsuranceEndTime:'', insurancePicturePhoto:'' } + // 如果从 supplierAdd 进入,默认设置为停用状态 + if(fromSupplierAdd === 'true') { + this.vehicleStatus = 2; + } } }, methods:{ diff --git a/src/views/index/vehicleManage.vue b/src/views/index/vehicleManage.vue index 1d9404f3..93bebc77 100644 --- a/src/views/index/vehicleManage.vue +++ b/src/views/index/vehicleManage.vue @@ -11,7 +11,7 @@ @click-left="goBack" >