diff --git a/components/buns-order-templates/bo-detail-tmp.vue b/components/buns-order-templates/bo-detail-tmp.vue
index fe1d958..22b3037 100644
--- a/components/buns-order-templates/bo-detail-tmp.vue
+++ b/components/buns-order-templates/bo-detail-tmp.vue
@@ -81,7 +81,7 @@
-
+
目的国家:
{{ modelInfo.reciever.countryName }}
diff --git a/components/buns-post-edit-templates/bpe-addressinfo-tmp.vue b/components/buns-post-edit-templates/bpe-addressinfo-tmp.vue
index cbbf70b..5de0991 100644
--- a/components/buns-post-edit-templates/bpe-addressinfo-tmp.vue
+++ b/components/buns-post-edit-templates/bpe-addressinfo-tmp.vue
@@ -119,12 +119,19 @@
},
chooseAddressEventBack({ data, queryOption }){
const { tab } = queryOption
+ let isChange = false
+ let oldData = {}
if(tab == 1) {
+ oldData = JSON.parse(JSON.stringify(this.modelInfo.sender))
this.modelInfo.sender = data
}
if(tab == 2) {
+ oldData = JSON.parse(JSON.stringify(this.modelInfo.sender))
this.modelInfo.reciever = data
}
+ if(oldData.id != data.id) {
+ this.$emit("onChange", this.modelInfo)
+ }
},
}
}
diff --git a/pages/post/openorder.vue b/pages/post/openorder.vue
index 28f6298..5320ec1 100644
--- a/pages/post/openorder.vue
+++ b/pages/post/openorder.vue
@@ -32,7 +32,7 @@
-
+
路线信息
@@ -82,13 +82,13 @@
-
+
-
+
@@ -288,29 +288,7 @@
}
},
data() {
- return {
- pageLoading: true,
- isEdit: false,
- queryOption: {
- billCode: '', // 运单id
- orderSn: '', // 订单id
- },
- kehuRes: { list: [], checkedList: [] },
- wayRes: { list: [], checkedList: [] },
- productRes: { list: [], checkedList: [] },
- caozuoRes: { list: [], checkedList: [] },
- shoupaiRes: { list: [], checkedList: [] },
- yuejieRes: { list: [], checkedList: [] },
- destPostRes: { list: [], checkedList: [] },
- wareRes: { list: [], checkedList: [] },
- goodChooseModal: {
- show: false,
- },
- submitParam: {
- ...getOrderModels(),
- sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
- }
- }
+ return this.getDefaultData()
},
onShareAppMessage() {
return {
@@ -327,6 +305,31 @@
},
methods: {
+ getDefaultData() { // data的默认数据
+ return {
+ pageLoading: true,
+ isEdit: false,
+ queryOption: {
+ billCode: '', // 运单id
+ orderSn: '', // 订单id
+ },
+ kehuRes: { list: [], checkedList: [] },
+ wayRes: { list: [], checkedList: [] },
+ productRes: { list: [], checkedList: [] },
+ caozuoRes: { list: [], checkedList: [] },
+ shoupaiRes: { list: [], checkedList: [] },
+ yuejieRes: { list: [], checkedList: [] },
+ destPostRes: { list: [], checkedList: [] },
+ wareRes: { list: [], checkedList: [] },
+ goodChooseModal: {
+ show: false,
+ },
+ submitParam: {
+ ...getOrderModels(),
+ sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
+ }
+ }
+ },
getCustomerUserList: apiService.getCustomerUserList,
getTransLineList: apiService.getTransLineList,
getTransProductList: apiService.getTransProductList,
@@ -335,7 +338,7 @@
getMonthpayAccountList: apiService.getMonthpayAccountList,
getDestPositionList: apiService.getDestPositionList,
getWarehouseInList: apiService.warehouseInList,
- async initData() {
+ async initData() { // 初始化
this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
if(this.isEdit) {
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
@@ -360,6 +363,14 @@
const res = await apiService.createOrderNo()
this.submitParam.billCode = res.data
},
+ handleAddressChange() { // 地址切换
+ let { wayRes, submitParam } = this.getDefaultData()
+ if(this.submitParam.reciever.country && this.submitParam.sender.country) {
+ this.submitParam.transLine = submitParam.transLine
+ this.wayRes.checkedList = wayRes.checkedList
+ this.handleWayChange() // 调用线路切换,清空后续数据
+ }
+ },
handleYueJieSelect(val) {
const item = this.yuejieRes.list.filter(t=> t.val == val)[0]
this.submitParam.payee = item.payee
@@ -367,7 +378,11 @@
this.submitParam.salesmenName = item.salesmenName
this.submitParam.payee = item.payeeName
},
- handleWayChange(val) {
+ handleWayChange(val) { // 线路切换
+ let { productRes, submitParam } = this.getDefaultData()
+ // 清空产品类型数据
+ this.submitParam.productType = submitParam.productType
+ this.productRes.checkedList = productRes.checkedList
const item = this.wayRes.list.filter(t=> t.val == val)[0]
this.updateDltDestSite({ lineCode: val })
},