Commit de8758bb authored by liuzeheng's avatar liuzeheng

目的仓筛选

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