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
49597999
Commit
49597999
authored
Nov 25, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
fc89c9b2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
3 deletions
+37
-3
ListCar.vue
src/components/hotel/list/ListCar.vue
+7
-1
ListHeader.vue
src/components/hotel/list/ListHeader.vue
+7
-0
TableOperation.vue
src/components/hotel/list/TableOperation.vue
+7
-1
HotelOrder.vue
src/pages/hotel/HotelOrder.vue
+1
-1
tools.ts
src/utils/tools.ts
+15
-0
No files found.
src/components/hotel/list/ListCar.vue
View file @
49597999
...
...
@@ -128,7 +128,7 @@ import { DirtionmaryHelper } from '../../../config/dictionary'
import
message
from
'../../../utils/message'
import
{
ApiResult
}
from
'../../../@types/enumHelper'
import
HotelService
from
'../../../api/hotel'
import
{
moneyFormat
}
from
'../../../utils/tools'
import
{
moneyFormat
,
dateDiffer
}
from
'../../../utils/tools'
import
{
useQuasar
}
from
'quasar'
export
default
defineComponent
({
props
:
{},
...
...
@@ -136,6 +136,12 @@ export default defineComponent({
const
HotelLength
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_LENGTH
)
as
any
const
orderstatus
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_STATUS
)
as
any
const
cars
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_LIST
)
as
any
cars
&&
cars
.
value
.
forEach
((
item
:
any
,
index
:
Number
)
=>
{
if
(
dateDiffer
(
item
.
Date
)
<
15
){
cars
.
value
.
splice
(
index
,
1
)
}
});
HotelLength
.
value
=
cars
.
value
.
length
const
editor
=
inject
(
DirtionmaryHelper
.
HOTEL_UPDATEHOTEL_CAR
)
as
any
const
{
t
}
=
useI18n
()
const
TCNumRef
=
ref
(
null
)
as
any
...
...
src/components/hotel/list/ListHeader.vue
View file @
49597999
...
...
@@ -63,6 +63,7 @@ import { date } from 'quasar'
import
{
HotelRate
,
useHotel
}
from
'../../../utils/hotelRate'
import
{
useQuasar
}
from
'quasar'
import
useScrollModule
from
'../../../module/scrollbar/scrollModule'
import
{
dateDiffer
}
from
'../../../utils/tools'
import
ListCar
from
"./ListCar.vue"
import
{
DirtionmaryHelper
}
from
'../../../config/dictionary'
export
default
defineComponent
({
...
...
@@ -70,6 +71,12 @@ export default defineComponent({
setup
()
{
const
HotelLength
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_LENGTH
)
as
any
const
cars
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_LIST
)
as
any
cars
&&
cars
.
value
.
forEach
((
item
:
any
,
index
:
Number
)
=>
{
if
(
dateDiffer
(
item
.
Date
)
<
15
){
cars
.
value
.
splice
(
index
,
1
)
}
});
HotelLength
.
value
=
cars
.
value
.
length
const
$q
=
useQuasar
()
const
qDateProxy
=
ref
(
null
)
as
any
const
qNameProxy
=
ref
(
null
)
as
any
...
...
src/components/hotel/list/TableOperation.vue
View file @
49597999
...
...
@@ -92,7 +92,7 @@ import { useI18n } from 'vue-i18n'
import
{
DirtionmaryHelper
}
from
'../../../config/dictionary'
import
{
date
}
from
'quasar'
import
message
from
'../../../utils/message'
import
{
moneyFormat
}
from
'../../../utils/tools'
import
{
moneyFormat
,
dateDiffer
}
from
'../../../utils/tools'
export
default
defineComponent
({
props
:
{
HotelRow
:
{
...
...
@@ -110,6 +110,12 @@ export default defineComponent({
const
qDateProxyOpera
=
ref
<
any
>
(
null
)
const
HotelLength
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_LENGTH
)
as
any
const
cars
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_LIST
)
as
any
cars
&&
cars
.
value
.
forEach
((
item
:
any
,
index
:
Number
)
=>
{
if
(
dateDiffer
(
item
.
Date
)
<
15
){
cars
.
value
.
splice
(
index
,
1
)
}
});
HotelLength
.
value
=
cars
.
value
.
length
const
editor
=
inject
(
DirtionmaryHelper
.
HOTEL_UPDATEHOTEL_CAR
)
as
any
const
data
=
reactive
({
HotelRow
:
{}
as
any
,
...
...
src/pages/hotel/HotelOrder.vue
View file @
49597999
...
...
@@ -38,7 +38,7 @@ export default defineComponent({
ContactName
:
''
,
ContactNumber
:
''
})
search
.
OrderId
=
currentRouter
.
currentRoute
.
value
.
params
.
orderId
search
.
OrderId
=
currentRouter
.
value
.
params
.
orderId
provide
(
DirtionmaryHelper
.
HOTEL_ORDER_SEARCH
,
search
)
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
...
...
src/utils/tools.ts
View file @
49597999
...
...
@@ -17,6 +17,21 @@ export interface DateType{
text
:
string
}
/**
* @description 计算距离天数
*/
export
function
dateDiffer
(
DateEnd
:
string
)
{
//date1结束时间
let
date1
=
new
Date
(
DateEnd
);
//date2当前时间
let
date2
=
new
Date
();
date1
=
new
Date
(
date1
.
getFullYear
(),
date1
.
getMonth
(),
date1
.
getDate
());
date2
=
new
Date
(
date2
.
getFullYear
(),
date2
.
getMonth
(),
date2
.
getDate
());
const
diff
=
date1
.
getTime
()
-
date2
.
getTime
();
//目标时间减去当前时间
const
diffDate
=
diff
/
(
24
*
60
*
60
*
1000
);
//计算当前时间与结束时间之间相差天数
return
diffDate
}
/**
* @description 将枚举转为数组
* @param objEnum 枚举对象
...
...
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