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

修复部分bug

parent 6afe225f
......@@ -3,7 +3,6 @@ ENV = 'development'
NODE_ENV = 'development'
# base api
#VUE_APP_BASE_API = 'https://apitest.groupage.cn'
VUE_APP_BASE_API = 'http://apitest.groupage.cn'
VUE_APP_BASE_API = 'https://apitest.groupage.cn'
VUE_APP_HOME_API = 'https://apitest.groupage.cn'
......@@ -13,3 +13,11 @@ export function locale() {
method: 'get'
})
}
export function checkCountryCode(params){
return request({
url: '/app-api/ecw/region/check/dest-currency/area-code/',
method: 'get',
params
})
}
......@@ -1580,6 +1580,7 @@ import DictTag from '@/components/DictTag'
import SupplierSelector from '@/components/SupplierSelector'
import Pagination from '@/components/Pagination'
import SectionTitle from '@/views/jiedao/profile/components/SectionTitle.vue'
import { checkCountryCode } from '@/api/country'
export default {
name: 'OrderEdit',
components: {
......@@ -2053,7 +2054,7 @@ export default {
if (this.$route.query.id) {
await getOrderDetail(this.$route.query.id).then(async (res) => {
this.form = Object.assign({}, res.data, { orderItemVOList: [] })
this.form = Object.assign({}, res.data, { orderItemVOList: [], destCountryId: null })
this.form.deliveryDate = res.data.deliveryDate
if(res.data.consigneeVO){
this.$set(this.form, 'consigneePhone', res.data.consigneeVO.phone)
......@@ -2067,7 +2068,7 @@ export default {
if(this.form.type){
this.form.type = this.form.type.split(",").filter(item => !!item)
}
}else this.form.type = []
await this.getOpenedRouterList()
this.handleChangeLineId()
......@@ -2586,14 +2587,14 @@ export default {
item.channelIds = Array.from(item.channelIdSet).join(',')
}
})
this.form.type = this.form.type?.join(",")
this.form.status = status
// 修改的提交
if (this.form.orderId) {
const data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.getProductListWithDefaultValue()
orderItemVOList: this.getProductListWithDefaultValue(),
type: this.form.type?.join(",")
})
updateOrder(data).then((response) => {
this.$message({
......@@ -2611,11 +2612,23 @@ export default {
})
return
}
const data = Object.assign(this.form, {
const data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.getProductListWithDefaultValue()
orderItemVOList: this.getProductListWithDefaultValue(),
type: this.form.type?.join(",")
})
// 校验目的国与收货人手机号地区是否匹配
if(this.hasConsignee && data.countryCode){
const res = await checkCountryCode({
areaCode: data.countryCode,
currencyId: this.form.destCountryId
})
// 并不一致则提示
if(!res.data){
await this.$confirm(this.$t('电话所在国与目的国不一致,请检查'))
}
}
// 添加的提交
createOrder(data).then((response) => {
if (status != 0) {
......
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