Commit f5979366 authored by dragondean@qq.com's avatar dragondean@qq.com

报价单的渠道,目的城市,线路联动

parent b17c0dc9
...@@ -795,7 +795,9 @@ export default { ...@@ -795,7 +795,9 @@ export default {
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
// 目的地 // 目的地
'form.objectiveId'(){ async 'form.objectiveId'(){
await this.$nextTick()
await this.getChannelList()
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
'form.transportId'(transportId, oldTransportId){ 'form.transportId'(transportId, oldTransportId){
...@@ -818,20 +820,22 @@ export default { ...@@ -818,20 +820,22 @@ export default {
this.$set(this.form, 'lineId', undefined) this.$set(this.form, 'lineId', undefined)
} }
}, },
'form.channelId'(){ async 'form.channelId'(){
await this.getTradeCity()
this.getOpenedRouterList() this.getOpenedRouterList()
this.calculationPrice('form.channelId') this.calculationPrice('form.channelId')
}, },
'form.lineId'(lineId){ async 'form.lineId'(lineId){
let router = this.routerList.find(item => item.id == lineId) let router = this.routerList.find(item => item.id == lineId)
if(router){ if(router){
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
} }
this.$nextTick(() => { await this.$nextTick()
this.calculationPrice('form.lineId') await this.getChannelList()
}) await this.getTradeCity()
await this.calculationPrice('form.lineId')
}, },
'form.transportVO.packageTypeArr'(val){ 'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', (val || []).join(',')) this.$set(this.form.transportVO, 'packageType', (val || []).join(','))
...@@ -851,10 +855,10 @@ export default { ...@@ -851,10 +855,10 @@ export default {
this.getOffer() this.getOffer()
} }
}, },
created() { async created() {
await this.getChannelList()
await this.getTradeCity()
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE) this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
...@@ -864,6 +868,20 @@ export default { ...@@ -864,6 +868,20 @@ export default {
}else this.addProduct() }else this.addProduct()
}, },
methods: { methods: {
async getChannelList(){
let query = {
cityId: this.form.objectiveId,
lineId: this.form.lineId
}
this.channelList = (await getChannelList(query)).data || []
},
async getTradeCity(){
let query = {}
if(this.form.channelId){
query.channelId = this.form.channelId
}
this.tradeCityList = (await getTradeCityList(query)).data || []
},
getOffer(){ getOffer(){
getOffer(this.$route.query.id).then(res => { getOffer(this.$route.query.id).then(res => {
let formData = res.data let formData = res.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