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
de038472
Commit
de038472
authored
Dec 11, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合填写订单页面开发
parent
1da98847
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
314 additions
and
393 deletions
+314
-393
albumOrderdetail.vue
pages/album/albumOrderdetail/albumOrderdetail.vue
+1
-2
combinationProduct.vue
pages/scenic/combinationProduct/combinationProduct.vue
+1
-1
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+310
-388
scenicOrder.vue
pages/scenic/scenicOrder/scenicOrder.vue
+2
-2
No files found.
pages/album/albumOrderdetail/albumOrderdetail.vue
View file @
de038472
...
...
@@ -213,8 +213,7 @@ export default {
getDetail
(){
let
data
=
{
orderId
:
this
.
orderId
,
//订单ID
// userId:uni.getStorageSync('openid')||'',//用户Id
userId
:
'oroHZ5FaUQ_SOOC_uQQP92fJpBRE'
,
//用户Id
userId
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
//用户Id
}
this
.
$request
(
'order/userOrder/findOrderDetail'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
...
...
pages/scenic/combinationProduct/combinationProduct.vue
View file @
de038472
...
...
@@ -585,7 +585,7 @@ export default {
})
let
query
=
'?productIdList='
+
JSON
.
stringify
(
productIdList
)
+
'&groupId='
+
this
.
groupId
+
'&groupChannelId='
+
this
.
groupChannelId
+
'&orderSource=3'
uni
.
navigateTo
({
url
:
'/pages/
combination/combiOrder/c
ombiOrder'
+
query
url
:
'/pages/
scenic/scenicCombiOrder/scenicC
ombiOrder'
+
query
})
}
},
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
de038472
...
...
@@ -123,7 +123,7 @@
<view
class=
"list-Number"
>
<view
class=
"title-text"
>
购买数量
</view>
<view>
<u-number-box
v-model=
"item.buyNum"
@
change=
'buyNumChange'
>
<u-number-box
:max=
"item.maxBookNum"
v-model=
"item.buyNum"
@
change=
'buyNumChange'
>
<view
slot=
"minus"
class=
"number-minus"
>
<u-icon
name=
"minus"
color=
"#FFFFFF"
size=
"32"
></u-icon>
</view>
...
...
@@ -449,209 +449,6 @@ export default {
}
},
methods
:
{
//---获取排号信息---暂时未使用
getSortInfor
(
merchantCode
)
{
let
data
=
{
areaCode
:
this
.
areaObj
.
areaCode
,
merchantCode
//商户code
}
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
this
.
$request
(
'distribution/distribution/findNewFetchInfoFromSceinc'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
sortInforPop
=
true
res
.
data
.
forEach
(
item
=>
{
item
.
peopleNumber
=
Math
.
max
(
item
.
sortTotalCapacity
-
item
.
showEnd
,
0
)
})
let
index
=
res
.
data
.
findIndex
(
item
=>
{
return
item
.
projectId
==
this
.
areaObj
.
areaCode
})
this
.
sortIfo
=
res
.
data
[
index
]
}
})
},
//---获取子组件的传值---已修改
areaSure
(
data
)
{
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
},
//---展示选择站点---已修改
openArea
(
index
)
{
this
.
areaIndex
=
index
this
.
showChooseArea
=
true
},
//---关闭选择站点---已修改
closeArea
()
{
this
.
showChooseArea
=
false
},
//---展示详情弹窗---已修改
showDetail
()
{
this
.
$refs
.
detail
.
showPop
=
true
},
//---展示日历---已修改
showCalendar
(
index
)
{
// if(!this.productList[index].chooseDate){//没有选择时,默认第一个日期
// this.productList[index].chooseDate=this.productList[index].priceStockList[0].startTime.substr(0,10)
// }
this
.
$refs
.
calendar
.
setDefaultDate
(
this
.
productList
[
index
].
chooseDate
)
//日历组件选中日期
this
.
moreDateIndex
=
index
this
.
chooseDateList
=
this
.
productList
[
index
].
priceStockList
this
.
$refs
.
calendar
.
showPop
=
true
},
//---日期选择---已改
dateChoose
(
item
,
item2
,
index
)
{
item
.
dateActive
=
index
//修改选中样式
item
.
maxBookNum
=
Math
.
min
(
item2
.
maxBookNum
,
item2
.
surplus
)
//剩余量变化
item
.
originalPrice
=
item2
.
originalPrice
//产品原价为当前选中日期的原价
item
.
sellingPrice
=
item2
.
sellingPrice
//产品卖价为当前选中日期的卖价
item
.
chooseDate
=
item2
.
startTime
.
substr
(
0
,
10
)
this
.
$refs
.
calendar
.
setDefaultDate
(
item
.
chooseDate
)
//日历组件选中日期
item
.
endDate
=
item2
.
endTime
//开始日期
item
.
startDate
=
item2
.
startTime
//结束日期
if
(
item
.
productType
==
3
){
//productType=3为场次票
item
.
cruisePlanId
=
''
item
.
timeActive
=
10000
this
.
timeActive
=
10000
uni
.
$u
.
throttle
(
this
.
getTimeStock
(
item
),
3000
)
}
// this.initCoupon(Item.id,Item.buyNum,Item.sellingPrice,Item.merchantId,Index)
//解决点击日期无反应的情况
this
.
$forceUpdate
()
},
//---日历确认事件
dateConfig
(
data
)
{
let
index2
=
chooseDateList
.
findIndex
(
item
=>
{
return
item
.
startTime
.
substr
(
0
,
10
)
==
data
})
let
item
=
this
.
productList
[
this
.
moreDateIndex
]
let
item2
=
item
.
priceStockList
[
index2
]
this
.
dateChoose
(
item
,
item2
,
index2
)
//选中确认的日期
let
width
=
0
this
.
docQuery
.
select
(
'.date-list'
).
boundingClientRect
(
data
=>
{
width
=
data
.
width
}).
exec
()
item
.
dateScroll
=
(
width
+
6
)
*
index2
},
//---展示更多时间---已改好
showTime
(
item
,
index
)
{
this
.
chooseTimeList
=
item
.
timeList
this
.
moreTimeIndex
=
index
if
(
item
.
timeActive
>=
0
){
this
.
timeActive
=
item
.
timeActive
//组件的默认下标
}
else
{
this
.
timeActive
=
10000
}
this
.
$refs
.
times
.
showPop
=
true
},
//---时间选择---已改好
chooseTime
(
item
,
item2
,
index2
)
{
if
(
item2
.
copyLast
!=
'售罄'
){
item
.
timeActive
=
index2
item
.
cruisePlanId
=
item2
.
cruisePlanId
//获取班次Id
item
.
maxBookNum
=
Math
.
min
(
item
.
maxBookNum
,
item2
.
last
)
//如果为场次票,开始时间为班次时间的开始时间,结束时间为班次时间的结束时间,班次时间的结束时间为空时,结束时间为班次时间的开始时间
item
.
startPlayTime
=
item2
.
startPlanTime
item
.
endPlayTime
=
item2
.
endPlanTime
||
item2
.
startPlanTime
//解决时间下标未及时选中的问题
this
.
$forceUpdate
()
}
},
//---时间确认事件---已改好
timeConfig
(
index2
)
{
let
item
=
this
.
productList
[
this
.
moreTimeIndex
]
let
item2
=
this
.
chooseTimeList
[
index2
]
this
.
chooseTime
(
item
,
item2
,
index2
)
//由于没有数据需要测试
let
width
=
0
this
.
docQuery
.
select
(
'.time-list'
).
boundingClientRect
(
data
=>
{
width
=
data
.
width
}).
exec
()
item
.
timeScroll
=
(
width
+
6
)
*
index2
},
//---获取点击的编辑联系人信息,传给编辑联系人组件
getEditContact
(
data
)
{
this
.
editContact
=
data
},
//---删除选中的联系人
delChooseContact
(
item
,
index
)
{
//所有联系人中找到删除联系人下标,改成未选中状态
let
sub
=
this
.
contactTotal
.
findIndex
(
item2
=>
item2
.
id
==
item
.
id
)
this
.
contactTotal
[
sub
].
ifChoose
=
false
this
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
},
//---展示编辑联系人
showEdit
(
obj
)
{
this
.
$refs
.
editContacts
.
showEdit
=
true
this
.
editContact
=
obj
},
//---展示新增联系人,并获取联系人列表
showContacts
()
{
this
.
$refs
.
contactList
.
showPop
=
true
},
//---游客选择
visitorChoose
(
i
)
{
let
chooseList
=
this
.
chooseContact
let
data
=
this
.
contactTotal
data
[
i
].
ifChoose
=
!
data
[
i
].
ifChoose
if
(
data
[
i
].
ifChoose
)
{
if
(
chooseList
.
length
==
this
.
contactNum
)
{
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
chooseList
[
chooseList
.
length
-
1
].
ifChoose
=
false
chooseList
.
splice
(
chooseList
.
length
-
1
,
1
)
}
chooseList
.
push
(
data
[
i
])
//加入数组
}
else
{
let
index
=
chooseList
.
findIndex
(
items
=>
{
return
items
.
id
==
data
[
i
].
id
})
chooseList
.
splice
(
index
,
1
)
//删除数组
}
//先注释
// this.$forceUpdate()
},
//---订单数量变化
buyNumChange
(
e
)
{
if
(
e
.
value
>=
this
.
maxBookNum
)
{
uni
.
showToast
({
title
:
'最大可预订数量为'
+
this
.
maxBookNum
,
icon
:
'none'
})
}
if
(
this
.
productIfo
.
tripTemplateFlag
==
1
)
{
//实名制
this
.
contactNum
=
e
.
value
if
(
this
.
chooseContact
.
length
>
this
.
contactNum
)
{
//当选中联系人数量大于购买数量时
this
.
chooseContact
.
splice
(
this
.
chooseContact
.
length
-
1
,
1
)
//删除多余的联系人
//联系人列表重新判断是否选中
this
.
contactTotal
.
forEach
(
item
=>
{
item
.
ifChoose
=
false
})
this
.
chooseContact
.
forEach
(
item
=>
{
this
.
contactTotal
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
){
item2
.
ifChoose
=
true
}
})
})
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
==
0
)
{
//非实名制
this
.
contactNum
=
1
}
clearTimeout
(
this
.
timeFlag
)
this
.
timeFlag
=
setTimeout
(()
=>
{
this
.
initCoupon
()
},
1500
)
},
//---展示购票须知---已修改
showBuyKnow
(
index
)
{
this
.
buyKnowData
=
this
.
productList
[
index
]
this
.
$refs
.
buyKnow
.
showPop
=
true
},
//---页面初始化数据,获取产品基本信息---已修改
initData
()
{
let
data
=
{
...
...
@@ -690,7 +487,6 @@ export default {
this
.
payBackground
=
'#C0C0C0'
return
}
if
(
item
.
productType
!=
3
){
//不为班次票时,开始时间为当前时间,结束时间为23:59:59
item
.
startPlayTime
=
new
Date
().
Format
(
'hh:mm:ss'
)
item
.
endPlayTime
=
'23:59:59'
...
...
@@ -710,7 +506,7 @@ export default {
}
})
},
//---获取产品价格库存列表---已
部分
修改
//---获取产品价格库存列表---已修改
getPriceList
()
{
let
data
=
{
productIds
:
this
.
productIdList
,
//产品id集合
...
...
@@ -768,11 +564,14 @@ export default {
this
.
payBackground
=
'#C0C0C0'
return
}
//下面参数是默认选择每个产品第一个日期的值
item
.
chooseDate
=
item
.
priceStockList
[
0
].
startTime
.
substr
(
0
,
10
)
//日历选中的日期
item
.
startDate
=
item
.
priceStockList
[
0
].
startTime
//开始日期
item
.
endDate
=
item
.
priceStockList
[
0
].
endTime
//结束日期
item
.
originalPrice
=
item
.
priceStockList
[
0
].
originalPrice
//原价
item
.
sellingPrice
=
item
.
priceStockList
[
0
].
sellingPrice
//卖价
item
.
maxBookNum
=
Math
.
min
(
item
.
priceStockList
[
0
].
surplus
,
item
.
maxBookNum
)
//最大购买数量
console
.
log
(
item
.
maxBookNum
)
item
.
priceStockList
.
forEach
(
item2
=>
{
//循环单个产品的价格列表
item2
.
week
=
'日一二三四五六'
.
charAt
(
new
Date
(
item2
.
startTime
.
substr
(
0
,
10
)).
getDay
())
if
(
item2
.
startTime
.
substr
(
0
,
10
)
==
today
){
...
...
@@ -796,84 +595,6 @@ export default {
})
//解决初始化日期不显示的情况
this
.
$forceUpdate
()
// this.dateList = res.data //日期列表
// if (this.dateList.length > 0) {
// let time1 = this.dateList[0].startTime.substr(0, 10) + this.productIfo.bookTime //获取价格列表的第一个日期+预订最晚时间
// let timeNum1 = parseInt(this.$commonjs.changeTime(time1))
// let time2 = new Date().Format('yyyy-MM-dd hh:mm:ss')
// let timeNum2 = parseInt(this.$commonjs.changeTime(time2)) //将当前时间转化为数字
// if (timeNum2 > timeNum1) {
// //如果当前时间大于价格列表第一个日期+预订最晚时间,第一个价格不显示
// this.dateList.splice(0, 1)
// }
// this.dateList.forEach((item, index) => {
// //价格上面时间小于当前时间加上需预定天数之后的需删除
// let date = new Date()
// date.setDate(date.getDate() + this.beforeBookDays)
// let newDate = date.Format('yyyy-MM-dd')
// let priceTime = this.$commonjs.changeTime(item.endTime.substr(0, 10))
// let newTime = this.$commonjs.changeTime(newDate)
// if (priceTime
<
newTime
)
{
// delete this.dateList[index]
// }
// })
// this.dateList = this.dateList.filter(val => {
// return val
// })
// if (this.dateList.length == 0) {
// uni.showToast({
// title: '没有库存',
// icon: 'none'
// })
// this.showChooseArea = false
// this.payBackground = '#C0C0C0'
// return
// }
// if (this.productIfo.isFetch == 1) {
// this.sortUpDown()
// }
// if (this.dateList.length == 1 && this.beforeBookDays == 0) {
// //长度为1而且只能预订当天,默认选中第一个日期
// //真机模拟的时候手机端不显示今天,明天后天,延迟执行
// setTimeout(item => {
// this.$refs.calendar.defaultDate = this.dateList[0].startTime.substr(0, 10)
// }, 1000)
// this.maxBookNum = Math.min(this.dateList[0].surplus, this.productIfo.maxBookNum) //剩余量
// this.startDate = this.dateList[0].startTime //开始日期
// this.endDate = this.dateList[0].endTime //结束日期
// this.originalPrice = this.dateList[0].originalPrice //原价
// this.sellingPrice = this.dateList[0].sellingPrice //卖价
// this.active = 0
// if (this.productIfo.productType == 3) {
// //如果为班次票,请求班次票接口
// this.getTimeStock()
// }
// this.initCoupon() //获取优惠券
// }
// } else {
// uni.showToast({
// title: '没有库存',
// icon: 'none'
// })
// this.showChooseArea = false
// this.payBackground = '#C0C0C0'
// }
// let today = this.$commonjs.today() //今天
// let tomorrow = this.$commonjs.tomorrow() //明天
// let afterTomorrow = this.$commonjs.afterTomorrow() //后天
// this.dateList.forEach((item, index) => {
// item.week = '日一二三四五六'.charAt(new Date(item.startTime.substr(0, 10)).getDay())
// if (item.startTime.substr(0, 10) == today) {
// item.week = '今天'
// }
// if (item.startTime.substr(0, 10) == tomorrow) {
// item.week = '明天'
// }
// if (item.startTime.substr(0, 10) == afterTomorrow) {
// item.week = '后天'
// }
// })
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
...
...
@@ -992,6 +713,207 @@ export default {
}
})
},
//---获取排号信息---暂时未使用
getSortInfor
(
merchantCode
)
{
let
data
=
{
areaCode
:
this
.
areaObj
.
areaCode
,
merchantCode
//商户code
}
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
this
.
$request
(
'distribution/distribution/findNewFetchInfoFromSceinc'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
sortInforPop
=
true
res
.
data
.
forEach
(
item
=>
{
item
.
peopleNumber
=
Math
.
max
(
item
.
sortTotalCapacity
-
item
.
showEnd
,
0
)
})
let
index
=
res
.
data
.
findIndex
(
item
=>
{
return
item
.
projectId
==
this
.
areaObj
.
areaCode
})
this
.
sortIfo
=
res
.
data
[
index
]
}
})
},
//---获取子组件的传值---已修改
areaSure
(
data
)
{
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
},
//---展示选择站点---已修改
openArea
(
index
)
{
this
.
areaIndex
=
index
this
.
showChooseArea
=
true
},
//---关闭选择站点---已修改
closeArea
()
{
this
.
showChooseArea
=
false
},
//---展示详情弹窗---已修改
showDetail
()
{
this
.
$refs
.
detail
.
showPop
=
true
},
//---展示日历---已修改
showCalendar
(
index
)
{
this
.
$refs
.
calendar
.
setDefaultDate
(
this
.
productList
[
index
].
chooseDate
)
//日历组件选中日期
this
.
moreDateIndex
=
index
this
.
chooseDateList
=
this
.
productList
[
index
].
priceStockList
this
.
$refs
.
calendar
.
showPop
=
true
},
//---日期选择---已改
dateChoose
(
item
,
item2
,
index
)
{
item
.
dateActive
=
index
//修改选中样式
item
.
maxBookNum
=
Math
.
min
(
item2
.
maxBookNum
,
item2
.
surplus
)
//剩余量变化
item
.
originalPrice
=
item2
.
originalPrice
//产品原价为当前选中日期的原价
item
.
sellingPrice
=
item2
.
sellingPrice
//产品卖价为当前选中日期的卖价
item
.
chooseDate
=
item2
.
startTime
.
substr
(
0
,
10
)
this
.
$refs
.
calendar
.
setDefaultDate
(
item
.
chooseDate
)
//日历组件选中日期
item
.
endDate
=
item2
.
endTime
//开始日期
item
.
startDate
=
item2
.
startTime
//结束日期
if
(
item
.
productType
==
3
){
//productType=3为场次票
item
.
cruisePlanId
=
''
item
.
timeActive
=
10000
this
.
timeActive
=
10000
uni
.
$u
.
throttle
(()
=>
{
this
.
getTimeStock
(
item
)
this
.
initCoupon
(
item
)
},
3000
)
}
uni
.
$u
.
throttle
(()
=>
{
this
.
initCoupon
(
item
)
},
3000
)
//解决点击日期无反应的情况
this
.
$forceUpdate
()
},
//---日历确认事件
dateConfig
(
data
)
{
let
index2
=
this
.
chooseDateList
.
findIndex
(
item
=>
{
return
item
.
startTime
.
substr
(
0
,
10
)
==
data
})
let
item
=
this
.
productList
[
this
.
moreDateIndex
]
let
item2
=
item
.
priceStockList
[
index2
]
this
.
dateChoose
(
item
,
item2
,
index2
)
//选中确认的日期
this
.
docQuery
.
select
(
'.date-list'
).
boundingClientRect
(
data
=>
{
item
.
dateScroll
=
(
data
.
width
+
6
)
*
index2
this
.
$forceUpdate
()
}).
exec
()
},
//---展示更多时间---已改好
showTime
(
item
,
index
)
{
this
.
chooseTimeList
=
item
.
timeList
this
.
moreTimeIndex
=
index
if
(
item
.
timeActive
>=
0
){
this
.
timeActive
=
item
.
timeActive
//组件的默认下标
}
else
{
this
.
timeActive
=
10000
}
this
.
$refs
.
times
.
showPop
=
true
},
//---时间选择---已改好
chooseTime
(
item
,
item2
,
index2
)
{
if
(
item2
.
copyLast
!=
'售罄'
){
item
.
timeActive
=
index2
item
.
cruisePlanId
=
item2
.
cruisePlanId
//获取班次Id
item
.
maxBookNum
=
Math
.
min
(
item
.
maxBookNum
,
item2
.
last
)
//如果为场次票,开始时间为班次时间的开始时间,结束时间为班次时间的结束时间,班次时间的结束时间为空时,结束时间为班次时间的开始时间
item
.
startPlayTime
=
item2
.
startPlanTime
item
.
endPlayTime
=
item2
.
endPlanTime
||
item2
.
startPlanTime
//解决时间下标未及时选中的问题
this
.
$forceUpdate
()
}
},
//---时间确认事件---已改好
timeConfig
(
index2
)
{
let
item
=
this
.
productList
[
this
.
moreTimeIndex
]
let
item2
=
this
.
chooseTimeList
[
index2
]
this
.
chooseTime
(
item
,
item2
,
index2
)
//由于没有数据需要测试
this
.
docQuery
.
select
(
'.time-list'
).
boundingClientRect
(
data
=>
{
item
.
timeScroll
=
(
data
.
width
+
6
)
*
index2
}).
exec
()
},
//---获取点击的编辑联系人信息,传给编辑联系人组件
getEditContact
(
data
)
{
this
.
editContact
=
data
},
//---删除选中的联系人
delChooseContact
(
item
,
index
)
{
//所有联系人中找到删除联系人下标,改成未选中状态
let
sub
=
this
.
contactTotal
.
findIndex
(
item2
=>
item2
.
id
==
item
.
id
)
this
.
contactTotal
[
sub
].
ifChoose
=
false
this
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
},
//---展示编辑联系人
showEdit
(
obj
)
{
this
.
$refs
.
editContacts
.
showEdit
=
true
this
.
editContact
=
obj
},
//---展示新增联系人,并获取联系人列表
showContacts
()
{
this
.
$refs
.
contactList
.
showPop
=
true
},
//---游客选择
visitorChoose
(
i
)
{
let
chooseList
=
this
.
chooseContact
let
data
=
this
.
contactTotal
data
[
i
].
ifChoose
=
!
data
[
i
].
ifChoose
if
(
data
[
i
].
ifChoose
)
{
if
(
chooseList
.
length
==
this
.
contactNum
)
{
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
chooseList
[
chooseList
.
length
-
1
].
ifChoose
=
false
chooseList
.
splice
(
chooseList
.
length
-
1
,
1
)
}
chooseList
.
push
(
data
[
i
])
//加入数组
}
else
{
let
index
=
chooseList
.
findIndex
(
items
=>
{
return
items
.
id
==
data
[
i
].
id
})
chooseList
.
splice
(
index
,
1
)
//删除数组
}
//先注释
// this.$forceUpdate()
},
//---订单数量变化---正在修改
buyNumChange
(
value
,
index
)
{
console
.
log
(
value
)
console
.
log
(
index
)
if
(
this
.
productIfo
.
tripTemplateFlag
==
1
)
{
//实名制
this
.
contactNum
=
e
.
value
if
(
this
.
chooseContact
.
length
>
this
.
contactNum
)
{
//当选中联系人数量大于购买数量时
this
.
chooseContact
.
splice
(
this
.
chooseContact
.
length
-
1
,
1
)
//删除多余的联系人
//联系人列表重新判断是否选中
this
.
contactTotal
.
forEach
(
item
=>
{
item
.
ifChoose
=
false
})
this
.
chooseContact
.
forEach
(
item
=>
{
this
.
contactTotal
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
){
item2
.
ifChoose
=
true
}
})
})
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
==
0
)
{
//非实名制
this
.
contactNum
=
1
}
clearTimeout
(
this
.
timeFlag
)
this
.
timeFlag
=
setTimeout
(()
=>
{
this
.
initCoupon
()
},
1500
)
//解决数量显示不及时更新问题
this
.
$forceUpdate
()
},
//---展示购票须知---已修改
showBuyKnow
(
index
)
{
this
.
buyKnowData
=
this
.
productList
[
index
]
this
.
$refs
.
buyKnow
.
showPop
=
true
},
//---添加并选中联系人--用于添加联系人之后直接从联系人列表选出需要填写的几位联系人
addChoose
()
{
let
data
=
{
...
...
pages/scenic/scenicOrder/scenicOrder.vue
View file @
de038472
...
...
@@ -456,7 +456,6 @@ export default {
this
.
orderSource
=
option
.
orderSource
||
''
this
.
thirdOpenid
=
option
.
thirdOpenid
||
''
//第三方openid
this
.
productId
=
option
.
productId
||
''
this
.
merchantId
=
option
.
merchantId
||
''
this
.
initData
()
//页面初始化数据
this
.
docQuery
=
uni
.
createSelectorQuery
().
in
(
this
)
},
...
...
@@ -579,7 +578,8 @@ export default {
this
.
timeActive
=
10000
uni
.
$u
.
throttle
(
this
.
getTimeStock
,
3000
)
}
this
.
initCoupon
()
uni
.
$u
.
throttle
(
this
.
initCoupon
,
3000
)
},
//---日历确认事件
dateConfig
(
data
)
{
...
...
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