Commit 6efa58ae authored by zhengyi's avatar zhengyi

线路选择器的逻辑目的国、目的城市、目的仓选择联动逻辑完善

parent e80ca6e3
......@@ -319,6 +319,29 @@ export default {
if (this.destCountryIds && this.destCountryIds.length > 0) {
this.destCityList = this.AddressCity.filter(item => this.destCountryIds.includes(item.guojia))
this.destWarehouseList = this.AddressTown.filter(item => this.destCountryIds.includes(item.guojia))
}else {
if (this.destCityIds && this.destCityIds.length > 0) {
let cityCountryIdList = this.destCityList.filter(item => this.destCityIds.includes(item.shi)).map((city) => {
return city.guojia
})
this.destCountryList = this.countryList.filter(item => cityCountryIdList.includes(item.guojia))
this.destWarehouseList = this.AddressTown.filter(item => this.destCityIds.includes(item.shi))
}else {
if (this.destWarehouseIds && this.destWarehouseIds.length > 0) {
let warehouseCountryIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
return warehouse.guojia
})
this.destCountryList = this.countryList.filter(item => warehouseCountryIdList.includes(item.guojia))
let warehouseCityIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
return warehouse.shi
})
this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
}else {
this.destCountryList = this.countryList;
this.destCityList = this.AddressCity;
this.destWarehouseList = this.AddressTown
}
}
}
this.getOpenedRouterList()
},
......@@ -334,6 +357,26 @@ export default {
})
this.destCountryList = this.countryList.filter(item => cityCountryIdList.includes(item.guojia))
this.destWarehouseList = this.AddressTown.filter(item => this.destCityIds.includes(item.shi))
}else {
if (this.destCountryIds && this.destCountryIds.length > 0) {
this.destCityList = this.AddressCity.filter(item => this.destCountryIds.includes(item.guojia))
this.destWarehouseList = this.AddressTown.filter(item => this.destCountryIds.includes(item.guojia))
}else {
if (this.destWarehouseIds && this.destWarehouseIds.length > 0) {
let warehouseCountryIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
return warehouse.guojia
})
this.destCountryList = this.countryList.filter(item => warehouseCountryIdList.includes(item.guojia))
let warehouseCityIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
return warehouse.shi
})
this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
}else {
this.destCountryList = this.countryList;
this.destCityList = this.AddressCity;
this.destWarehouseList = this.AddressTown
}
}
}
this.getOpenedRouterList()
},
......@@ -351,6 +394,23 @@ export default {
return warehouse.shi
})
this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
}else {
if (this.destCountryIds && this.destCountryIds.length > 0) {
this.destCityList = this.AddressCity.filter(item => this.destCountryIds.includes(item.guojia))
this.destWarehouseList = this.AddressTown.filter(item => this.destCountryIds.includes(item.guojia))
}else {
if (this.destCityIds && this.destCityIds.length > 0) {
let cityCountryIdList = this.destCityList.filter(item => this.destCityIds.includes(item.shi)).map((city) => {
return city.guojia
})
this.destCountryList = this.countryList.filter(item => cityCountryIdList.includes(item.guojia))
this.destWarehouseList = this.AddressTown.filter(item => this.destCityIds.includes(item.shi))
}else {
this.destCountryList = this.countryList;
this.destCityList = this.AddressCity;
this.destWarehouseList = this.AddressTown
}
}
}
this.getOpenedRouterList()
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment