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 @@
...
@@ -77,7 +77,7 @@
<view
v-if=
"roomLabelList.length"
class=
"room-label-list"
>
<view
v-if=
"roomLabelList.length"
class=
"room-label-list"
>
<view
v-for=
"(item,index) in roomLabelList"
:key=
"index"
class=
"room-label-box"
<view
v-for=
"(item,index) in roomLabelList"
:key=
"index"
class=
"room-label-box"
@
tap=
"onChangePackage(index)"
>
@
tap=
"onChangePackage(index)"
>
<view
class=
"item"
:class=
"
{active: modeIndex===index}
">
<view
class=
"item"
:class=
"allDayUseStatus? 'gray': modeIndex===index?'active':''
"
>
<text>
{{
item
.
labelName
}}
</text>
<text>
{{
item
.
labelName
}}
</text>
</view>
</view>
<view
v-if=
"item.openPack==1"
class=
"pre-icon"
>
<view
v-if=
"item.openPack==1"
class=
"pre-icon"
>
...
@@ -255,12 +255,12 @@
...
@@ -255,12 +255,12 @@
v-model=
"checkedDateList"
@
change=
"onBindChange"
>
v-model=
"checkedDateList"
@
change=
"onBindChange"
>
<picker-view-column>
<picker-view-column>
<view
class=
"item"
v-for=
"(item,index) in hourList"
:key=
"index"
>
<view
class=
"item"
v-for=
"(item,index) in hourList"
:key=
"index"
>
<text>
{{
item
}}
</text>
<text
class=
"text-lg text-pink"
>
{{
item
}}
</text>
</view>
</view>
</picker-view-column>
</picker-view-column>
<picker-view-column>
<picker-view-column>
<view
class=
"item"
v-for=
"(item,index) in minuteList"
:key=
"index"
>
<view
class=
"item"
v-for=
"(item,index) in minuteList"
:key=
"index"
>
<text>
{{
item
}}
</text>
<text
class=
"text-lg text-pink"
>
{{
item
}}
</text>
</view>
</view>
</picker-view-column>
</picker-view-column>
</picker-view>
</picker-view>
...
@@ -315,12 +315,15 @@
...
@@ -315,12 +315,15 @@
</view>
</view>
</view>
</view>
<view
class=
"info"
>
<view
class=
"info flex-row-center"
>
<text
class=
""
>
房间:
{{
roomInfo
.
name
}}
{{
roomTypeEnum
[
roomInfo
.
roomType
]
}}
</text>
<text
class=
""
>
房间:
</text>
<text
class=
"text-pink margin-left text-lg "
>
{{
roomInfo
.
name
}}
{{
roomTypeEnum
[
roomInfo
.
roomType
]
}}
</text>
</view>
</view>
<view
class=
"info"
>
<view
class=
"info flex-row-center"
>
<text
class=
""
>
金额:
{{
Number
(
computePriceInfo
.
payFee
).
toFixed
(
2
)
}}
元
</text>
<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>
</view>
<view
class=
"footer-btn-box"
>
<view
class=
"footer-btn-box"
>
...
@@ -338,15 +341,11 @@
...
@@ -338,15 +341,11 @@
<uni-popup
ref=
"popupMessage"
type=
"dialog"
>
<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-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=
"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>
</uni-popup>
<uni-popup
ref=
"popupDialog"
type=
"dialog"
>
<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>
</uni-popup>
</view>
</view>
</
template
>
</
template
>
...
@@ -505,6 +504,9 @@
...
@@ -505,6 +504,9 @@
0
:
"星期日"
,
0
:
"星期日"
,
},
},
allDayUseStatus
:
false
,
// 当日无可预约时段,true 无法预约,false 可预约
allDayUseStatus
:
false
,
// 当日无可预约时段,true 无法预约,false 可预约
tipContent
:
"当前条件下无可预约的时段,请手动选择合适的空闲时段"
,
tipErrMsg
:
''
};
};
},
},
filters
:
{
filters
:
{
...
@@ -1163,7 +1165,7 @@
...
@@ -1163,7 +1165,7 @@
},
},
// 开始选择时间
// 开始选择时间
onSelectDate
()
{
onSelectDate
()
{
if
(
this
.
orderType
==
1
&&
this
.
modeIndex
>=
0
){
if
(
this
.
orderType
==
1
&&
this
.
modeIndex
>=
0
&&
!
this
.
allDayUseStatus
){
this
.
hourList
=
[
this
.
hourList
=
[
"00"
,
"00"
,
"01"
,
"01"
,
...
@@ -1443,7 +1445,7 @@
...
@@ -1443,7 +1445,7 @@
})
})
},
},
onSelectDatePoint
(
val
,
i
)
{
onSelectDatePoint
(
val
,
i
)
{
if
(
this
.
orderType
==
2
||
this
.
modeIndex2
>=
0
)
return
;
if
(
this
.
orderType
==
2
||
this
.
modeIndex2
>=
0
||
this
.
allDayUseStatus
)
return
;
if
(
i
>=
24
)
{
if
(
i
>=
24
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
...
@@ -1487,22 +1489,21 @@
...
@@ -1487,22 +1489,21 @@
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
start
=
moment
(
item
.
timeHour
+
':00:00'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
let
end
=
moment
(
item
.
timeHour
+
':59:59'
).
valueOf
();
if
(
end
>
startStemp
&&
start
<
endStemp
){
if
(
end
>
startStemp
&&
start
<
endStemp
){
if
(
item
.
status
==
1
){
if
(
item
.
status
==
1
){
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
if
(
this
.
onCheckHourUse
(
item
.
startHoldTime
,
item
.
endHoldTime
)){
useStatus
=
true
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
else
{
}
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
;
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
}
if
(
moment
(
item
.
startHoldTime
).
valueOf
()
>
endStemp
&&
moment
(
item
.
endHoldTime
).
valueOf
()
<
endStemp
){
if
(
endStemp
>
moment
(
item
.
startHoldTime
).
valueOf
()
&&
endStemp
<=
moment
(
item
.
endHoldTime
).
valueOf
()
){
useStatus
=
true
useStatus
=
true
;
nextStatus
=
true
;
nextStatus
=
true
;
}
}
}
}
}
}
}
}
...
@@ -1539,6 +1540,8 @@
...
@@ -1539,6 +1540,8 @@
let
dateObj
=
{
let
dateObj
=
{
useStatus
:
false
useStatus
:
false
};
};
this
.
tipErrMsg
=
""
;
if
(
params
.
startDateTime
){
if
(
params
.
startDateTime
){
// 开始和结束时间的毫秒数
// 开始和结束时间的毫秒数
startStamp
=
moment
(
params
.
startDateTime
).
valueOf
();
startStamp
=
moment
(
params
.
startDateTime
).
valueOf
();
...
@@ -1589,7 +1592,6 @@
...
@@ -1589,7 +1592,6 @@
},
},
onCancleTip
(){
onCancleTip
(){
this
.
$refs
.
popupMessage
.
close
();
this
.
$refs
.
popupMessage
.
close
();
this
.
$refs
.
popupMessage2
.
close
();
this
.
$refs
.
popupDialog
.
close
();
this
.
$refs
.
popupDialog
.
close
();
},
},
// 检查当前小时段是否被全部占用 true 完全占用 false 部分占用
// 检查当前小时段是否被全部占用 true 完全占用 false 部分占用
...
@@ -1871,6 +1873,10 @@
...
@@ -1871,6 +1873,10 @@
.item
{
.item
{
padding
:
8
upx
20
upx
;
padding
:
8
upx
20
upx
;
}
}
.gray
{
background
:
#c3c3c3
;
color
:
#f5f5f5
;
}
.pre-icon
{
.pre-icon
{
position
:
absolute
;
position
:
absolute
;
top
:
-8
upx
;
top
:
-8
upx
;
...
@@ -2330,7 +2336,7 @@
...
@@ -2330,7 +2336,7 @@
text{
text{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
32
rpx
;
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