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
eabba234
Commit
eabba234
authored
Mar 06, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
酒店/门票地区修改
parent
a1993a9e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
4 deletions
+75
-4
hotel.ts
src/api/hotel.ts
+12
-0
ListHeader.vue
src/components/hotel/list/ListHeader.vue
+24
-1
ListHeader.vue
src/components/ticket/list/ListHeader.vue
+28
-1
HotelList.vue
src/pages/hotel/HotelList.vue
+5
-1
TicketList.vue
src/pages/ticket/TicketList.vue
+6
-1
No files found.
src/api/hotel.ts
View file @
eabba234
...
...
@@ -17,6 +17,18 @@ class HotelService {
return
request
(
'dict_post_Destination_GetChildList'
,
params
)
}
/**
* 查詢城市信息
* @param params
* @returns
*/
static
async
GetCityExtList
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dict_get_Destination_GetCityExtList'
,
params
)
}
/**
* 上次旅客名單
* @param OrderId 訂單ID
...
...
src/components/hotel/list/ListHeader.vue
View file @
eabba234
...
...
@@ -87,6 +87,7 @@ import useScrollModule from '../../../module/scrollbar/scrollModule'
// import { dateDiffer } from '../../../utils/tools'
import
ListCar
from
"./ListCar.vue"
import
{
DirtionmaryHelper
}
from
'../../../config/dictionary'
import
{
getStoreGetter
}
from
'../../../store/utils'
export
default
defineComponent
({
components
:
{
svgIcon
,
ListCar
,
NCascader
,
NSelect
},
setup
()
{
...
...
@@ -107,6 +108,10 @@ export default defineComponent({
addressParams
:
{
Id
:
'651'
},
addressDestination
:
{
QCountry
:
0
,
CodeLevel
:
2
,
},
provinces
:
[],
cascader
:
{
addressValue
:
null
...
...
@@ -121,7 +126,7 @@ export default defineComponent({
})
data
.
scrollStyle
=
useScrollModule
().
scrollStyle
const
search
=
inject
(
DirtionmaryHelper
.
HOTEL_QUERY_PARAM
)
as
any
data
.
userInfo
=
getStoreGetter
<
UserGetter
>
(
'user'
,
'getUser'
)
data
.
dateRange
.
to
=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
50
}),
'YYYY/MM/DD'
)
data
.
dateRange
.
from
=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
20
}),
'YYYY/MM/DD'
)
data
.
dateRangeFormat
=
`
${
data
.
dateRange
.
from
}
-
${
data
.
dateRange
.
to
}
`
...
...
@@ -131,6 +136,23 @@ export default defineComponent({
const
methods
=
{
initAddress
()
{
if
(
data
.
userInfo
.
groupId
==
100
){
HotelService
.
GetCityExtList
(
data
.
addressDestination
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
r
.
data
.
data
.
forEach
((
x
:
any
)
=>
{
x
.
isLeaf
=
false
x
.
depth
=
1
})
data
.
provinces
=
r
.
data
.
data
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
})
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
}
else
{
HotelService
.
GetDestination
(
data
.
addressParams
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
...
...
@@ -146,6 +168,7 @@ export default defineComponent({
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
}
},
initHotels
()
{
HotelService
.
GetHasStockHotelList
()
...
...
src/components/ticket/list/ListHeader.vue
View file @
eabba234
...
...
@@ -74,6 +74,7 @@ import HotelService from 'src/api/hotel'
import
{
CascaderOption
,
NCascader
}
from
'naive-ui'
import
{
ApiResult
}
from
'src/@types/enumHelper'
import
message
from
'src/utils/message'
import
{
getStoreGetter
}
from
'../../../store/utils'
export
default
{
components
:
{
svgIcon
,
NCascader
},
setup
(
props
)
{
...
...
@@ -84,18 +85,25 @@ export default {
addressParams
:
{
Id
:
'651'
},
addressDestination
:
{
QCountry
:
0
,
CodeLevel
:
2
,
},
provinces
:
[],
cascader
:
{
addressValue
:
null
}
as
any
,
searchClone
:
{}
as
any
,
canHide
:
false
,
userInfo
:
{}
as
any
,
})
data
.
userInfo
=
getStoreGetter
<
UserGetter
>
(
'user'
,
'getUser'
)
const
search
=
inject
(
DirtionmaryHelper
.
TICKET_QUERY_PARAM
)
as
any
data
.
searchClone
=
JSON
.
parse
(
JSON
.
stringify
(
search
.
msg
))
const
methods
=
{
initAddress
()
{
HotelService
.
GetDestination
(
data
.
addressParams
)
if
(
data
.
userInfo
.
groupId
==
100
){
HotelService
.
GetCityExtList
(
data
.
addressDestination
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
r
.
data
.
data
.
forEach
((
x
:
any
)
=>
{
...
...
@@ -110,6 +118,25 @@ export default {
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
}
else
{
HotelService
.
GetDestination
(
data
.
addressParams
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
r
.
data
.
data
.
forEach
((
x
:
any
)
=>
{
x
.
isLeaf
=
false
x
.
depth
=
1
})
data
.
provinces
=
r
.
data
.
data
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
})
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
}
},
loadChilds
(
option
:
CascaderOption
)
{
return
new
Promise
<
void
>
(
resolve
=>
{
...
...
src/pages/hotel/HotelList.vue
View file @
eabba234
...
...
@@ -18,6 +18,7 @@ import ListHeader from '../../components/hotel/list/ListHeader.vue'
import
ListTable
from
'../../components/hotel/list/ListTable.vue'
import
HotelTips
from
'../../components/hotel/list/HotelTips.vue'
import
{
date
}
from
'quasar'
import
{
getStoreGetter
}
from
'../../store/utils'
export
default
defineComponent
({
components
:
{
svgIcon
,
ListHeader
,
ListTable
,
HotelTips
},
setup
()
{
...
...
@@ -45,7 +46,10 @@ export default defineComponent({
provide
(
DirtionmaryHelper
.
HOTEL_QUERY_PARAM
,
search
)
const
HotelCarList
=
ref
<
Array
<
any
>>
([])
let
userInfo
=
getStoreGetter
<
UserGetter
>
(
'user'
,
'getUser'
)
if
(
userInfo
.
groupId
==
100
){
search
.
Country
=
0
}
const
cacheCars
=
localStorage
.
getItem
(
DirtionmaryHelper
.
HOTEL_HOTELCARS_CACHE
)
if
(
cacheCars
)
{
let
cacheCarArray
=
JSON
.
parse
(
cacheCars
).
filter
((
x
:
any
)
=>
date
.
getDateDiff
(
new
Date
(
x
.
Date
),
new
Date
(),
'days'
)
>=
20
)
...
...
src/pages/ticket/TicketList.vue
View file @
eabba234
...
...
@@ -13,6 +13,7 @@ import { useI18n } from 'vue-i18n'
import
{
DirtionmaryHelper
}
from
'../../config/dictionary'
;
import
ListHeader
from
'src/components/ticket/list/ListHeader.vue'
;
import
ListTable
from
'src/components/ticket/list/ListTable.vue'
;
import
{
getStoreGetter
}
from
'../../store/utils'
export
default
defineComponent
({
components
:
{
ListHeader
,
ListTable
},
setup
(
props
)
{
...
...
@@ -35,8 +36,12 @@ export default defineComponent({
StartPrice
:
''
,
EndPrice
:
''
,
ViewType
:
1
,
//列表模式
}
}
,
})
let
userInfo
=
getStoreGetter
<
UserGetter
>
(
'user'
,
'getUser'
)
if
(
userInfo
.
groupId
==
100
){
search
.
msg
.
QCountry
=
0
}
provide
(
DirtionmaryHelper
.
TICKET_QUERY_PARAM
,
search
)
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
menu
.
value
=
8
...
...
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