Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
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
zhengke
jz_Travel
Commits
24124116
Commit
24124116
authored
Feb 06, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改适配小包团规则
parent
fae24a0c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
940 additions
and
910 deletions
+940
-910
index.vue
components/coupon/index.vue
+32
-3
index.vue
pages/jiuzhai/components/sign/index.vue
+879
-892
jz_Line.vue
pages/jiuzhai/jz_Line.vue
+4
-0
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+24
-14
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+1
-1
No files found.
components/coupon/index.vue
View file @
24124116
...
@@ -21,9 +21,12 @@
...
@@ -21,9 +21,12 @@
<view
class=
"coupond"
>
<view
class=
"coupond"
>
<view
class=
"name"
>
{{
x
.
couponName
}}
</view>
<view
class=
"name"
>
{{
x
.
couponName
}}
</view>
<view
class=
"date"
>
{{
x
.
expirationDate
}}
失效
</view>
<view
class=
"date"
>
{{
x
.
expirationDate
}}
失效
</view>
<view
class=
"err"
v-if=
"x.err"
>
{{
x
.
err
}}
</view>
<!--
<view
class=
"rule"
v-if=
"x.lineTeamName!='' || x.lineName!=''"
>
{{
x
.
lineName
}}
{{
x
.
lineTeamName
}}
可用
</view>
-->
<!--
<view
class=
"rule"
v-if=
"x.lineTeamName!='' || x.lineName!=''"
>
{{
x
.
lineName
}}
{{
x
.
lineTeamName
}}
可用
</view>
-->
</view>
</view>
<view
class=
"chosen"
>
<view
class=
"chosen"
v-if=
"!x.err"
>
<u-radio-group
v-model=
"value"
@
change=
"radioChange"
>
<u-radio-group
v-model=
"value"
@
change=
"radioChange"
>
<u-radio
shape=
"circle"
:name=
"x.id"
:icon-size=
"36"
:active-color=
"mc"
></u-radio>
<u-radio
shape=
"circle"
:name=
"x.id"
:icon-size=
"36"
:active-color=
"mc"
></u-radio>
</u-radio-group>
</u-radio-group>
...
@@ -49,7 +52,7 @@
...
@@ -49,7 +52,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
"list"
,
"current"
],
props
:
[
"list"
,
"current"
,
"currentPrice"
,
"order"
],
data
()
{
data
()
{
return
{
return
{
mc
:
""
,
mc
:
""
,
...
@@ -68,8 +71,29 @@
...
@@ -68,8 +71,29 @@
x
.
start_time
=
x
.
effectDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
start_time
=
x
.
effectDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
end_time
=
x
.
expirationDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
end_time
=
x
.
expirationDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
})
})
this
.
checkOrderCoupon
()
},
},
methods
:
{
methods
:
{
checkOrderCoupon
(){
if
(
this
.
currentPrice
.
teamType
==
1
)
{
//totalSeat:总机位 isSubstitution:1 (可候补) leaderNum:领队
const
shengyu
=
this
.
currentPrice
.
totalSeat
-
this
.
currentPrice
.
leaderNum
const
remainNum
=
this
.
currentPrice
.
remainNum
const
orderNum
=
this
.
order
.
ManNum
+
this
.
order
.
ChirdNeedBedNum
+
this
.
order
.
ChirdNoBedNum
let
errorMsg
=
null
if
(
shengyu
!=
remainNum
)
errorMsg
=
'当前定制团存在其他订单,无法使用专享优惠券'
else
if
(
orderNum
<
shengyu
)
errorMsg
=
'报名人数小于团队机位人数,无法使用专享优惠券'
console
.
log
(
errorMsg
,
shengyu
,
remainNum
,
orderNum
)
this
.
ts
.
forEach
(
x
=>
{
if
(
x
.
couponsUseScope
==
10
)
x
.
err
=
errorMsg
})
console
.
log
(
this
.
ts
)
}
},
popupClose
()
{
popupClose
()
{
if
(
this
.
currentChosen
!=
this
.
current
)
{
if
(
this
.
currentChosen
!=
this
.
current
)
{
this
.
$emit
(
'close'
,
this
.
currentChosen
)
this
.
$emit
(
'close'
,
this
.
currentChosen
)
...
@@ -78,7 +102,6 @@
...
@@ -78,7 +102,6 @@
}
}
},
},
radioChange
(
e
){
radioChange
(
e
){
console
.
log
(
e
)
if
(
this
.
currentChosen
!=
e
){
if
(
this
.
currentChosen
!=
e
){
this
.
currentChosen
=
e
this
.
currentChosen
=
e
}
else
{
}
else
{
...
@@ -179,6 +202,12 @@
...
@@ -179,6 +202,12 @@
font-weight
:
600
;
font-weight
:
600
;
color
:
#000
;
color
:
#000
;
}
}
.coupon
.details
.item
.detail
.coupond
.err
{
margin-top
:
5px
;
font-size
:
11px
;
color
:
#FF3166
;
}
.coupon
.details
.item
.detail
.coupond
.date
{
.coupon
.details
.item
.detail
.coupond
.date
{
margin-top
:
5px
;
margin-top
:
5px
;
...
...
pages/jiuzhai/components/sign/index.vue
View file @
24124116
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<scroll-view
<scroll-view
:scroll-y=
"true"
style=
"height: 100%; flex: 1; box-sizing: border-box"
>
:scroll-y=
"true"
<view
class=
"header"
>
style=
"height: 100%; flex: 1; box-sizing: border-box"
<!--
<view
class=
"bar"
></view>
>
<view
class=
"set text-gray"
>
<view
class=
"header"
>
<text
@
click=
"close"
style=
"font-size:40upx;"
>
返回
</text>
<!--
<view
class=
"bar"
></view>
<text
@
click=
"reset"
style=
"font-size:35upx;color:#DDDDDD"
>
清空
</text>
<view
class=
"set text-gray"
>
</view>
-->
<text
@
click=
"close"
style=
"font-size:40upx;"
>
返回
</text>
<!--
<view
class=
"in-and-out"
>
<text
@
click=
"reset"
style=
"font-size:35upx;color:#DDDDDD"
>
清空
</text>
<view
class=
"item"
v-if=
"start.length > 0"
>
</view>
-->
<view
style=
"font-size:30upx;color:#C0C0C0"
>
入住日期
</view>
<!--
<view
class=
"in-and-out"
>
<view
style=
"font-weight: bold;margin-top:10upx;font-size:36upx"
>
{{
startDay
}}
</view>
<view
class=
"item"
v-if=
"start.length > 0"
>
<view
style=
"font-size:24upx;margin-top:10upx"
>
{{
startWeek
}}
</view>
<view
style=
"font-size:30upx;color:#C0C0C0"
>
入住日期
</view>
</view>
<view
style=
"font-weight: bold;margin-top:10upx;font-size:36upx"
>
{{
startDay
}}
</view>
<view
class=
"item text"
v-if=
"start.length == 0"
>
<view
style=
"font-size:24upx;margin-top:10upx"
>
{{
startWeek
}}
</view>
<view>
入住日期
</view>
</view>
</view>
<view
class=
"item text"
v-if=
"start.length == 0"
>
<view
class=
"item"
>
<view>
入住日期
</view>
<view
class=
"count-border"
:class=
"day == 0 ? 'gray' : 'orange'"
>
</view>
<view
class=
"count"
style=
"font-size:26upx;line-height:26upx;"
>
共
{{
day
}}
晚
</view>
<view
class=
"item"
>
</view>
<view
class=
"count-border"
:class=
"day == 0 ? 'gray' : 'orange'"
>
</view>
<view
class=
"count"
style=
"font-size:26upx;line-height:26upx;"
>
共
{{
day
}}
晚
</view>
<view
class=
"item text"
v-if=
"end.length == 0"
>
</view>
<view>
离店日期
</view>
</view>
</view>
<view
class=
"item text"
v-if=
"end.length == 0"
>
<view
class=
"item"
v-if=
"end.length > 0"
>
<view>
离店日期
</view>
<view
style=
"font-size:30upx;color:#C0C0C0"
>
离店日期
</view>
</view>
<view
style=
"font-weight: bold;margin-top:10upx;font-size:36upx"
>
{{
endDay
}}
</view>
<view
class=
"item"
v-if=
"end.length > 0"
>
<view
style=
"font-size:24upx;margin-top:10upx"
>
{{
endWeek
}}
</view>
<view
style=
"font-size:30upx;color:#C0C0C0"
>
离店日期
</view>
</view>
<view
style=
"font-weight: bold;margin-top:10upx;font-size:36upx"
>
{{
endDay
}}
</view>
</view>
-->
<view
style=
"font-size:24upx;margin-top:10upx"
>
{{
endWeek
}}
</view>
<view
style=
"
</view>
font-size: 32rpx;
</view>
-->
color: #111;
<view
text-align: center;
style=
"
padding: 30rpx 0;
font-size: 32rpx;
"
>
color: #111;
<text>
{{
title
}}
</text>
text-align: center;
</view>
padding: 30rpx 0;
<view
class=
"week"
>
"
<view>
日
</view>
>
<view>
一
</view>
<text>
{{
title
}}
</text>
<view>
二
</view>
</view>
<view>
三
</view>
<view
class=
"week"
>
<view>
四
</view>
<view>
日
</view>
<view>
五
</view>
<view>
一
</view>
<view>
六
</view>
<view>
二
</view>
</view>
<view>
三
</view>
</view>
<view>
四
</view>
<view
class=
"section"
>
<view>
五
</view>
<view
v-for=
"(res, line) in resDate"
class=
"item"
:key=
"line"
>
<view>
六
</view>
<view
class=
"year"
>
{{
res
.
year
}}
年
{{
res
.
month
}}
月
</view>
</view>
<view
class=
"day"
>
</view>
<view
v-for=
"week in res.oneDayWeek"
class=
"day-list"
<view
class=
"section"
>
:style=
"
{ width: (dayWidth - 10) / 7 + 'px' }">
</view>
<view
v-for=
"(res, line) in resDate"
class=
"item"
:key=
"line"
>
<view
@
tap=
"selectDay(line, index, (line + 1).toString() + index)"
<view
class=
"year"
>
{{
res
.
year
}}
年
{{
res
.
month
}}
月
</view>
v-for=
"(item, index) in res.day"
:key=
"index"
class=
"day-list"
:class=
"[
<view
class=
"day"
>
line == start[0] && index == start[1]
<view
? 'bg-orange select-style'
v-for=
"week in res.oneDayWeek"
: '',
class=
"day-list"
(line >= start[0] &&
:style=
"
{ width: (dayWidth - 10) / 7 + 'px' }"
line
<
=
end
[
0
]
&&
>
</view>
index
>
start[1]
&&
<view
index
<
end
[
1
])
||
@
tap=
"selectDay(line, index, (line + 1).toString() + index)"
(
line
>
= start[0]
&&
index > start[1]
&&
line
<
end
[
0
])
||
v-for=
"(item, index) in res.day"
(
line
<
=
end
[
0
]
&&
index
<
end
[
1
]
&&
line
>
start[0]) ||
:key=
"index"
(line
<
end
[
0
]
&&
line
>
start[0])
class=
"day-list"
? 'bg-higlt-orange'
:class=
"[
: '',
line == start[0] && index == start[1]
(line == 0
&&
index + 1
<
nowDay
)
?
'
time-out
'
:
'',
? 'bg-orange select-style'
isNaN
(
item
)
?
'
is-festival
'
:
'',
: '',
(
isNaN
(
item
)
&&
line =
=
start
[
0
]
&&
index =
=
start
[
1
])
||
(line >= start[0] &&
(
isNaN
(
item
)
&&
line =
=
end
[
0
]
&&
index =
=
end
[
1
])
line
<
=
end
[
0
]
&&
?
'
not-festival
'
index
>
start[1]
&&
:
'',
index
<
end
[
1
])
||
(
priceStauts
.
length
>
0
&&
(
line
>
= start[0]
&&
index > start[1]
&&
line
<
end
[
0
])
||
priceStauts[line][index]
<
0
&&
(
line
<
=
end
[
0
]
&&
index
<
end
[
1
]
&&
line
>
start[0]) ||
start
.
length
>
0
&&
(line
<
end
[
0
]
&&
line
>
start[0])
end.length > 0) ||
? 'bg-higlt-orange'
(priceStauts.length > 0
&&
: '',
priceStauts[line][index]
<
0
&&
(line == 0
&&
index + 1
<
nowDay
)
?
'
time-out
'
:
'',
start
.
length =
=
0
&&
isNaN
(
item
)
?
'
is-festival
'
:
'',
end
.
length =
=
0
)
(
isNaN
(
item
)
&&
line =
=
start
[
0
]
&&
index =
=
start
[
1
])
||
?
'
not-sub
'
(
isNaN
(
item
)
&&
line =
=
end
[
0
]
&&
index =
=
end
[
1
])
:
'',
?
'
not-festival
'
priceStauts
.
length
>
0
&&
:
'',
end.length == 0
&&
(
priceStauts
.
length
>
0
&&
start.length > 0
&&
priceStauts[line][index]
<
0
&&
priceStauts[line][index]
<
0
&&
start
.
length
>
0
&&
line
+
index
*
2
!=
lastNot
[
0
]
+
lastNot
[
1
]
*
2
end.length > 0) ||
?
'
not-sub
'
(priceStauts.length > 0
&&
:
'',
priceStauts[line][index]
<
0
&&
]"
:style=
"
{
start
.
length =
=
0
&&
width: (dayWidth - 10) / 7 + 'px',
end
.
length =
=
0
)
borderRadius:
?
'
not-sub
'
line == end[0]
&&
index == end[1] ? '0px 6px 6px 0px' : '',
:
'',
backgroundColor:
priceStauts
.
length
>
0
&&
line == end[0]
&&
index == end[1] ? '#111' : '',
end.length == 0
&&
color: line == end[0]
&&
index == end[1] ? '#FFFFFF' : '',
start.length > 0
&&
}">
priceStauts[line][index]
<
0
&&
<view
style=
"padding-top: 2px; padding-bottom: 2px"
>
{{
line
+
index
*
2
!=
lastNot
[
0
]
+
lastNot
[
1
]
*
2
item
?
'
not-sub
'
}}
</view>
:
'',
<!--
<view
class=
"select-style"
v-if=
"line == start[0] && index == start[1]"
>
最早
</view>
]"
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
最晚
</view>
-->
:style=
"
{
<view
style=
"font-size: 12px; padding-bottom: 3px"
v-if=
"priceStauts.length > 0"
>
width: (dayWidth - 10) / 7 + 'px',
<view
v-if=
"priceStauts[line][index] > 0"
style=
"color:#FF3166"
>
borderRadius:
¥
{{
priceStauts
[
line
][
index
]
}}
</view>
line == end[0]
&&
index == end[1] ? '0px 6px 6px 0px' : '',
<view
v-if=
"priceStauts[line][index] == -1"
>
售罄
</view>
backgroundColor:
<view
v-if=
"priceStauts[line][index] == -2"
>
候补
</view>
line == end[0]
&&
index == end[1] ? '#111' : '',
</view>
color: line == end[0]
&&
index == end[1] ? '#FFFFFF' : '',
</view>
}"
</view>
>
</view>
<view
style=
"padding-top: 2px; padding-bottom: 2px"
>
{{
</view>
item
</scroll-view>
}}
</view>
<view
class=
"submit"
v-if=
"!immediately"
>
<!--
<view
class=
"select-style"
v-if=
"line == start[0] && index == start[1]"
>
最早
</view>
<button
class=
"sub-btn"
:disabled=
"!isSub"
@
click=
"submit"
>
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
最晚
</view>
-->
<text
v-if=
"isSub"
>
确定
</text>
<view
<text
v-if=
"!isSub"
>
选择出行时间
</text>
style=
"font-size: 12px; padding-bottom: 3px"
</button>
v-if=
"priceStauts.length > 0"
</view>
>
</view>
<view
v-if=
"priceStauts[line][index] > 0"
style=
"color:#FF3166"
>
¥
{{
priceStauts
[
line
][
index
]
}}
</view
</
template
>
>
<view
v-if=
"priceStauts[line][index]
<
0
"
>
售罄
</view>
<
script
>
</view>
//引入节假日的数据,也可以用后台返回去渲染
</view>
import
json
from
"./day.js"
;
</view>
</view>
export
default
{
</view>
props
:
{
</scroll-view>
priceList
:
{
<view
class=
"submit"
v-if=
"!immediately"
>
type
:
Array
,
<button
class=
"sub-btn"
:disabled=
"!isSub"
@
click=
"submit"
>
default
:
[],
<text
v-if=
"isSub"
>
确定
</text>
},
<text
v-if=
"!isSub"
>
选择出行时间
</text>
defaultDate
:
{
</button>
type
:
String
,
</view>
default
:
""
,
</view>
},
</
template
>
title
:
{
type
:
String
,
<
script
>
default
:
"选择日期"
,
//引入节假日的数据,也可以用后台返回去渲染
},
import
json
from
"./day.js"
;
immediately
:
{
type
:
Boolean
,
export
default
{
default
:
false
,
props
:
{
},
priceList
:
{
},
type
:
Array
,
computed
:
{
default
:
[],
//房间是否能预订
},
isSub
()
{
defaultDate
:
{
// if (this.priceStauts.length > 0) {
type
:
String
,
// for (var i = this.start[0]; i
<=
this
.
end
[
0
];
i
++
)
{
default
:
""
,
// if (i == this.start[0]) {
},
// for (var j = this.start[1]; j
<
this
.
date
[
i
].
length
;
j
++
)
{
title
:
{
// if (this.priceStauts[i][j] == -1) return false
type
:
String
,
// }
default
:
"选择日期"
,
// } else if (this.end[0] == this.start[0]) {
},
// for (var j = this.start[1]; j
<
this
.
end
[
1
];
j
++
)
{
immediately
:
{
// if (this.priceStauts[i][j] == -1) return false
type
:
Boolean
,
// }
default
:
false
,
// } else if (i == this.end[0]) {
},
// for (var j = 0; j
<
this
.
end
[
1
];
j
++
)
{
},
// if (this.priceStauts[i][j] == -1) return false
computed
:
{
// }
//房间是否能预订
// } else {
isSub
()
{
// for (var j = 0; j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
// if (this.priceStauts.length > 0) {
// if (this.priceStauts[i][j] == -1) return false
// for (var i = this.start[0]; i
<=
this
.
end
[
0
];
i
++
)
{
// }
// if (i == this.start[0]) {
// }
// for (var j = this.start[1]; j
<
this
.
date
[
i
].
length
;
j
++
)
{
// }
// if (this.priceStauts[i][j] == -1) return false
// }
// }
return
this
.
start
.
length
==
2
;
// } else if (this.end[0] == this.start[0]) {
},
// for (var j = this.start[1]; j
<
this
.
end
[
1
];
j
++
)
{
//计算日历里的节假日
// if (this.priceStauts[i][j] == -1) return false
resDate
()
{
// }
if
(
this
.
date
.
length
==
0
)
return
;
// } else if (i == this.end[0]) {
// for (var j = 0; j
<
this
.
end
[
1
];
j
++
)
{
for
(
var
i
=
0
;
i
<
this
.
date
.
length
;
i
++
)
{
// if (this.priceStauts[i][j] == -1) return false
for
(
var
j
=
0
;
j
<
this
.
festival
.
length
;
j
++
)
{
// }
if
(
// } else {
this
.
festival
[
j
].
year
==
this
.
date
[
i
].
year
&&
// for (var j = 0; j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
this
.
festival
[
j
].
month
==
this
.
date
[
i
].
month
// if (this.priceStauts[i][j] == -1) return false
)
{
// }
for
(
var
k
=
0
;
k
<
this
.
festival
[
j
].
festival
.
length
;
k
++
)
{
// }
if
(
// }
this
.
date
[
i
].
day
.
indexOf
(
this
.
festival
[
j
].
festival
[
k
].
day
)
!=
-
1
// }
)
{
return
this
.
start
.
length
==
2
;
this
.
date
[
i
].
day
[
},
this
.
date
[
i
].
day
.
indexOf
(
this
.
festival
[
j
].
festival
[
k
].
day
)
//计算日历里的节假日
]
=
this
.
festival
[
j
].
festival
[
k
].
name
;
resDate
()
{
}
if
(
this
.
date
.
length
==
0
)
return
;
}
}
for
(
var
i
=
0
;
i
<
this
.
date
.
length
;
i
++
)
{
}
for
(
var
j
=
0
;
j
<
this
.
festival
.
length
;
j
++
)
{
}
if
(
this
.
festival
[
j
].
year
==
this
.
date
[
i
].
year
&&
return
this
.
date
;
this
.
festival
[
j
].
month
==
this
.
date
[
i
].
month
},
)
{
},
for
(
var
k
=
0
;
k
<
this
.
festival
[
j
].
festival
.
length
;
k
++
)
{
data
()
{
if
(
return
{
this
.
date
[
i
].
day
.
indexOf
(
this
.
festival
[
j
].
festival
[
k
].
day
)
!=
-
1
out
:
0
,
)
{
festival
:
json
,
//节假日
this
.
date
[
i
].
day
[
type
:
"-"
,
//日期分隔符
this
.
date
[
i
].
day
.
indexOf
(
this
.
festival
[
j
].
festival
[
k
].
day
)
date
:
[],
//日期数组对象
]
=
this
.
festival
[
j
].
festival
[
k
].
name
;
dayWidth
:
0
,
//日期的宽度
}
nowDay
:
0
,
//当前时间的日
}
start
:
[],
//入住时间
}
count
:
6
,
//显示月的数量
}
startDay
:
""
,
//入住日期
}
startWeek
:
""
,
//入住时间的周几
end
:
[],
//离开时间
return
this
.
date
;
endDay
:
""
,
//离开日期
},
endWeek
:
""
,
//离开时间的周几
},
day
:
0
,
//多少晚
data
()
{
priceStauts
:
[],
//价格状态
return
{
lastNot
:
[
0
,
10
],
//前置的无房操作
out
:
0
,
userDefaultDate
:
""
,
festival
:
json
,
//节假日
};
type
:
"-"
,
//日期分隔符
},
date
:
[],
//日期数组对象
mounted
()
{
dayWidth
:
0
,
//日期的宽度
this
.
userDefaultDate
=
this
.
defaultDate
;
nowDay
:
0
,
//当前时间的日
uni
.
getSystemInfo
({
start
:
[],
//入住时间
success
:
(
res
)
=>
{
count
:
6
,
//显示月的数量
this
.
dayWidth
=
res
.
windowWidth
;
startDay
:
""
,
//入住日期
},
startWeek
:
""
,
//入住时间的周几
});
end
:
[],
//离开时间
endDay
:
""
,
//离开日期
this
.
setDate
();
endWeek
:
""
,
//离开时间的周几
var
dateTime
=
new
Date
();
day
:
0
,
//多少晚
dateTime
=
dateTime
.
setDate
(
dateTime
.
getDate
()
+
1
);
priceStauts
:
[],
//价格状态
this
.
nowDay
=
new
Date
(
dateTime
).
getDate
();
lastNot
:
[
0
,
10
],
//前置的无房操作
if
(
this
.
userDefaultDate
!=
""
)
{
userDefaultDate
:
""
,
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
};
}
},
this
.
priceStauts
=
this
.
initPrice
();
mounted
()
{
// #ifdef MP-ALIPAY
this
.
userDefaultDate
=
this
.
defaultDate
;
uni
.
setNavigationBarTitle
({
uni
.
getSystemInfo
({
title
:
""
,
success
:
(
res
)
=>
{
});
this
.
dayWidth
=
res
.
windowWidth
;
// #endif
},
},
});
watch
:
{
this
.
setDate
();
defaultDate
(
newVal
)
{
var
dateTime
=
new
Date
();
this
.
userDefaultDate
=
newVal
;
dateTime
=
dateTime
.
setDate
(
dateTime
.
getDate
()
+
1
);
if
(
this
.
userDefaultDate
!=
""
)
{
this
.
nowDay
=
new
Date
(
dateTime
).
getDate
();
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
if
(
this
.
userDefaultDate
!=
""
)
{
}
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
this
.
priceStauts
=
this
.
initPrice
();
}
console
.
log
(
this
.
priceStauts
)
this
.
priceStauts
=
this
.
initPrice
();
},
// #ifdef MP-ALIPAY
//入住日期
uni
.
setNavigationBarTitle
({
start
(
newVal
)
{
title
:
""
,
if
(
this
.
start
.
length
>
0
)
{
});
this
.
startDay
=
// #endif
this
.
setMonth
(
newVal
[
0
])
+
},
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
])
+
"日"
;
watch
:
{
this
.
startWeek
=
this
.
getWeek
(
defaultDate
(
newVal
)
{
this
.
date
[
newVal
[
0
]].
year
+
this
.
userDefaultDate
=
newVal
;
"/"
+
if
(
this
.
userDefaultDate
!=
""
)
{
this
.
date
[
newVal
[
0
]].
month
+
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
"/"
+
}
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
])
this
.
priceStauts
=
this
.
initPrice
();
);
console
.
log
(
this
.
priceStauts
)
}
},
//入住日期
if
(
this
.
priceStauts
.
length
>
0
)
{
start
(
newVal
)
{
console
.
log
(
this
.
lastNot
);
if
(
this
.
start
.
length
>
0
)
{
for
(
var
i
=
newVal
[
0
];
i
<
this
.
priceStauts
.
length
;
i
++
)
{
this
.
startDay
=
if
(
i
==
newVal
[
0
])
{
this
.
setMonth
(
newVal
[
0
])
+
for
(
var
j
=
newVal
[
1
];
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
])
+
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
"日"
;
this
.
lastNot
=
[
i
,
j
];
this
.
startWeek
=
this
.
getWeek
(
console
.
log
(
this
.
lastNot
);
this
.
date
[
newVal
[
0
]].
year
+
return
;
"/"
+
}
this
.
date
[
newVal
[
0
]].
month
+
}
"/"
+
}
else
{
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
])
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
);
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
}
this
.
lastNot
=
[
i
,
j
];
console
.
log
(
this
.
lastNot
);
if
(
this
.
priceStauts
.
length
>
0
)
{
return
;
console
.
log
(
this
.
lastNot
);
}
for
(
var
i
=
newVal
[
0
];
i
<
this
.
priceStauts
.
length
;
i
++
)
{
}
if
(
i
==
newVal
[
0
])
{
}
for
(
var
j
=
newVal
[
1
];
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
}
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
//清空
this
.
lastNot
=
[
i
,
j
];
this
.
lastNot
=
[];
console
.
log
(
this
.
lastNot
);
}
return
;
},
}
},
}
methods
:
{
}
else
{
initPrice
()
{
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
//年份
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
var
year
=
new
Date
().
getFullYear
();
this
.
lastNot
=
[
i
,
j
];
let
data
=
[];
console
.
log
(
this
.
lastNot
);
//月份
return
;
var
month
=
new
Date
().
getMonth
();
}
console
.
log
(
'执行。。。。'
)
}
for
(
let
i
=
0
;
i
<
this
.
count
;
i
++
)
{
}
var
days
=
[];
}
var
week
=
0
;
//清空
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
this
.
lastNot
=
[];
let
isexsit
=
false
;
}
const
m
=
month
+
1
>
9
?
month
+
1
:
"0"
+
(
month
+
1
);
},
const
d
=
j
+
1
>
9
?
j
+
1
:
"0"
+
(
j
+
1
);
},
const
ds
=
`
${
year
}
-
${
m
}
-
${
d
}
`
methods
:
{
const
price
=
this
.
priceList
.
find
(
p
=>
p
.
startDate
==
ds
)
initPrice
()
{
if
(
price
)
{
//年份
isexsit
=
true
var
year
=
new
Date
().
getFullYear
();
if
(
price
.
remainNum
>
0
)
let
data
=
[];
days
.
push
(
this
.
$utils
.
getretailer
()
?
price
.
b2BPrice
:
price
.
b2CPrice
)
//月份
else
if
(
price
.
isSubstitution
==
1
)
var
month
=
new
Date
().
getMonth
();
days
.
push
(
-
2
)
console
.
log
(
'执行。。。。'
)
else
for
(
let
i
=
0
;
i
<
this
.
count
;
i
++
)
{
days
.
push
(
-
1
)
var
days
=
[];
}
else
{
var
week
=
0
;
days
.
push
(
0
);
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
}
let
isexsit
=
false
;
console
.
log
(
this
.
priceList
.
length
,
new
Date
(
year
,
month
+
1
,
0
).
getDate
(),
price
)
const
m
=
month
+
1
>
9
?
month
+
1
:
"0"
+
(
month
+
1
);
// for (var k = 0; k
<
this
.
priceList
.
length
;
k
++
)
{
const
d
=
j
+
1
>
9
?
j
+
1
:
"0"
+
(
j
+
1
);
// const x = this.priceList[k];
const
ds
=
`
${
year
}
-
${
m
}
-
${
d
}
`
// console.log(x)
const
price
=
this
.
priceList
.
find
(
p
=>
p
.
startDate
==
ds
)
// }
if
(
price
){
// this.priceList.forEach((x) => {
isexsit
=
true
// let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
days
.
push
(
price
.
remainNum
>
0
?(
this
.
$utils
.
getretailer
()
?
price
.
b2BPrice
:
price
.
b2CPrice
):
-
1
)
// let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
}
else
{
// //console.log(x.startDate+'-----'+`${year}-${m}-${d}`)
days
.
push
(
0
);
// if (x.startDate == `${year}-${m}-${d}`) {
}
// isexsit = true;
console
.
log
(
this
.
priceList
.
length
,
new
Date
(
year
,
month
+
1
,
0
).
getDate
(),
price
)
// if (x.remainNum > 0) {
// for (var k = 0; k
<
this
.
priceList
.
length
;
k
++
)
{
// days.push(this.$utils.getretailer() ? x.b2BPrice : x.b2CPrice);
// const x = this.priceList[k];
// //days.push(x.b2CPrice);
// console.log(x)
// } else {
// }
// days.push(-1);
// this.priceList.forEach((x) => {
// }
// let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
// }
// let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
// });
// //console.log(x.startDate+'-----'+`${year}-${m}-${d}`)
}
// if (x.startDate == `${year}-${m}-${d}`) {
data
.
push
(
days
);
// isexsit = true;
if
(
month
==
11
)
{
// if (x.remainNum > 0) {
year
+=
1
;
// days.push(this.$utils.getretailer() ? x.b2BPrice : x.b2CPrice);
month
=
0
;
// //days.push(x.b2CPrice);
}
else
{
// } else {
month
++
;
// days.push(-1);
}
// }
}
// }
// });
return
data
;
}
},
data
.
push
(
days
);
//月份补零
if
(
month
==
11
)
{
setMonth
(
dateIndex
)
{
year
+=
1
;
let
month
=
this
.
date
[
dateIndex
].
month
;
month
=
0
;
if
(
month
<
10
)
{
}
else
{
month
=
"0"
+
month
;
month
++
;
}
}
return
month
+
"月"
;
}
},
//如果是节假日名称则返回选择的日期天数
return
data
;
isFestival
(
line
,
index
,
push
=
false
)
{
},
var
date
=
this
.
date
[
line
].
day
[
index
];
//月份补零
setMonth
(
dateIndex
)
{
if
(
isNaN
(
date
))
{
let
month
=
this
.
date
[
dateIndex
].
month
;
var
newIndex
=
this
.
date
[
line
].
day
.
indexOf
(
date
)
+
1
;
if
(
month
<
10
)
{
if
(
push
)
return
newIndex
;
month
=
"0"
+
month
;
return
newIndex
<
10
?
"0"
+
newIndex
:
newIndex
;
}
}
else
{
return
month
+
"月"
;
if
(
push
)
return
date
;
},
return
date
<
10
?
"0"
+
date
:
date
;
//如果是节假日名称则返回选择的日期天数
}
isFestival
(
line
,
index
,
push
=
false
)
{
},
var
date
=
this
.
date
[
line
].
day
[
index
];
//获取今天明天的日期
getDefaultDate
(
AddDayCount
)
{
if
(
isNaN
(
date
))
{
var
dd
=
new
Date
();
var
newIndex
=
this
.
date
[
line
].
day
.
indexOf
(
date
)
+
1
;
dd
.
setDate
(
dd
.
getDate
()
+
AddDayCount
);
//获取AddDayCount天后的日期
if
(
push
)
return
newIndex
;
var
year
=
dd
.
getFullYear
();
return
newIndex
<
10
?
"0"
+
newIndex
:
newIndex
;
var
mon
=
dd
.
getMonth
()
+
1
;
//获取当前月份的日期
}
else
{
var
day
=
dd
.
getDate
();
if
(
push
)
return
date
;
return
year
+
"-"
+
mon
+
"-"
+
day
;
return
date
<
10
?
"0"
+
date
:
date
;
},
}
//设置入住时间 如果没有传值则根据默认值设置
},
setDefaultDate
(
data
)
{
//获取今天明天的日期
var
arr
=
[
0
,
parseInt
(
this
.
nowDay
-
1
)];
getDefaultDate
(
AddDayCount
)
{
var
dd
=
new
Date
();
var
start
=
data
.
indexOf
(
"-"
)
!=
-
1
?
data
.
split
(
"-"
)
:
data
.
split
(
"/"
);
dd
.
setDate
(
dd
.
getDate
()
+
AddDayCount
);
//获取AddDayCount天后的日期
var
year
=
dd
.
getFullYear
();
var
year
=
new
Date
().
getFullYear
();
var
mon
=
dd
.
getMonth
()
+
1
;
//获取当前月份的日期
var
day
=
dd
.
getDate
();
var
month
=
new
Date
().
getMonth
()
+
1
;
return
year
+
"-"
+
mon
+
"-"
+
day
;
},
for
(
var
i
=
0
;
i
<
this
.
date
.
length
;
i
++
)
{
//设置入住时间 如果没有传值则根据默认值设置
if
(
this
.
date
[
i
].
year
==
start
[
0
]
&&
this
.
date
[
i
].
month
==
start
[
1
])
{
setDefaultDate
(
data
)
{
if
(
year
==
start
[
0
]
&&
month
==
start
[
1
]
&&
start
[
2
]
<
this
.
nowDay
)
{
var
arr
=
[
0
,
parseInt
(
this
.
nowDay
-
1
)];
arr
=
[
i
,
parseInt
(
this
.
nowDay
-
1
)];
}
else
{
var
start
=
data
.
indexOf
(
"-"
)
!=
-
1
?
data
.
split
(
"-"
)
:
data
.
split
(
"/"
);
arr
=
[
i
,
parseInt
(
start
[
2
]
-
1
)];
}
var
year
=
new
Date
().
getFullYear
();
break
;
}
var
month
=
new
Date
().
getMonth
()
+
1
;
}
return
arr
;
for
(
var
i
=
0
;
i
<
this
.
date
.
length
;
i
++
)
{
},
if
(
this
.
date
[
i
].
year
==
start
[
0
]
&&
this
.
date
[
i
].
month
==
start
[
1
])
{
//清空
if
(
year
==
start
[
0
]
&&
month
==
start
[
1
]
&&
start
[
2
]
<
this
.
nowDay
)
{
reset
()
{
arr
=
[
i
,
parseInt
(
this
.
nowDay
-
1
)];
this
.
start
=
[];
}
else
{
this
.
end
=
[];
arr
=
[
i
,
parseInt
(
start
[
2
]
-
1
)];
this
.
day
=
0
;
}
},
break
;
//补零操作
}
setPull
(
day
)
{
}
if
(
day
<
10
)
{
return
arr
;
day
=
"0"
+
day
;
},
}
//清空
return
day
;
reset
()
{
},
this
.
start
=
[];
//计算天数
this
.
end
=
[];
getDay
(
date1
,
date2
)
{
this
.
day
=
0
;
//获得天数
},
//date1:开始日期,date2结束日期
//补零操作
var
a1
=
Date
.
parse
(
new
Date
(
date1
));
setPull
(
day
)
{
var
a2
=
Date
.
parse
(
new
Date
(
date2
));
if
(
day
<
10
)
{
var
day
=
parseInt
((
a2
-
a1
)
/
(
1000
*
60
*
60
*
24
));
//核心:时间戳相减,然后除以天数
day
=
"0"
+
day
;
return
day
;
}
},
return
day
;
//计算周几
},
getWeek
(
date
)
{
//计算天数
var
weekDay
=
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
];
getDay
(
date1
,
date2
)
{
var
myDate
=
new
Date
(
Date
.
parse
(
date
));
//获得天数
return
weekDay
[
myDate
.
getDay
()];
//date1:开始日期,date2结束日期
},
var
a1
=
Date
.
parse
(
new
Date
(
date1
));
var
a2
=
Date
.
parse
(
new
Date
(
date2
));
//选择入住离开
var
day
=
parseInt
((
a2
-
a1
)
/
(
1000
*
60
*
60
*
24
));
//核心:时间戳相减,然后除以天数
selectDay
(
line
,
index
)
{
return
day
;
if
(
this
.
priceStauts
[
line
][
index
]
==
0
)
{
},
uni
.
showToast
({
//计算周几
title
:
"抱歉,此日期没有行程哦"
,
getWeek
(
date
)
{
icon
:
"none"
,
var
weekDay
=
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
];
});
var
myDate
=
new
Date
(
Date
.
parse
(
date
));
}
else
if
(
this
.
priceStauts
[
line
][
index
]
==
-
1
)
{
return
weekDay
[
myDate
.
getDay
()];
uni
.
showToast
({
},
title
:
"改团期已售罄"
,
icon
:
"none"
,
//选择入住离开
});
selectDay
(
line
,
index
)
{
}
else
{
if
(
this
.
priceStauts
[
line
][
index
]
==
0
)
{
this
.
start
=
[
line
,
index
];
uni
.
showToast
({
}
title
:
"抱歉,此日期没有行程哦"
,
icon
:
"none"
,
if
(
this
.
immediately
)
{
});
this
.
submit
();
}
else
if
(
this
.
priceStauts
[
line
][
index
]
==
-
1
)
{
}
uni
.
showToast
({
title
:
"改团期已售罄"
,
return
;
icon
:
"none"
,
if
(
line
==
0
&&
index
+
1
<
this
.
nowDay
)
return
;
});
//如果有入住情况和价格则需要进行一些列的判断
}
else
{
if
(
this
.
priceStauts
.
length
>
0
)
{
this
.
start
=
[
line
,
index
];
if
(
}
(
this
.
start
.
length
==
0
&&
this
.
priceStauts
[
line
][
index
]
<
0
)
||
(
this
.
end
.
length
>
0
&&
this
.
priceStauts
[
line
][
index
]
<
0
)
if
(
this
.
immediately
)
{
)
{
this
.
submit
();
return
uni
.
showToast
({
}
title
:
"该日期已被预订"
,
icon
:
"none"
,
return
;
});
if
(
line
==
0
&&
index
+
1
<
this
.
nowDay
)
return
;
}
//如果有入住情况和价格则需要进行一些列的判断
if
(
this
.
priceStauts
.
length
>
0
)
{
if
(
if
(
(
this
.
start
.
length
>
0
&&
line
<
this
.
start
[
0
])
||
(
this
.
start
.
length
==
0
&&
this
.
priceStauts
[
line
][
index
]
<
0
)
||
(
line
==
this
.
start
[
0
]
&&
this
.
start
[
1
]
>
index
)
(
this
.
end
.
length
>
0
&&
this
.
priceStauts
[
line
][
index
]
<
0
)
)
{
)
{
if
(
this
.
priceStauts
[
line
][
index
]
<
0
)
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
"该日期已被预订"
,
title
:
"该日期已被预订"
,
icon
:
"none"
,
icon
:
"none"
,
});
});
}
this
.
start
=
[
line
,
index
];
this
.
end
=
[];
if
(
(
this
.
start
.
length
>
0
&&
line
<
this
.
start
[
0
])
||
return
;
(
line
==
this
.
start
[
0
]
&&
this
.
start
[
1
]
>
index
)
}
)
{
if
(
this
.
priceStauts
[
line
][
index
]
<
0
)
if
(
this
.
start
.
length
>
0
&&
this
.
end
.
length
==
0
)
{
return
uni
.
showToast
({
if
(
this
.
start
[
0
]
-
line
==
0
)
{
title
:
"该日期已被预订"
,
for
(
var
j
=
this
.
start
[
1
];
j
<
index
;
j
++
)
{
icon
:
"none"
,
if
(
this
.
priceStauts
[
line
][
j
]
<
0
)
});
return
uni
.
showToast
({
this
.
start
=
[
line
,
index
];
title
:
"很抱歉,所选入离店时间包含无房日期"
,
this
.
end
=
[];
icon
:
"none"
,
mask
:
true
,
return
;
});
}
}
}
else
{
if
(
this
.
start
.
length
>
0
&&
this
.
end
.
length
==
0
)
{
//如果不在同一个月份有三种情况需要处理
if
(
this
.
start
[
0
]
-
line
==
0
)
{
for
(
var
i
=
this
.
start
[
0
];
i
<=
line
;
i
++
)
{
for
(
var
j
=
this
.
start
[
1
];
j
<
index
;
j
++
)
{
//开始日期到开始日期当月的最大日期是否包含无房情况
if
(
this
.
priceStauts
[
line
][
j
]
<
0
)
if
(
i
==
this
.
start
[
0
])
{
return
uni
.
showToast
({
for
(
title
:
"很抱歉,所选入离店时间包含无房日期"
,
var
j
=
this
.
start
[
1
];
j
<
this
.
priceStauts
[
i
].
length
;
j
++
icon
:
"none"
,
)
{
mask
:
true
,
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
});
return
uni
.
showToast
({
}
title
:
"很抱歉,所选入离店时间包含无房日期"
,
}
else
{
icon
:
"none"
,
//如果不在同一个月份有三种情况需要处理
mask
:
true
,
for
(
var
i
=
this
.
start
[
0
];
i
<=
line
;
i
++
)
{
});
//开始日期到开始日期当月的最大日期是否包含无房情况
}
if
(
i
==
this
.
start
[
0
])
{
}
else
if
(
i
==
line
)
{
for
(
//结束日期到当月结束日期之前是否包含无房情况
var
j
=
this
.
start
[
1
];
for
(
var
j
=
0
;
j
<
index
;
j
++
)
{
j
<
this
.
priceStauts
[
i
].
length
;
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
j
++
return
uni
.
showToast
({
)
{
title
:
"很抱歉,所选入离店时间包含无房日期"
,
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
icon
:
"none"
,
return
uni
.
showToast
({
mask
:
true
,
title
:
"很抱歉,所选入离店时间包含无房日期"
,
});
icon
:
"none"
,
}
mask
:
true
,
}
else
{
});
//中间间隔的月份需要检查每一天是否包含无房情况
}
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
}
else
if
(
i
==
line
)
{
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
//结束日期到当月结束日期之前是否包含无房情况
return
uni
.
showToast
({
for
(
var
j
=
0
;
j
<
index
;
j
++
)
{
title
:
"很抱歉,所选入离店时间包含无房日期"
,
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
icon
:
"none"
,
return
uni
.
showToast
({
mask
:
true
,
title
:
"很抱歉,所选入离店时间包含无房日期"
,
});
icon
:
"none"
,
}
mask
:
true
,
}
});
}
}
}
}
else
{
}
//中间间隔的月份需要检查每一天是否包含无房情况
}
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
//如果没有入住时间
return
uni
.
showToast
({
if
(
this
.
start
.
length
==
0
)
{
title
:
"很抱歉,所选入离店时间包含无房日期"
,
//填充入住时间
icon
:
"none"
,
this
.
start
=
[
line
,
index
];
mask
:
true
,
}
else
if
(
});
this
.
start
.
length
>
0
&&
}
this
.
start
[
0
]
==
line
&&
}
this
.
start
[
1
]
==
index
&&
}
this
.
end
.
length
==
0
}
)
{
}
return
;
}
}
else
{
//如果没有离开时间
//如果没有入住时间
if
(
this
.
end
.
length
==
0
)
{
if
(
this
.
start
.
length
==
0
)
{
//如果有价格和入住离开情况则需要进行判断所选的离店时间时候包含无房日期
//填充入住时间
this
.
start
=
[
line
,
index
];
if
(
}
else
if
(
line
<
this
.
start
[
0
]
||
this
.
start
.
length
>
0
&&
(
line
==
this
.
start
[
0
]
&&
index
<
this
.
start
[
1
])
this
.
start
[
0
]
==
line
&&
)
{
this
.
start
[
1
]
==
index
&&
this
.
end
=
this
.
start
;
this
.
end
.
length
==
0
this
.
start
=
[
line
,
index
];
)
{
}
else
{
return
;
//如果离开时间比入住时间晚则填充
}
else
{
this
.
end
=
[
line
,
index
];
//如果没有离开时间
}
if
(
this
.
end
.
length
==
0
)
{
}
else
{
//如果有价格和入住离开情况则需要进行判断所选的离店时间时候包含无房日期
//如果有离开时间则清空离开时间重新填充入住时间
this
.
start
=
[
line
,
index
];
if
(
this
.
end
=
[];
line
<
this
.
start
[
0
]
||
}
(
line
==
this
.
start
[
0
]
&&
index
<
this
.
start
[
1
])
}
)
{
},
this
.
end
=
this
.
start
;
//设置日历
this
.
start
=
[
line
,
index
];
setDate
()
{
}
else
{
//年份
//如果离开时间比入住时间晚则填充
var
year
=
new
Date
().
getFullYear
();
this
.
end
=
[
line
,
index
];
}
//月份
}
else
{
var
month
=
new
Date
().
getMonth
();
//如果有离开时间则清空离开时间重新填充入住时间
console
.
log
(
"执行了..."
);
this
.
start
=
[
line
,
index
];
for
(
let
i
=
0
;
i
<
this
.
count
;
i
++
)
{
this
.
end
=
[];
var
day
=
[];
}
var
week
=
0
;
}
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
},
day
.
push
(
j
+
1
);
//设置日历
}
setDate
()
{
//年份
this
.
date
.
push
({
var
year
=
new
Date
().
getFullYear
();
year
:
year
,
month
:
month
+
1
,
//月份
day
:
day
,
var
month
=
new
Date
().
getMonth
();
oneDayWeek
:
new
Date
(
console
.
log
(
"执行了..."
);
Date
.
parse
(
year
+
"/"
+
(
month
+
1
)
+
"/"
+
"01"
)
for
(
let
i
=
0
;
i
<
this
.
count
;
i
++
)
{
).
getDay
(),
var
day
=
[];
});
var
week
=
0
;
if
(
month
==
11
)
{
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
year
+=
1
;
day
.
push
(
j
+
1
);
month
=
0
;
}
}
else
{
month
++
;
this
.
date
.
push
({
}
year
:
year
,
}
month
:
month
+
1
,
day
:
day
,
return
this
.
date
;
oneDayWeek
:
new
Date
(
},
Date
.
parse
(
year
+
"/"
+
(
month
+
1
)
+
"/"
+
"01"
)
//关闭
).
getDay
(),
close
()
{
});
uni
.
navigateBack
({
if
(
month
==
11
)
{
delta
:
1
,
year
+=
1
;
});
month
=
0
;
},
}
else
{
//确定入住离店事件提交
month
++
;
submit
()
{
}
let
m
=
this
.
date
[
this
.
start
[
0
]].
month
;
}
m
=
m
>
9
?
m
:
"0"
+
m
;
let
d
=
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
);
return
this
.
date
;
d
=
d
>
9
?
d
:
"0"
+
d
;
},
var
obj
=
{
//关闭
/* startYMD: this.date[this.start[0]].year + this.type + this.date[this.start[0]].month + this.type + this.isFestival(
close
()
{
this.start[0], this.start[1]),
uni
.
navigateBack
({
startMD: this.date[this.start[0]].month + this.type + this.isFestival(this.start[0], this.start[1]),
delta
:
1
,
startDay: this.startDay,
});
startWeek: this.startWeek,
},
endYMD: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this.isFestival(this
//确定入住离店事件提交
.end[0], this.end[1]),
submit
()
{
emdMD: this.date[this.end[0]].month + this.type + this.type + this.isFestival(this.end[0], this.end[1]),
let
m
=
this
.
date
[
this
.
start
[
0
]].
month
;
endDay: this.endDay,
m
=
m
>
9
?
m
:
"0"
+
m
;
endWeek: this.endWeek,
let
d
=
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
);
day: this.day */
d
=
d
>
9
?
d
:
"0"
+
d
;
startWeek
:
this
.
startWeek
,
var
obj
=
{
start
:
this
.
date
[
this
.
start
[
0
]].
year
+
this
.
type
+
m
+
this
.
type
+
d
,
/* startYMD: this.date[this.start[0]].year + this.type + this.date[this.start[0]].month + this.type + this.isFestival(
startDay
:
m
+
"-"
+
d
,
this.start[0], this.start[1]),
};
startMD: this.date[this.start[0]].month + this.type + this.isFestival(this.start[0], this.start[1]),
let
tempPrice
=
{};
startDay: this.startDay,
this
.
priceList
.
forEach
((
x
,
i
)
=>
{
startWeek: this.startWeek,
console
.
log
(
x
.
startDate
,
obj
.
start
);
endYMD: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this.isFestival(this
if
(
obj
.
start
==
x
.
startDate
)
{
.end[0], this.end[1]),
obj
.
priceObj
=
i
;
emdMD: this.date[this.end[0]].month + this.type + this.type + this.isFestival(this.end[0], this.end[1]),
}
endDay: this.endDay,
});
endWeek: this.endWeek,
day: this.day */
this
.
$emit
(
"finish"
,
obj
);
startWeek
:
this
.
startWeek
,
},
start
:
this
.
date
[
this
.
start
[
0
]].
year
+
this
.
type
+
m
+
this
.
type
+
d
,
},
startDay
:
m
+
"-"
+
d
,
};
};
</
script
>
let
tempPrice
=
{};
this
.
priceList
.
forEach
((
x
,
i
)
=>
{
<
style
>
console
.
log
(
x
.
startDate
,
obj
.
start
);
/**确认按钮**/
if
(
obj
.
start
==
x
.
startDate
)
{
.submit
{
obj
.
priceObj
=
i
;
width
:
100%
;
}
});
background
:
white
;
position
:
fixed
;
this
.
$emit
(
"finish"
,
obj
);
bottom
:
0
upx
;
},
},
height
:
auto
;
};
}
</
script
>
.sub-btn
{
<
style
>
height
:
auto
;
/**确认按钮**/
border-radius
:
10
upx
;
.submit
{
background
:
#111
;
width
:
100%
;
color
:
white
;
}
background
:
white
;
position
:
fixed
;
.content
{
bottom
:
0
upx
;
height
:
100%
;
z-index
:
999
;
height
:
auto
;
}
}
/**不能预订**/
.sub-btn
{
height
:
auto
;
/* 入住离开时间的color */
border-radius
:
10
upx
;
.bg-orange
{
background
:
#111
;
background
:
#111111
!important
;
color
:
white
;
border-radius
:
6px
!important
;
}
}
.content
{
.bg-higlt-orange
{
height
:
100%
;
background-color
:
#fff
;
z-index
:
999
;
}
}
/* 节假日的日期样式 */
/**不能预订**/
.is-festival
{
font-size
:
22
rpx
!important
;
/* 入住离开时间的color */
color
:
#000
!important
;
.bg-orange
{
}
background
:
#111111
!important
;
border-radius
:
6px
!important
;
/** 非节假日的日期样式**/
}
.not-festival
{
font-size
:
18
upx
;
.bg-higlt-orange
{
color
:
white
;
background-color
:
#fff
;
}
}
/***入住离开时间的日历样式*/
/* 节假日的日期样式 */
.is-festival
{
.not-sub
{
font-size
:
22
rpx
!important
;
color
:
#222222
;
color
:
#000
!important
;
background
:
#dddddd
;
}
}
/** 非节假日的日期样式**/
.select-out-item
{
.not-festival
{
background
:
#ffffff
;
font-size
:
18
upx
;
}
color
:
white
;
}
.select-style
{
color
:
white
!important
;
/***入住离开时间的日历样式*/
font-size
:
20
rpx
!important
;
/* font-size: 20upx; */
.not-sub
{
/* padding-top: 4upx; */
color
:
#222222
;
}
background
:
#dddddd
;
}
.time-out
{
/* text-decoration: line-through; */
.select-out-item
{
color
:
#ccc
!important
;
background
:
#ffffff
;
}
}
/**
.select-style
{
* 点击日期的样式
color
:
white
!important
;
*/
font-size
:
20
rpx
!important
;
.bg
{
/* font-size: 20upx; */
background
:
orange
;
/* padding-top: 4upx; */
}
}
/**
.time-out
{
* 日期部分
/* text-decoration: line-through; */
*/
color
:
#ccc
!important
;
.section
{
}
width
:
100%
;
padding-bottom
:
150
upx
;
/**
height
:
auto
;
* 点击日期的样式
padding-top
:
176
rpx
;
*/
background-color
:
#f1f4f6
;
.bg
{
}
background
:
orange
;
}
.section
>
.item
>
.year
{
text-align
:
center
;
/**
height
:
50
rpx
;
* 日期部分
font-weight
:
bold
;
*/
/* padding-left:30upx;
.section
{
padding-right: 30upx; */
width
:
100%
;
font-size
:
24
rpx
;
padding-bottom
:
150
upx
;
line-height
:
50
rpx
;
height
:
auto
;
color
:
#1b1d1e
;
padding-top
:
176
rpx
;
}
background-color
:
#f1f4f6
;
}
.section
>
.item
>
.day
{
display
:
flex
;
.section
>
.item
>
.year
{
flex-wrap
:
wrap
;
text-align
:
center
;
text-align
:
center
;
height
:
50
rpx
;
margin-left
:
5px
;
font-weight
:
bold
;
margin-right
:
5px
;
/* padding-left:30upx;
}
padding-right: 30upx; */
font-size
:
24
rpx
;
.section
>
.item
>
.day
>
.day-list
{
line-height
:
50
rpx
;
margin-top
:
30
upx
;
color
:
#1b1d1e
;
margin-bottom
:
30
upx
;
}
min-height
:
100
upx
;
max-height
:
180
upx
;
.section
>
.item
>
.day
{
display
:
flex
;
display
:
flex
;
font-size
:
26
rpx
;
flex-wrap
:
wrap
;
flex-direction
:
column
;
text-align
:
center
;
align-items
:
center
;
margin-left
:
5px
;
justify-content
:
center
;
margin-right
:
5px
;
color
:
#1b1d1e
;
}
}
.section
>
.item
>
.day
>
.day-list
{
/**
margin-top
:
30
upx
;
* 头部固定
margin-bottom
:
30
upx
;
*/
min-height
:
100
upx
;
.header
{
max-height
:
180
upx
;
position
:
fixed
;
display
:
flex
;
top
:
0
;
font-size
:
26
rpx
;
width
:
100%
;
flex-direction
:
column
;
/* height: 400upx; */
align-items
:
center
;
background
:
white
;
justify-content
:
center
;
box-shadow
:
0px
10
rpx
30
rpx
0px
rgba
(
36
,
36
,
36
,
0.06
);
color
:
#1b1d1e
;
}
}
.bar
{
/**
width
:
100%
;
* 头部固定
height
:
var
(
--status-bar-height
);
*/
background
:
#222222
;
.header
{
}
position
:
fixed
;
top
:
0
;
/**
width
:
100%
;
* 关闭清空
/* height: 400upx; */
*/
background
:
white
;
.set
{
box-shadow
:
0px
10
rpx
30
rpx
0px
rgba
(
36
,
36
,
36
,
0.06
);
height
:
100
upx
;
}
padding-left
:
30
upx
;
padding-right
:
30
upx
;
.bar
{
width
:
100%
;
align-items
:
center
;
height
:
var
(
--status-bar-height
);
display
:
flex
;
background
:
#222222
;
justify-content
:
space-between
;
}
}
/**
/**
* 关闭清空
* 入住离开时间
*/
*/
.set
{
.in-and-out
{
height
:
100
upx
;
height
:
210
upx
;
padding-left
:
30
upx
;
padding-left
:
30
upx
;
padding-right
:
30
upx
;
padding-right
:
30
upx
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
/**
/**
* 入住离开的view
* 入住离开时间
*/
*/
.in-and-out
>
.item
{
.in-and-out
{
display
:
flex
;
height
:
210
upx
;
flex-direction
:
column
;
padding-left
:
30
upx
;
height
:
100
upx
;
padding-right
:
30
upx
;
}
display
:
flex
;
align-items
:
center
;
/**
justify-content
:
space-between
;
* 未选择入离时间时的文字样式
}
*/
.in-and-out
>
.text
{
/**
margin-top
:
100
upx
;
* 入住离开的view
font-weight
:
bold
;
*/
font-size
:
36
upx
;
.in-and-out
>
.item
{
color
:
#c0c0c0
;
display
:
flex
;
}
flex-direction
:
column
;
height
:
100
upx
;
/**
}
* 一共选择了多少晚的样式
*/
/**
.in-and-out
>
.item
>
.count-border
{
* 未选择入离时间时的文字样式
width
:
200
upx
;
*/
font-size
:
28
upx
;
.in-and-out
>
.text
{
height
:
40
upx
;
margin-top
:
100
upx
;
margin-top
:
48
upx
;
font-weight
:
bold
;
text-align
:
center
;
font-size
:
36
upx
;
}
color
:
#c0c0c0
;
}
.gray
{
color
:
#c0c0c0
;
/**
border-bottom
:
1px
solid
#c0c0c0
;
* 一共选择了多少晚的样式
}
*/
.in-and-out
>
.item
>
.count-border
{
.orange
{
width
:
200
upx
;
color
:
orange
;
font-size
:
28
upx
;
border-bottom
:
1px
solid
orange
;
height
:
40
upx
;
}
margin-top
:
48
upx
;
text-align
:
center
;
/**
}
* 共多少晚
*/
.gray
{
.in-and-out
>
.item
>
.count-border
>
.count
{
color
:
#c0c0c0
;
font-size
:
10px
;
border-bottom
:
1px
solid
#c0c0c0
;
}
}
/**
.orange
{
* 周一到周日
color
:
orange
;
*/
border-bottom
:
1px
solid
orange
;
.week
{
}
/* height: 70upx; */
display
:
flex
;
/**
justify-content
:
space-between
;
* 共多少晚
align-items
:
center
;
*/
padding-left
:
25px
;
.in-and-out
>
.item
>
.count-border
>
.count
{
padding-right
:
25px
;
font-size
:
10px
;
font-size
:
24
rpx
;
}
color
:
#1b1d1e
;
background
:
white
;
/**
margin-bottom
:
16
rpx
;
* 周一到周日
}
*/
.week
{
.isa
{
/* height: 70upx; */
color
:
red
;
display
:
flex
;
}
justify-content
:
space-between
;
align-items
:
center
;
.isa2
{
padding-left
:
25px
;
color
:
red
;
padding-right
:
25px
;
}
font-size
:
24
rpx
;
</
style
>
color
:
#1b1d1e
;
\ No newline at end of file
background
:
white
;
margin-bottom
:
16
rpx
;
}
.isa
{
color
:
red
;
}
.isa2
{
color
:
red
;
}
</
style
>
pages/jiuzhai/jz_Line.vue
View file @
24124116
...
@@ -549,6 +549,7 @@
...
@@ -549,6 +549,7 @@
PlaceIds
:
''
,
PlaceIds
:
''
,
lineId
:
0
,
lineId
:
0
,
teamType
:
""
,
//团队类型 1-小包团
teamType
:
""
,
//团队类型 1-小包团
pName
:
""
},
},
time
:
''
,
time
:
''
,
currentLineId
:
null
,
currentLineId
:
null
,
...
@@ -663,6 +664,9 @@
...
@@ -663,6 +664,9 @@
if
(
option
&&
option
.
teamType
)
{
if
(
option
&&
option
.
teamType
)
{
this
.
msg
.
teamType
=
option
.
teamType
;
this
.
msg
.
teamType
=
option
.
teamType
;
}
}
if
(
option
&&
option
.
pName
){
this
.
msg
.
pName
=
option
.
pName
}
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
24124116
...
@@ -76,9 +76,9 @@
...
@@ -76,9 +76,9 @@
<u-icon
name=
"arrow"
size=
"30"
color=
"#cecece"
style=
"margin-left: 5px;"
></u-icon>
<u-icon
name=
"arrow"
size=
"30"
color=
"#cecece"
style=
"margin-left: 5px;"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"jz_LineDetaYJDKQ"
v-if=
"stepNumber>0"
>
<view
class=
"jz_LineDetaYJDKQ"
v-if=
"stepNumber>0
&& dataList.currentPriceInfo.teamType==0
"
>
<view
class=
"jz_LineDetaFL"
>
<view
class=
"jz_LineDetaFL"
>
<view
v-if=
"
dataList.currentPriceInfo.teamType==0
"
class=
"row items-center jz_LineDetaCZ"
<view
v-if=
""
class=
"row items-center jz_LineDetaCZ"
style=
"border-radius: 4px;overflow: hidden;font-size: 12px;margin-right: 15rpx;"
>
style=
"border-radius: 4px;overflow: hidden;font-size: 12px;margin-right: 15rpx;"
>
<view
class=
"jz_LineDetaCZL"
>
<view
class=
"jz_LineDetaCZL"
>
<view
style=
"opacity: 0;"
>
1
</view>
<view
style=
"opacity: 0;"
>
1
</view>
...
@@ -88,9 +88,9 @@
...
@@ -88,9 +88,9 @@
<
template
v-else
>
30
</
template
>
元/人
<
template
v-else
>
30
</
template
>
元/人
</view>
</view>
</view>
</view>
<view
class=
"jz_LineDetaFLJf"
>
<
!-- <
view class="jz_LineDetaFLJf" >
278.25
积分
预计:{{}}
积分
</view>
</view>
-->
</view>
</view>
<view
class=
"jz_LineDetaRDKQ"
>
<view
class=
"jz_LineDetaRDKQ"
>
<view>
共{{Discounts}}项福利
</view>
<view>
共{{Discounts}}项福利
</view>
...
@@ -254,9 +254,12 @@
...
@@ -254,9 +254,12 @@
<text>
余
</text>
<text>
余
</text>
<text
style=
"font-size: 28rpx; font-weight: 600"
>
{{
item
.
remainNum
}}
</text>
<text
style=
"font-size: 28rpx; font-weight: 600"
>
{{
item
.
remainNum
}}
</text>
</view>
</view>
<view
v-if=
"item.remainNum > 0"
style=
"color: #ff3166; font-size: 26rpx"
>
<view
class=
"jz_StartHoubu"
v-else-if=
"item.isSubstitution==1"
>
<text
style=
"font-size: 28rpx; font-weight: 600"
>
可候补
</text>
</view>
<view
v-if=
"item.remainNum > 0 || item.isSubstitution==1"
style=
"color: #ff3166; font-size: 26rpx"
>
¥
{{
$utils
.
getretailer
()?
item
.
b2BPrice
:
item
.
b2CPrice
}}
</view>
¥
{{
$utils
.
getretailer
()?
item
.
b2BPrice
:
item
.
b2CPrice
}}
</view>
<view
v-if=
"item.remainNum
<
=
0
"
style=
"padding: 20rpx 0"
>
<view
v-if=
"item.remainNum
<
=
0
&&
item
.
isSubstitution
!=
1
"
style=
"padding: 20rpx 0"
>
<text
style=
"font-size: 32rpx; font-weight: 600"
>
已售罄
</text>
<text
style=
"font-size: 32rpx; font-weight: 600"
>
已售罄
</text>
</view>
</view>
</view>
</view>
...
@@ -270,6 +273,9 @@
...
@@ -270,6 +273,9 @@
<text>
余
</text>
<text>
余
</text>
<text
style=
"font-size: 28rpx; font-weight: 600"
>
{{ customerDate.remainNum }}
</text>
<text
style=
"font-size: 28rpx; font-weight: 600"
>
{{ customerDate.remainNum }}
</text>
</view>
</view>
<view
class=
"jz_StartHoubu"
v-else-if=
"customerDate.isSubstitution==1"
>
<text
style=
"font-size: 28rpx; font-weight: 600"
>
可候补
</text>
</view>
<view
style=
"color: #ff3166; font-size: 26rpx"
v-if=
"customerDate.b2BPrice"
>
<view
style=
"color: #ff3166; font-size: 26rpx"
v-if=
"customerDate.b2BPrice"
>
¥{{ $utils.getretailer()?currentPrice.b2BPrice:currentPrice.b2CPrice }}
</view>
¥{{ $utils.getretailer()?currentPrice.b2BPrice:currentPrice.b2CPrice }}
</view>
<view
v-if=
"!customerDate.startDate"
style=
"height: 100%;width: 100%; display: flex; align-items: center;justify-content: center;"
>
<view
v-if=
"!customerDate.startDate"
style=
"height: 100%;width: 100%; display: flex; align-items: center;justify-content: center;"
>
...
@@ -996,7 +1002,7 @@
...
@@ -996,7 +1002,7 @@
margin-left: 30rpx;
margin-left: 30rpx;
flex: 1;
flex: 1;
"
>
18
周岁以上
<
/text
>
"
>
18
周岁以上
<
/text
>
<
u
-
number
-
box
size
=
"28"
:
min
=
"1"
:
max
=
"currentPrice.
remainNum - etCount - etbCount
"
@
change
=
"crChange"
v
-
model
=
"crCount"
><
/u-number-box
>
<
u
-
number
-
box
size
=
"28"
:
min
=
"1"
:
max
=
"currentPrice.
isSubstitution==1?1000:(currentPrice.remainNum - etCount - etbCount)
"
@
change
=
"crChange"
v
-
model
=
"crCount"
><
/u-number-box
>
<
/view
>
<
/view
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童
(
占床
)
<
/text
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童
(
占床
)
<
/text
>
...
@@ -1006,7 +1012,7 @@
...
@@ -1006,7 +1012,7 @@
margin-left: 30rpx;
margin-left: 30rpx;
flex: 1;
flex: 1;
"
>
2
-
18
周岁
(
不含
)
<
/text
>
"
>
2
-
18
周岁
(
不含
)
<
/text
>
<
u
-
number
-
box
size
=
"28"
:
min
=
"0"
:
max
=
"currentPrice.
remainNum - crCount - etbCount
"
@
change
=
"etChange"
v
-
model
=
"etCount"
><
/u-number-box
>
<
u
-
number
-
box
size
=
"28"
:
min
=
"0"
:
max
=
"currentPrice.
isSubstitution==1?1000:(currentPrice.remainNum - crCount - etbCount)
"
@
change
=
"etChange"
v
-
model
=
"etCount"
><
/u-number-box
>
<
/view
>
<
/view
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童
(
不占床
)
<
/text
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童
(
不占床
)
<
/text
>
...
@@ -1016,7 +1022,7 @@
...
@@ -1016,7 +1022,7 @@
margin-left: 30rpx;
margin-left: 30rpx;
flex: 1;
flex: 1;
"
>
2
-
18
周岁
(
不含
)
<
/text
>
"
>
2
-
18
周岁
(
不含
)
<
/text
>
<
u
-
number
-
box
size
=
"28"
:
min
=
"0"
:
max
=
"currentPrice.
remainNum - crCount - etCount
"
@
change
=
"etbChange"
v
-
model
=
"etbCount"
><
/u-number-box
>
<
u
-
number
-
box
size
=
"28"
:
min
=
"0"
:
max
=
"currentPrice.
isSubstitution==1?1000:(currentPrice.remainNum - crCount - etCount)
"
@
change
=
"etbChange"
v
-
model
=
"etbCount"
><
/u-number-box
>
<
/view
>
<
/view
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
婴儿
<
/text
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
婴儿
<
/text
>
...
@@ -1053,7 +1059,10 @@
...
@@ -1053,7 +1059,10 @@
<
text
style
=
"font-size: 24rpx; color: #111; font-weight: 500"
>
{{
currentPrice
.
startDate
}}
<
text
style
=
"font-size: 24rpx; color: #111; font-weight: 500"
>
{{
currentPrice
.
startDate
}}
出发
余位:
{{
出发
余位:
{{
currentPrice
.
remainNum
currentPrice
.
remainNum
}}
<
/text
>
}}
<
/text>
<
text
style
=
"font-size: 24rpx;font-weight: 500; margin-left: 10rpx;"
:
style
=
"{color: currentPrice.isSubstitution==1?'#111':'#FF3166'
}
"
>
{{
currentPrice
.
isSubstitution
==
1
?
'本单可以候补'
:
'本单不能候补'
}}
<
/text
>
<
/view
>
<
/view
>
<
view
style
=
"display: flex; align-items: center"
>
<
view
style
=
"display: flex; align-items: center"
>
<!--
#
ifdef
MP
-
WEIXIN
-->
<!--
#
ifdef
MP
-
WEIXIN
-->
...
@@ -1101,7 +1110,8 @@
...
@@ -1101,7 +1110,8 @@
<
view
style
=
"color: #111111; font-size: 22rpx"
>
客服
<
/view
>
<
view
style
=
"color: #111111; font-size: 22rpx"
>
客服
<
/view
>
<
/button
>
<
/button
>
<!--
#
endif
-->
<!--
#
endif
-->
<
view
class
=
"jz_OrderNow disable"
v
-
if
=
"currentPrice.remainNum <= 0"
>
已售罄
<
/view
>
<
view
class
=
"jz_OrderNow disable"
v
-
if
=
"currentPrice.remainNum <= 0 && currentPrice.isSubstitution==0"
>
已售罄
<
/view
>
<
view
class
=
"jz_OrderNow"
@
click
=
"openOrderPreview"
v
-
else
-
if
=
"currentPrice.remainNum <= 0 && currentPrice.isSubstitution==1"
>
可候补
<
/view
>
<
view
class
=
"jz_OrderNow"
@
click
=
"openOrderPreview"
v
-
else
>
立即预定
<
/view
>
<
view
class
=
"jz_OrderNow"
@
click
=
"openOrderPreview"
v
-
else
>
立即预定
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
...
@@ -1714,7 +1724,7 @@
...
@@ -1714,7 +1724,7 @@
}
);
}
);
}
);
}
);
this.currentPrice = this.dataList.currentPriceInfo;
this.currentPrice = this.dataList.currentPriceInfo;
if (this.currentPrice.remainNum == 0) {
if (this.currentPrice.remainNum == 0
&& this.currentPrice.isSubstitution!=1
) {
let temp = this.dataList.priceList.find((x) => x.remainNum > 0);
let temp = this.dataList.priceList.find((x) => x.remainNum > 0);
if (temp) {
if (temp) {
this.getDayInfo(temp);
this.getDayInfo(temp);
...
@@ -1862,7 +1872,7 @@
...
@@ -1862,7 +1872,7 @@
}
,
}
,
//点击切换
//点击切换
getDayInfo(item) {
getDayInfo(item) {
if (item.remainNum > 0) {
if (item.remainNum > 0
|| item.isSubstitution==1
) {
if (
if (
this.crCount + this.etCount + this.etbCount >=
this.crCount + this.etCount + this.etbCount >=
this.currentPrice.remainNum
this.currentPrice.remainNum
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
24124116
...
@@ -422,7 +422,7 @@
...
@@ -422,7 +422,7 @@
</view>
</view>
</view>
</view>
<view
class=
"empty-block"
></view>
<view
class=
"empty-block"
></view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"useCouponId"
@
close=
"closeCouponHandler"
></coupon>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"useCouponId"
@
close=
"closeCouponHandler"
:current-price=
"realCurrentPriceInfo"
:order=
"orderMsg"
></coupon>
<view
style=
"padding: 50rpx 40rpx"
v-if=
"tips != ''"
>
<view
style=
"padding: 50rpx 40rpx"
v-if=
"tips != ''"
>
<view
class=
"big-title"
>
<view
class=
"big-title"
>
<text>
重要提示
</text>
<text>
重要提示
</text>
...
...
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