Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
华国豪
Athena
Commits
f2fe7465
Commit
f2fe7465
authored
Dec 18, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加验证防止重复提交
parent
dd531c1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
34 deletions
+53
-34
HotelSure.vue
src/components/Hotel/HotelSure.vue
+53
-34
No files found.
src/components/Hotel/HotelSure.vue
View file @
f2fe7465
...
@@ -340,6 +340,19 @@
...
@@ -340,6 +340,19 @@
margin-top
:
20px
;
margin-top
:
20px
;
border
:
1px
solid
#E0E0E0
;
border
:
1px
solid
#E0E0E0
;
}
}
.HotelSure
.disClick
{
background-color
:
#d1d1d1
!important
;
color
:
#fff
!important
;
background-image
:
none
;
border
:
1px
solid
#d1d1d1
!important
;
}
.HotelSure
.disClick
:hover
{
background-color
:
#d1d1d1
!important
;
cursor
:
default
!important
;
box-shadow
:
none
!important
;
}
</
style
>
</
style
>
...
@@ -597,7 +610,7 @@
...
@@ -597,7 +610,7 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<input
type=
"button"
class=
"HD_payBtn"
:class=
"{'disBtn':isBaoChild}"
@
click=
"submitForm('sureMsg')"
value=
"下单"
/>
<input
type=
"button"
class=
"HD_payBtn"
:class=
"{'disBtn':isBaoChild
,'disClick':!isSubmit
}"
@
click=
"submitForm('sureMsg')"
value=
"下单"
/>
</div>
</div>
<div
class=
"HS_RightList"
>
<div
class=
"HS_RightList"
>
<div
class=
"HS_RightTopImg"
>
<div
class=
"HS_RightTopImg"
>
...
@@ -704,6 +717,8 @@ export default {
...
@@ -704,6 +717,8 @@ export default {
roomOptionCd
:
''
,
roomOptionCd
:
''
,
searchroomGroup
:[]
searchroomGroup
:[]
},
},
//防止重复提交
isSubmit
:
true
,
auditNum
:
0
,
auditNum
:
0
,
childNum
:
0
,
childNum
:
0
,
//入住 周几
//入住 周几
...
@@ -1317,40 +1332,44 @@ export default {
...
@@ -1317,40 +1332,44 @@ export default {
if
(
this
.
sureMsg
.
CustomerId
==
null
||
this
.
sureMsg
.
CustomerId
==
""
){
if
(
this
.
sureMsg
.
CustomerId
==
null
||
this
.
sureMsg
.
CustomerId
==
""
){
this
.
sureMsg
.
CustomerId
=
0
this
.
sureMsg
.
CustomerId
=
0
}
}
this
.
apipost
(
"dmc_post_Get_GetJAPAN_HotelBooking"
,
this
.
sureMsg
,
res
=>
{
if
(
this
.
isSubmit
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
isSubmit
=
false
;
this
.
Success
(
'预订成功'
);
this
.
apipost
(
"dmc_post_Get_GetJAPAN_HotelBooking"
,
this
.
sureMsg
,
res
=>
{
let
num
=
0
;
this
.
isSubmit
=
true
;
this
.
sureMsg
.
roomGroup
.
forEach
(
x
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
num
+=
parseInt
(
x
.
roomFemaleCount
)
+
parseInt
(
x
.
roomMaleCount
)
+
parseInt
(
x
.
roomChildCount
)
this
.
Success
(
'预订成功'
);
})
let
num
=
0
;
let
msg
=
{
this
.
sureMsg
.
roomGroup
.
forEach
(
x
=>
{
RB_Branch_id
:
res
.
data
.
data
.
RB_Branch_id
,
num
+=
parseInt
(
x
.
roomFemaleCount
)
+
parseInt
(
x
.
roomMaleCount
)
+
parseInt
(
x
.
roomChildCount
)
costType
:
res
.
data
.
data
.
costType
,
})
orderId
:
res
.
data
.
data
.
orderId
,
let
msg
=
{
bookingNumber
:
res
.
data
.
data
.
parmResult
.
bookingNumber
,
RB_Branch_id
:
res
.
data
.
data
.
RB_Branch_id
,
bookMoney
:
this
.
SettlementPrice
,
costType
:
res
.
data
.
data
.
costType
,
CancelTime
:
res
.
data
.
data
.
CancelTime
,
orderId
:
res
.
data
.
data
.
orderId
,
hotelName
:
res
.
data
.
data
.
parmResult
.
hotelName
,
bookingNumber
:
res
.
data
.
data
.
parmResult
.
bookingNumber
,
totalPnumber
:
num
bookMoney
:
this
.
SettlementPrice
,
}
CancelTime
:
res
.
data
.
data
.
CancelTime
,
sessionStorage
.
setItem
(
"HotelPayMsg"
,
JSON
.
stringify
(
msg
));
hotelName
:
res
.
data
.
data
.
parmResult
.
hotelName
,
this
.
$router
.
push
({
totalPnumber
:
num
path
:
"/HotelPayBefore"
,
}
})
sessionStorage
.
setItem
(
"HotelPayMsg"
,
JSON
.
stringify
(
msg
));
}
else
{
this
.
$router
.
push
({
var
that
=
this
path
:
"/HotelPayBefore"
,
if
(
res
.
data
.
message
==
'Room rate(s) for 1 day(s) changed'
){
})
that
.
Confirm
(
"当前酒店价格已发生变化,需要重新加载?"
,
function
()
{
}
else
{
that
.
getBookInfo
();
var
that
=
this
});
if
(
res
.
data
.
message
==
'Room rate(s) for 1 day(s) changed'
){
}
else
{
that
.
Confirm
(
"当前酒店价格已发生变化,需要重新加载?"
,
function
()
{
that
.
Error
(
res
.
data
.
message
);
that
.
getBookInfo
();
});
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
}
}
}
},
},
err
=>
{}
err
=>
{}
);
);
}
},
},
}
}
};
};
...
...
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