Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
b55a47dd
Commit
b55a47dd
authored
Nov 14, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
a496a79e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
29 deletions
+48
-29
ListCar.vue
src/components/hotel/list/ListCar.vue
+28
-18
ListHeader.vue
src/components/hotel/list/ListHeader.vue
+12
-4
Table-Operation.vue
src/components/hotel/list/Table-Operation.vue
+8
-7
No files found.
src/components/hotel/list/ListCar.vue
View file @
b55a47dd
...
...
@@ -202,7 +202,7 @@
})
data
.
scrollStyle
=
useScrollModule
().
scrollStyle
// 今天购买数量
watch
(
HotelCarList
.
_
value
,
(
n
,
o
)
=>
{
watch
(
HotelCarList
.
value
,
(
n
,
o
)
=>
{
methods
.
calculateNum
()
methods
.
getMoney
()
})
...
...
@@ -214,7 +214,7 @@
},
getMoney
(){
data
.
parameters
.
Money
=
0
HotelCarList
.
_
value
.
forEach
(
item
=>
{
HotelCarList
.
value
.
forEach
(
item
=>
{
item
.
timeList
.
forEach
(
t
=>
{
t
.
rooms
.
forEach
(
room
=>
{
let
m
=
(
room
.
PeopleNumber
*
room
.
Unit_Price
)
+
(
room
.
Number
*
room
.
TaxesPrice
)
+
(
room
.
Number
*
room
.
PriceInTangTax
)
...
...
@@ -224,6 +224,7 @@
})
},
submit
()
{
// context.emit('success')
// TCNumRef.value.validate()
// ContactNameRef.value.validate()
// ContactNumberRef.value.validate()
...
...
@@ -242,7 +243,7 @@
}
data
.
parameters
.
DetailList
=
[]
as
Array
<
any
>
HotelCarList
.
_
value
.
forEach
(
item
=>
{
HotelCarList
.
value
.
forEach
(
item
=>
{
item
.
timeList
.
forEach
(
t
=>
{
let
datas
=
{
HotelId
:
item
.
HotelId
,
...
...
@@ -269,11 +270,19 @@
data
.
loading
=
true
HotelService
.
SetCustomerOrder
(
data
.
parameters
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
message
.
successMsg
(
`
${
t
(
'success'
)}
`
)
HotelCarList
.
_value
=
[]
as
Array
<
any
>
context
.
emit
(
'close'
)
data
.
parameters
=
{
Money
:
0
,
DetailList
:
[],
Remark
:
''
,
OrderType
:
1
,
//订单类型 1散客 2团队
TCNum
:
''
,
//=团队时 传递 组团号
ContactName
:
''
,
//=散客时 传递 联系人
ContactNumber
:
''
,
//=散客时 传递 联系人电话
OrderId
:
0
,
},
context
.
emit
(
'success'
)
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
...
...
@@ -286,8 +295,8 @@
},
getLength
(){
data
.
HotelLength
=
0
if
(
HotelCarList
.
_
value
.
length
>
0
){
HotelCarList
.
_
value
.
forEach
(
item
=>
{
if
(
HotelCarList
.
value
.
length
>
0
){
HotelCarList
.
value
.
forEach
(
item
=>
{
item
.
timeList
.
forEach
(
t
=>
{
if
(
t
.
rooms
.
length
>
0
){
data
.
HotelLength
+=
t
.
rooms
.
length
...
...
@@ -298,10 +307,10 @@
},
// 计算房间数量
calculateNum
(){
let
list
=
HotelCarList
.
_
value
let
list
=
HotelCarList
.
value
if
(
list
&&
list
[
data
.
currentIndex
]){
// HotelCarList.
_
value[data.currentIndex].timeList[data.currentI].total = 0
HotelCarList
.
_value
&&
HotelCarList
.
_
value
.
forEach
((
item
,
index
)
=>
{
// HotelCarList.value[data.currentIndex].timeList[data.currentI].total = 0
HotelCarList
.
value
&&
HotelCarList
.
value
.
forEach
((
item
,
index
)
=>
{
item
.
timeList
.
forEach
(
t
=>
{
t
.
total
=
0
t
.
rooms
.
forEach
(
room
=>
{
...
...
@@ -334,14 +343,14 @@
}
}
else
if
(
type
==
0
&&
room
.
Number
>
0
){
if
(
room
.
Number
==
1
){
if
(
HotelCarList
.
_value
[
index
].
timeList
[
i
].
rooms
.
length
==
1
&&
HotelCarList
.
_
value
[
index
].
timeList
.
length
>
1
){
HotelCarList
.
_
value
[
index
].
timeList
.
splice
(
i
,
1
)
}
else
if
(
HotelCarList
.
_
value
[
index
].
timeList
.
length
==
1
&&
HotelCarList
.
_
value
[
index
].
timeList
[
i
].
rooms
.
length
==
1
){
HotelCarList
.
_
value
.
splice
(
index
,
1
)
if
(
HotelCarList
.
value
[
index
].
timeList
[
i
].
rooms
.
length
==
1
&&
HotelCarList
.
value
[
index
].
timeList
.
length
>
1
){
HotelCarList
.
value
[
index
].
timeList
.
splice
(
i
,
1
)
}
else
if
(
HotelCarList
.
value
[
index
].
timeList
.
length
==
1
&&
HotelCarList
.
value
[
index
].
timeList
[
i
].
rooms
.
length
==
1
){
HotelCarList
.
value
.
splice
(
index
,
1
)
return
}
else
{
HotelCarList
.
_
value
[
index
].
timeList
[
i
].
rooms
.
splice
(
s
,
1
)
HotelCarList
.
value
[
index
].
timeList
[
i
].
rooms
.
splice
(
s
,
1
)
}
methods
.
getLength
()
}
...
...
@@ -351,6 +360,7 @@
},
}
onMounted
(()
=>
{
methods
.
getLength
()
methods
.
getMoney
()
})
...
...
src/components/hotel/list/ListHeader.vue
View file @
b55a47dd
...
...
@@ -47,7 +47,7 @@
</div>
<q-dialog
v-if=
"HotelCarList.length>0"
v-model=
"rightCarOpen"
maximized
full-height
position=
"right"
>
<ListCar
@
close=
"
rightCarOpen=false
"
></ListCar>
<ListCar
@
close=
"
close"
@
success=
"setSuccess
"
></ListCar>
</q-dialog>
</
template
>
...
...
@@ -181,10 +181,18 @@ export default defineComponent({
console
.
log
(
search
.
HotelChooseArray
)
},
1000
)
},
close
(){
data
.
rightCarOpen
=
false
},
setSuccess
(){
data
.
rightCarOpen
=
false
// HotelCarList.value = []
// data.HotelLength = 0
},
getLength
(){
data
.
HotelLength
=
0
if
(
HotelCarList
.
_
value
.
length
>
0
){
HotelCarList
.
_
value
.
forEach
(
item
=>
{
if
(
HotelCarList
.
value
.
length
>
0
){
HotelCarList
.
value
.
forEach
(
item
=>
{
item
.
timeList
.
forEach
(
t
=>
{
if
(
t
.
rooms
.
length
>
0
){
data
.
HotelLength
+=
t
.
rooms
.
length
...
...
@@ -208,7 +216,7 @@ export default defineComponent({
})
methods
.
initAddress
()
methods
.
initHotels
()
watch
(
HotelCarList
.
_
value
,
(
n
,
o
)
=>
{
watch
(
HotelCarList
.
value
,
(
n
,
o
)
=>
{
methods
.
getLength
()
})
onMounted
(()
=>
{
...
...
src/components/hotel/list/Table-Operation.vue
View file @
b55a47dd
...
...
@@ -109,6 +109,7 @@
},
total
:
0
,
})
data
.
onlyNum
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
hotelInfor
.
RemainingInventory
))
// 今天购买数量
watch
(
data
.
parameters
,
(
n
,
o
)
=>
{
...
...
@@ -177,18 +178,18 @@
})
msgData
.
timeList
.
push
(
msg
)
if
(
data
.
total
>
0
){
let
list
=
HotelCarList
.
_
value
let
list
=
HotelCarList
.
value
if
(
list
.
length
>
0
){
let
fault
=
true
list
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
HotelId
==
parameters
.
HotelId
){
item
.
timeList
.
forEach
((
x
,
i
)
=>
{
if
(
fault
&&
x
.
Date
==
parameters
.
Date
){
HotelCarList
.
_
value
[
index
].
timeList
.
splice
(
i
,
1
)
HotelCarList
.
_
value
[
index
].
timeList
.
push
(
msg
)
HotelCarList
.
value
[
index
].
timeList
.
splice
(
i
,
1
)
HotelCarList
.
value
[
index
].
timeList
.
push
(
msg
)
fault
=
false
}
else
if
(
fault
&&
x
.
Date
!=
parameters
.
Date
){
HotelCarList
.
_
value
[
index
].
timeList
.
push
(
msg
)
HotelCarList
.
value
[
index
].
timeList
.
push
(
msg
)
fault
=
false
}
else
{
// console.log(fault,x.Date,parameters.Date)
...
...
@@ -196,9 +197,9 @@
})
}
})
if
(
fault
)
HotelCarList
.
_
value
.
push
(
msgData
)
if
(
fault
)
HotelCarList
.
value
.
push
(
msgData
)
}
else
{
HotelCarList
.
_
value
.
push
(
msgData
)
HotelCarList
.
value
.
push
(
msgData
)
}
}
message
.
successMsg
(
`
${
t
(
'success'
)}
`
)
...
...
@@ -231,7 +232,7 @@
data
.
parameters
.
DetailList
.
push
(
dataMsg
)
}
})
HotelCarList
.
_
value
.
forEach
(
item
=>
{
HotelCarList
.
value
.
forEach
(
item
=>
{
if
(
item
.
HotelId
==
data
.
HotelRow
.
HotelId
){
if
(
item
.
timeList
.
length
>
0
){
item
.
timeList
.
forEach
(
x
=>
{
...
...
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