Commit 4daaff38 authored by yujinyao's avatar yujinyao

客户详情 订单tag搜索目的国+目的地+目的仓下拉多选

parent cba937ec
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select
v-model="destCountryId" v-model="destCountryId"
:label="destCountryId" multiple
:placeholder="$t('请选择目的国')" :placeholder="$t('请选择目的国')"
clearable clearable
@change="handleQuery" @change="handleQuery"
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
<el-form-item :label="$t('目的城市')" prop="objectiveId"> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select <el-select
v-model="objectiveId" v-model="objectiveId"
multiple
:placeholder="$t('请根据目的国选择目的城市')" :placeholder="$t('请根据目的国选择目的城市')"
style="width: 200px" style="width: 200px"
clearable clearable
...@@ -123,6 +124,7 @@ ...@@ -123,6 +124,7 @@
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select <el-select
v-model="destWarehouseId" v-model="destWarehouseId"
multiple
:placeholder="$t('请根据目的城市选择目的仓')" :placeholder="$t('请根据目的城市选择目的仓')"
style="width: 200px" style="width: 200px"
clearable clearable
...@@ -234,7 +236,7 @@ ...@@ -234,7 +236,7 @@
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select
v-model="destCountryId" v-model="destCountryId"
:label="destCountryId" multiple
:placeholder="$t('请选择目的国')" :placeholder="$t('请选择目的国')"
clearable clearable
@change="handleQuery" @change="handleQuery"
...@@ -250,6 +252,7 @@ ...@@ -250,6 +252,7 @@
<el-form-item :label="$t('目的城市')" prop="objectiveId"> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select <el-select
v-model="objectiveId" v-model="objectiveId"
multiple
:placeholder="$t('请根据目的国选择目的城市')" :placeholder="$t('请根据目的国选择目的城市')"
style="width: 200px" style="width: 200px"
clearable clearable
...@@ -266,6 +269,7 @@ ...@@ -266,6 +269,7 @@
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select <el-select
v-model="destWarehouseId" v-model="destWarehouseId"
multiple
:placeholder="$t('请根据目的城市选择目的仓')" :placeholder="$t('请根据目的城市选择目的仓')"
style="width: 200px" style="width: 200px"
clearable clearable
...@@ -830,16 +834,16 @@ export default { ...@@ -830,16 +834,16 @@ export default {
activeName(val){ activeName(val){
switch (val) { switch (val) {
case 'order': case 'order':
this.destCountryId = null this.destCountryId = ''
this.destWarehouseId = null this.destWarehouseId = ''
this.objectiveId = null this.objectiveId = ''
this.queryParams.page = 1 this.queryParams.page = 1
this.getorderList()//订单 this.getorderList()//订单
break break
case 'quote': case 'quote':
this.destCountryId = null this.destCountryId = ''
this.destWarehouseId = null this.destWarehouseId = ''
this.objectiveId = null this.objectiveId = ''
this.infoListOfferFrom.pageNo = 1 this.infoListOfferFrom.pageNo = 1
this.getInfoListOfferPage()//报价 this.getInfoListOfferPage()//报价
break break
...@@ -872,59 +876,18 @@ export default { ...@@ -872,59 +876,18 @@ export default {
this.AddressTown = []; this.AddressTown = [];
this.objectiveId = ""; this.objectiveId = "";
this.destWarehouseId = ""; this.destWarehouseId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5) if (this.destCountryId == "") {
.then(({ data }) => { this.getAddressCity()
this.AddressTown = data; this.getAddressTown()
})
.catch((error) => {
console.log(error);
});
} else if ( } else if (
this.destCountryId != "" && this.destCountryId != "" &&
this.objectiveId == "" && this.objectiveId == "" &&
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
/*getRegionList(2, this.destCountryId) this.findByprovinceCode()
.then(({ data }) => { this.getAddressTown()
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});*/
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);
// });
}, },
}, },
objectiveId: { objectiveId: {
...@@ -932,62 +895,28 @@ export default { ...@@ -932,62 +895,28 @@ export default {
handler() { handler() {
this.AddressTown = []; this.AddressTown = [];
this.destWarehouseId = ""; this.destWarehouseId = "";
this.findBycityCode();
if ( if (
this.objectiveId != "" && this.objectiveId != "" &&
this.destCountryId != "" && this.destCountryId != "" &&
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
/*getRegionList(3, this.objectiveId) this.findBycityCode()
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});*/
} else if ( } else if (
this.destCountryId == "" && this.destCountryId == "" &&
this.objectiveId == "" && this.objectiveId == "" &&
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
getRegionList(5, 5) this.getAddressCity()
.then(({ data }) => { this.getAddressTown()
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if ( } else if (
this.destCountryId != "" && this.destCountryId != "" &&
this.objectiveId == "" && this.objectiveId == "" &&
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
/*getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});*/
this.findByprovinceCode() this.findByprovinceCode()
getRegionList(5, 5) this.getAddressTown()
.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: { destWarehouseId: {
...@@ -999,34 +928,14 @@ export default { ...@@ -999,34 +928,14 @@ export default {
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId) this.findBycityCode()
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if ( } else if (
this.destCountryId != "" && this.destCountryId != "" &&
this.objectiveId == "" && this.objectiveId == "" &&
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
getRegionList(5, 5) this.getAddressTown()
.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);
// });
// }
}, },
}, },
}, },
...@@ -1138,9 +1047,9 @@ export default { ...@@ -1138,9 +1047,9 @@ export default {
AddressCity: [], AddressCity: [],
AddressProvince: [], AddressProvince: [],
AddressTown: [], AddressTown: [],
destCountryId: "", destCountryId: null,
objectiveId: "", objectiveId: null,
destWarehouseId: "", destWarehouseId: null,
} }
}, },
computed: { computed: {
...@@ -1327,8 +1236,7 @@ export default { ...@@ -1327,8 +1236,7 @@ export default {
findByprovinceCode() { findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode //获取当前省份值id,获取该省份下城市 destCountryId provinceCode
if (this.destCountryId != null && this.destCountryId != "") { if (this.destCountryId != null && this.destCountryId != "") {
getRegionList(2, this.destCountryId) getRegionList(2, this.destCountryId).then(({ data }) => {
.then(({ data }) => {
this.AddressCity = data; this.AddressCity = data;
}) })
} }
...@@ -1336,48 +1244,30 @@ export default { ...@@ -1336,48 +1244,30 @@ export default {
findBycityCode() { findBycityCode() {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
if (this.objectiveId != null && this.objectiveId != "") { if (this.objectiveId != null && this.objectiveId != "") {
getRegionList(3, this.objectiveId) getRegionList(3, this.objectiveId).then(({ data }) => {
.then(({ data }) => {
this.AddressTown = data; this.AddressTown = data;
// 去重
// let uniqueDataList = data.filter((item, index, self) => {
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
// });
// this.AddressProvince = uniqueDataList
}) })
} }
}, },
getData() { getData() {
getRegionList(1, 1) this.getAddressProvince()
.then(({ data }) => { this.getAddressCity()
this.getAddressTown()
},
getAddressProvince() {
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data; this.AddressProvince = data;
console.log(this.AddressProvince);
}) })
.catch((error) => { },
console.log(error); getAddressCity() {
}); getRegionList(4, 4).then(({ data }) => {
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data; this.AddressCity = data;
}) })
.catch((error) => { },
console.log(error); getAddressTown() {
}); getRegionList(5, 5).then(({ data }) => {
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data; this.AddressTown = data;
}) })
.catch((error) => {
console.log(error);
});
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
......
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