Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-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-app-operator-master
Commits
f7b0b3d9
Commit
f7b0b3d9
authored
Oct 19, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单下单校验收货人手机区号是否与目的国一致
parent
09914fec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
region.js
src/api/ecw/region.js
+9
-0
edit.vue
src/views/ecw/order/edit.vue
+12
-1
No files found.
src/api/ecw/region.js
View file @
f7b0b3d9
...
...
@@ -115,3 +115,12 @@ export function listByIds(params){
params
})
}
// 检查国家区域是否与手机号国家区号一致
export
function
checkCountryCode
(
params
){
return
request
({
url
:
'
ecw/region/check/dest-currency/area-code/
'
,
method
:
'
get
'
,
params
})
}
src/views/ecw/order/edit.vue
View file @
f7b0b3d9
...
...
@@ -675,7 +675,7 @@ import {getChannelList} from '@/api/ecw/channel'
import
Selector
from
'
@/components/Selector
'
import
CustomerContactSelector
from
'
@/components/CustomerContactSelector
'
import
{
getGuojiaAndShiAndWarehouseList
,
openedRouterList
as
getOpenedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
checkCountryCode
,
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getDictData
,
getDictDatas
}
from
'
@/utils/dict
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
...
...
@@ -1668,6 +1668,17 @@ export default {
hasConsignee
:
this
.
hasConsignee
})
data
.
type
=
data
.
type
.
join
(
'
,
'
)
// 校验手机号跟目的国是否匹配
if
(
this
.
hasConsignee
&&
data
.
consigneeCountryCode
&&
data
.
consigneePhone
){
const
res
=
await
checkCountryCode
({
areaCode
:
data
.
consigneeCountryCode
,
currencyId
:
this
.
form
.
destCountryId
})
// 并不一致则提示
if
(
!
res
.
data
){
await
this
.
$confirm
(
this
.
$t
(
'
电话所在国与目的国不一致,请检查
'
))
}
}
// 添加的提交
createOrder
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
...
...
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