You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
244 lines
8.0 KiB
244 lines
8.0 KiB
<template>
|
|
<view class="reservation-order" @click="detailChange">
|
|
<view class="ro-header">
|
|
<view class="rh-view">{{orderInfo.stadium_name || '-'}}</view>
|
|
<text
|
|
:class="[ 'rh-text', orderInfo.pay_status == 1?'rh-active':'', zh_order_status(orderInfo) == '已退款'?'rh-red':'' ]"
|
|
>{{zh_order_status(orderInfo)}}</text>
|
|
</view>
|
|
<view class="ro-section">
|
|
<view class="rs-line">
|
|
<view class="rl-view">订单编号:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view">{{orderInfo.order_no || '-'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="rs-line">
|
|
<view class="rl-view">预订项目:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view"><text class="rv-text">{{ zh_type_name(orderInfo.order_type) }}</text></view>
|
|
</view>
|
|
</view>
|
|
<!-- 场次 -->
|
|
<block v-if="orderInfo.order_type == 0">
|
|
<view class="rs-line" >
|
|
<view class="rl-view">预订场数:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view">{{ orderInfo.number || '-'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="rs-line">
|
|
<view class="rl-view">预订时间:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view" v-for="(e,i) in orderInfo.sessions" :key="i">{{e.date}} {{e.duration}}{{orderInfo.sessions.length>1?'等':''}}</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<!-- 人次 -->
|
|
<block v-if="orderInfo.order_type == 1">
|
|
<view class="rs-line">
|
|
<view class="rl-view">数量:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view">{{ orderInfo.number || '-'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="rs-line">
|
|
<view class="rl-view">类型:</view>
|
|
<view class="rl-view">
|
|
<!-- <view class="rv-view" v-for="(e, i) in orderInfo.person_number_spec_names" :key="i"><text>{{ e || '-'}}</text></view> -->
|
|
<view class="rv-view" >{{ zh_spec_names || '-'}}</view>
|
|
</view>
|
|
</view>
|
|
<!-- 人次+随时用 -->
|
|
<view class="rs-line" v-if="orderInfo.person_number_rule.order_method==1">
|
|
<view class="rl-view">有效期至:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view">{{orderInfo.end_time || '-'}}</view>
|
|
</view>
|
|
</view>
|
|
<!-- 人次+指定日期 -->
|
|
<view class="rs-line" v-if="orderInfo.person_number_rule.order_method==2">
|
|
<view class="rl-view">使用日期:</view>
|
|
<view class="rl-view">
|
|
<view class="rv-view">{{orderInfo.date || '-'}}</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<view class="ro-bot">
|
|
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.pay_amount || '0'}}</text></view>
|
|
<view class="rb-btn" v-if="orderInfo.order_type == 1" @click.stop="verifyBtn">核销</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import util from '@/utils/util';
|
|
export default {
|
|
props: {
|
|
orderInfo: {
|
|
type: Object,
|
|
default: ()=>({})
|
|
}
|
|
},
|
|
computed: {
|
|
zh_verify_type(){
|
|
// 核销方式 1/2/3/4 核销码核销/人脸核销/扫码核销/商家扫码
|
|
return status =>{
|
|
const _obj = {
|
|
'0': '未核销',
|
|
'1': '核销码核销',
|
|
'2': '人脸核销',
|
|
'3': '扫码核销',
|
|
'4': '商家扫码',
|
|
}
|
|
return _obj[`${status}`] || '-'
|
|
}
|
|
},
|
|
zh_type_name(){
|
|
// 预订项目 0场次 1人次
|
|
let { orderInfo } = this
|
|
return status =>{
|
|
const _obj = {
|
|
'0': orderInfo.venue_type_name,
|
|
'1': orderInfo.person_number_rule_name,
|
|
}
|
|
return _obj[`${status}`] || '-'
|
|
}
|
|
},
|
|
zh_spec_names(){
|
|
let { orderInfo } = this
|
|
if(!orderInfo.person_number_spec_names)return '';
|
|
let spec = orderInfo.person_number_spec_names.join('+')
|
|
return spec || '';
|
|
},
|
|
},
|
|
methods:{
|
|
verifyBtn(){
|
|
this.$emit('verify')
|
|
},
|
|
zh_order_status(orderInfo = {}){
|
|
// 订单状态 -1已作废0未支付1已支付待使用2已使用3已失效4已退款
|
|
let _status = orderInfo.pay_status || '';
|
|
if(_status == 3&&orderInfo.is_active_release)return '已失效*'; // 20220929 新增状态 '已失效*'
|
|
// 20230705 新增状态 已取消
|
|
// end:如果金额为0而且是已退款的话就显示已取消, 或者是share_pid大于0但是已退款的
|
|
// extension.take_up_bboc && !extension.take_up_bboc_pay 这个表示未收款的挂账订单
|
|
if(
|
|
orderInfo.pay_status == 4&&
|
|
(orderInfo.share_pid > 0 ||
|
|
orderInfo.pay_amount == 0 ||
|
|
(orderInfo?.extension?.take_up_bboc && !orderInfo?.extension?.take_up_bboc_pay))
|
|
)return '已取消';
|
|
const _obj = {
|
|
'-1': '已作废',
|
|
'0': '未支付',
|
|
'1': '待使用',
|
|
'2': '已使用',
|
|
'3': '已失效',
|
|
'4': '已退款',
|
|
'8': '使用中', // 20210528 新增状态
|
|
}
|
|
return _obj[`${_status}`] || '-'
|
|
},
|
|
detailChange(){
|
|
let { orderInfo } = this
|
|
let _str = `stadium_id=${orderInfo.stadium_id || ''}&order_no=${orderInfo.order_no || ''}&order_type=3`
|
|
util.routeTo(`/subpackage/device/pages/order_details/order_details?${_str}`,'nT');
|
|
}
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" >
|
|
@import "../../style/public.scss";
|
|
.reservation-order{
|
|
padding: 0 24upx;
|
|
border-radius: 10upx;
|
|
background-color: #fff;
|
|
.ro-header{
|
|
margin-bottom: 18upx;
|
|
height: 98upx;
|
|
line-height: 96upx;
|
|
border-bottom: 2upx solid #D8D8D8;
|
|
@include centerFlex(space-between);
|
|
.rh-view{
|
|
flex-grow: 1;
|
|
font-size: 28upx;
|
|
color: #1a1a1a;
|
|
@include textHide(1);
|
|
}
|
|
.rh-text{
|
|
margin-left: 20upx;
|
|
flex-shrink: 0;
|
|
font-size: 28upx;
|
|
color: #9C9C9F;
|
|
}
|
|
.rh-active{
|
|
color: $themeColor;
|
|
}
|
|
.rh-red{
|
|
color: #EA5061;
|
|
}
|
|
}
|
|
.ro-section{
|
|
padding-bottom: 20upx;
|
|
.rs-line{
|
|
display: flex;
|
|
.rl-view,.rv-view{
|
|
line-height: 40upx;
|
|
font-size: 24upx;
|
|
color: #9c9c9f;
|
|
>.rv-text{
|
|
color: #333;
|
|
}
|
|
}
|
|
.rl-view{
|
|
&:first-child{
|
|
flex-shrink: 0;
|
|
}
|
|
&+.rl-view{
|
|
flex-grow: 1;
|
|
.rv-view{
|
|
@include textHide(1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
.ro-bot{
|
|
padding-top: 20upx;
|
|
padding-bottom: 30upx;
|
|
border-top: 2upx solid #D8D8D8;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
.rb-btn{
|
|
margin-left: 12upx;
|
|
flex-shrink: 0;
|
|
width: 192upx;
|
|
line-height: 80upx;
|
|
text-align: center;
|
|
border-radius: 10upx;
|
|
font-size: 32upx;
|
|
font-weight: 500;
|
|
color: #fff;
|
|
background-color: $themeColor;
|
|
}
|
|
.rb-total{
|
|
flex-grow: 1;
|
|
line-height: 40upx;
|
|
font-size: 24upx;
|
|
color: #9c9c9f;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
.rt-txt{
|
|
color: #1A1A1A;
|
|
margin-left: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|