刘翔宇-旅管家 3 years ago
parent 0b50e78f4f
commit cc245fe2f4

@ -80,16 +80,22 @@
<view class="book-box-timerow">
<view class="book-box-row-timeitem" v-for="(item,index) in currentDate.rules"
:class="{'book-box-row-timeitem-on':item.checked,'timeitem-none':item.remain_count==0}"
:class="{'book-box-row-timeitem-on':item.checked,'timeitem-none':item.remain_count==0,'timeitem-none':item.isCanbook==false}"
:key="index" @click="handleSelectTime(index)">
<view class="book-box-row-timeitem-status" v-if="item.checked">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
<view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view>
<view class="book-box-row-timeitem-txt" v-if="item.remain_count>0">
{{item.remain_count}}
</view>
<view class="book-box-row-timeitem-txt" v-else></view>
<block v-if="item.isCanbook">
<view class="book-box-row-timeitem-txt" v-if="item.remain_count>0">
{{item.remain_count}}
</view>
<view class="book-box-row-timeitem-txt" v-else></view>
</block>
<block v-else>
<view class="book-box-row-timeitem-txt" >不可预约</view>
</block>
</view>
</view>
</view>
@ -274,14 +280,17 @@
}
cdate.checked = true;
this.loadDefaultTime(cdate.rules);
this.currentDate = cdate;
this.loadDefaultTime(cdate.rules);
this.listDatePrice = list;
this.$forceUpdate();
},
handleSelectTime(index) {
var mod = this.currentDate.rules[index];
var mod = this.currentDate.rules[index];
if (!mod.isCanbook) {
return false
}
if (mod.remain_count == 0) {
this.util.toast("该时段已售罄");
return false
@ -452,12 +461,15 @@
},
loadDefaultTime(rules) {
var that = this;
var nt = new Date();
that.currentTime = {};
let isDefault = false;
for (var mod of rules) {
mod.checked = false;
if (!isDefault && mod.remain_count > 0) {
mod.endtime = that.currentDate.date + " " + mod.end_time;
var isCanbook = that.$moment(nt).isBefore(mod.endtime);
mod.isCanbook = isCanbook;
if (!isDefault && mod.remain_count > 0 && isCanbook) {
isDefault = true;
mod.checked = true;
that.currentTime = mod;

@ -86,8 +86,8 @@
canvasId: 'qrcode',
componentInstance: this,
text: text,
size: 150,
margin: 0,
size: 140,
margin: 10,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
@ -228,8 +228,6 @@
}
.imgs {
width: 273rpx;
height: 273rpx;
margin: 30rpx 0 50rpx 0;
font-size: 0;
display: inline-block;

@ -7,10 +7,11 @@
<u-empty mode="list" :marginTop="100" v-if="isloading&&listOrder.length==0" />
<view class="orderBoxList" v-else>
<block v-for="(item,index) in listOrder" :key="index">
<view class="orderBox" @click="toinfo(item.id)">
<view class="orderBox" :class="{'cancelBox':item.status==0}" @click="toinfo(item.id)">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">{{item.plate}}</text>
<view class="orderBoxStatus">待参观</view>
<view class="orderBoxStatus" :class="{'cancelStatus':item.status==0}">{{item.status_name}}
</view>
</view>
<view class="orderBoxInfo flex-col">
@ -30,7 +31,7 @@
<view class="orderBoxFooter flex-row flex_end">
<view class="fbtn" @click="toinfo(item.id)" style="margin-right: 23rpx;">查看详情</view>
<view class="fbtn cancel" @click.stop="tocancel(item.id)">取消</view>
<view class="fbtn cancel" @click.stop="tocancel(item.id)" v-if="item.status==1"></view>
</view>
</view>
</block>
@ -58,7 +59,12 @@
}],
current: 0,
isloading: true,
listOrder: []
listOrder: [],
statusArr: {
0: "已取消",
1: "待完成",
2: "已完成"
}
}
},
onShow() {
@ -88,7 +94,7 @@
utilSuccess: function(res) {
that.loadOrder()
},
utilFail: function(res) {
utilFail: function(res) {
that.util.toast(res);
}
})
@ -107,6 +113,9 @@
status: this.list[this.current].idx
},
utilSuccess: function(res) {
for (var mod of res) {
mod.status_name = that.statusArr[mod.status];
}
that.listOrder = res;
this.isloading = false;
},
@ -127,6 +136,15 @@
padding: 20rpx 0 0 0;
}
.cancelStatus {
background: #CFCFCF !important;
}
.cancelBox .fbtn {
background: #CFCFCF;
color: #828282;
}
.fbtn {
background: #EF9525;
border-radius: 8rpx;
@ -140,6 +158,10 @@
color: #828282;
}
.cancelBox .iconfont {
color: #828282;
}
.iconfont {
color: #6EAC97;
margin-right: 20rpx;

@ -36,7 +36,7 @@
<view class="orderBoxFooter flex-row flex_end">
<view class="fbtn cancel" v-if="item.status==1" style="margin-right: 23rpx;"
@click.stop="tocancel(item.id)">取消</view>
@click.stop="tocancel(item.id)">取消预约</view>
<view class="fbtn" @click.stop="toinfo(item.id)">查看详情</view>
</view>
</view>

@ -56,7 +56,8 @@
</view>
</view>
<view class="activityBox-row" style="margin-top: 20rpx;color: #EF9525;" @click="showSelectorder=true">
<view class="activityBox-row" style="margin-top: 20rpx;color: #EF9525;"
@click="showSelectorder=true">
<text>选择信息{{selectInfo.info||"暂未选择"}}</text>
</view>
</view>
@ -83,7 +84,7 @@
<view class="box-tip flex-row align-center" @click="handleSelectOrder(index,1)"
style="margin-bottom: 20rpx;">
<u-icon :name="(item.checked?'checkmark-circle-fill':'checkmark-circle')"
color="#EF9525">
:color="(item.checked?'#EF9525':'#828282')">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">
{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
@ -100,7 +101,7 @@
<view class="box-tip flex-row align-center" @click="handleSelectOrder(index,2)"
style="margin-bottom: 20rpx;">
<u-icon :name="(item.checked?'checkmark-circle-fill':'checkmark-circle')"
color="#EF9525">
:color="(item.checked?'#EF9525':'#828282')">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">
活动时间{{item.activity.start_time}}
@ -360,6 +361,10 @@
width: 96%;
}
.box-tiptxt {
font-size: 28rpx;
}
.footer {
position: fixed;
bottom: 0;

@ -590,6 +590,7 @@
this.load3Day(date, function(isCanbook) {
if (isCanbook) {
that.showCalendar = false;
that.bcurrentTime = null;
} else {
that.util.toast("您选择的日期不可预约")
}
@ -630,7 +631,7 @@
var nt = this.$moment().format("yyyy-MM-DD");
let list = this.listDatePrice;
let cdate = list[index];
if (cdate.is_open === 0) {
uni.showToast({
icon: "none",
@ -653,9 +654,9 @@
}
cdate.checked = true;
this.currentDate = cdate;
this.loadDefaultTime(cdate.rules);
this.currentDate = cdate;
this.listDatePrice = list;
this.$forceUpdate();
},
@ -752,11 +753,19 @@
for (var mod of rules) {
mod.checked = false;
if (!isDefault && mod.remain_count > 0) {
isDefault = true;
mod.checked = true;
that.currentTime = mod;
if (that.bcurrentTime) {
if (that.bcurrentTime.id == mod.id) {
mod.checked = true;
that.currentTime = that.bcurrentTime;
}
} else {
if (!isDefault && mod.remain_count > 0) {
isDefault = true;
mod.checked = true;
that.currentTime = mod;
}
}
}
},

@ -1,8 +1,8 @@
@font-face {
font-family: 'iconfont'; /* Project id 3356385 */
src: url('//at.alicdn.com/t/font_3356385_v6nfjk6rvl.woff2?t=1652365280374') format('woff2'),
url('//at.alicdn.com/t/font_3356385_v6nfjk6rvl.woff?t=1652365280374') format('woff'),
url('//at.alicdn.com/t/font_3356385_v6nfjk6rvl.ttf?t=1652365280374') format('truetype');
src: url('https://at.alicdn.com/t/font_3356385_sqfmhev64k.woff2?t=1654076004192') format('woff2'),
url('https://at.alicdn.com/t/font_3356385_sqfmhev64k.woff?t=1654076004192') format('woff'),
url('https://at.alicdn.com/t/font_3356385_sqfmhev64k.ttf?t=1654076004192') format('truetype');
}
.iconfont {
@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-checkboxweixuanzhongxiao:before {
content: "\e933";
}
.icon-ditu:before {
content: "\e61a";
}
.icon-icon_xuzhixiao:before {
content: "\e639";
}
.icon-ziyuan:before {
content: "\e614";
}
.icon-lianxiwomen:before {
content: "\e608";
}

Loading…
Cancel
Save