Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
e36a52c1
Commit
e36a52c1
authored
Dec 19, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合下单bug处理
parent
6a4aa882
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+7
-7
No files found.
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
e36a52c1
...
...
@@ -129,7 +129,7 @@
<view
class=
"list-Number"
>
<view
class=
"title-text"
>
购买数量
</view>
<view>
<u-number-box
:max=
"item.
maxBook
Num"
v-model=
"item.buyNum"
@
change=
'buyNumChange'
:name=
'index'
>
<u-number-box
:max=
"item.
realMax
Num"
v-model=
"item.buyNum"
@
change=
'buyNumChange'
:name=
'index'
>
<view
slot=
"minus"
class=
"number-minus"
>
<u-icon
name=
"minus"
color=
"#FFFFFF"
size=
"32"
></u-icon>
</view>
...
...
@@ -743,11 +743,11 @@ export default {
dateChoose
(
item
,
item2
,
index
)
{
item
.
dateActive
=
index
//修改选中样式
this
.
maxBookNum
=
999
//默认可以去支付
item
.
maxBookNum
=
Math
.
min
(
item2
.
maxBookNum
,
item2
.
surplus
)
//剩余量变化
item
.
realMaxNum
=
Math
.
min
(
item
.
maxBookNum
,
item2
.
surplus
)
//获取实际最大购买数量
for
(
let
i
=
0
;
i
<
this
.
productList
.
length
;
i
++
){
let
item
=
this
.
productList
[
i
]
//任何一个产品无库存时,无法进行支付
if
(
parseFloat
(
item
.
maxBook
Num
)
<
1
){
if
(
parseFloat
(
item
.
realMax
Num
)
<
1
){
this
.
maxBookNum
=
0
return
}
...
...
@@ -805,7 +805,7 @@ export default {
if
(
item2
.
copyLast
!=
'售罄'
){
item
.
timeActive
=
index2
item
.
cruisePlanId
=
item2
.
cruisePlanId
//获取班次Id
item
.
maxBookNum
=
Math
.
min
(
item
.
maxBook
Num
,
item2
.
last
)
item
.
realMaxNum
=
Math
.
min
(
item
.
realMax
Num
,
item2
.
last
)
//如果为场次票,开始时间为班次时间的开始时间,结束时间为班次时间的结束时间,班次时间的结束时间为空时,结束时间为班次时间的开始时间
item
.
startPlayTime
=
item2
.
startPlanTime
item
.
endPlayTime
=
item2
.
endPlanTime
||
item2
.
startPlanTime
...
...
@@ -874,9 +874,9 @@ export default {
//由于buyNum页面数据未及时更新,在这里进行赋值一遍
item
.
buyNum
=
value
//超过最大值时进行文字提示
if
(
value
>=
item
.
maxBook
Num
)
{
if
(
value
>=
item
.
realMax
Num
)
{
uni
.
showToast
({
title
:
'最大可预订数量为'
+
item
.
maxBook
Num
,
title
:
'最大可预订数量为'
+
item
.
realMax
Num
,
icon
:
'none'
})
}
...
...
@@ -1031,7 +1031,7 @@ export default {
return
}
//最大购买数量大于1,才可以下单
if
(
parseFloat
(
item
.
maxBook
Num
)
<
1
){
if
(
parseFloat
(
item
.
realMax
Num
)
<
1
){
uni
.
showToast
({
title
:
item
.
merchantName
+
'没有库存'
,
icon
:
'none'
...
...
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