Commit 24124116 authored by 罗超's avatar 罗超

修改适配小包团规则

parent fae24a0c
...@@ -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{
...@@ -180,6 +203,12 @@ ...@@ -180,6 +203,12 @@
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;
font-size: 11px; font-size: 11px;
......
<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"
style="height: 100%; flex: 1; box-sizing: border-box"
>
<view class="header"> <view class="header">
<!-- <view class="bar"></view> <!-- <view class="bar"></view>
<view class="set text-gray"> <view class="set text-gray">
...@@ -33,14 +30,12 @@ ...@@ -33,14 +30,12 @@
<view style="font-size:24upx;margin-top:10upx">{{ endWeek }}</view> <view style="font-size:24upx;margin-top:10upx">{{ endWeek }}</view>
</view> </view>
</view> --> </view> -->
<view <view style="
style="
font-size: 32rpx; font-size: 32rpx;
color: #111; color: #111;
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
" ">
>
<text>{{ title }}</text> <text>{{ title }}</text>
</view> </view>
<view class="week"> <view class="week">
...@@ -57,17 +52,10 @@ ...@@ -57,17 +52,10 @@
<view v-for="(res, line) in resDate" class="item" :key="line"> <view v-for="(res, line) in resDate" class="item" :key="line">
<view class="year">{{ res.year }}{{ res.month }}</view> <view class="year">{{ res.year }}{{ res.month }}</view>
<view class="day"> <view class="day">
<view <view v-for="week in res.oneDayWeek" class="day-list"
v-for="week in res.oneDayWeek" :style="{ width: (dayWidth - 10) / 7 + 'px' }"></view>
class="day-list" <view @tap="selectDay(line, index, (line + 1).toString() + index)"
:style="{ width: (dayWidth - 10) / 7 + 'px' }" v-for="(item, index) in res.day" :key="index" class="day-list" :class="[
></view>
<view
@tap="selectDay(line, index, (line + 1).toString() + index)"
v-for="(item, index) in res.day"
:key="index"
class="day-list"
:class="[
line == start[0] && index == start[1] line == start[0] && index == start[1]
? 'bg-orange select-style' ? 'bg-orange select-style'
: '', : '',
...@@ -103,28 +91,24 @@ ...@@ -103,28 +91,24 @@
line + index * 2 != lastNot[0] + lastNot[1] * 2 line + index * 2 != lastNot[0] + lastNot[1] * 2
? 'not-sub' ? 'not-sub'
: '', : '',
]" ]" :style="{
:style="{
width: (dayWidth - 10) / 7 + 'px', width: (dayWidth - 10) / 7 + 'px',
borderRadius: borderRadius:
line == end[0] && index == end[1] ? '0px 6px 6px 0px' : '', line == end[0] && index == end[1] ? '0px 6px 6px 0px' : '',
backgroundColor: backgroundColor:
line == end[0] && index == end[1] ? '#111' : '', line == end[0] && index == end[1] ? '#111' : '',
color: line == end[0] && index == end[1] ? '#FFFFFF' : '', color: line == end[0] && index == end[1] ? '#FFFFFF' : '',
}" }">
>
<view style="padding-top: 2px; padding-bottom: 2px">{{ <view style="padding-top: 2px; padding-bottom: 2px">{{
item item
}}</view> }}</view>
<!-- <view class="select-style" v-if="line == start[0] && index == start[1]">最早</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> --> <view class="select-style" v-if="line == end[0] && index == end[1]">最晚</view> -->
<view <view style="font-size: 12px; padding-bottom: 3px" v-if="priceStauts.length > 0">
style="font-size: 12px; padding-bottom: 3px" <view v-if="priceStauts[line][index] > 0" style="color:#FF3166">
v-if="priceStauts.length > 0" {{ priceStauts[line][index] }}</view>
> <view v-if="priceStauts[line][index] == -1">售罄</view>
<view v-if="priceStauts[line][index] > 0" style="color:#FF3166">{{ priceStauts[line][index] }}</view <view v-if="priceStauts[line][index] == -2">候补</view>
>
<view v-if="priceStauts[line][index] < 0">售罄</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -141,10 +125,10 @@ ...@@ -141,10 +125,10 @@
</template> </template>
<script> <script>
//引入节假日的数据,也可以用后台返回去渲染 //引入节假日的数据,也可以用后台返回去渲染
import json from "./day.js"; import json from "./day.js";
export default { export default {
props: { props: {
priceList: { priceList: {
type: Array, type: Array,
...@@ -325,15 +309,20 @@ export default { ...@@ -325,15 +309,20 @@ export default {
let isexsit = false; let isexsit = false;
const m = month + 1 > 9 ? month + 1 : "0" + (month + 1); const m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
const d = j + 1 > 9 ? j + 1 : "0" + (j + 1); const d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
const ds =`${year}-${m}-${d}` const ds = `${year}-${m}-${d}`
const price = this.priceList.find(p=>p.startDate==ds) const price = this.priceList.find(p => p.startDate == ds)
if(price){ if (price) {
isexsit = true isexsit = true
days.push(price.remainNum > 0?(this.$utils.getretailer() ? price.b2BPrice : price.b2CPrice):-1) if (price.remainNum > 0)
}else{ days.push(this.$utils.getretailer() ? price.b2BPrice : price.b2CPrice)
else if (price.isSubstitution == 1)
days.push(-2)
else
days.push(-1)
} else {
days.push(0); days.push(0);
} }
console.log(this.priceList.length,new Date(year, month + 1, 0).getDate(),price) console.log(this.priceList.length, new Date(year, month + 1, 0).getDate(), price)
// for (var k = 0; k < this.priceList.length; k++) { // for (var k = 0; k < this.priceList.length; k++) {
// const x = this.priceList[k]; // const x = this.priceList[k];
// console.log(x) // console.log(x)
...@@ -510,9 +499,7 @@ export default { ...@@ -510,9 +499,7 @@ export default {
//开始日期到开始日期当月的最大日期是否包含无房情况 //开始日期到开始日期当月的最大日期是否包含无房情况
if (i == this.start[0]) { if (i == this.start[0]) {
for ( for (
var j = this.start[1]; var j = this.start[1]; j < this.priceStauts[i].length; j++
j < this.priceStauts[i].length;
j++
) { ) {
if (this.priceStauts[i][j] < 0) if (this.priceStauts[i][j] < 0)
return uni.showToast({ return uni.showToast({
...@@ -652,12 +639,12 @@ export default { ...@@ -652,12 +639,12 @@ export default {
this.$emit("finish", obj); this.$emit("finish", obj);
}, },
}, },
}; };
</script> </script>
<style> <style>
/**确认按钮**/ /**确认按钮**/
.submit { .submit {
width: 100%; width: 100%;
background: white; background: white;
...@@ -665,86 +652,86 @@ export default { ...@@ -665,86 +652,86 @@ export default {
bottom: 0upx; bottom: 0upx;
height: auto; height: auto;
} }
.sub-btn { .sub-btn {
height: auto; height: auto;
border-radius: 10upx; border-radius: 10upx;
background: #111; background: #111;
color: white; color: white;
} }
.content { .content {
height: 100%; height: 100%;
z-index: 999; z-index: 999;
} }
/**不能预订**/ /**不能预订**/
/* 入住离开时间的color */ /* 入住离开时间的color */
.bg-orange { .bg-orange {
background: #111111 !important; background: #111111 !important;
border-radius: 6px !important; border-radius: 6px !important;
} }
.bg-higlt-orange { .bg-higlt-orange {
background-color: #fff; background-color: #fff;
} }
/* 节假日的日期样式 */ /* 节假日的日期样式 */
.is-festival { .is-festival {
font-size: 22rpx !important; font-size: 22rpx !important;
color: #000 !important; color: #000 !important;
} }
/** 非节假日的日期样式**/ /** 非节假日的日期样式**/
.not-festival { .not-festival {
font-size: 18upx; font-size: 18upx;
color: white; color: white;
} }
/***入住离开时间的日历样式*/ /***入住离开时间的日历样式*/
.not-sub { .not-sub {
color: #222222; color: #222222;
background: #dddddd; background: #dddddd;
} }
.select-out-item { .select-out-item {
background: #ffffff; background: #ffffff;
} }
.select-style { .select-style {
color: white !important; color: white !important;
font-size: 20rpx !important; font-size: 20rpx !important;
/* font-size: 20upx; */ /* font-size: 20upx; */
/* padding-top: 4upx; */ /* padding-top: 4upx; */
} }
.time-out { .time-out {
/* text-decoration: line-through; */ /* text-decoration: line-through; */
color: #ccc !important; color: #ccc !important;
} }
/** /**
* 点击日期的样式 * 点击日期的样式
*/ */
.bg { .bg {
background: orange; background: orange;
} }
/** /**
* 日期部分 * 日期部分
*/ */
.section { .section {
width: 100%; width: 100%;
padding-bottom: 150upx; padding-bottom: 150upx;
height: auto; height: auto;
padding-top: 176rpx; padding-top: 176rpx;
background-color: #f1f4f6; background-color: #f1f4f6;
} }
.section > .item > .year { .section>.item>.year {
text-align: center; text-align: center;
height: 50rpx; height: 50rpx;
font-weight: bold; font-weight: bold;
...@@ -753,17 +740,17 @@ export default { ...@@ -753,17 +740,17 @@ export default {
font-size: 24rpx; font-size: 24rpx;
line-height: 50rpx; line-height: 50rpx;
color: #1b1d1e; color: #1b1d1e;
} }
.section > .item > .day { .section>.item>.day {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
text-align: center; text-align: center;
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.section > .item > .day > .day-list { .section>.item>.day>.day-list {
margin-top: 30upx; margin-top: 30upx;
margin-bottom: 30upx; margin-bottom: 30upx;
min-height: 100upx; min-height: 100upx;
...@@ -774,30 +761,30 @@ export default { ...@@ -774,30 +761,30 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: #1b1d1e; color: #1b1d1e;
} }
/** /**
* 头部固定 * 头部固定
*/ */
.header { .header {
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
/* height: 400upx; */ /* height: 400upx; */
background: white; background: white;
box-shadow: 0px 10rpx 30rpx 0px rgba(36, 36, 36, 0.06); box-shadow: 0px 10rpx 30rpx 0px rgba(36, 36, 36, 0.06);
} }
.bar { .bar {
width: 100%; width: 100%;
height: var(--status-bar-height); height: var(--status-bar-height);
background: #222222; background: #222222;
} }
/** /**
* 关闭清空 * 关闭清空
*/ */
.set { .set {
height: 100upx; height: 100upx;
padding-left: 30upx; padding-left: 30upx;
padding-right: 30upx; padding-right: 30upx;
...@@ -805,71 +792,71 @@ export default { ...@@ -805,71 +792,71 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
/** /**
* 入住离开时间 * 入住离开时间
*/ */
.in-and-out { .in-and-out {
height: 210upx; height: 210upx;
padding-left: 30upx; padding-left: 30upx;
padding-right: 30upx; padding-right: 30upx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
/** /**
* 入住离开的view * 入住离开的view
*/ */
.in-and-out > .item { .in-and-out>.item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100upx; height: 100upx;
} }
/** /**
* 未选择入离时间时的文字样式 * 未选择入离时间时的文字样式
*/ */
.in-and-out > .text { .in-and-out>.text {
margin-top: 100upx; margin-top: 100upx;
font-weight: bold; font-weight: bold;
font-size: 36upx; font-size: 36upx;
color: #c0c0c0; color: #c0c0c0;
} }
/** /**
* 一共选择了多少晚的样式 * 一共选择了多少晚的样式
*/ */
.in-and-out > .item > .count-border { .in-and-out>.item>.count-border {
width: 200upx; width: 200upx;
font-size: 28upx; font-size: 28upx;
height: 40upx; height: 40upx;
margin-top: 48upx; margin-top: 48upx;
text-align: center; text-align: center;
} }
.gray { .gray {
color: #c0c0c0; color: #c0c0c0;
border-bottom: 1px solid #c0c0c0; border-bottom: 1px solid #c0c0c0;
} }
.orange { .orange {
color: orange; color: orange;
border-bottom: 1px solid orange; border-bottom: 1px solid orange;
} }
/** /**
* 共多少晚 * 共多少晚
*/ */
.in-and-out > .item > .count-border > .count { .in-and-out>.item>.count-border>.count {
font-size: 10px; font-size: 10px;
} }
/** /**
* 周一到周日 * 周一到周日
*/ */
.week { .week {
/* height: 70upx; */ /* height: 70upx; */
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -880,13 +867,13 @@ export default { ...@@ -880,13 +867,13 @@ export default {
color: #1b1d1e; color: #1b1d1e;
background: white; background: white;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.isa { .isa {
color: red; color: red;
} }
.isa2 { .isa2 {
color: red; color: red;
} }
</style> </style>
\ No newline at end of file
...@@ -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 ==
......
...@@ -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>
...@@ -1054,6 +1060,9 @@ ...@@ -1054,6 +1060,9 @@
出发 余位:{{ 出发 余位:{{
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
......
...@@ -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>
......
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