|
|
|
|
@ -4,36 +4,39 @@
|
|
|
|
|
<u-tabs lineWidth="50" lineHeight="2" :scrollable="false" :list="list" lineColor="#EF9525"
|
|
|
|
|
:is-scroll="false" :current="current" @change="handleChange"></u-tabs>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBoxList">
|
|
|
|
|
<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">
|
|
|
|
|
<view class="orderBox" @click="toinfo(item.id)">
|
|
|
|
|
<view class="orderBoxTitle flex-row">
|
|
|
|
|
<text class="orderBoxTitleTxt">{{item.isteam?"团队预约":"个人预约"}}</text>
|
|
|
|
|
<view class="orderBoxStatus">待参观</view>
|
|
|
|
|
<text class="orderBoxTitleTxt">{{item.type==1?"团队预约":"个人预约"}}</text>
|
|
|
|
|
<view class="orderBoxStatus" :class="{'cancel':item.status==0}">{{item.status_name}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="orderBoxInfo flex-col">
|
|
|
|
|
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
|
|
|
|
|
<text class="iconfont icon-youkexuzhi"></text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">订单信息:5月06日 09:00-10:00 丨 3位观众</text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">
|
|
|
|
|
订单信息:{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
|
|
|
|
|
{{item.time}}丨{{item.details_count}}位观众</text>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBoxInfoRow flex-row">
|
|
|
|
|
<text class="iconfont icon-iconfontgerenzhongxin"></text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">联系人:王小华 丨 13355634563</text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">联系人:{{item.leader}}丨 {{item.mobile}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBoxInfoRow flex-row" v-if="item.isteam" style="margin-top: 20rpx;">
|
|
|
|
|
<view class="orderBoxInfoRow flex-row" v-if="item.type==1" style="margin-top: 20rpx;">
|
|
|
|
|
<text class="iconfont icon-danwei"></text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">单位名称:王小华 丨 13355634563</text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">单位名称:{{item.unit}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBoxTime">
|
|
|
|
|
<text>下单时间:5月03日 09:30</text>
|
|
|
|
|
<text>下单时间:{{item.created_at}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="orderBoxFooter flex-row flex_end">
|
|
|
|
|
<view class="fbtn" @click="tobook()" style="margin-right: 23rpx;">查看详情</view>
|
|
|
|
|
<view class="fbtn cancel">取消</view>
|
|
|
|
|
<view class="fbtn" @click.stop="toinfo(item.id)" style="margin-right: 23rpx;">查看详情</view>
|
|
|
|
|
<view class="fbtn cancel" @click.stop="tocancel(item.id)">取消</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
@ -50,30 +53,78 @@
|
|
|
|
|
flex: 1
|
|
|
|
|
},
|
|
|
|
|
list: [{
|
|
|
|
|
name: '全部'
|
|
|
|
|
name: '全部',
|
|
|
|
|
idx: ""
|
|
|
|
|
}, {
|
|
|
|
|
name: '待参观'
|
|
|
|
|
name: '待参观',
|
|
|
|
|
idx: "1"
|
|
|
|
|
}, {
|
|
|
|
|
name: '已参观'
|
|
|
|
|
name: '已参观',
|
|
|
|
|
idx: "2"
|
|
|
|
|
}],
|
|
|
|
|
current: 0,
|
|
|
|
|
listOrder: [{
|
|
|
|
|
isteam: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
isteam: false
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
isloading: true,
|
|
|
|
|
listOrder: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.loadOrder();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleChange() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleChange(e) {
|
|
|
|
|
this.current = e.index;
|
|
|
|
|
this.loadOrder();
|
|
|
|
|
},
|
|
|
|
|
tobook(){
|
|
|
|
|
toinfo(id) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "/pages/order/visitorderinfo"
|
|
|
|
|
url: "/pages/order/visitorderinfo?id=" + id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
tocancel(id) {
|
|
|
|
|
var that = this;
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '确认要取消预约?',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
that.util.request({
|
|
|
|
|
api: '/api/mobile/visit/cancel-order',
|
|
|
|
|
data: {
|
|
|
|
|
id: id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.loadOrder()
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: res
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('用户点击确定');
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
console.log('用户点击取消');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
loadOrder() {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/user/my-visit-order',
|
|
|
|
|
data: {
|
|
|
|
|
status: this.list[this.current].idx
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.listOrder = res;
|
|
|
|
|
this.isloading = false;
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: res
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -142,6 +193,10 @@
|
|
|
|
|
color: #351C1B;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cancelstatus {
|
|
|
|
|
background: #828282;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.orderBoxStatus {
|
|
|
|
|
background: #EF9525;
|
|
|
|
|
border-top-right-radius: 16rpx;
|
|
|
|
|
|