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
ca17c19c
Commit
ca17c19c
authored
May 10, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单功能完善
parent
4f23052e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
22 deletions
+28
-22
order.vue
pages/order/order.vue
+28
-22
No files found.
pages/order/order.vue
View file @
ca17c19c
...
...
@@ -77,7 +77,7 @@
<view
v-if=
"roomLabelList.length"
class=
"room-label-list"
>
<view
v-for=
"(item,index) in roomLabelList"
:key=
"index"
class=
"room-label-box"
@
tap=
"onChangePackage(index)"
>
<view
class=
"item"
:class=
"
{active: modeIndex===index}
">
<view
class=
"item"
:class=
"allDayUseStatus? 'gray': modeIndex===index?'active':''
"
>
<text>
{{
item
.
labelName
}}
</text>
</view>
<view
v-if=
"item.openPack==1"
class=
"pre-icon"
>
...
...
@@ -255,12 +255,12 @@
v-model=
"checkedDateList"
@
change=
"onBindChange"
>
<picker-view-column>
<view
class=
"item"
v-for=
"(item,index) in hourList"
:key=
"index"
>
<text>
{{
item
}}
</text>
<text
class=
"text-lg text-pink"
>
{{
item
}}
</text>
</view>
</picker-view-column>
<picker-view-column>
<view
class=
"item"
v-for=
"(item,index) in minuteList"
:key=
"index"
>
<text>
{{
item
}}
</text>
<text
class=
"text-lg text-pink"
>
{{
item
}}
</text>
</view>
</picker-view-column>
</picker-view>
...
...
@@ -315,12 +315,15 @@
</view>
</view>
<view
class=
"info"
>
<text
class=
""
>
房间:
{{
roomInfo
.
name
}}
{{
roomTypeEnum
[
roomInfo
.
roomType
]
}}
</text>
<view
class=
"info flex-row-center"
>
<text
class=
""
>
房间:
</text>
<text
class=
"text-pink margin-left text-lg "
>
{{
roomInfo
.
name
}}
{{
roomTypeEnum
[
roomInfo
.
roomType
]
}}
</text>
</view>
<view
class=
"info"
>
<text
class=
""
>
金额:
{{
Number
(
computePriceInfo
.
payFee
).
toFixed
(
2
)
}}
元
</text>
<view
class=
"info flex-row-center"
>
<text
class=
""
>
金额:
</text>
<text
class=
"text-pink text-xxl margin-left"
>
{{
Number
(
computePriceInfo
.
payFee
).
toFixed
(
2
)
}}
</text>
<text
class=
"margin-left-sm"
>
元
</text>
</view>
</view>
<view
class=
"footer-btn-box"
>
...
...
@@ -338,15 +341,11 @@
<uni-popup
ref=
"popupMessage"
type=
"dialog"
>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:showClose=
"false"
content=
"当前条件下无可预约的时段,请手动选择合适的空闲时段"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onCancleTip"
></uni-popup-dialog>
</uni-popup>
<uni-popup
ref=
"popupMessage2"
type=
"dialog"
>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:showClose=
"false"
confirmText=
"好的"
content=
"所选套餐,可用时长不足,请选择其他日期的套餐"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onCancleTip"
></uni-popup-dialog>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
:showClose=
"false"
:content=
"tipErrMsg|| tipContent"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onCancleTip"
></uni-popup-dialog>
</uni-popup>
<uni-popup
ref=
"popupDialog"
type=
"dialog"
>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
content=
"所选套餐可使用时长不足,
点击确认
表示接受"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onPackageCheck"
></uni-popup-dialog>
<uni-popup-dialog
type=
"warn"
mode=
"base"
title=
"提示"
content=
"所选套餐可使用时长不足,
请点击确定
表示接受"
:duration=
"2000"
:before-close=
"true"
@
close=
"onCancleTip"
@
confirm=
"onPackageCheck"
></uni-popup-dialog>
</uni-popup>
</view>
</
template
>
...
...
@@ -505,6 +504,9 @@
0
:
"星期日"
,
},
allDayUseStatus
:
false
,
// 当日无可预约时段,true 无法预约,false 可预约
tipContent
:
"当前条件下无可预约的时段,请手动选择合适的空闲时段"
,
tipErrMsg
:
''
};
},
filters
:
{
...
...
@@ -1163,7 +1165,7 @@
},
// 开始选择时间
onSelectDate
()
{
if
(
this
.
orderType
==
1
&&
this
.
modeIndex
>=
0
){
if
(
this
.
orderType
==
1
&&
this
.
modeIndex
>=
0
&&
!
this
.
allDayUseStatus
){
this
.
hourList
=
[
"00"
,
"01"
,
...
...
@@ -1443,7 +1445,7 @@
})
},
onSelectDatePoint
(
val
,
i
)
{
if
(
this
.
orderType
==
2
||
this
.
modeIndex2
>=
0
)
return
;
if
(
this
.
orderType
==
2
||
this
.
modeIndex2
>=
0
||
this
.
allDayUseStatus
)
return
;
if
(
i
>=
24
)
{
uni
.
showToast
({
icon
:
"none"
,
...
...
@@ -1487,22 +1489,21 @@
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
if
(
end
>
startStemp
&&
start
<
endStemp
){
if
(
item
.
status
==
1
){
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
useStatus
=
true
;
nextStatus
=
true
;
}
else
{
if
(
moment
(
item
.
startHoldTime
).
valueOf
()
>
startStemp
&&
moment
(
item
.
endHoldTime
).
valueOf
()
<
startStemp
){
if
(
startStemp
>=
moment
(
item
.
startHoldTime
).
valueOf
()
&&
startStemp
<
moment
(
item
.
endHoldTime
).
valueOf
()
){
useStatus
=
true
;
nextStatus
=
true
;
}
if
(
moment
(
item
.
startHoldTime
).
valueOf
()
>
endStemp
&&
moment
(
item
.
endHoldTime
).
valueOf
()
<
endStemp
){
useStatus
=
true
if
(
endStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()
){
useStatus
=
true
;
nextStatus
=
true
;
}
}
}
}
}
...
...
@@ -1539,6 +1540,8 @@
let
dateObj
=
{
useStatus
:
false
};
this
.
tipErrMsg
=
""
;
if
(
params
.
startDateTime
){
// 开始和结束时间的毫秒数
startStamp
=
moment
(
params
.
startDateTime
).
valueOf
();
...
...
@@ -1589,7 +1592,6 @@
},
onCancleTip
(){
this
.
$refs
.
popupMessage
.
close
();
this
.
$refs
.
popupMessage2
.
close
();
this
.
$refs
.
popupDialog
.
close
();
},
// 检查当前小时段是否被全部占用 true 完全占用 false 部分占用
...
...
@@ -1871,6 +1873,10 @@
.item
{
padding
:
8
upx
20
upx
;
}
.gray
{
background
:
#c3c3c3
;
color
:
#f5f5f5
;
}
.pre-icon
{
position
:
absolute
;
top
:
-8
upx
;
...
...
@@ -2330,7 +2336,7 @@
text{
font-weight
:
600
;
font-size
:
32
rpx
;
color
:
#333333
;
//
color
:
#333333
;
}
}
}
...
...
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