Commit 7f835652 authored by zhengyi's avatar zhengyi

路线选择器bug修复

parent 1996a8ca
......@@ -143,9 +143,9 @@ export default {
countryList: [], //目的国
AddressCity: [], //目的地
AddressTown: [], //目的仓
destCountryIds: null,
destCityIds: null,
destWarehouseIds: null,
destCountryIds: [],
destCityIds: [],
destWarehouseIds: [],
}
},
......@@ -295,14 +295,13 @@ export default {
this.destWarehouseIds = "";
this.destCityIds = "";
this.findByprovinceCode();
if (this.destCountryIds == "") {
if (this.destCountryIds && this.destCountryIds.length > 0) {
//1 是所有区域,2 国家,3是市,
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.size() > 0
) {
this.getAddressTown()
}
......@@ -316,29 +315,28 @@ export default {
this.destWarehouseIds = "";
this.findBycityCode();
if (
this.destCityIds != "" &&
this.destCountryIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryIds == "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
this.getAddressTown()
} else if (
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0
) {
this.findByprovinceCode()
this.getAddressTown()
} else if (
this.destCountryIds == "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
//获取当前城市值id,获取该城市下区域
......@@ -351,22 +349,22 @@ export default {
deep: true, //深度监听
handler() {
if (
this.destCountryIds != "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode()
} else if (
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
this.getAddressTown()
} else if (
this.destCountryIds == "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
this.findBycityCode()
}
......@@ -416,9 +414,10 @@ export default {
},
changeOption(){
if(!this.option) return
this.destCountryIds = +this.option.destCountryId || null
this.destCityIds = +this.option.destCityId || null
this.destWarehouseIds = +this.option.destWarehouseId || null
console.log("线路信息", this.option)
this.destCountryId = + this.option.destCountryId || null
this.destCityId = +this.option.destCityId || null
this.destWarehouseId = +this.option.destWarehouseId || null
// this.importCity = +this.option.importCity || null
this.exportCity = +this.option.exportCity || null
this.transportType = this.option.transportId || null
......@@ -520,7 +519,7 @@ export default {
})
},
findByprovinceCode() {
if (this.destCountryIds != null && this.destCountryIds != '') {
if (this.destCountryIds != null && this.destCountryIds.length > 0) {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryIds).then(({ data }) => {
this.AddressCity = data;
......@@ -529,7 +528,7 @@ export default {
},
findBycityCode() {
if (this.destCityIds != null && this.destCityIds != '') {
if (this.destCityIds != null && this.destCityIds.length > 0) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIds).then(({ data }) => {
this.AddressTown = data;
......
......@@ -232,7 +232,7 @@ export default {
isAllProduct: false, // 是否全部商品
isAllFilteredProduct: false, // 是否勾選全部搜索結果
specialProducts: [],
rules() {},
rules: {},
product: null,
currencyList: [],
unitList: [],
......
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