story#6071,车辆类型为小修车时需清除拖车服务类型id

This commit is contained in:
2025-01-20 10:05:26 +08:00
parent ea5c817057
commit 653a86cf00
3 changed files with 8 additions and 5 deletions

View File

@ -72,7 +72,6 @@ export const myMixins = {
methods();
}
setTimeout(() => {
console.log("shengxiaoxi")
that.noClick = true;
}, 3000)
} else {

View File

@ -154,7 +154,7 @@
<span class="line"></span>
</div>
<div :ref="'checkboxGroup' + index" class="checkbox-group">
<van-checkbox-group v-model="serviceIds" v-for="(item2,index2) in item.children" :key="index2" class="radioWrap" >
<van-checkbox-group v-model="serviceIds" v-for="(item2,index2) in item.children" :key="index2" class="radioWrap">
<van-checkbox class="item" :name="item2.id">{{item2.name }}</van-checkbox>
</van-checkbox-group>
</div>
@ -462,7 +462,11 @@ export default {
this.$toast('车辆类型不能为空')
return
}
await saveVehicle({
if(this.selectedOption.includes(1)){//选择小修车时需清除原本的拖车服务类型
let data=this.oldSupplierServiceList.filter(item => item.name ==='拖车服务')
this.serviceIds = this.serviceIds.filter(item => !data[0].children.some(obj => obj.id === item));
}
await saveVehicle({
vehicleId:this.id ? this.id : '',
plateNumber:this.carNum ? this.carNum :'',
vehicleType:this.selectedOption?.length>0 ? this.selectedOption.join(',') : '',