Commit 0b3e33f9 authored by 潘永坪's avatar 潘永坪

单产品开发

parent 7a7e3a5b
<template>
<view>
<!-- tabbar页面不能放在分包里面,故放在indexs里面 -->
<view class="head">
<image src="@/static/img/common/pangdingLogo.png">
......
......@@ -571,17 +571,16 @@ export default {
} else {
//普通票
uni.navigateTo({
url: '/pages/scenic/scenicSingleOrder/scenicSingleOrder' + query
url: '/pages/scenic/scenicOrder/scenicOrder'+ query
})
}
} else {
let productIdList = this.chooseProduct.map(item => {
return item.id
})
let query =
'?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3'
let query ='?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3'
uni.navigateTo({
url: '/pages/combination/combiOrder/combiOrder' + query
url: '/pages/scenic/scenicOrder/scenicOrder' + query
})
}
},
......@@ -834,9 +833,8 @@ export default {
font-weight: bold;
}
.btn {
padding: 16rpx 48rpx;
border-radius: 20rpx;
font-size: 32rpx;
width: 200rpx;
}
//摄影、旅拍
.album-left{
......
This diff is collapsed.
......@@ -91,10 +91,14 @@
<view class="time-list" v-for="(item, index) of timeList" @click="chooseTime(index)" :class="{ on: timeActive == index }" :key="index">
<view>
{{ item.startPlanTime ? item.startPlanTime.substr(0, 5) : '' }}
<text v-if="item.endPlanTime">-</text>
{{ item.endPlanTime ? item.endPlanTime.substr(0, 5) : '' }}
<text v-if="item.endPlanTime&&!item.saleOnlyShowFromDate">
-{{ item.endPlanTime ? item.endPlanTime.substr(0, 5) : '' }}
</text>
</view>
<view>
<text v-if="item.copyLast!='余票充足'&&item.copyLast!='售罄'">剩余:</text>
{{ item.last }}
</view>
<view> 剩余:{{ item.last }} </view>
<view v-if="timeActive == index" class="date-icon">
<u-icon name="checkmark" color="#ffffff"></u-icon>
</view>
......@@ -118,7 +122,7 @@
<view class="middle-Number">
<view class="title-text"> 购买数量 </view>
<view>
<u-number-box v-model="buyNum">
<u-number-box v-model="buyNum" @change='buyNumChange'>
<view slot="minus" class="number-minus" >
<u-icon name="minus" color="#FFFFFF" size="32"></u-icon>
</view>
......@@ -127,17 +131,6 @@
<u-icon name="plus" color="#FFFFFF" size="32"></u-icon>
</view>
</u-number-box>
<!-- <u-number-box
@change='buyNumChange'
v-model="buyNum"
bg-color='#3688FF'
color='#ffffff'
iconStyle='color:#ffffff;font-size:32rpx;'
buttonSize='60'
input-width="100"
:min="1"
:max="maxBookNum">
</u-number-box> -->
</view>
</view>
<view class=" middle-coupon" v-if="couponData.length>0" @click="showCoupon()">
......@@ -605,13 +598,15 @@ export default {
},
//---时间选择
chooseTime(i) {
this.timeActive = i
this.cruisePlanId = this.timeList[i].cruisePlanId //获取班次Id
this.chooseTimeData = this.timeList[i].startPlanTime
this.maxBookNum = Math.min(this.timeList[i].last, this.productIfo.maxBookNum) //获取剩余库存
//如果为班次票,开始时间为班次时间的开始时间,结束时间为班次时间的结束时间,班次时间的结束时间为空时,结束时间为班次时间的开始时间
this.startPlayTime = this.timeList[i].startPlanTime
this.endPlayTime = this.timeList[i].endPlanTime || this.timeList[i].startPlanTime
if(this.timeList[i].copyLast!='售罄'){
this.timeActive = i
this.cruisePlanId = this.timeList[i].cruisePlanId //获取班次Id
this.chooseTimeData = this.timeList[i].startPlanTime
this.maxBookNum = Math.min(this.timeList[i].last, this.productIfo.maxBookNum) //获取剩余库存
//如果为班次票,开始时间为班次时间的开始时间,结束时间为班次时间的结束时间,班次时间的结束时间为空时,结束时间为班次时间的开始时间
this.startPlayTime = this.timeList[i].startPlanTime
this.endPlayTime = this.timeList[i].endPlanTime || this.timeList[i].startPlanTime
}
},
//---时间确认事件
timeConfig(data) {
......@@ -908,10 +903,16 @@ export default {
if (res.code == '00') {
this.timeList = res.data
this.timeList.forEach((item, index) => {
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,不显示该班次
item.timeNumber = parseInt(this.$commonjs.changeTime(item.planDate.substr(0, 10) + item.endPlanTime))
if (this.timeNumber > item.timeNumber || item.last == 0) {
this.timeList.splice(index, 1)
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
let text=parseFloat((item.last/item.total).toFixed(2))||0
if(text>0.4){
item.copyLast='余票充足'
}else{
item.copyLast=item.last
}
item.timeNumber = parseInt(this.commonjs.changeTime(item.planDate.substr(0, 10) + item.endPlanTime))
if (this.timeNumber > item.timeNumber || item.last <= 0) {
item.copyLast='售罄'
}
})
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment