Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
pseer
gxpt_wechat
Commits
940066e5
Commit
940066e5
authored
May 24, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
9a364d64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
187 additions
and
28 deletions
+187
-28
cleanManage.vue
pages/cleanManage/cleanManage.vue
+2
-2
index.vue
pages/index/index.vue
+84
-15
order.vue
pages/order/order.vue
+101
-11
No files found.
pages/cleanManage/cleanManage.vue
View file @
940066e5
...
...
@@ -68,7 +68,7 @@
<view
class=
"room-stauts"
>
<view
class=
"flex-row"
>
<text
class=
"text-sm"
:style=
"
{color: colorEnum[val.colorStatus]}">
{{
statusEnum
[
val
.
colorStatus
]
}}
</text>
<text
v-if=
"val.facilities.length"
class=
"text-
yellow2
text-sm"
>
(
{{
val
.
facilities
[
0
]
}}
)
</text>
<text
v-if=
"val.facilities.length"
class=
"text-
gray
text-sm"
>
(
{{
val
.
facilities
[
0
]
}}
)
</text>
</view>
<view
class=
"order-info-box"
>
<view
v-if=
"val.orderList&&val.orderList.length"
class=
"list"
>
...
...
@@ -212,7 +212,7 @@ import moment from "@/common/moment";
preEndDate
:
moment
(
oItem
.
preEndDate
).
format
(
"HH:mm"
)
}
}):[],
facilities
:
val
.
facilities
.
split
(
","
).
map
(
fItem
=>
this
.
facilitieList
[
fItem
]).
filter
(
fVal
=>
fVal
.
includes
(
'窗'
))
,
facilities
:
val
.
facilities
?
val
.
facilities
.
split
(
","
).
map
(
fItem
=>
this
.
facilitieList
[
fItem
]).
filter
(
fVal
=>
fVal
.
includes
(
'窗'
)):[]
,
colorStatus
:
val
.
roomStat
===
3
?
2
:
val
.
roomStat
===
2
?
6
:
val
.
isDirtyRoom
>=
1
&&
val
.
recordsStatus
===
0
?
5
:
val
.
recordsStatus
>=
0
&&
val
.
recordsStatus
===
0
?
3
:
val
.
recordsStatus
>=
0
&&
val
.
recordsStatus
===
1
?
4
:
val
.
status
}
}):[]
...
...
pages/index/index.vue
View file @
940066e5
...
...
@@ -171,12 +171,27 @@
</view>
</view>
<view
class=
"flex-row list-point-box"
>
<view
v-for=
"(val,k) in list"
:key=
"k"
class=
"flex-1 flex-col"
>
<view
v-for=
"(val,k) in list"
:key=
"k"
class=
"flex-1 flex-col
relative
"
>
<view
class=
"box"
:class=
"item.roomStatusList && item.roomStatusList[val].status==1 ? 'bg-pink':'bg-gray'"
>
</view>
<text
class=
"text-gray text-sm"
>
{{
val
==
24
?
'次日'
:
val
>
24
?
val
-
24
:
val
}}
</text>
<text
class=
"text-gray text-sm"
>
{{
val
>=
24
?
val
-
24
:
val
}}
</text>
<view
v-if=
"val==24"
class=
"absolute"
>
<view
class=
"flex-col"
>
<view
class=
"saojiao"
>
</view>
<view
class=
"line"
>
</view>
<view
class=
"text-sm"
>
<text>
次日
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
@@ -282,7 +297,7 @@
nowLongitude
:
""
,
name
:
''
,
pageNum
:
1
,
pageSize
:
20
pageSize
:
20
0
},
iconList
:
[{
value
:
"1"
,
...
...
@@ -468,14 +483,6 @@
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
)
:
0
}
that
.
onGetRoomList
(
obj
.
id
)
this
.
popStoreList
=
res
.
data
.
data
.
map
(
item
=>
{
return
{
...
item
,
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
}).
filter
(
item
=>
item
.
id
!=
obj
.
id
)
}
})
},
...
...
@@ -533,7 +540,21 @@
let
l
=
that
.
roomVoList
.
filter
(
item
=>
item
.
sortNum
===
1
)
if
(
l
.
length
<=
0
)
{
if
(
!
uni
.
getStorageSync
(
"storePopShow"
))
{
that
.
$refs
.
popupStoreList
.
open
();
getListStore
({
...
that
.
queryParams
,
nowLatitude
:
that
.
storeInfo
.
latitude
,
nowLongitude
:
that
.
storeInfo
.
longitude
}).
then
(
res
=>
{
that
.
popStoreList
=
res
.
data
.
data
.
map
(
item
=>
{
return
{
...
item
,
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
}
}).
filter
(
item
=>
item
.
id
!=
this
.
storeInfo
.
id
)
that
.
$refs
.
popupStoreList
.
open
();
})
}
}
...
...
@@ -1402,7 +1423,7 @@
.list-point-box
{
width
:
100%
;
margin-bottom
:
20
upx
;
padding
:
30
upx
0
;
.bg-pink
{
background-color
:
rgba
(
185
,
75
,
112
,
0.7
);
...
...
@@ -1420,7 +1441,7 @@
}
.box
{
margin
:
0
2
upx
6
upx
;
margin
:
0
4
upx
6
upx
;
width
:
90%
;
height
:
12px
;
border-radius
:
5
upx
;
...
...
@@ -1429,6 +1450,54 @@
.text-sm
{
font-size
:
20
upx
;
}
.relative
{
position
:
relative
;
.absolute{
position
:
absolute
;
top
:
-1
upx
;
left
:
0
upx
;
height
:
100%
;
.flex-col{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
height
:
150%
;
display
:
flex
;
flex-direction
:
column
;
.saojiao{
position
:
absolute
;
top
:
-10px
;
left
:
-15
upx
;
display
:
flex
;
width
:
0
;
height
:
0
;
border
:
15
upx
solid
#EFD12C
;
border-radius
:
2px
;
border-top-color
:
transparent
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
}
.line
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
1px
;
height
:
100%
;
background
:
linear-gradient
(
180deg
,
#EFD12C
,
#DDC01E
);
}
.text-sm
{
position
:
absolute
;
top
:
-4px
;
left
:
10px
;
width
:
46
upx
;
text{
font-size
:
20
upx
;
color
:
#DFC224
;
}
}
}
}
}
}
.pop-store-list
{
...
...
pages/order/order.vue
View file @
940066e5
...
...
@@ -181,12 +181,28 @@
</view>
</view>
<view
class=
"date-point-box"
>
<view
v-for=
"(item,k) in formatAllData.list"
:key=
"k"
class=
"date-point-item"
<view
v-for=
"(item,k) in formatAllData.list"
:key=
"k"
class=
"date-point-item
relative
"
v-if=
"k>=startHours && k
<
=
endHours
"
@
tap=
"onSelectDatePoint(item,k)"
>
<view
class=
"date-point"
:class=
" item.status==2?'checked': item.tagStatus === 0 ?'free':item.tagStatus===1?'used':'error'"
>
</view>
<text
class=
"text-gray"
>
{{
item
.
hour
}}
</text>
<text
class=
"text-gray"
>
{{
item
.
hour
>=
24
?
item
.
hour
-
24
:
item
.
hour
}}
</text>
<view
v-if=
"item.hour == 24"
class=
"absolute"
>
<view
class=
"flex-col"
>
<view
class=
"saojiao"
>
</view>
<view
class=
"line"
>
</view>
<view
class=
"text-sm"
>
<text>
次日
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
@@ -609,17 +625,35 @@
let
endDate
=
moment
(
moment
().
format
(
endStr
)).
format
(
"YYYY-MM-DD HH:00:00"
);
console
.
log
(
startStr
,
endStr
,
6666
)
// 如果是续单,则订单的结束时间必须在套餐的开始时间和结束时间内,否则无法续对应的套餐
if
(
this
.
orderType
==
2
){
if
(
!
(
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
>=
moment
(
startDate
).
valueOf
()
&&
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
<=
moment
(
endDate
).
valueOf
())){
useStatus
=
false
;
}
}
//
if(this.orderType == 2){
//
if(!(moment(this.orderInfo.endDate).valueOf() >= moment(startDate).valueOf() && moment(this.orderInfo.endDate).valueOf()
<=
moment
(
endDate
).
valueOf
())){
//
useStatus = false;
//
}
//
}
// 如果此套餐的结束时间在11点前,则为通宵套餐,会在当天及明天进行找合适的时间段,否则则没有合适的套餐时段
let
pointDateForm
=
moment
(
this
.
dateList
[
this
.
dateIndex
].
readDate
).
format
(
"YYYY-MM-DD 11:00:00"
);
let
dateTimeObj
=
{};
if
(
moment
(
endDate
).
valueOf
()
<
moment
(
pointDateForm
).
valueOf
()){
if
(
this
.
orderType
==
2
){
console
.
log
(
startDate
,
endDate
,
this
.
orderInfo
.
endDate
,
"22222"
)
let
orderEndDate
=
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
console
.
log
(
moment
(
startDate
).
add
(
1
,
'd'
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
orderEndDate
,
"224444"
)
let
b1
=
orderEndDate
>=
moment
(
startDate
).
valueOf
()
&&
orderEndDate
<=
moment
(
endDate
).
valueOf
();
let
b2
=
orderEndDate
>=
moment
(
moment
(
startDate
).
add
(
1
,
'd'
)).
valueOf
()
&&
orderEndDate
<=
moment
(
moment
(
endDate
).
add
(
1
,
"d"
)).
valueOf
();
console
.
log
(
b1
,
b2
,
"b1b2"
)
if
(
!
(
b1
||
b2
)){
useStatus
=
false
;
console
.
log
(
useStatus
,
"useStatus1"
)
return
;
}
}
// console.log("通宵套餐")
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
...
...
@@ -631,8 +665,9 @@
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
)){
// console.log("实际时长小于原时长的60%则选择明天的时间");
// 加一天时间重新计算
if
(
this
.
dateIndex
!=
0
||
this
.
orderType
==
2
){
if
(
this
.
dateIndex
!=
0
){
useStatus
=
false
;
console
.
log
(
useStatus
,
"useStatus2"
)
return
}
...
...
@@ -644,11 +679,17 @@
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
if
(
actualTime
<
originTime
-
4
*
60
*
60
*
1000
||
this
.
onCheckPackUse
(
startDate
,
endDate
,
4
)){
useStatus
=
false
;
console
.
log
(
useStatus
,
"useStatus3"
)
return
}
}
}
else
{
if
(
this
.
orderType
==
2
){
if
(
!
(
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
>=
moment
(
startDate
).
valueOf
()
&&
moment
(
this
.
orderInfo
.
endDate
).
valueOf
()
<=
moment
(
endDate
).
valueOf
())){
useStatus
=
false
;
}
}
// 如果此套餐的结束时间在12点后,则为闲时套餐,仅查看今日日否有合适的套餐
// console.log("闲时套餐")
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
...
...
@@ -706,6 +747,7 @@
startDate
=
moment
(
startDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
endDate
=
moment
(
endDate
).
add
(
1
,
"d"
).
format
(
"YYYY-MM-DD HH:00:00"
);
dateTimeObj
=
this
.
onComputeStartDateAndEndDate
(
startDate
,
endDate
);
console
.
log
(
dateTimeObj
,
"通宵套餐2"
)
// 实际时间
actualTime
=
moment
(
dateTimeObj
.
tempEndDate
).
valueOf
()
-
moment
(
dateTimeObj
.
tempStartDate
).
valueOf
()
...
...
@@ -837,7 +879,7 @@
tempEndDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
add
(
1
,
'm'
).
format
(
"YYYY-MM-DD HH:mm:00"
)
}
else
if
(
item
.
status
==
1
&&
!
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)
&&
startNeedChange
){
startNeedChange
=
false
;
tempStartDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
add
(
1
,
"m"
).
format
(
"YYYY-MM-DD HH:mm:00"
)
tempStartDate
=
moment
(
moment
(
item
.
endHoldTime
).
format
(
"YYYY-MM-DD HH:mm:00"
)).
format
(
"YYYY-MM-DD HH:mm:00"
)
}
}
}
...
...
@@ -1046,7 +1088,7 @@
return
{
...
item
,
tagStatus
:
status
,
hour
:
index
>
0
&&
index
-
24
==
0
?
'次日'
:
index
>
24
?
index
-
24
:
index
hour
:
index
}
})
...
...
@@ -2104,7 +2146,7 @@
.date-point-box
{
display
:
flex
;
flex-wrap
:
wrap
;
margin
:
2
0
upx
;
margin
:
50
upx
20
upx
3
0
upx
;
.date-point-item
{
display
:
flex
;
...
...
@@ -2144,6 +2186,54 @@
text-align
:
center
;
}
}
.relative
{
position
:
relative
;
.absolute{
position
:
absolute
;
top
:
-1
upx
;
left
:
0
upx
;
height
:
100%
;
.flex-col{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
height
:
150%
;
display
:
flex
;
flex-direction
:
column
;
.saojiao{
position
:
absolute
;
top
:
-10px
;
left
:
-15
upx
;
display
:
flex
;
width
:
0
;
height
:
0
;
border
:
15
upx
solid
#EFD12C
;
border-radius
:
2px
;
border-top-color
:
transparent
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
}
.line
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
1px
;
height
:
100%
;
background
:
linear-gradient
(
180deg
,
#EFD12C
,
#DDC01E
);
}
.text-sm
{
position
:
absolute
;
top
:
-4px
;
left
:
10px
;
width
:
46
upx
;
text{
font-size
:
20
upx
;
color
:
#DFC224
;
}
}
}
}
}
}
}
...
...
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