|
|
@ -2,11 +2,31 @@ |
|
|
|
<view class="order-details"> |
|
|
|
<block v-if="optionsQuery.order_type==3"> |
|
|
|
<!-- pageInfo.order_type 场次(0)/人次(1) --> |
|
|
|
<reservation-site-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 0"></reservation-site-detail> |
|
|
|
<reservation-site-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 0" @refundbtn='refundBtn' ></reservation-site-detail> |
|
|
|
<reservation-people-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 1" @recoverBtn="peopleRecoverBtn" @okChange="okChange"></reservation-people-detail> |
|
|
|
</block> |
|
|
|
<timing-detail :orderInfo="pageInfo" v-if="optionsQuery.order_type==1"></timing-detail> |
|
|
|
<organize-detail :orderInfo="pageInfo" v-if="optionsQuery.order_type==10"></organize-detail> |
|
|
|
|
|
|
|
<!-- 次卡、订场退款弹窗 --> |
|
|
|
<view class="refund-mask" v-if="isOrderRefund" @click="isOrderRefund = false"> |
|
|
|
<view class="rm-content" @click.stop="_=>false"> |
|
|
|
<view class="rc-tit">退款</view> |
|
|
|
<view class="rc-info"> |
|
|
|
<view class="ri-view">{{ pageInfo.stadium_name || '-' }}</view> |
|
|
|
<view class="ri-view">订单编号:{{ pageInfo.order_no || '-' }}</view> |
|
|
|
<view class="ri-view">手机号码:{{ pageInfo.mobile || '-' }}</view> |
|
|
|
</view> |
|
|
|
<view class="rc-price"> |
|
|
|
<view class="rp-name"><text class="rn-txt">*</text>退款金额</view> |
|
|
|
<view class="rp-frame"> |
|
|
|
<input class="rf-ipt" v-model="refundPrice" type="number" placeholder="请输入金额" /> |
|
|
|
</view> |
|
|
|
<view class="rp-tip">最多可退{{ (pageInfo.extension&&pageInfo.extension.refundable_amount) || 0 }}元</view> |
|
|
|
</view> |
|
|
|
<view class="ri-btn" @click="confirmRefund">确认退款</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -16,7 +36,7 @@ |
|
|
|
import reservationPeopleDetail from '../../components/order/reservation_people_detail/reservation_people_detail.vue'; |
|
|
|
import organizeDetail from '../../components/order/organize_detail/organize_detail.vue'; |
|
|
|
|
|
|
|
import util from '@/utils/util'; |
|
|
|
import util from '../../../../utils/util'; |
|
|
|
import deviceServer from '../../js/device_server'; |
|
|
|
import deviceApi from '../../js/device_api'; |
|
|
|
import { mapState } from 'vuex'; |
|
|
@ -46,6 +66,11 @@ |
|
|
|
order_type: -1, |
|
|
|
}, |
|
|
|
pageInfo: {}, |
|
|
|
|
|
|
|
// 订场/次卡退款 --- |
|
|
|
isOrderRefund: false, |
|
|
|
refundPrice: '', |
|
|
|
// 订场/次卡退款 --- |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
@ -65,6 +90,36 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
refreshPage(){ |
|
|
|
let { optionsQuery } = this; |
|
|
|
this.isOrderRefund = false; |
|
|
|
this.refundPrice = ''; |
|
|
|
this.getPageInfo({ |
|
|
|
orderType: optionsQuery.order_type, |
|
|
|
stadium_id: optionsQuery.stadium_id, |
|
|
|
order_no: optionsQuery.order_no, |
|
|
|
}) |
|
|
|
}, |
|
|
|
refundBtn(){ |
|
|
|
this.isOrderRefund = true; |
|
|
|
}, |
|
|
|
confirmRefund: util.debounce(function(){ |
|
|
|
let { pageInfo, refundPrice } = this; |
|
|
|
deviceServer.get({ |
|
|
|
url: deviceApi.orderRefund, |
|
|
|
data: { order_no: pageInfo.order_no || '', amount: refundPrice || 0, integral: 0 }, // integral 传0就好 |
|
|
|
isDefaultGet: false |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
if(res.data.code == 0){ |
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
setTimeout(this.refreshPage, 1200); |
|
|
|
}else{ |
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(util.hideLoad) |
|
|
|
}, 300, true), |
|
|
|
// 次卡恢复二维码状态刷新订单 |
|
|
|
peopleRecoverBtn(){ |
|
|
|
this.okChange(); // 逻辑一样,刷新 |
|
|
@ -97,7 +152,6 @@ |
|
|
|
.catch(util.hideLoad) |
|
|
|
}, |
|
|
|
okChange(){ |
|
|
|
console.log("有了吗") |
|
|
|
let { optionsQuery } = this |
|
|
|
this.getPageInfo({ |
|
|
|
orderType: optionsQuery.order_type, |
|
|
@ -114,4 +168,83 @@ |
|
|
|
.order-details{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.refund-mask{ |
|
|
|
position: fixed; |
|
|
|
left: 0; |
|
|
|
top: 0; |
|
|
|
bottom: 0; |
|
|
|
right: 0; |
|
|
|
background-color: rgba($color: #000, $alpha: .5); |
|
|
|
.rm-content{ |
|
|
|
position: absolute; |
|
|
|
left: 50%; |
|
|
|
top: 50%; |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
padding: 80upx; |
|
|
|
background-color: #fff; |
|
|
|
width: 620upx; |
|
|
|
border-radius: 10upx; |
|
|
|
.rc-tit{ |
|
|
|
margin-bottom: 30upx; |
|
|
|
text-align: center; |
|
|
|
font-size: 32upx; |
|
|
|
font-weight: 500; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
.rc-info{ |
|
|
|
margin-bottom: 34upx; |
|
|
|
.ri-view{ |
|
|
|
line-height: 40upx; |
|
|
|
font-size: 28upx; |
|
|
|
color: #9C9C9F; |
|
|
|
@include textHide(1); |
|
|
|
&:first-child{ |
|
|
|
font-weight: 500; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.rc-price{ |
|
|
|
margin-bottom: 32upx; |
|
|
|
.rp-name{ |
|
|
|
margin-bottom: 8upx; |
|
|
|
font-size: 28upx; |
|
|
|
line-height: 48upx; |
|
|
|
color: #333; |
|
|
|
.rn-txt{ |
|
|
|
color: #EA5061; |
|
|
|
} |
|
|
|
} |
|
|
|
.rp-frame{ |
|
|
|
padding: 0 20upx; |
|
|
|
height: 88upx; |
|
|
|
border-radius: 10upx; |
|
|
|
border: 2upx solid #D8D8D8; |
|
|
|
.rf-ipt{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
font-size: 28upx; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
.rp-tip{ |
|
|
|
font-size: 24upx; |
|
|
|
color: #EA5061; |
|
|
|
} |
|
|
|
} |
|
|
|
.ri-btn{ |
|
|
|
margin: 0 auto; |
|
|
|
width: 240upx; |
|
|
|
line-height: 88upx; |
|
|
|
text-align: center; |
|
|
|
border-radius: 10upx; |
|
|
|
font-size: 32upx; |
|
|
|
font-weight: 500; |
|
|
|
color: #fff; |
|
|
|
background-color: $themeColor; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</style> |