Commit 7f835652 authored by zhengyi's avatar zhengyi

路线选择器bug修复

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