Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
d0641d21
Commit
d0641d21
authored
Mar 15, 2023
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/million
parents
7710de21
61c49608
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
789 additions
and
303 deletions
+789
-303
RoomCard.vue
src/components/hotal/RoomCard.vue
+133
-45
orderPreview.vue
src/components/hotal/orderPreview.vue
+177
-6
detailsHotal.vue
src/pages/detailsHotal.vue
+291
-70
orderForm.vue
src/pages/hotel/orderForm.vue
+188
-182
No files found.
src/components/hotal/RoomCard.vue
View file @
d0641d21
This diff is collapsed.
Click to expand it.
src/components/hotal/orderPreview.vue
View file @
d0641d21
...
...
@@ -20,7 +20,78 @@
</div>
</div>
</
template
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇數量
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
住宿日期
</div>
<div
v-for=
"(x,index) in roomGroup"
:key=
"index"
>
<div
v-for=
"(y,i) in x.rateGroup"
:key=
"i"
>
<div
class=
"row items-end"
>
<div
class=
"col"
:class=
"{'column':$q.platform.is.mobile}"
>
<div>
<span
class=
"text-subtitle2 text-weight-bold"
>
{{ selectedObj?getMealType(selectedObj.meals):''}}
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
>
{{y.stayDate}}
</span></span>
</div>
<div
v-if=
"$q.platform.is.mobile"
>
<span
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<
template
v-if=
"y.perAdultRateBySetCurrency"
>
CNY
{{
y
.
perAdultRateBySetCurrency
}}
/人
</
template
>
<
template
v-else=
"y.totalPerRoomRateBySetCurrency"
>
CNY
{{
y
.
totalPerRoomRateBySetCurrency
}}
/晚
</
template
>
<!-- CNY {{ selectedObj?getPrice2(selectedObj.chargeableRateInfoPerPersonForANightBySetCurrency):0 }} /人均 -->
</span>
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<
template
v-if=
"y.perAdultRateBySetCurrency"
>
CNY
{{
y
.
perAdultRateBySetCurrency
}}
/人
</
template
>
<
template
v-else=
"y.totalPerRoomRateBySetCurrency"
>
CNY
{{
y
.
totalPerRoomRateBySetCurrency
}}
/晚
</
template
>
<!-- CNY {{selectedObj? getPrice2(selectedObj.chargeableRateInfoPerPersonForANightBySetCurrency):0 }} /人均 -->
</span>
<!-- <q-input
style="width: 150px"
@input="changePeople"
v-model="chosenObj.Count"
class="col"
:class="{
'q-ml-sm q-px-none q-pl-none': $q.platform.is.desktop,
}"
mask="#"
reverse-fill-mask
dense
standout
readonly
>
<template v-slot:prepend>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="remove"
@click="addPeople('Count', -1)"
/>
</template>
<template v-slot:append>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="add"
@click="addPeople('Count', 1)"
/>
</template>
</q-input> -->
</div>
</div>
</div>
</div>
<!-- <div class="text-grey-6 f12 q-my-md">選擇數量</div>
<div class="row items-end">
<div class="col" :class="{'column':$q.platform.is.mobile}">
<div>
...
...
@@ -73,7 +144,7 @@
</template>
</q-input>
</div>
</div>
</div>
-->
</div>
<div
class=
"q-mt-md q-pt-md"
style=
"border-top: 1px dashed #eee"
>
<div
class=
"row items-center"
>
...
...
@@ -135,6 +206,7 @@ export default {
chosenObj
:
null
,
sumPrice
:
0
,
selectedObj
:
null
,
roomGroup
:
null
};
},
created
()
{
...
...
@@ -143,7 +215,7 @@ export default {
methods
:
{
goOrderHandler
(){
let
order
=
{
msg
:
JSON
.
stringify
(
this
.
msg
)
,
msg
:
this
.
msg
,
// hotelId: this.msg.hotelId,
// arrivalDate: this.msg.arrivalDate,
// departureDate: this.msg.departureDate,
...
...
@@ -152,7 +224,7 @@ export default {
id
:
this
.
p
.
id
,
selectedObjId
:
this
.
selectedObj
.
id
,
roomOptionCd
:
this
.
selectedObj
.
roomOptionCd
,
chosenObj
:
this
.
chosenObj
,
Count
:
this
.
chosenObj
.
Count
,
sumPrice
:
this
.
sumPrice
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
...
...
@@ -167,11 +239,110 @@ export default {
},
handleSelect
(
item
){
this
.
selectedObj
=
item
console
.
log
(
this
.
selectedObj
,
'-----'
)
this
.
sumPrice
=
0
setTimeout
(()
=>
{
this
.
calcMoney
()
this
.
getData
()
// this.calcMoney()
},
100
)
},
getData
()
{
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
))
msg
.
roomOptionCd
=
this
.
selectedObj
.
roomOptionCd
this
.
$q
.
loading
.
show
();
this
.
apipost
(
"dmc_post_Get_GetJAPAN_RoomsList"
,
msg
,
(
r
)
=>
{
this
.
$q
.
loading
.
hide
();
if
(
r
.
data
.
resultCode
==
1
)
{
let
rateGrouoLen
=
0
;
if
(
Object
.
prototype
.
toString
.
call
(
r
.
data
.
data
.
roomGroup
)
==
'[object Object]'
){
let
arr
=
[];
arr
.
push
(
r
.
data
.
data
.
roomGroup
);
this
.
roomGroup
=
arr
;
}
this
.
roomGroup
.
forEach
(
x
=>
{
if
(
Object
.
prototype
.
toString
.
call
(
x
.
rateGroup
)
==
'[object Object]'
){
let
arr
=
[];
arr
.
push
(
x
.
rateGroup
);
x
.
rateGroup
=
arr
;
}
let
tt
=
0
;
let
tt2
=
0
;
let
AdultTotalPrice
=
0
;
let
childToTalPrice
=
0
;
let
AdultCount
=
0
;
let
childCount
=
0
;
let
AdultJapanPrice
=
0
;
let
ChildJapanPrice
=
0
;
let
AdultJapanCount
=
0
;
let
childJapanCount
=
0
;
//原始成人
let
oldAount
=
0
;
let
childAount
=
0
;
let
oldAuditPrice
=
0
;
let
oldChildPrice
=
0
;
// this.TotalChildCount+=x.roomChildCount*x.rateGroup.length;
rateGrouoLen
+=
x
.
rateGroup
.
length
;
// this.chekedChildCount = this.numberOfChildren*rateGrouoLen;
//无价格 只有房间价格
this
.
sumPrice
=
0
let
onlyRoomPrice
=
0
;
let
onlyJanpnase
=
0
;
x
.
rateGroup
.
forEach
(
z
=>
{
if
(
z
.
perAdultRateBySetCurrency
){
z
.
oldAuditPrice
=
z
.
perAdultRateBySetCurrency
;
z
.
oldchildPrice
=
z
.
perChildRateBySetCurrency
;
z
.
perAdultRateBySetCurrency
=
Math
.
ceil
(
z
.
perAdultRateBySetCurrency
/
r
.
data
.
data
.
JapanIncrease
);
z
.
perChildRateBySetCurrency
=
Math
.
ceil
(
z
.
perChildRateBySetCurrency
/
r
.
data
.
data
.
JapanIncrease
);
if
(
x
.
roomAdultCount
>
0
){
AdultTotalPrice
+=
parseFloat
(
z
.
perAdultRateBySetCurrency
);
oldAuditPrice
+=
parseFloat
(
z
.
oldAuditPrice
);
AdultJapanPrice
+=
parseFloat
(
z
.
perAdultRate
);
}
if
(
x
.
roomChildCount
>
0
){
childToTalPrice
+=
parseFloat
(
z
.
perChildRateBySetCurrency
);
oldChildPrice
+=
parseFloat
(
z
.
oldchildPrice
);
ChildJapanPrice
+=
parseFloat
(
z
.
perChildRate
);
}
}
if
(
z
.
totalPerRoomRateBySetCurrency
){
z
.
totalPerRoomRateBySetCurrency
=
Math
.
ceil
(
z
.
totalPerRoomRateBySetCurrency
/
r
.
data
.
data
.
JapanIncrease
);
onlyRoomPrice
+=
parseFloat
(
z
.
totalPerRoomRateBySetCurrency
);
onlyJanpnase
+=
parseFloat
(
z
.
totalPerRoomRate
);
}
})
AdultCount
+=
AdultTotalPrice
*
x
.
roomAdultCount
;
childCount
+=
childToTalPrice
*
x
.
roomChildCount
;
// AdultCount+=AdultTotalPrice;
// childCount+=childToTalPrice;
oldAount
+=
oldAuditPrice
;
childAount
+=
childAount
;
// this.parameters.totalChargeableRateInfo += parseFloat(AdultCount+childCount+onlyRoomPrice);
// this.parameters.OldTotalPrice+=parseFloat(oldAount+childAount+onlyRoomPrice);
AdultJapanCount
+=
AdultJapanPrice
*
x
.
roomAdultCount
;
childJapanCount
+=
ChildJapanPrice
*
x
.
roomChildCount
;
// this.SettlementPrice=this.parameters.totalChargeableRateInfo;
// this.SettlementPrice=this.parameters.totalChargeableRateInfo;
// let price=this.parameters.totalChargeableRateInfo;
this
.
sumPrice
+=
parseFloat
(
AdultJapanCount
+
childJapanCount
+
onlyJanpnase
);
console
.
log
(
this
.
sumPrice
,
'----'
)
})
}
})
},
initModel
()
{
this
.
sumPrice
=
0
this
.
chosenObj
=
{
...
...
src/pages/detailsHotal.vue
View file @
d0641d21
This diff is collapsed.
Click to expand it.
src/pages/hotel/orderForm.vue
View file @
d0641d21
This diff is collapsed.
Click to expand it.
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