|
|
|
|
@ -55,24 +55,31 @@
|
|
|
|
|
<text class="infoBox-titletxt">活动场次</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="numbers">
|
|
|
|
|
<u-radio-group placement="column" v-model="chooseNum" @change="numChange">
|
|
|
|
|
<view v-for="(item, index) in numbers" :key="index">
|
|
|
|
|
<u-radio activeColor="#EF9525"
|
|
|
|
|
:label="item.label" :disabled="item.disabled" :name="item.id">
|
|
|
|
|
</u-radio>
|
|
|
|
|
<view style="padding-left:50rpx;margin-bottom:10rpx">
|
|
|
|
|
<text style="margin-right:20rpx">
|
|
|
|
|
限制人数:{{item.total==0?'不限':item.total}}
|
|
|
|
|
</text>
|
|
|
|
|
<text>
|
|
|
|
|
已报名数:{{item.has_total}}
|
|
|
|
|
</text>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view v-for="(item, index) in numbers" :key="index" @click="numChange(item)" class="numbersBox"
|
|
|
|
|
:class="{numbersBoxActive:item.checked}">
|
|
|
|
|
<view style="padding-left:50rpx;margin-bottom:10rpx">
|
|
|
|
|
<text style="margin-right:20rpx;font-size: 28rpx;font-weight: bold;">
|
|
|
|
|
{{item.label}}
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="padding-left:50rpx;margin-bottom:10rpx">
|
|
|
|
|
<text style="margin-right:20rpx">
|
|
|
|
|
活动时间:{{item.time}}
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="padding-left:50rpx;margin-bottom:10rpx">
|
|
|
|
|
<text style="margin-right:20rpx">
|
|
|
|
|
限制人数:{{item.total==0?'不限':item.total}}
|
|
|
|
|
</text>
|
|
|
|
|
<text>
|
|
|
|
|
已报名数:{{item.has_total}}
|
|
|
|
|
</text>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="book-box-row-timeitem-status" v-if="item.checked">
|
|
|
|
|
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -168,14 +175,20 @@
|
|
|
|
|
this.showNumbers = false
|
|
|
|
|
this.chooseNum = ""
|
|
|
|
|
},
|
|
|
|
|
numChange(val) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.activity_number_id = val
|
|
|
|
|
console.log("book?type=" + this.teamType + "&activity_id=" + this.id + "&activity_number_id=" + this
|
|
|
|
|
.activity_number_id)
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
// url: "book?type=" + this.teamType + "&activity_id=" + this.id + "&activity_number_id="+this.activity_number_id
|
|
|
|
|
// })
|
|
|
|
|
numChange(item) {
|
|
|
|
|
if(item.disabled) {
|
|
|
|
|
this.util.alert("您选择的产次不可预约!");
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
var _numbers = this.numbers;
|
|
|
|
|
for (var mod of _numbers) {
|
|
|
|
|
mod.checked = false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
item.checked = true;
|
|
|
|
|
this.activity_number_id = item.id;
|
|
|
|
|
this.numbers = _numbers;
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
tobook(type) {
|
|
|
|
|
// this.showNumbers = true
|
|
|
|
|
@ -207,17 +220,27 @@
|
|
|
|
|
res.isCanBook = that.$moment(nt).isBefore(res.end_plan);
|
|
|
|
|
that.list = res;
|
|
|
|
|
let numberArr = []
|
|
|
|
|
let nowTime = that.getNowTime()
|
|
|
|
|
let nowTime = that.getNowTime();
|
|
|
|
|
var i = 0;
|
|
|
|
|
for (var m of res.numbers) {
|
|
|
|
|
m.label = m.name + "(" + that.timeFormat(m.start_time, "yyyy年MM月DD日") + " " + that
|
|
|
|
|
.getHm(m.start_time) + "-" + that.getHm(m.end_time) + ")"
|
|
|
|
|
if (m.has_total == m.total && m.total != 0 || that.compareDate(nowTime, m
|
|
|
|
|
.end_plan)) {
|
|
|
|
|
m.disabled = true
|
|
|
|
|
m.label = m.name;
|
|
|
|
|
m.time = that.timeFormat(m.start_time, "yyyy年MM月DD日") + " " + that
|
|
|
|
|
.getHm(m.start_time) + "-" + that.getHm(m.end_time);
|
|
|
|
|
if (that.compareDate(nowTime, m
|
|
|
|
|
.end_plan)) {
|
|
|
|
|
m.disabled = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m.has_total == m.total && m.total != 0){
|
|
|
|
|
m.disabled = true
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
numberArr.push(m);
|
|
|
|
|
if(that.chooseNum==""){
|
|
|
|
|
that.chooseNum=m.id;
|
|
|
|
|
numberArr.push(m);
|
|
|
|
|
if (!m.disabled) {
|
|
|
|
|
|
|
|
|
|
this.activity_number_id = (i == 0 ? m.id : '')
|
|
|
|
|
m.checked = i == 0;
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
that.numbers = numberArr
|
|
|
|
|
@ -346,4 +369,31 @@
|
|
|
|
|
.colortext {
|
|
|
|
|
color: #D98012
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.numbersBox {
|
|
|
|
|
border: #F7F6F4 1px solid;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
background-color: #F7F6F4;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.numbersBoxActive {
|
|
|
|
|
border: #D98012 1px solid;
|
|
|
|
|
background-color: #FCF6E3;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.book-box-row-timeitem-status {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
background: #EF9525;
|
|
|
|
|
border-top-right-radius: 5rpx;
|
|
|
|
|
border-bottom-left-radius: 5rpx;
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
color: #828282;
|
|
|
|
|
padding: 7rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|