Compare commits
2 Commits
4aae54f9a5
...
7c40fbc4c5
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c40fbc4c5 | |||
| 336bb11c42 |
@@ -122,7 +122,7 @@
|
||||
<span>司机状态</span>
|
||||
</div>
|
||||
<div class="isJoin">
|
||||
<van-radio-group v-model="states" @change="isUse" :disabled="statesDisabled" :class="{ 'disabled-radio': statesDisabled }" class="joinWrap">
|
||||
<van-radio-group v-model="states" @change="isUse" class="joinWrap">
|
||||
<van-radio :name="1" style="margin-right: 26px" class="item">
|
||||
启用
|
||||
<img
|
||||
@@ -185,7 +185,6 @@ export default {
|
||||
iconList: [],
|
||||
driverInfo: {},
|
||||
drivingLicenceName: '',
|
||||
fromSupplierAdd: false, // 是否从 supplierAdd 进入
|
||||
idCardAuthority:'',
|
||||
idCardValidStartTime:'',
|
||||
idCardValidEndTime:'',
|
||||
@@ -223,13 +222,6 @@ 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;
|
||||
this.fromSupplierAdd = fromSupplierAdd === 'true';
|
||||
// 如果从 supplierAdd 进入且不是修改模式,默认设置为停用状态
|
||||
if(!this.id && this.fromSupplierAdd) {
|
||||
this.states = 0;
|
||||
}
|
||||
if( this.identityCardFront ) {
|
||||
this.identityCardFrontList = [{ url : this.identityCardFront }];
|
||||
}
|
||||
@@ -464,12 +456,6 @@ export default {
|
||||
},2000)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 司机状态是否禁用(从 supplierAdd 进入且非修改模式时禁用)
|
||||
statesDisabled() {
|
||||
return !this.id && this.fromSupplierAdd;
|
||||
}
|
||||
},
|
||||
components:{
|
||||
TwoCommonBtn,
|
||||
CellGroup
|
||||
@@ -544,8 +530,4 @@ export default {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
}
|
||||
.disabled-radio {
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -137,7 +137,6 @@ export default {
|
||||
supplierId: '',
|
||||
routeId: '',
|
||||
initialized: false,
|
||||
fromSupplierAdd: '', // 是否从 supplierAdd 进入
|
||||
supplierType:'',
|
||||
count: 0,
|
||||
isLoading: false,
|
||||
@@ -187,8 +186,6 @@ 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();
|
||||
}
|
||||
@@ -258,7 +255,7 @@ export default {
|
||||
}else{
|
||||
this.$router.push({
|
||||
name: 'driverAdd',
|
||||
params: this.supplierId ? { supplierId: this.supplierId, fromSupplierAdd: this.fromSupplierAdd } : {}
|
||||
params: this.supplierId ? { supplierId: this.supplierId } : {}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -323,10 +323,6 @@
|
||||
});
|
||||
this.wechatId = res?.data?.wechatId
|
||||
},
|
||||
isFromSupplierAdd() {
|
||||
// 判断是否从 supplierAdd 进入
|
||||
return this.$route.name === 'supplierAdd' || this.$route.query.fromSupplierAdd === 'true';
|
||||
},
|
||||
async saveHandler() {
|
||||
if( this.clickFlag ) {
|
||||
try {
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
methods: {
|
||||
goAddVehicle() {
|
||||
const supplierId = this.id
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId, fromSupplierAdd: 'true' } }));
|
||||
this.goPage('vehicleManage', { id: supplierId, fromSupplierAdd: 'true' });
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId } }));
|
||||
this.goPage('vehicleManage', { id: supplierId });
|
||||
},
|
||||
goModifyPage() {
|
||||
this.goPage('supplierAdd', { id : this.id })
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
<span>车辆状态</span>
|
||||
</div>
|
||||
<div class="isJoin">
|
||||
<van-radio-group v-model="vehicleStatus" :class="{ 'disabled-tree': vehicleInfoDisabled || vehicleStatusDisabled }" :disabled="vehicleInfoDisabled || vehicleStatusDisabled" @change="isVehicleChange" class="joinWrap">
|
||||
<van-radio-group v-model="vehicleStatus" :class="{ 'disabled-tree': vehicleInfoDisabled }" :disabled="vehicleInfoDisabled" @change="isVehicleChange" class="joinWrap">
|
||||
<van-radio :name="1" style="margin-right: 14px">
|
||||
启用
|
||||
<img
|
||||
@@ -471,7 +471,6 @@ export default {
|
||||
checkList: [],
|
||||
virtualVehicle: '',
|
||||
vehicleStatus: '',
|
||||
fromSupplierAdd: false, // 是否从 supplierAdd 进入
|
||||
showDatePicker: false,
|
||||
dateVal: '',
|
||||
trailerService: '',//拖车服务
|
||||
@@ -649,10 +648,6 @@ export default {
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 车辆状态是否禁用(从 supplierAdd 进入且非修改模式时禁用)
|
||||
vehicleStatusDisabled() {
|
||||
return !this.id && this.fromSupplierAdd;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@@ -694,9 +689,6 @@ 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');
|
||||
this.fromSupplierAdd = fromSupplierAdd === 'true';
|
||||
await this.getSupplierServiceTree();
|
||||
await this.getTypeList();
|
||||
if( this.id){
|
||||
@@ -713,10 +705,6 @@ export default {
|
||||
liabilityInsuranceEndTime:'',
|
||||
insurancePicturePhoto:''
|
||||
}
|
||||
// 如果从 supplierAdd 进入,默认设置为停用状态
|
||||
if(this.fromSupplierAdd) {
|
||||
this.vehicleStatus = 2;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@click-left="goBack"
|
||||
>
|
||||
<template slot="right" v-if="permissonList.includes('vehicleAddBtn') || supplierId">
|
||||
<div class="rightWrap" @click="goPage('vehicleAdd', supplierId ? { supplierId, fromSupplierAdd } : {})">
|
||||
<div class="rightWrap" @click="goPage('vehicleAdd', supplierId ? { supplierId } : {})">
|
||||
<img src="@/assets/addImg.png" />
|
||||
<span class="addTxt">添加</span>
|
||||
</div>
|
||||
@@ -149,7 +149,6 @@ export default {
|
||||
searchVal: '',
|
||||
authStates: [],
|
||||
liabilityInsuranceAuditList: [],
|
||||
fromSupplierAdd: '', // 是否从 supplierAdd 进入
|
||||
inputStatusListOptions: [{
|
||||
name: '行驶证未录入',
|
||||
value: 0
|
||||
@@ -206,8 +205,6 @@ export default {
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
// 获取 fromSupplierAdd 标识
|
||||
this.fromSupplierAdd = this.$route.query.fromSupplierAdd || urlParams.get('fromSupplierAdd') || '';
|
||||
let _token = localStorage.getItem('token')
|
||||
if( _token ) {
|
||||
this.getPermissions();
|
||||
@@ -215,8 +212,8 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
nextToDriver() {
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'driverManage', query: { id: this.supplierId, potentialId: this.routeId, fromSupplierAdd: this.fromSupplierAdd } }));
|
||||
this.goPage('driverManage', { id: this.supplierId, potentialId: this.routeId, fromSupplierAdd: this.fromSupplierAdd });
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'driverManage', query: { id: this.supplierId, potentialId: this.routeId } }));
|
||||
this.goPage('driverManage', { id: this.supplierId, potentialId: this.routeId });
|
||||
},
|
||||
async getSupplierById(id) {
|
||||
let res = await supplierSelectById({ id });
|
||||
|
||||
Reference in New Issue
Block a user