Commit 1cdd2480 authored by zhengyi's avatar zhengyi

控货订单的收货人手机号不能是国内号码

parent 7d0031b2
...@@ -850,10 +850,17 @@ export default { ...@@ -850,10 +850,17 @@ export default {
}) })
return ids return ids
}, },
importCountryIds(){
let ids = []
this.destCountryList.forEach(item => {
ids.push(item.guojia)
})
return ids
},
importCityIds(){ importCityIds(){
let ids = [] let ids = []
this.importCityList.forEach(item => { this.destCityList.forEach(item => {
ids.push(item.id) ids.push(item.shi)
}) })
return ids return ids
}, },
...@@ -1529,6 +1536,9 @@ export default { ...@@ -1529,6 +1536,9 @@ export default {
if(this.form.departureId){ if(this.form.departureId){
params.startCityId = this.form.departureId params.startCityId = this.form.departureId
} }
if(this.form.destCountryId){
params.destCountryId = this.form.destCountryId
}
if(this.form.objectiveId){ if(this.form.objectiveId){
params.destCityId = this.form.objectiveId params.destCityId = this.form.objectiveId
} }
...@@ -1540,10 +1550,10 @@ export default { ...@@ -1540,10 +1550,10 @@ export default {
} }
console.log("获取路线,参数", params) console.log("获取路线,参数", params)
// 始发,目的和运输方式都没有的时候不获取 // 始发,目的和运输方式都没有的时候不获取
if(!params.startCityId && !params.destCityId && !params.transportType) return false if(!params.startCityId && !params.destCountryId && !params.destCityId && !params.transportType) return false
return getOpenedRouterList(params).then(res => { return getOpenedRouterList(params).then(res => {
this.routerList = res.data.filter(item => { this.routerList = res.data.filter(item => {
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1 return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCountryIds.indexOf(item.destCountryId) > -1 && (this.importCityIds && this.importCityIds.indexOf(item.destCityId) > -1)
}) })
console.log(`已获取到路线${res.data?.length}条,有效路线${this.routerList.length},参数:${JSON.stringify(params)}`) console.log(`已获取到路线${res.data?.length}条,有效路线${this.routerList.length},参数:${JSON.stringify(params)}`)
console.table([ console.table([
...@@ -1660,6 +1670,9 @@ export default { ...@@ -1660,6 +1670,9 @@ export default {
// 校验手机号跟目的国是否匹配 // 校验手机号跟目的国是否匹配
if(this.hasConsignee && this.form.consigneeCountryCode && this.form.consigneePhone){ if(this.hasConsignee && this.form.consigneeCountryCode && this.form.consigneePhone){
if (this.form.isCargoControl && (this.form.consigneeCountryCode == "86" || this.form.consigneeCountryCode == "+86")){
return this.$message.error($t("控货订单的收货人手机号不能是国内号码"))
}
const res = await checkCountryCode({ const res = await checkCountryCode({
areaCode: this.form.consigneeCountryCode, areaCode: this.form.consigneeCountryCode,
currencyId: this.form.destCountryId currencyId: this.form.destCountryId
......
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