story#6071,选择小修车且只有一项数据时需清除原本的拖车服务类型

This commit is contained in:
2025-01-21 16:45:39 +08:00
parent 66aa84a753
commit 2a925e120b

View File

@ -525,7 +525,7 @@ export default {
this.$toast('车辆类型不能为空')
return
}
if(this.selectedOption?.length==0 && this.selectedOption.includes(1)){//选择小修车时需清除原本的拖车服务类型
if(this.selectedOption?.length==1 && 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));
}