Commit 2a6e65b2 authored by dragondean@qq.com's avatar dragondean@qq.com

创建订单优化

parent a3489fd5
......@@ -939,6 +939,14 @@ export default {
'form.channelId'(){
this.calculationPrice()
if(this.form.lineId) this.getOfferData()
// 选择渠道后需要筛选目的城市和线路
// 有点卡,改异步
this.$nextTick(() => {
// 更新目的城市备选
this.getTradeCity()
// 更新线路备选
this.getOpenedRouterList()
})
},
'form.consigneeCountryCode'(){
if(this.form.lineId) this.getOfferData()
......@@ -1086,7 +1094,7 @@ export default {
this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data
this.tradeCityList = (await getTradeCityList()).data
await this.getTradeCity()
this.currencyList = (await getCurrencyList()).data
this.unitList = (await getUnitList()).data
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
......@@ -1110,6 +1118,13 @@ export default {
},
methods: {
async getTradeCity(){
let query = {}
if(this.form.channelId){
query.channelId = this.form.channelId
}
this.tradeCityList = (await getTradeCityList(query)).data
},
onTableMounted(e){
// console.warn('onTableMounted', e)
},
......@@ -1333,6 +1348,9 @@ export default {
if(this.form.transportId){
params.transportType = this.form.transportId
}
if(this.form.channelId){
params.channelId = this.form.channelId
}
// 始发,目的和运输方式都没有的时候不获取
if(!params.startCityId && !params.destCityId && !params.transportType) return false
getOpenedRouterList(params).then(res => this.routerList = res.data.filter(item => {
......
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