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
e0128e84
Commit
e0128e84
authored
Feb 23, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
f6cf3dfd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
224 deletions
+33
-224
HotelList.vue
src/components/Hotel/singleProduct/HotelList.vue
+17
-214
TableOperation.vue
...ponents/Hotel/singleProduct/components/TableOperation.vue
+16
-10
No files found.
src/components/Hotel/singleProduct/HotelList.vue
View file @
e0128e84
This diff is collapsed.
Click to expand it.
src/components/Hotel/singleProduct/components/TableOperation.vue
View file @
e0128e84
...
...
@@ -128,6 +128,7 @@
cars
:
[],
//购物车参数
HotelLength
:
0
,
//购物车酒店数
editor
:
{},
//预定订单对象
contrastCars
:
[],
//对比缓存cars
};
},
watch
:
{
...
...
@@ -146,6 +147,7 @@
},
hotelInfor
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
){
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
}
...
...
@@ -166,6 +168,7 @@
},
mounted
()
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
){
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
}
...
...
@@ -173,6 +176,7 @@
this
.
setList
()
}
},
methods
:
{
changePeople
(
val
){
...
...
@@ -191,6 +195,8 @@
})
},
join
(){
this
.
cars
=
[]
this
.
cars
=
JSON
.
parse
(
localStorage
.
getItem
(
'cars'
))
if
(
!
this
.
sumPeople
)
return
this
.
Error
(
'请加入人数'
);
const
temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
parameters
))
temp
.
Money
=
0
...
...
@@ -201,7 +207,6 @@
temp
.
Money
+=
(
x
.
PeopleNumber
*
(
x
.
Unit_Price
+
x
.
TaxesPrice
+
x
.
PriceInTangTax
))
});
let
existsIndex
=
this
.
cars
.
findIndex
((
x
)
=>
x
.
Date
==
temp
.
Date
)
let
exists
=
existsIndex
==-
1
?
null
:
this
.
cars
[
existsIndex
]
if
(
exists
){
let
existsHotel
=
exists
.
Hotels
.
findIndex
((
h
)
=>
h
.
HotelId
==
temp
.
HotelId
)
...
...
@@ -218,6 +223,7 @@
return
new
Date
(
x
.
Date
).
getTime
()
-
new
Date
(
y
.
Date
).
getTime
()
})
this
.
HotelLength
=
this
.
cars
.
length
localStorage
.
setItem
(
"cars"
,
JSON
.
stringify
(
this
.
cars
))
localStorage
.
setItem
(
"HotelLength"
,
this
.
HotelLength
)
this
.
Success
(
'加入购物车成功'
);
...
...
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