子公司不能添加司机

This commit is contained in:
2023-08-24 10:53:22 +08:00
parent a4ab5eb55c
commit bb73bd7847
8 changed files with 31 additions and 16 deletions

View File

@@ -11,7 +11,7 @@
@click-left="goBack"
>
<template slot="right">
<div class="rightWrap" @click="goPage('driverAdd')">
<div class="rightWrap" @click="addDriver" >
<img src="@/assets/addImg.png" />
<span class="addTxt">添加</span>
</div>
@@ -62,13 +62,25 @@ export default {
pageSize:10,
total:'',
driverList:[],
states:''
states:'',
supplierType:'',
}
},
mounted() {
this.getDriverList()
const urlParams = new URLSearchParams(window.location.search);
this.supplierType = urlParams.get('supplierType');
this.getDriverList()
},
methods:{
addDriver(){
if(this.supplierType === 1){
this.$toast("无权添加")
}else{
this.$router.push({
name:'driverAdd'
})
}
},
async getDriverList(){
let res = await driverList({
pageNum:this.pageNum,