Commit e129a085 authored by honghy's avatar honghy Committed by wux

bug170 订单编辑或者复制订单,目的国、线路、目的城市联动问题

parent 44223c43
...@@ -894,7 +894,8 @@ export default { ...@@ -894,7 +894,8 @@ export default {
destCityList: [], destCityList: [],
selectedRouter: null, selectedRouter: null,
// 发货人默认付款 // 发货人默认付款
defaultPay: false defaultPay: false,
showDestCityList: []
}; };
}, },
computed: { computed: {
...@@ -1069,10 +1070,6 @@ export default { ...@@ -1069,10 +1070,6 @@ export default {
showDestCountryList() { showDestCountryList() {
return this.destCountryList return this.destCountryList
}, },
showDestCityList() {
if (!this.form.destCountryId) return this.destCityList
return this.destCityList.filter(item => item.guojia === this.form.destCountryId) || []
},
// 是否已起运(已起运不让修改报关方式) // 是否已起运(已起运不让修改报关方式)
isShipment() { isShipment() {
return [326, 328, 329, 330, 332, 391, 392, 426, 428, 432].indexOf(this.form.shipmentState) > -1 return [326, 328, 329, 330, 332, 391, 392, 426, 428, 432].indexOf(this.form.shipmentState) > -1
...@@ -1314,6 +1311,7 @@ export default { ...@@ -1314,6 +1311,7 @@ export default {
await getGuojiaAndShiAndWarehouseList({tradeType: 1}).then(({data}) => { await getGuojiaAndShiAndWarehouseList({tradeType: 1}).then(({data}) => {
this.destCountryList = data.guojiaList this.destCountryList = data.guojiaList
this.destCityList = data.shiList this.destCityList = data.shiList
this.showDestCityList = data.shiList
}) })
this.productAttrList = (await getProductAttrList()).data this.productAttrList = (await getProductAttrList()).data
await this.getChannelList() await this.getChannelList()
...@@ -2099,7 +2097,13 @@ export default { ...@@ -2099,7 +2097,13 @@ export default {
// 切换目的国 // 切换目的国
handleChangeDestCountry(val) { handleChangeDestCountry(val) {
console.log("handleChangeDestCountry", val) console.log("handleChangeDestCountry", val)
// 目的城市赋值
this.form.destCountryId = val this.form.destCountryId = val
if (!val) {
this.showDestCityList = JSON.parse(JSON.stringify(this.destCityList))
} else {
this.showDestCityList = JSON.parse(JSON.stringify(this.destCityList.filter(item => item.guojia === val)))
}
if (this.form.destCountryId) { if (this.form.destCountryId) {
this.form.objectiveId = null this.form.objectiveId = null
this.form.lineId = null this.form.lineId = null
......
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