车辆,司机管理下拉刷新,车辆管理->服务种类预期:支持多选
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<div class="itemWrap" v-for="(item,index) in driverList" :key="index">
|
||||
<div class="name-status">
|
||||
<div class="namephone">{{ item.driverName }} / {{ item.driverPhone }}</div>
|
||||
@ -45,6 +46,7 @@
|
||||
<span :class="item.states?.code == 1 ? 'statusYes' : 'statusNo'">{{ item.states?.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@ -64,6 +66,8 @@ export default {
|
||||
driverList:[],
|
||||
states:'',
|
||||
supplierType:'',
|
||||
count: 0,
|
||||
isLoading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -72,8 +76,14 @@ export default {
|
||||
this.getDriverList()
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getDriverList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
addDriver(){
|
||||
this.$toast(this.supplierType)
|
||||
if(this.supplierType == 1){
|
||||
this.$toast("无权添加")
|
||||
}else{
|
||||
@ -108,10 +118,11 @@ export default {
|
||||
driverId:item.driverId,
|
||||
states:this.states
|
||||
})
|
||||
|
||||
await this.getDriverList();
|
||||
setTimeout(()=>{
|
||||
this.$toast('操作成功')
|
||||
},2000)
|
||||
// setTimeout(()=>{
|
||||
// this.$toast('操作成功')
|
||||
// },2000)
|
||||
console.log("item",res)
|
||||
},
|
||||
updateDriver(item){
|
||||
|
@ -62,24 +62,9 @@
|
||||
<span class="service">{{ item.name }}:</span>
|
||||
<span class="line"></span>
|
||||
</div>
|
||||
<van-radio-group v-model="trailerService" @change="change" class="radioWrap">
|
||||
<van-radio :name="item2.name" class="item" v-for="(item2,index2) in item.children" :key="index2">
|
||||
{{item2.name }}
|
||||
<img
|
||||
slot="icon"
|
||||
slot-scope="props"
|
||||
:src="props.checked ? activeIcon : inactiveIcon"
|
||||
>
|
||||
</van-radio>
|
||||
<!-- <van-radio name=" 事故——平板拖车" class="item">-->
|
||||
<!-- 事故——平板拖车-->
|
||||
<!-- <img-->
|
||||
<!-- slot="icon"-->
|
||||
<!-- slot-scope="props"-->
|
||||
<!-- :src="props.checked ? activeIcon : inactiveIcon"-->
|
||||
<!-- >-->
|
||||
<!-- </van-radio>-->
|
||||
</van-radio-group>
|
||||
<van-checkbox-group v-model="serviceIds" v-for="(item2,index2) in item.children" :key="index2" class="radioWrap" @change="change">
|
||||
<van-checkbox class="item" :name="item2.id">{{item2.name }}</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
<two-common-btn class="btn" @cancelClick="cancelBtn" @submitClick="submitBtn" />
|
||||
@ -102,11 +87,13 @@ export default {
|
||||
isJoin:'',//是否参与
|
||||
activeIcon: require('@/assets/check.png'),
|
||||
inactiveIcon: require('@/assets/uncheck.png'),
|
||||
// result: [],
|
||||
checked: true,
|
||||
carNum:"",//车牌号
|
||||
typeList:[],//车辆类型列表
|
||||
selectedOption:'1',//车辆类型
|
||||
id:'',//车辆Id
|
||||
serviceIds:'',//车辆服务种类,
|
||||
serviceIds:[],//车辆服务种类,
|
||||
supplierServiceList:[]
|
||||
}
|
||||
},
|
||||
@ -145,8 +132,8 @@ export default {
|
||||
this.serviceIds=result.serviceIds
|
||||
},
|
||||
change(e) {
|
||||
this.trailerService=e
|
||||
console.log(" this.trailerService", this.trailerService)
|
||||
// this.trailerService=e
|
||||
console.log(" this.trailerService",e, this.result)
|
||||
},
|
||||
change2(e) {
|
||||
this.smallRepairService=e
|
||||
|
@ -18,6 +18,7 @@
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<div class="carItem" v-for="(item,index) in vehicleList" :key="index">
|
||||
<div class="carCode">
|
||||
<div class="codeLeft">{{item.plateNumber}} / {{item.vehicleTypeString}}</div>
|
||||
@ -32,6 +33,7 @@
|
||||
<span :class="item.hasPolymerization.code == 0 ? 'isYes' :'isNo'">{{item.hasPolymerization.label}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
<van-dialog v-model="show" title="确定删除吗" show-cancel-button @confirm="handleConfirm"></van-dialog>
|
||||
<div v-if="loading">加载中...</div>
|
||||
</div>
|
||||
@ -53,12 +55,20 @@ export default {
|
||||
pageSize:10,
|
||||
total:'',
|
||||
loading:false,
|
||||
isLoading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getVehicleList();
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getVehicleList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async getVehicleList(){
|
||||
let result = await supplierVehicleList({
|
||||
pageNum:this.pageNum,
|
||||
@ -85,7 +95,7 @@ export default {
|
||||
})
|
||||
// if(result.code === 200){
|
||||
this.$toast('删除成功');
|
||||
this.vehicleList=[]
|
||||
// this.vehicleList=[]
|
||||
await this.getVehicleList();
|
||||
// }
|
||||
},
|
||||
|
Reference in New Issue
Block a user