|
|
|
@ -3,33 +3,36 @@ |
|
|
|
|
<view class="v-order-bg"></view> |
|
|
|
|
<view class="v-order-detail-state"> |
|
|
|
|
<view class="order-top"> |
|
|
|
|
<view class="state">待付款</view> |
|
|
|
|
<view class="tip">酒店房间有限,请尽快支付,超时后订单将自动取消</view> |
|
|
|
|
<view class="time">25:25</view> |
|
|
|
|
<view class="state">{{homestayOrderData.status}}</view> |
|
|
|
|
<view class="tip">{{promptText(homestayOrderData.orderStatus)}}</view> |
|
|
|
|
|
|
|
|
|
<view class="time" v-if="homestayOrderData.orderStatus == '0'">25:25</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="row order-top-btn"> |
|
|
|
|
<view class="col-12"> |
|
|
|
|
<view class="pay-btn">去支付</view> |
|
|
|
|
<view class=" order-top-btn"> |
|
|
|
|
<view class=""> |
|
|
|
|
<view class="pay-btn" v-if="homestayOrderData.orderStatus == '0'">去支付</view> |
|
|
|
|
<view class="pay-btn" v-else @click="toHomeStayBookingPage(homestayOrderData.hotelId)">再次预订</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="col-12"> |
|
|
|
|
<!-- <view class="col-12"> |
|
|
|
|
<view class="cancel-btn">取消订单</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="false"> |
|
|
|
|
<view class="pay-btn">再次约定</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="row describe"> |
|
|
|
|
<!-- <view v-if="homestayOrderData.orderStatus != '0' && homestayOrderData.orderStatus !='1'"> |
|
|
|
|
<view class="pay-btn">再次预订</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="row describe" v-if="homestayOrderData.orderStatus == '7' || homestayOrderData.orderStatus == '8' "> |
|
|
|
|
|
|
|
|
|
<view class="dec col">退款进度:<text>退款成功</text></view> |
|
|
|
|
<view class="btn">查看详情</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="v-card container-fluid m-t--80"> |
|
|
|
|
<!-- <view class="v-card container-fluid m-t--80"> |
|
|
|
|
<view class="v-form-item row"> |
|
|
|
|
<view class="label">取消规则</view> |
|
|
|
|
<view class="content">09月13日18:00前,可免费取消</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
<view class="v-card container-fluid m-t-24"> |
|
|
|
|
<view class="v-form"> |
|
|
|
@ -37,10 +40,10 @@ |
|
|
|
|
<view class="col row"> |
|
|
|
|
<view class="label">在线支付</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
<text class="price">1520.00</text> |
|
|
|
|
<text class="price">¥{{homestayOrderData.orderAmount}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="detail-btn">详情</view> |
|
|
|
|
<!-- <view class="detail-btn">详情</view> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-line"></view> |
|
|
|
|
<view class="v-form-item row"> |
|
|
|
@ -52,34 +55,40 @@ |
|
|
|
|
|
|
|
|
|
<view class="v-card container-fluid m-t-24"> |
|
|
|
|
<view class="v-order-info row"> |
|
|
|
|
<view class="info-image"></view> |
|
|
|
|
<view class="info-image"> |
|
|
|
|
<!-- <image :src="homestayOrderData.hotelLogo" ></image> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="info-content"> |
|
|
|
|
<view class="title">石家庄西部长青璞祯酒店</view> |
|
|
|
|
<view class="address">鹿泉区白鹿乡梁庄村西部长青休博城</view> |
|
|
|
|
<view class="title">{{homestayOrderData.hotelName}}</view> |
|
|
|
|
<view class="address">{{homestayOrderData.addressInfo}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="row v-order-info-btn"> |
|
|
|
|
<view class="btn col-12">地图导航</view> |
|
|
|
|
<view class="btn col">咨询电话</view> |
|
|
|
|
<view class="btn col-12" @click="navigation">地图导航</view> |
|
|
|
|
<view class="btn col" @click="cell(homestayOrderData.serviceNumber)">咨询电话</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="v-card container-fluid m-t-24"> |
|
|
|
|
<view class="v-form-date row flex-align-center"> |
|
|
|
|
<view class="start"><text class="date">9月12日</text></view> |
|
|
|
|
<text class="mid">1晚</text> |
|
|
|
|
<view class="end"><text class="date">09月12日</text></view> |
|
|
|
|
<view class="v-form-date row flex-align-center" v-for="item in homestayOrderData.dateList"> |
|
|
|
|
<view class="start"><text class="date">{{item.checkTime}}</text></view> |
|
|
|
|
<text class="mid">{{item.day}}晚</text> |
|
|
|
|
<view class="end"><text class="date">{{item.checkOutTime}}</text></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-name m-t-12">豪华大床房</view> |
|
|
|
|
<view class="v-form-tip"><text>无早餐</text> <text>1张2米特大床</text> <text>2人入住</text> <text>45㎡</text></view> |
|
|
|
|
<view class="v-form-name m-t-12">{{homestayOrderData.houseName}}</view> |
|
|
|
|
<view class="v-form-tip"> |
|
|
|
|
<!-- <text>无早餐</text> --> |
|
|
|
|
<!-- <text>{{homestayOrderData.bedWide +'米宽'+homestayOrderData.hotelTypeName}}</text> --> |
|
|
|
|
<text>最多入住{{homestayOrderData.guest}}人</text> |
|
|
|
|
<text>{{homestayOrderData.houseArea}}㎡</text></view> |
|
|
|
|
<view class="v-form bg m-t-24"> |
|
|
|
|
<view class="v-form-item row"> |
|
|
|
|
<view class="label">入住人</view> |
|
|
|
|
<view class="content">张春荣</view> |
|
|
|
|
<view class="content">{{homestayOrderData.bookerusername}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-item row"> |
|
|
|
|
<view class="label">联系手机</view> |
|
|
|
|
<view class="content">157144552</view> |
|
|
|
|
<view class="content">{{homestayOrderData.bookerphone}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -89,11 +98,11 @@ |
|
|
|
|
<view class="v-form"> |
|
|
|
|
<view class="v-form-item row"> |
|
|
|
|
<view class="label">订单号</view> |
|
|
|
|
<view class="content">567389478348534</view> |
|
|
|
|
<view class="content">{{homestayOrderData.orderNumber}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-item row"> |
|
|
|
|
<view class="label">下单时间</view> |
|
|
|
|
<view class="content">2024-08-20 12:00:01</view> |
|
|
|
|
<view class="content">{{homestayOrderData.orderTime}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -104,21 +113,130 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
title: 'Hello' |
|
|
|
|
title: '订单详情', |
|
|
|
|
homestayOrderData:{ |
|
|
|
|
'id': 1734877929, |
|
|
|
|
'orderNumber': '', |
|
|
|
|
'hotelId': 0, |
|
|
|
|
'hotelName': '', |
|
|
|
|
'addressInfo': '', |
|
|
|
|
'orderAmount': 0, |
|
|
|
|
'orderTime': '', |
|
|
|
|
'payTime': null, |
|
|
|
|
'price': null, |
|
|
|
|
'status': '', |
|
|
|
|
'orderStatus': '0', |
|
|
|
|
'belongingPayOrderId': '', |
|
|
|
|
'bedNum': 0, |
|
|
|
|
'hotelLogo': '', |
|
|
|
|
'houseName': '', |
|
|
|
|
'serviceNumber': '', |
|
|
|
|
'bedWide': 0, |
|
|
|
|
'houseArea': 0, |
|
|
|
|
'guest': 0, |
|
|
|
|
'bedNumTwo': 0, |
|
|
|
|
'hotelTypeName': '', |
|
|
|
|
'bookerusername': '', |
|
|
|
|
'bookerphone': '', |
|
|
|
|
'cancelReason': null, |
|
|
|
|
'dateList': [ |
|
|
|
|
{ |
|
|
|
|
'checkTime': '', |
|
|
|
|
'checkOutTime': '', |
|
|
|
|
'day': 0 |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
'no': null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
|
|
|
|
|
onLoad(opetion) { |
|
|
|
|
this.getHomestayOrderDetail(opetion.id) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
// 查询订单详情 |
|
|
|
|
getHomestayOrderDetail(orderId){ |
|
|
|
|
let data ={ |
|
|
|
|
'id':orderId |
|
|
|
|
} |
|
|
|
|
this.$Request.get(this.$config.getHomestayOrderDetail, data, null, null, false, null).then((res) => { |
|
|
|
|
console.log(res) |
|
|
|
|
if(res.code == 0){ |
|
|
|
|
this.homestayOrderData = res.data |
|
|
|
|
}else{ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.data, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 拨打咨询电话 |
|
|
|
|
cell(val){ |
|
|
|
|
uni.makePhoneCall({ |
|
|
|
|
phoneNumber: val //仅为示例 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//导航 |
|
|
|
|
navigation(){ |
|
|
|
|
uni.openLocation({ |
|
|
|
|
latitude: Number(this.homestayOrderData.lat), |
|
|
|
|
longitude: Number(this.homestayOrderData.lon), |
|
|
|
|
name: this.homestayOrderData.hotelName, |
|
|
|
|
address: this.homestayOrderData.addressInfo, |
|
|
|
|
complete: function(result) { |
|
|
|
|
console.log(result); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 根据订单状态反馈提示文字 |
|
|
|
|
promptText: function(val) { |
|
|
|
|
//订单状态 0未支付 1已支付 2已取消 3 预定失败 4预定成功 5 已入住 6已离店 7 退款中 8已退款 |
|
|
|
|
switch (val) { |
|
|
|
|
case "0": |
|
|
|
|
return "酒店房间有限,请尽快支付,超时后订单将自动取消" |
|
|
|
|
break; |
|
|
|
|
case "1": |
|
|
|
|
return "等待商家确认汇总,请及时关注订单状态" |
|
|
|
|
break; |
|
|
|
|
case "2": |
|
|
|
|
return "订单超时未支付,请重新下单" |
|
|
|
|
break; |
|
|
|
|
case "3": |
|
|
|
|
return "商家因满房原因暂时无法接单,建议您稍后重试或选择其他房型" |
|
|
|
|
break; |
|
|
|
|
case "4": |
|
|
|
|
return "请按预订时间办理入住" |
|
|
|
|
break; |
|
|
|
|
case "5": |
|
|
|
|
return "" |
|
|
|
|
break; |
|
|
|
|
case "6": |
|
|
|
|
return "" |
|
|
|
|
break; |
|
|
|
|
case "7": |
|
|
|
|
return "退款进度:发起退款申请" |
|
|
|
|
break; |
|
|
|
|
case "8": |
|
|
|
|
return "退款进度:退款成功" |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//跳转预订页面 |
|
|
|
|
toHomeStayBookingPage(hotelId){ |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: "/subPageB/Homestay/homestaydetail/homestaydetail?guid="+hotelId |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
|
/*每个页面公共css */ |
|
|
|
|
@import '../../static/common.scss'; |
|
|
|
|
@import '@/static/css/common.scss'; |
|
|
|
|
|
|
|
|
|
.v-order-detail { |
|
|
|
|
padding-bottom: 24rpx; |
|
|
|
|