Commit de8758bb authored by liuzeheng's avatar liuzeheng

目的仓筛选

parent af17f86a
......@@ -739,8 +739,8 @@ export default {
this.objectiveId = "";
this.destWarehouseId = "";
this.findByprovinceCode();
//重新加载目的城市
getRegionList(4, 4).then(({data}) => {
if(this.destCountryId=="" && this.objectiveId=="" ){
getRegionList(4, 4).then(({data}) => {
this.AddressCity = data;
})
.catch(error => {
......@@ -753,6 +753,32 @@ export default {
.catch(error => {
console.log(error);
});
}else if(this.destCountryId!="" && this.objectiveId=="" && this.destWarehouseId==""){
getRegionList(5, 5).then(({data}) => {
this.AddressTown = data;
})
.catch(error => {
console.log(error);
});
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then(({data}) => {
// this.AddressCity = data;
// })
// .catch(error => {
// console.log(error);
// });
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
}
......@@ -762,17 +788,80 @@ export default {
objectiveId: {
deep:true, //深度监听
handler () {
this.AddressTown = [] ;
this.destWarehouseId="";
this.findBycityCode();
getRegionList(5, 5).then(({data}) => {
if(this.objectiveId!="" && this.destCountryId!="" && this.destWarehouseId==""){
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({data}) => {
this.AddressTown = data;
})
.catch(error => {
console.log(error);
});
}else if(this.destCountryId=="" && this.objectiveId=="" && this.destWarehouseId==""){
getRegionList(5, 5).then(({data}) => {
this.AddressTown = data;
}).catch(error => {
console.log(error);
});
}
// else if(this.objectiveId!="" && this.objectiveId=="" ){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// }).catch(error => {
// console.log(error);
// });
// }
}
}
},
destWarehouseId:{
deep:true, //深度监听
handler () {
if(this.objectiveId!="" && this.destCountryId!="" && this.destWarehouseId==""){
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({data}) => {
this.AddressTown = data;
})
.catch(error => {
console.log(error);
});
}else if( this.destCountryId!="" && this.objectiveId=="" && this.destWarehouseId=="" ){
getRegionList(5, 5).then(({data}) => {
this.AddressTown = data;
})
.catch(error => {
console.log(error);
});
}else if(this.objectiveId=="" && this.destWarehouseId==""){
getRegionList(5, 5).then(({data}) => {
this.AddressTown = data;
})
.catch(error => {
console.log(error);
});
}
}
},
},
computed: {
// 导出的权限字符串
......@@ -916,6 +1005,7 @@ export default {
findByprovinceCode () {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({data}) => {
this.AddressCity = data;
......@@ -926,6 +1016,7 @@ export default {
},
findBycityCode () {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({data}) => {
this.AddressTown = data;
......
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