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
dee49704
Commit
dee49704
authored
Nov 18, 2022
by
youjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/bigwood
parents
2909d212
dd327fb9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
225 additions
and
19 deletions
+225
-19
hotel.ts
src/api/hotel.ts
+10
-0
OrderList.vue
src/components/hotel/order/list/OrderList.vue
+13
-7
index.ts
src/i18n/zh-TW/index.ts
+3
-0
newpassword.vue
src/pages/auth/newpassword.vue
+3
-3
HotelOrder.vue
src/pages/hotel/HotelOrder.vue
+0
-1
ModifyHotelOrder.vue
src/pages/hotel/ModifyHotelOrder.vue
+164
-0
index.ts
src/router/index.ts
+13
-7
routes.ts
src/router/routes.ts
+2
-1
tools.ts
src/utils/tools.ts
+17
-0
No files found.
src/api/hotel.ts
View file @
dee49704
...
@@ -27,6 +27,16 @@ class HotelService {
...
@@ -27,6 +27,16 @@ class HotelService {
return
request
(
'dict_post_CancelCustomerOrder'
,
{
OrderId
})
return
request
(
'dict_post_CancelCustomerOrder'
,
{
OrderId
})
}
}
/**
* 獲取酒店訂單詳情
* @param OrderId 订单编号
* @returns
*/
static
async
GetOrderDetail
(
OrderId
:
number
):
Promise
<
HttpResponse
>
{
return
request
(
'dict_post_GetMyCustomerOrderInfo'
,
{
OrderId
})
}
static
async
GetHasStockHotelList
():
Promise
<
HttpResponse
>
{
static
async
GetHasStockHotelList
():
Promise
<
HttpResponse
>
{
let
params
=
{
let
params
=
{
IsMoreThanZero
:
0
,
IsMoreThanZero
:
0
,
...
...
src/components/hotel/order/list/OrderList.vue
View file @
dee49704
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
</
template
>
</
template
>
<
template
v-slot:body-cell-HandFittingFee=
"props"
>
<
template
v-slot:body-cell-HandFittingFee=
"props"
>
<q-td
:props=
"props"
:rowspan=
"x.DetailList.length"
v-if=
"props.rowIndex==0"
>
<q-td
:props=
"props"
:rowspan=
"x.DetailList.length"
v-if=
"props.rowIndex==0"
>
{{
x
.
HandFittingFee
}}
{{
moneyFormat
(
x
.
HandFittingFee
)
}}
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:body-cell-HotelName=
"props"
>
<
template
v-slot:body-cell-HotelName=
"props"
>
...
@@ -118,21 +118,21 @@
...
@@ -118,21 +118,21 @@
<div
class=
"f12 text-grey"
>
{{ $t('hotelorder.orderMoney') }}
</div>
<div
class=
"f12 text-grey"
>
{{ $t('hotelorder.orderMoney') }}
</div>
<div
class=
"dark q-ml-xl"
>
<div
class=
"dark q-ml-xl"
>
<span
class=
"f12"
>
{{ $t('unit.jpc') }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jpc') }}
</span>
<span
class=
"din text-subtitle1"
>
{{
x.Money.toFixed(2
) }}
</span>
<span
class=
"din text-subtitle1"
>
{{
moneyFormat(x.Money
) }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jp') }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jp') }}
</span>
</div>
</div>
</div>
</div>
<div
class=
"row items-center justify-between q-mb-sm q-pb-sm"
style=
"border-bottom: 1px dashed #ddd"
v-if=
"x.CustomerPayType == 1 || x.CustomerPayType == 3"
>
<div
class=
"row items-center justify-between q-mb-sm q-pb-sm"
style=
"border-bottom: 1px dashed #ddd"
v-if=
"x.CustomerPayType == 1 || x.CustomerPayType == 3"
>
<div
class=
"f12 text-grey"
>
{{ $t('hotelorder.payType.t1') }}
</div>
<div
class=
"f12 text-grey"
>
{{ $t('hotelorder.payType.t1') }}
</div>
<div
class=
"dark"
>
<div
class=
"dark"
>
<span
class=
"f12"
>
{{
(x.SelfPayMoney ?? 1999).toFixed(2
) }}
</span>
<span
class=
"f12"
>
{{
moneyFormat(x.SelfPayMoney
) }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jp') }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jp') }}
</span>
</div>
</div>
</div>
</div>
<div
class=
"row items-center justify-between"
v-if=
"x.CustomerPayType == 2 || x.CustomerPayType == 3"
>
<div
class=
"row items-center justify-between"
v-if=
"x.CustomerPayType == 2 || x.CustomerPayType == 3"
>
<div
class=
"f12 text-grey"
>
{{ $t('hotelorder.payType.t2') }}
</div>
<div
class=
"f12 text-grey"
>
{{ $t('hotelorder.payType.t2') }}
</div>
<div
class=
"dark"
>
<div
class=
"dark"
>
<span
class=
"f12"
>
{{
(x.BeforeMoney ?? 0).toFixed(2
) }}
</span>
<span
class=
"f12"
>
{{
moneyFormat(x.BeforeMoney
) }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jp') }}
</span>
<span
class=
"f12"
>
{{ $t('unit.jp') }}
</span>
</div>
</div>
</div>
</div>
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
<q-item-label>
{{ $t('hotelorder.opera.cancel') }}
</q-item-label>
<q-item-label>
{{ $t('hotelorder.opera.cancel') }}
</q-item-label>
</q-item-section>
</q-item-section>
</q-item>
</q-item>
<q-item
class=
"text-primary"
clickable
v-close-popup
>
<q-item
class=
"text-primary"
clickable
v-close-popup
@
click=
"modify(x.OrderId)"
>
<q-item-section>
<q-item-section>
<q-item-label>
{{ $t('hotelorder.opera.edit') }}
</q-item-label>
<q-item-label>
{{ $t('hotelorder.opera.edit') }}
</q-item-label>
</q-item-section>
</q-item-section>
...
@@ -211,10 +211,11 @@ import HotelService from '../../../../api/hotel'
...
@@ -211,10 +211,11 @@ import HotelService from '../../../../api/hotel'
import
{
ApiResult
}
from
'../../../../@types/enumHelper'
import
{
ApiResult
}
from
'../../../../@types/enumHelper'
import
message
from
'../../../../utils/message'
import
message
from
'../../../../utils/message'
import
{
RoomType
,
StandardStatus
}
from
'../../../../@types'
import
{
RoomType
,
StandardStatus
}
from
'../../../../@types'
import
{
getHotelOrderStatus
,
getHotelRoomType
}
from
'../../../../utils/tools'
import
{
getHotelOrderStatus
,
getHotelRoomType
,
moneyFormat
}
from
'../../../../utils/tools'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
svgIcon
from
'../../../global/svg-icon.vue'
import
svgIcon
from
'../../../global/svg-icon.vue'
import
{
useQuasar
}
from
'quasar'
import
{
useQuasar
}
from
'quasar'
import
{
currentRouter
}
from
'../../../../router'
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
svgIcon
},
components
:
{
svgIcon
},
...
@@ -335,13 +336,18 @@ export default defineComponent({
...
@@ -335,13 +336,18 @@ export default defineComponent({
data
.
status
=
getHotelOrderStatus
()
data
.
status
=
getHotelOrderStatus
()
data
.
rooms
=
getHotelRoomType
()
data
.
rooms
=
getHotelRoomType
()
methods
.
initOrders
()
methods
.
initOrders
()
},
modify
(
id
:
number
){
//location.href =
currentRouter
.
push
(
'/hotel/modify/'
+
id
)
}
}
}
}
methods
.
init
()
methods
.
init
()
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
...
methods
,
moneyFormat
}
}
}
}
})
})
...
...
src/i18n/zh-TW/index.ts
View file @
dee49704
...
@@ -34,6 +34,9 @@ export default {
...
@@ -34,6 +34,9 @@ export default {
on
:
'展開'
,
on
:
'展開'
,
off
:
'收起'
off
:
'收起'
},
},
hotelm
:{
pageTitle
:
'酒店訂單變更'
},
hotelorder
:
{
hotelorder
:
{
dialog
:{
dialog
:{
title
:
'您的專屬付款賬戶如下'
,
title
:
'您的專屬付款賬戶如下'
,
...
...
src/pages/auth/newpassword.vue
View file @
dee49704
...
@@ -74,7 +74,7 @@ import svgIcon from '../../components/global/svg-icon.vue'
...
@@ -74,7 +74,7 @@ import svgIcon from '../../components/global/svg-icon.vue'
import
UserService
from
'../../api/user'
import
UserService
from
'../../api/user'
import
message
from
'../../utils/message'
import
message
from
'../../utils/message'
import
{
ApiResult
}
from
'../../@types/enumHelper'
import
{
ApiResult
}
from
'../../@types/enumHelper'
import
router
from
'../../router'
;
import
{
currentRouter
}
from
'../../router'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
svgIcon
},
components
:
{
svgIcon
},
...
@@ -96,12 +96,12 @@ export default defineComponent({
...
@@ -96,12 +96,12 @@ export default defineComponent({
accountCertificate
:
''
as
(
string
|
undefined
),
accountCertificate
:
''
as
(
string
|
undefined
),
passRules
:
[(
val
:
string
|
undefined
)
=>
(
val
&&
val
.
length
>=
8
)
||
t
(
'newpwd.notEmptyPass'
),
(
val
:
string
|
undefined
)
=>
(
val
&&
val
.
length
<=
16
)
||
t
(
'newpwd.maxLengthPass'
),(
val
:
string
)
=>
methods
.
checkPassword
(
val
)
||
''
]
passRules
:
[(
val
:
string
|
undefined
)
=>
(
val
&&
val
.
length
>=
8
)
||
t
(
'newpwd.notEmptyPass'
),
(
val
:
string
|
undefined
)
=>
(
val
&&
val
.
length
<=
16
)
||
t
(
'newpwd.maxLengthPass'
),(
val
:
string
)
=>
methods
.
checkPassword
(
val
)
||
''
]
})
})
data
.
accountCertificate
=
r
outer
.
currentRoute
.
value
.
params
.
code
?.
toString
()
data
.
accountCertificate
=
currentR
outer
.
currentRoute
.
value
.
params
.
code
?.
toString
()
if
(
!
data
.
accountCertificate
){
if
(
!
data
.
accountCertificate
){
//window.history.go(-1)
//window.history.go(-1)
}
}
console
.
log
(
data
.
accountCertificate
)
console
.
log
(
data
.
accountCertificate
)
data
.
langs
=
getLangs
()
data
.
langs
=
getLangs
()
if
(
data
.
langs
&&
data
.
langs
.
length
>
0
)
{
if
(
data
.
langs
&&
data
.
langs
.
length
>
0
)
{
data
.
currentLang
=
data
.
langs
.
find
(
x
=>
x
.
langLocale
==
locale
.
value
)
??
{}
data
.
currentLang
=
data
.
langs
.
find
(
x
=>
x
.
langLocale
==
locale
.
value
)
??
{}
...
...
src/pages/hotel/HotelOrder.vue
View file @
dee49704
...
@@ -18,7 +18,6 @@ import OrderList from '../../components/hotel/order/list/OrderList.vue';
...
@@ -18,7 +18,6 @@ import OrderList from '../../components/hotel/order/list/OrderList.vue';
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
OrderListHeader
,
OrderList
},
components
:
{
OrderListHeader
,
OrderList
},
setup
(
props
)
{
setup
(
props
)
{
console
.
log
(
' in '
)
let
{
setTitle
}
=
useMetaModule
()
let
{
setTitle
}
=
useMetaModule
()
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
pageTitle
=
inject
(
DirtionmaryHelper
.
PAGE_TITLE_KEY
)
as
any
const
pageTitle
=
inject
(
DirtionmaryHelper
.
PAGE_TITLE_KEY
)
as
any
...
...
src/pages/hotel/ModifyHotelOrder.vue
0 → 100644
View file @
dee49704
<
template
>
<div
class=
"fix-height-subpage no-wrap q-pa-md"
v-if=
"order"
>
<div
class=
"q-py-sm q-px-md rounded-borders bg-white row items-center justify-between f12"
>
<div
class=
"f12 text-grey-6"
>
{{
$t
(
'hotelorder.search.orderNum'
)
}}
:
{{
order
.
OrderNo
}}
</div>
<div
v-html=
"$t('hotel.car.title',
{ days: order.DetailList.length, hotels: order.HotelCount })" class="q-pa-sm rounded-border text-orange-10 f12">
</div>
<div
class=
"q-ml-md f12"
:class=
"[order.typeInfo.Color]"
>
<q-icon
:name=
"order.typeInfo.Icon"
/>
<span
class=
"q-ml-sm"
>
{{
order
.
typeInfo
.
StatusName
}}
</span>
</div>
</div>
<div
class=
"flex justify-start items-start content-start"
>
<div
class=
"q-pa-sm rounded-borders bg-white q-mt-md q-mr-md"
style=
"width: 320px"
v-for=
"x in order.DetailList"
>
<div
class=
"text-h6 row items-center"
>
<div
class=
"col"
>
{{
x
.
key
}}
</div>
<q-btn
color=
"primary"
icon=
"add"
class=
"q-mr-md"
rounded
dense
size=
"sm"
flat
/>
<q-btn
color=
"negative"
icon=
"delete"
rounded
dense
size=
"sm"
flat
/>
</div>
<div
class=
"q-pa-sm rounded-borders bg-blue-grey-1 q-mt-sm"
v-for=
"y in x.data"
>
<div
class=
"text-subtitle1 text-primary"
style=
"border-bottom: 1px dashed #607d8b"
>
{{
y
.
HotelName
}}
</div>
<div
v-for=
"(z,i) in y.RoomList"
class=
"q-mb-md"
>
<div
class=
"row no-wrap items-center q-mt-sm f12"
>
<span
class=
"col"
>
{{
z
.
RoomInfo
.
TypeName
}}
<div>
{{
z
.
Unit_Price
}}
/
{{
$t
(
'unit.ren'
)
}}
</div>
</span>
<div
class=
"col"
>
<div
class=
"f12 text-grey-6 text-center col"
v-html=
"$t('hotel.yg',
{ roomCount: z.Number })">
</div>
<!--
<div>
{{
$t
(
'hotelorder.xj'
)
}}
:
{{
moneyFormat
(
z
.
Money
)
}}
</div>
-->
</div>
<span>
<q-input
style=
"width: 90px"
v-model=
"z.PeopleNumber"
class=
"q-pa-none"
mask=
"#"
reverse-fill-mask
dense
standout
>
<template
v-slot:prepend
>
<q-btn
color=
"primary"
size=
"sm"
class=
"q-px-none"
flat
icon=
"remove"
@
click=
"calcPeople(y,i,0)"
/>
</
template
>
<
template
v-slot:append
>
<q-btn
color=
"primary"
size=
"sm"
class=
"q-px-none"
flat
icon=
"add"
@
click=
"calcPeople(y,i,1)"
/>
</
template
>
</q-input>
</span>
</div>
</div>
<div
class=
"row items-center justify-between"
style=
"border-top: 1px dashed #607d8b"
>
<div
class=
"q-mt-sm"
>
{{ $t('hotelorder.col.t') }}:{{ moneyFormat(y.TaxesPrice) }}/{{ $t('unit.ren') }}
</div>
<div
class=
"q-mt-sm"
>
{{ $t('hotelorder.col.t2') }}:{{ moneyFormat(y.PriceInTangTax) }}/{{ $t('unit.ren') }}
</div>
</div>
<div
class=
"text-right text-primary q-mt-sm"
style=
"border-top: 1px dashed #607d8b"
>
<span
class=
"text-weight-thin"
>
{{ $t('hotel.groupPrice') }}:
</span>
<span
class=
"fz14"
>
¥
</span>
<span
class=
"text-subtitle1"
>
{{ moneyFormat(y.HotelMoeny) }}
</span>
</div>
</div>
</div>
</div>
</div>
<q-inner-loading
:showing=
"loading"
:label=
"$t('loading')"
label-class=
"text-grey-6 f12"
/>
<div
class=
"text-center q-mt-xl"
v-if=
"!order && !loading"
>
<svg-icon
:size=
"50"
color=
"nav"
icon=
"General/Clipboard.svg"
></svg-icon>
<div
class=
"q-mt-md f12 text-grey-6"
>
{{ $t('noneData') }}
</div>
</div>
</template>
<
script
lang=
"ts"
>
import
useMetaModule
from
'../../module/meta/metaModule'
import
{
ApiResult
}
from
'src/@types/enumHelper'
import
HotelService
from
'src/api/hotel'
import
{
DirtionmaryHelper
}
from
'src/config/dictionary'
import
{
currentRouter
}
from
'src/router'
import
message
from
'src/utils/message'
import
{
defineComponent
,
inject
,
reactive
,
toRefs
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
RoomType
,
StandardStatus
}
from
'src/@types'
import
{
getHotelOrderStatus
,
getHotelRoomType
,
groupBy
,
moneyFormat
}
from
'src/utils/tools'
export
default
defineComponent
({
setup
(
props
)
{
let
{
setTitle
}
=
useMetaModule
()
const
{
t
}
=
useI18n
()
const
pageTitle
=
inject
(
DirtionmaryHelper
.
PAGE_TITLE_KEY
)
as
any
pageTitle
.
value
=
t
(
'hotelm.pageTitle'
)
setTitle
(
pageTitle
.
value
)
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
menu
.
value
=
3
const
data
=
reactive
({
orderId
:
0
,
order
:
null
as
any
,
loading
:
false
,
status
:
[]
as
Array
<
StandardStatus
>
,
rooms
:
[]
as
Array
<
RoomType
>
,
limitGuestNum
:
[
2
,
1
,
1
,
3
,
1
]
})
console
.
log
(
currentRouter
)
data
.
orderId
=
currentRouter
.
currentRoute
.
value
.
params
.
orderId
if
(
data
.
orderId
==
0
)
{
history
.
back
()
}
const
methods
=
{
initOrderDetails
()
{
HotelService
.
GetOrderDetail
(
data
.
orderId
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
order
=
r
.
data
.
data
data
.
order
.
typeInfo
=
data
.
status
.
find
(
y
=>
y
.
StatusId
==
data
.
order
.
OrderStatus
)
??
data
.
status
[
1
]
data
.
order
.
DetailList
.
forEach
((
y
:
any
)
=>
{
let
PeopleNum
=
0
y
.
RoomList
.
forEach
((
z
:
any
)
=>
{
z
.
RoomInfo
=
data
.
rooms
.
find
(
r
=>
r
.
TypeId
==
z
.
RoomType
)
??
data
.
rooms
[
0
]
console
.
log
(
z
.
RoomInfo
)
PeopleNum
+=
z
.
PeopleNumber
})
console
.
log
(
PeopleNum
)
y
.
PeopleNum
=
PeopleNum
})
data
.
order
.
HotelCount
=
data
.
order
.
DetailList
.
length
data
.
order
.
DetailList
=
groupBy
(
data
.
order
.
DetailList
,
(
x
:
any
)
=>
{
return
x
.
Date
})
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
data
.
loading
=
false
})
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
data
.
loading
=
false
})
},
calcPeople
(
hotel
:
any
,
room
:
number
,
type
:(
0
|
1
)){
let
t
=
hotel
.
RoomList
[
room
]
if
(
t
.
PeopleNumber
==
0
&&
type
==
0
)
return
t
.
PeopleNumber
+=
type
==
0
?
-
1
:
1
t
.
Number
=
Math
.
ceil
(
t
.
PeopleNumber
/
data
.
limitGuestNum
[
t
.
RoomType
-
1
])
t
.
Money
=
t
.
PeopleNumber
*
t
.
Number
methods
.
calcMoney
(
hotel
)
},
calcMoney
(
hotel
:
any
)
{
let
money
=
0.0
let
peoples
=
0
hotel
.
RoomList
.
forEach
((
x
:
any
)
=>
{
money
+=
x
.
Unit_Price
*
(
x
.
PeopleNumber
)
peoples
+=
x
.
PeopleNumber
})
money
+=
peoples
*
(
hotel
.
TaxesPrice
+
hotel
.
PriceInTangTax
)
hotel
.
PeopleNum
=
peoples
hotel
.
HotelMoeny
=
money
//return money
}
}
data
.
status
=
getHotelOrderStatus
()
data
.
rooms
=
getHotelRoomType
()
methods
.
initOrderDetails
()
return
{
...
toRefs
(
data
),
...
methods
,
moneyFormat
}
}
})
</
script
>
<
style
></
style
>
src/router/index.ts
View file @
dee49704
...
@@ -19,20 +19,26 @@ import routes from './routes';
...
@@ -19,20 +19,26 @@ import routes from './routes';
* with the Router instance.
* with the Router instance.
*/
*/
let
currentRouter
=
{}
as
any
export
default
route
<
StateType
>
(
function
(
/* { store, ssrContext } */
)
{
export
default
route
<
StateType
>
(
function
(
/* { store, ssrContext } */
)
{
const
createHistory
=
process
.
env
.
SERVER
const
createHistory
=
process
.
env
.
SERVER
?
createMemoryHistory
?
createMemoryHistory
:
(
process
.
env
.
VUE_ROUTER_MODE
===
'history'
?
createWebHistory
:
createWebHashHistory
);
:
(
process
.
env
.
VUE_ROUTER_MODE
===
'history'
?
createWebHistory
:
createWebHashHistory
);
const
Router
=
createRouter
({
const
Router
=
createRouter
({
scrollBehavior
:
()
=>
({
left
:
0
,
top
:
0
}),
scrollBehavior
:
()
=>
({
left
:
0
,
top
:
0
}),
routes
,
routes
,
// Leave this as is and make changes in quasar.conf.js instead!
// quasar.conf.js -> build -> vueRouterMode
// quasar.conf.js -> build -> publicPath
history
:
createHistory
(
process
.
env
.
VUE_ROUTER_BASE
),
});
// Leave this as is and make changes in quasar.conf.js instead!
currentRouter
=
Router
// quasar.conf.js -> build -> vueRouterMode
// quasar.conf.js -> build -> publicPath
history
:
createHistory
(
process
.
env
.
VUE_ROUTER_BASE
),
});
return
Router
;
return
Router
;
});
});
export
{
currentRouter
}
src/router/routes.ts
View file @
dee49704
...
@@ -7,7 +7,8 @@ const routes: RouteRecordRaw[] = [
...
@@ -7,7 +7,8 @@ const routes: RouteRecordRaw[] = [
children
:
[
children
:
[
{
path
:
''
,
component
:
()
=>
import
(
'pages/Index.vue'
)
},
{
path
:
''
,
component
:
()
=>
import
(
'pages/Index.vue'
)
},
{
path
:
'/hotel'
,
component
:
()
=>
import
(
'pages/hotel/HotelList.vue'
)
},
{
path
:
'/hotel'
,
component
:
()
=>
import
(
'pages/hotel/HotelList.vue'
)
},
{
path
:
'/hotel/order'
,
component
:
()
=>
import
(
'pages/hotel/HotelOrder.vue'
)
}
{
path
:
'/hotel/order'
,
component
:
()
=>
import
(
'pages/hotel/HotelOrder.vue'
)
},
{
path
:
'/hotel/modify/:orderId'
,
component
:
()
=>
import
(
'pages/hotel/ModifyHotelOrder.vue'
)
}
]
]
},
},
{
{
...
...
src/utils/tools.ts
View file @
dee49704
...
@@ -63,6 +63,23 @@ export function getHotelOrderStatus():Array<StandardStatus>{
...
@@ -63,6 +63,23 @@ export function getHotelOrderStatus():Array<StandardStatus>{
return
status
return
status
}
}
export
function
groupBy
(
array
:
any
[],
f
:
any
){
const
groups
:
{
[
key
:
string
]:
any
[];
}
=
{};
array
.
forEach
((
item
)
=>
{
const
group
=
JSON
.
stringify
(
f
(
item
));
groups
[
group
]
=
groups
[
group
]
||
[];
groups
[
group
].
push
(
item
);
});
return
Object
.
keys
(
groups
).
map
((
group
)
=>
{
return
{
key
:
group
.
replace
(
/
\"
/g
,
""
),
data
:
groups
[
group
]
};
});
}
export
function
getDateType
(){
export
function
getDateType
(){
let
types
=
[]
as
Array
<
DateType
>
let
types
=
[]
as
Array
<
DateType
>
types
.
push
({
types
.
push
({
...
...
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