Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-web-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-web-master
Commits
b92b4543
Commit
b92b4543
authored
Oct 24, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑订单也校验目的国和收货人手机区号 + 优化收货地区回显
parent
39f24dc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
17 deletions
+21
-17
index.vue
src/components/AreaSelector/index.vue
+7
-6
delivery.vue
src/views/jiedao/profile/delivery.vue
+14
-11
No files found.
src/components/AreaSelector/index.vue
View file @
b92b4543
...
@@ -70,14 +70,15 @@ export default {
...
@@ -70,14 +70,15 @@ export default {
}
}
},
},
created
()
{
created
()
{
getListTree
({
treeType
:
1
}).
then
(
response
=>
{
getListTree
({
treeType
:
1
}).
then
(
async
response
=>
{
this
.
treeList
=
response
.
data
this
.
treeList
=
response
.
data
this
.
formData
.
country
=
this
.
country
await
this
.
$nextTick
()
this
.
formData
.
province
=
this
.
province
await
this
.
$nextTick
()
this
.
formData
.
city
=
this
.
city
})
})
this
.
formData
=
{
country
:
this
.
country
,
province
:
this
.
province
,
city
:
this
.
city
}
}
}
}
}
</
script
>
</
script
>
src/views/jiedao/profile/delivery.vue
View file @
b92b4543
...
@@ -2588,6 +2588,19 @@ export default {
...
@@ -2588,6 +2588,19 @@ export default {
}
}
})
})
this
.
form
.
status
=
status
this
.
form
.
status
=
status
// 校验目的国与收货人手机号地区是否匹配
if
(
this
.
hasConsignee
&&
this
.
form
.
countryCode
)
{
const
res
=
await
checkCountryCode
({
areaCode
:
this
.
form
.
countryCode
,
currencyId
:
this
.
form
.
destCountryId
})
// 并不一致则提示
if
(
!
res
.
data
)
{
await
this
.
$confirm
(
this
.
$t
(
'
电话所在国与目的国不一致,请检查
'
))
}
}
// 修改的提交
// 修改的提交
if
(
this
.
form
.
orderId
)
{
if
(
this
.
form
.
orderId
)
{
const
data
=
Object
.
assign
({},
this
.
form
,
{
const
data
=
Object
.
assign
({},
this
.
form
,
{
...
@@ -2620,17 +2633,7 @@ export default {
...
@@ -2620,17 +2633,7 @@ export default {
type
:
this
.
form
.
type
?.
join
(
"
,
"
),
type
:
this
.
form
.
type
?.
join
(
"
,
"
),
hasConsignee
:
this
.
hasConsignee
hasConsignee
:
this
.
hasConsignee
})
})
// 校验目的国与收货人手机号地区是否匹配
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
)
=>
{
createOrder
(
data
).
then
((
response
)
=>
{
if
(
status
!=
0
)
{
if
(
status
!=
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment