|
|
|
|
@ -7,7 +7,8 @@
|
|
|
|
|
import {
|
|
|
|
|
ref,
|
|
|
|
|
onMounted,
|
|
|
|
|
defineEmits
|
|
|
|
|
defineEmits,
|
|
|
|
|
nextTick
|
|
|
|
|
} from "vue";
|
|
|
|
|
import {
|
|
|
|
|
$api,
|
|
|
|
|
@ -100,14 +101,22 @@
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits();
|
|
|
|
|
let tuikuan_tishi=ref('');
|
|
|
|
|
let TuiKuanPopupRef=ref(null);
|
|
|
|
|
const Refound = async (order) => {
|
|
|
|
|
let content='确定要为 '+order.title+' 退款吗?'
|
|
|
|
|
|
|
|
|
|
tuikuan_tishi.value='确定要为 '+order.title+' 退款吗?'
|
|
|
|
|
if(order.appointment_date?.length>0){
|
|
|
|
|
content='您已经预约'+order.appointment_date+'的体检,'+content;
|
|
|
|
|
tuikuan_tishi.value='您已经预约'+order.appointment_date+'的体检,'+content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TuiKuanPopupRef.value.open()
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: content,
|
|
|
|
|
content: tuikuan_tishi.value,
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
tuikuan(order.id)
|
|
|
|
|
@ -118,11 +127,40 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
let tuikuan_yuanyin_list=ref([
|
|
|
|
|
{
|
|
|
|
|
name:"不需要了",
|
|
|
|
|
value:"不需要了"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name:"点错体检项目了",
|
|
|
|
|
value:"点错体检项目了"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name:"已在其他医院体检",
|
|
|
|
|
value:"已在其他医院体检"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name:"其他原因",
|
|
|
|
|
value:"其他原因"
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
let tuikuan_yuanyin=ref('')
|
|
|
|
|
const tuikuanRadioChange=(evt)=>{
|
|
|
|
|
for (let i = 0; i < tuikuan_yuanyin_list.value.length; i++) {
|
|
|
|
|
if (tuikuan_yuanyin_list.value[i].value === evt.detail.value) {
|
|
|
|
|
tuikuan_yuanyin.value = tuikuan_yuanyin_list.value[i].value;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const tuikuan=async(id)=>{
|
|
|
|
|
console.log(tuikuan_yuanyin.value)
|
|
|
|
|
uni.showLoading();
|
|
|
|
|
const response = await $api("Refund", {
|
|
|
|
|
openid: localStorage.getItem("OPENID"),
|
|
|
|
|
id: id,
|
|
|
|
|
yuanyin:tuikuan_yuanyin.value
|
|
|
|
|
});
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
@ -298,6 +336,7 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
|
|
deepInfo();
|
|
|
|
|
@ -305,6 +344,30 @@
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<uni-popup ref="TuiKuanPopupRef" style="z-index: 999;">
|
|
|
|
|
<view class="tishi_main">
|
|
|
|
|
<view class="tishi_title">{{tuikuan_tishi}}</view>
|
|
|
|
|
<view class="tishi_title2">请选择退号原因</view>
|
|
|
|
|
<view class="tishi_content">
|
|
|
|
|
<radio-group @change="tuikuanRadioChange">
|
|
|
|
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in tuikuan_yuanyin_list" :key="item.value">
|
|
|
|
|
<view style="display: flex; margin-bottom: 10rpx;">
|
|
|
|
|
<view>
|
|
|
|
|
<radio :value="item.value" :checked="item.name === tuikuan_yuanyin" activeBackgroundColor="#009da5" />
|
|
|
|
|
</view>
|
|
|
|
|
<view>{{item.name}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
</radio-group>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="display: flex;justify-content: space-between;">
|
|
|
|
|
<view class="tishi_button" style=" width: 200rpx; background-color: #e1ecee;color:#239ea3" @click="TuiKuanPopupRef.close()">关闭</view>
|
|
|
|
|
<view class="tishi_button" style="width: 200rpx;" @click="tuikuan(order_info.id)">提交</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</uni-popup>
|
|
|
|
|
<uni-popup ref="TransferPopupRef" style="z-index: 999;">
|
|
|
|
|
<view class="tishi_main">
|
|
|
|
|
<view v-if="ZhuanZengType==1">
|
|
|
|
|
@ -314,6 +377,7 @@
|
|
|
|
|
<view v-if="(OrderInfoDetail.transfer_type==null || OrderInfoDetail.transfer_type=='') && ZhuanZengType!=1">
|
|
|
|
|
<view @click="ZhuanZengPerson(1)" class="tishi_button">指定转赠人</view>
|
|
|
|
|
<view @click="CreateTransferCode()" class="tishi_button">生成转赠码</view>
|
|
|
|
|
<view style="font-size: 26rpx; text-align: center; color:#ec4d15 ;margin-top: 16rpx;">温馨提示:转赠成功后无法线上退款</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="OrderInfoDetail.transfer_type==2">
|
|
|
|
|
<view>转赠码</view>
|
|
|
|
|
@ -385,11 +449,11 @@
|
|
|
|
|
<view class="row_label">订单状态:</view>
|
|
|
|
|
<view class="row_value">
|
|
|
|
|
<view v-if="[1].includes(OrderInfoDetail.status)"> 待支付 </view>
|
|
|
|
|
<view
|
|
|
|
|
v-if="[2].includes(OrderInfoDetail.status) ">
|
|
|
|
|
已支付 </view>
|
|
|
|
|
<view v-if="[3, 5].includes(OrderInfoDetail.status)"> 交易关闭 </view>
|
|
|
|
|
<view v-if="[2].includes(OrderInfoDetail.status)"> 已支付 </view>
|
|
|
|
|
<view v-if="[3].includes(OrderInfoDetail.status)"> 交易关闭 </view>
|
|
|
|
|
<view v-if="[4].includes(OrderInfoDetail.status)"> 已完成 </view>
|
|
|
|
|
<view v-if="[5].includes(OrderInfoDetail.status)"> 已退款 </view>
|
|
|
|
|
<view v-if="[6].includes(OrderInfoDetail.status)"> 已转赠 </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="OrderInfoRow">
|
|
|
|
|
@ -402,6 +466,11 @@
|
|
|
|
|
<view class="row_value">{{OrderInfoDetail.created_at}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="OrderInfoRow" v-if="OrderInfoDetail.status==2 && OrderInfoDetail.youxiaoqi_end">
|
|
|
|
|
<view class="row_label">订单有效期:</view>
|
|
|
|
|
<view class="row_value">{{OrderInfoDetail.youxiaoqi_end}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view >
|
|
|
|
|
|
|
|
|
|
<view class="OrderInfoRow" v-if="OrderInfoDetail.transfer_type==2">
|
|
|
|
|
@ -502,10 +571,10 @@
|
|
|
|
|
<text class="time_red">{{ count_down_text }}</text>
|
|
|
|
|
<text>内完成婚检预约</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="[2, 4].includes(order_info.status)">
|
|
|
|
|
<!-- <view v-if="[2, 4].includes(order_info.status)">
|
|
|
|
|
<view v-if="order_info.pay_time">支付时间</view>
|
|
|
|
|
<view>{{ order_info.pay_time }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
<view v-if="[5].includes(order_info.status)">
|
|
|
|
|
<view>退款时间</view>
|
|
|
|
|
<view>{{ order_info.refund_time }}</view>
|
|
|
|
|
@ -535,7 +604,7 @@
|
|
|
|
|
<view v-if="[4].includes(order_info.status) && order_info.report && !order_info.decode" class="button_item_wrapper decode_button_wrapper">
|
|
|
|
|
报告解读
|
|
|
|
|
</view> -->
|
|
|
|
|
<view v-if="[2].includes(order_info.status) && !order_info.source?.includes('转赠')" @click="Refound(order_info)"
|
|
|
|
|
<view v-if="[2].includes(order_info.status) && order_info.type=='个检' && !order_info.source?.includes('转赠')" @click="Refound(order_info)"
|
|
|
|
|
class="button_item_wrapper refund_button_wrapper">退款</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -666,6 +735,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.combo_name_wrapper {
|
|
|
|
|
padding-top: 4rpx;
|
|
|
|
|
width: calc(550rpx - 30rpx);
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
@ -755,4 +825,24 @@
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
margin: 40rpx auto 10rpx auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tishi_title{
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color:#2b2827;
|
|
|
|
|
}
|
|
|
|
|
.tishi_title2{
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color:#3a3635;
|
|
|
|
|
border-left: 3px solid #009da5;
|
|
|
|
|
padding-left: 5rpx;
|
|
|
|
|
}
|
|
|
|
|
.tishi_content{
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
color:#474241;
|
|
|
|
|
}
|
|
|
|
|
</style>
|