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

班次bug处理

parent 8adcbbaf
...@@ -89,7 +89,13 @@ ...@@ -89,7 +89,13 @@
<view class="title-text"> 场次 </view> <view class="title-text"> 场次 </view>
<view class="list-timelist"> <view class="list-timelist">
<scroll-view class="time-content" scroll-x="true" :scroll-left="item.timeScroll" v-if="item.timeList&&item.timeList.length> 0"> <scroll-view class="time-content" scroll-x="true" :scroll-left="item.timeScroll" v-if="item.timeList&&item.timeList.length> 0">
<view class="time-list" v-for="(item2,index2) of item.timeList" @click="chooseTime(item,item2,index2)" :class="{ on:item.timeActive == index2 }" :key="index2"> <view class="time-list"
:style="{color:item2.copyLast=='售罄'?'#ff0000':''}"
v-for="(item2,index2) of item.timeList"
@click="chooseTime(item,item2,index2)"
:class="{ on:item.timeActive == index2 }"
:key="index2"
>
<view> <view>
{{ item2.startPlanTime ? item2.startPlanTime.substr(0, 5) : '' }} {{ item2.startPlanTime ? item2.startPlanTime.substr(0, 5) : '' }}
<text v-if="!item2.saleOnlyShowFromDate"> <text v-if="!item2.saleOnlyShowFromDate">
...@@ -260,11 +266,11 @@ ...@@ -260,11 +266,11 @@
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
</view> </view>
<view class="bottom-btn" :style="{ background: payBackground }"> <view class="bottom-btn">
<text v-if="orderStatus == 1">已下架</text> <text v-if="orderStatus == 1">已下架</text>
<template v-else> <template v-else>
<text v-if="parseInt(maxBookNum)<1">暂无库存</text> <text v-if="parseInt(maxBookNum)<1">暂无库存</text>
<text v-if="parseInt(maxBookNum)>0" @click="goPay()">去支付</text> <text v-if="parseInt(maxBookNum)>0" @click="goPay()" style="background:#3688FF;">去支付</text>
</template> </template>
</view> </view>
</view> </view>
...@@ -371,7 +377,6 @@ export default { ...@@ -371,7 +377,6 @@ export default {
timeFlag: '', //setTimeout函数 timeFlag: '', //setTimeout函数
productDepositTotal: 0, //产品总押金 productDepositTotal: 0, //产品总押金
docQuery: '', //元素变量 docQuery: '', //元素变量
payBackground: '', //支付按钮背景颜色
timeScroll: '' ,//时间滚动值 timeScroll: '' ,//时间滚动值
openid:uni.getStorageSync('openid') || '',//openid openid:uni.getStorageSync('openid') || '',//openid
couponData:[], //所有劵数据 couponData:[], //所有劵数据
...@@ -433,7 +438,6 @@ export default { ...@@ -433,7 +438,6 @@ export default {
item.contactNum=1//需要选择几位联系人数量 item.contactNum=1//需要选择几位联系人数量
if(item.status==1){//任何一个产品下架,该组合票为下架状态 if(item.status==1){//任何一个产品下架,该组合票为下架状态
this.orderStatus=1 this.orderStatus=1
this.payBackground = '#C0C0C0'
return return
} }
if(item.productType!=3){//不为班次票时,开始时间为当前时间,结束时间为23:59:59 if(item.productType!=3){//不为班次票时,开始时间为当前时间,结束时间为23:59:59
...@@ -498,7 +502,6 @@ export default { ...@@ -498,7 +502,6 @@ export default {
}) })
if(item.priceStockList.length==0){ if(item.priceStockList.length==0){
uni.showToast({title: '没有库存',icon: 'none'}) uni.showToast({title: '没有库存',icon: 'none'})
this.payBackground = '#C0C0C0'
this.maxBookNum=0 this.maxBookNum=0
return return
} }
...@@ -534,7 +537,6 @@ export default { ...@@ -534,7 +537,6 @@ export default {
} }
}else{ }else{
uni.showToast({title: '没有库存',icon: 'none'}) uni.showToast({title: '没有库存',icon: 'none'})
this.payBackground = '#C0C0C0'
this.maxBookNum=0 this.maxBookNum=0
return return
} }
...@@ -1581,8 +1583,6 @@ export default { ...@@ -1581,8 +1583,6 @@ export default {
line-height: 80rpx; line-height: 80rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bolder; font-weight: bolder;
border-radius: 24rpx;
background: $red;
text-align: center; text-align: center;
} }
.bottom-btn text { .bottom-btn text {
...@@ -1593,6 +1593,8 @@ export default { ...@@ -1593,6 +1593,8 @@ export default {
left: 0; left: 0;
color: #ffffff; color: #ffffff;
top: 0; top: 0;
background:#C0C0C0;
border-radius: 24rpx;
} }
.sortPoptext { .sortPoptext {
font-size: 30rpx; font-size: 30rpx;
......
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
<view class="time-content" v-if="chooseTimeList&&chooseTimeList.length>0"> <view class="time-content" v-if="chooseTimeList&&chooseTimeList.length>0">
<!--库存大于零并且当前时间小于班次的开始时间才显示--> <!--库存大于零并且当前时间小于班次的开始时间才显示-->
<view class='time-list' <view class='time-list'
:style="{color:item.copyLast=='售罄'?'#ff0000':''}"
v-for="(item,index) of chooseTimeList" v-for="(item,index) of chooseTimeList"
:class="{on:active==index}" :class="{on:active==index}"
@click="chooseTime(index)" @click="chooseTime(index)"
:key="index" v-if="item.last>0"> :key="index"
<view> >
<view >
{{item.startPlanTime?item.startPlanTime.substr(0,5):""}} {{item.startPlanTime?item.startPlanTime.substr(0,5):""}}
<text v-if="!item.saleOnlyShowFromDate"> <text v-if="!item.saleOnlyShowFromDate">
-{{item.endPlanTime?item.endPlanTime.substr(0,5):""}} -{{item.endPlanTime?item.endPlanTime.substr(0,5):""}}
...@@ -59,8 +61,10 @@ export default { ...@@ -59,8 +61,10 @@ export default {
}, },
methods: { methods: {
//---时间选择 //---时间选择
chooseTime(i) { chooseTime(index) {
this.active = i if(this.chooseTimeList[index].copyLast!='售罄'){
this.active = index
}
}, },
//---时间确认事件 //---时间确认事件
confirm() { confirm() {
...@@ -91,12 +95,16 @@ export default { ...@@ -91,12 +95,16 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.time-content view:nth-child(3n) {
margin-right: 0;
}
.time-list { .time-list {
width:30%; width:30%;
height: 90rpx; height: 90rpx;
line-height: 30rpx; line-height: 30rpx;
text-align: center; text-align: center;
margin-right:5%; margin-right:5%;
margin-top: 30rpx;
border-radius: 15rpx; border-radius: 15rpx;
display: inline-block; display: inline-block;
background:#f2f2f2; background:#f2f2f2;
...@@ -106,9 +114,6 @@ export default { ...@@ -106,9 +114,6 @@ export default {
.time-list view { .time-list view {
margin-top: 10rpx; margin-top: 10rpx;
} }
.time-content view:nth-child(3n) {
margin-right: 0;
}
.time-list.on { .time-list.on {
border: 1px solid $theme; border: 1px solid $theme;
background: #DAE6F6; background: #DAE6F6;
......
...@@ -88,8 +88,14 @@ ...@@ -88,8 +88,14 @@
<view class="title-text"> 场次 </view> <view class="title-text"> 场次 </view>
<view class="middle-timelist"> <view class="middle-timelist">
<scroll-view class="time-content" scroll-x="true" :scroll-left="timeScroll" v-if="timeList.length> 0"> <scroll-view class="time-content" scroll-x="true" :scroll-left="timeScroll" v-if="timeList.length> 0">
<view class="time-list" v-for="(item, index) of timeList" @click="chooseTime(index)" :class="{ on: timeActive == index }" :key="index"> <view class="time-list"
<view> :style="{color:item.copyLast=='售罄'?'#ff0000':''}"
v-for="(item, index) of timeList"
@click="chooseTime(index)"
:class="{ on: timeActive == index }"
:key="index"
>
<view >
{{ item.startPlanTime ? item.startPlanTime.substr(0, 5) : '' }} {{ item.startPlanTime ? item.startPlanTime.substr(0, 5) : '' }}
<text v-if="!item.saleOnlyShowFromDate"> <text v-if="!item.saleOnlyShowFromDate">
-{{ item.endPlanTime ? item.endPlanTime.substr(0, 5) : '' }} -{{ item.endPlanTime ? item.endPlanTime.substr(0, 5) : '' }}
......
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