Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
罗超
SuperMan
Commits
a0ccaa96
Commit
a0ccaa96
authored
Sep 05, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路旅客名单
parent
d2525c90
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
19 deletions
+87
-19
addPassenger.vue
src/components/SalesModule/addPassenger.vue
+87
-19
No files found.
src/components/SalesModule/addPassenger.vue
View file @
a0ccaa96
...
...
@@ -193,7 +193,7 @@
</li>
<li>
<el-form-item
label=
"出生日期"
prop=
"Birthday"
>
<el-date-picker
v-model=
'addMsg.Birthday'
class=
"w230"
value-format=
"yyyy-MM-dd"
type=
"date"
<el-date-picker
v-model=
'addMsg.Birthday'
class=
"w230"
@
change=
"zhanchuangTips(addMsg.Birthday)"
value-format=
"yyyy-MM-dd"
type=
"date"
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
</li>
...
...
@@ -604,6 +604,7 @@
export
default
{
data
()
{
return
{
ppAge
:
0
,
loading
:
false
,
appkey_ocr
:
"OGAhU38ib8EweXMtPVqCbkpN"
,
secretKey_ocr
:
"OcqfFF5hlleWovzA6vLweykxPgwE8XF2"
,
...
...
@@ -798,6 +799,63 @@
};
},
methods
:
{
jsGetAge
(
strBirthday
){
let
returnAge
;
let
strBirthdayArr
=
strBirthday
.
split
(
"-"
);
let
birthYear
=
strBirthdayArr
[
0
];
let
birthMonth
=
strBirthdayArr
[
1
];
let
birthDay
=
strBirthdayArr
[
2
];
let
d
=
new
Date
();
let
nowYear
=
d
.
getFullYear
();
let
nowMonth
=
d
.
getMonth
()
+
1
;
let
nowDay
=
d
.
getDate
();
if
(
nowYear
==
birthYear
&&
birthMonth
<=
nowMonth
&&
birthDay
<=
nowDay
){
returnAge
=
1
;
//同年 则为0岁
}
else
{
let
ageDiff
=
nowYear
-
birthYear
;
//年之差
if
(
ageDiff
>
0
){
if
(
nowMonth
==
birthMonth
)
{
let
dayDiff
=
nowDay
-
birthDay
;
//日之差
if
(
dayDiff
<
0
)
{
returnAge
=
ageDiff
-
1
;
}
else
{
returnAge
=
ageDiff
;
}
}
else
{
let
monthDiff
=
nowMonth
-
birthMonth
;
//月之差
if
(
monthDiff
<
0
)
{
returnAge
=
ageDiff
-
1
;
}
else
{
returnAge
=
ageDiff
;
}
}
}
else
{
returnAge
=
-
1
;
//返回-1 表示出生日期输入错误 晚于今天
}
}
return
returnAge
;
//返回周岁年龄
},
zhanchuangTips
:
function
(
b
){
let
age
=
this
.
jsGetAge
(
b
)
this
.
ppAge
=
age
if
(
age
==
-
1
)
{
this
.
$message
.
error
(
'出生日期'
+
b
+
'有误'
)
this
.
addMsg
.
Birthday
=
''
return
}
},
getJingDIan
:
function
(){
this
.
apipost
(
"sellorder_post_GetGuestScenicRefundList"
,
...
...
@@ -1585,6 +1643,12 @@
if
(
this
.
addMsg
.
Marriage
==
""
)
{
this
.
addMsg
.
Marriage
=
"0"
;
}
if
(
this
.
ppAge
<=
10
&&
this
.
addMsg
.
IsBed
==
1
)
{
this
.
$confirm
(
this
.
$t
(
'确认占床?'
),
this
.
$t
(
'tips.tips'
),
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
"sellorder_post_SetTravelGuestInfo_V2"
,
this
.
addMsg
,
...
...
@@ -1604,6 +1668,10 @@
},
err
=>
{}
);
}).
catch
(()
=>
{
this
.
btnState
=
true
});
}
},
getEconomicCapability
()
{
//获取经济能力
...
...
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