story#6071,车辆类型为小修车时需清除拖车服务类型id
This commit is contained in:
@ -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(',') : '',
|
||||
|
Reference in New Issue
Block a user