|  | @@ -113,7 +113,8 @@
 | 
	
		
			
				|  |  |  				<button class="g-share-btn" open-type="share"></button>
 | 
	
		
			
				|  |  |  				邀请好友报名
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  | -			<view class="t-shoping-address-eventInfo" v-if="countdownVisible&&orderDetailInfo?.orderType==3||orderDetailInfo?.orderType==4">
 | 
	
		
			
				|  |  | +			<view class="t-shoping-address-eventInfo"
 | 
	
		
			
				|  |  | +				v-if="countdownVisible && orderDetailInfo?.orderType == 3 || orderDetailInfo?.orderType == 4">
 | 
	
		
			
				|  |  |  				<view class="time">{{ days }}</view>
 | 
	
		
			
				|  |  |  				<view class="unit">天</view>
 | 
	
		
			
				|  |  |  				<view class="time">{{ hours }}</view>
 | 
	
	
		
			
				|  | @@ -136,65 +137,35 @@
 | 
	
		
			
				|  |  |  				<view class="download-qrcode" @click="download_qrcode">下载到手机</view>
 | 
	
		
			
				|  |  |  			</block>
 | 
	
		
			
				|  |  |  			<view v-if="orderDetailInfo?.orderType == 0" style="color: #222;font-size: 26rpx;">通过学校门口闸机时,通过人脸自动核验</view>
 | 
	
		
			
				|  |  | -			<view class="t-todeused">
 | 
	
		
			
				|  |  | +			<view class="t-todeused" v-for="(item, index) in orderDetailInfo?.proInfoList" :key="item.id">
 | 
	
		
			
				|  |  |  				<view class="todeused">
 | 
	
		
			
				|  |  | -					<view class="text">{{ orderDetailInfo?.orderStatus }}</view>
 | 
	
		
			
				|  |  | -					<view class="time" v-if="orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime">
 | 
	
		
			
				|  |  | +					<view class="text">
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 0">待付款</text>
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 1">待使用</text>
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 2">已使用</text>
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 3">已到期</text>
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 4">已取消</text>
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 5">退款中</text>
 | 
	
		
			
				|  |  | +						<text v-if="item.orderStatus == 6">已退款</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  | +					<view class="time">
 | 
	
		
			
				|  |  |  						<!-- {{ orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime }} -->
 | 
	
		
			
				|  |  | -						{{ orderDetailInfo?.proInfoList[0].expireTime }}
 | 
	
		
			
				|  |  | +						{{ item.expireTime }}
 | 
	
		
			
				|  |  |  						到期
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<!-- orderStatus:0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款 -->
 | 
	
		
			
				|  |  |  				<!-- type:0-学校 1-包场 2-无固定场 3-个人赛 4-团队赛 5-课程 6-保险 -->
 | 
	
		
			
				|  |  | -				<view class="order-num" v-for="(item, index) in orderDetailInfo?.proInfoList" :key="item.id"
 | 
	
		
			
				|  |  | -					@click="RouterUtils.to_page(`/pages/index/tryUseRecord/index?ticketNo=${item.ticketNo}&proInfoList=${JSON.stringify(orderDetailInfo?.proInfoList)}&selectValue=${index}`)">
 | 
	
		
			
				|  |  | -					<text v-if="item.type != 6">{{ item.ticketNo }}   {{ item.userName }}</text>
 | 
	
		
			
				|  |  | -					<zzx-icon v-if="item.type != 6" name="ashRight" size="12"></zzx-icon>
 | 
	
		
			
				|  |  | -					<!-- <view v-if="item.type != 6" class="t-use-status">{{ getStatusText(item.orderStatus) }}</view> -->
 | 
	
		
			
				|  |  | -					<text v-if="item.type != 6 && orderPageInfo?.orderType == 1">{{ item.expireTime }}到期</text>
 | 
	
		
			
				|  |  | -					<!-- <view>申请退款</view> -->
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -			</view>
 | 
	
		
			
				|  |  | -		</view>
 | 
	
		
			
				|  |  | -		<!-- 已使用已过期展示 -->
 | 
	
		
			
				|  |  | -		<!-- <view class="t-qrcode-card" v-if="orderPageInfo?.orderType == 1">
 | 
	
		
			
				|  |  | -			<view class="t-todeused" v-for="item in 2" style="border-bottom: 1rpx solid #F0F0F0;">
 | 
	
		
			
				|  |  | -				<view class="todeused">
 | 
	
		
			
				|  |  | -					<view class="item-todeused">
 | 
	
		
			
				|  |  | -						<view class="text">已使用</view>
 | 
	
		
			
				|  |  | -						<view class="time">07-25 14:25:45 到期</view>
 | 
	
		
			
				|  |  | +				<view style="display: flex;align-items: center;justify-content: space-between;">
 | 
	
		
			
				|  |  | +					<view class="order-num" @click="selectOrderInfo(item, index)">
 | 
	
		
			
				|  |  | +						<text v-if="item.type != 6">{{ item.ticketNo }}   {{ item.userName }}</text>
 | 
	
		
			
				|  |  | +						<zzx-icon v-if="item.type != 6" name="ashRight" size="12"></zzx-icon>
 | 
	
		
			
				|  |  | +						<!-- <text v-if="item.type != 6 && orderPageInfo?.orderType == 1">{{ item.expireTime }}到期</text> -->
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  | -					<view class="application-btn" @click="refundPopup.open()">申请退款</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -				<view class="order-num" @click="RouterUtils.to_page('/pages/index/tryUseRecord/index')">
 | 
	
		
			
				|  |  | -					<text>0017 1712 5994 杨锦新</text>
 | 
	
		
			
				|  |  | -					<zzx-icon name="ashRight" size="12"></zzx-icon>
 | 
	
		
			
				|  |  | +					<view class="application-btn" @click="openRefund(item)" v-if="item.orderStatus == 1">申请退款</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  | -		</view> -->
 | 
	
		
			
				|  |  | -		<!-- 学校场地预定订单详情展示 -->
 | 
	
		
			
				|  |  | -		<!-- <view class="t-scheduled-card" v-if="orderPageInfo?.orderType == 2">
 | 
	
		
			
				|  |  | -			<view class="s-title">预定信息</view>
 | 
	
		
			
				|  |  | -			<view class="t-scheduled-list">
 | 
	
		
			
				|  |  | -				<view class="item-list">
 | 
	
		
			
				|  |  | -					<view class="list-left">场地</view>
 | 
	
		
			
				|  |  | -					<view class="list-right">体育馆综合训练馆(观山湖店)</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -				<view class="item-list">
 | 
	
		
			
				|  |  | -					<view class="list-left">日期</view>
 | 
	
		
			
				|  |  | -					<view class="list-right">06-11(今天)</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -				<view class="item-list">
 | 
	
		
			
				|  |  | -					<view class="list-left">时段</view>
 | 
	
		
			
				|  |  | -					<view class="list-right">11:00-12:00</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -				<view class="item-list">
 | 
	
		
			
				|  |  | -					<view class="list-left">用户</view>
 | 
	
		
			
				|  |  | -					<view class="list-right">杨锦新 赵四儿</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -			</view>
 | 
	
		
			
				|  |  | -		</view> -->
 | 
	
		
			
				|  |  | +		</view>
 | 
	
		
			
				|  |  |  		<view class="t-address-card">
 | 
	
		
			
				|  |  |  			<view class="address">
 | 
	
		
			
				|  |  |  				<zzx-icon name="location"></zzx-icon>
 | 
	
	
		
			
				|  | @@ -359,38 +330,27 @@
 | 
	
		
			
				|  |  |  	<uni-popup ref="refundPopup" :safe-area="false" type="bottom">
 | 
	
		
			
				|  |  |  		<view class="refund-detail">
 | 
	
		
			
				|  |  |  			<view class="refund-title">申请退款</view>
 | 
	
		
			
				|  |  | -			<view class="refund-text">足球五人制闲时1小时</view>
 | 
	
		
			
				|  |  | +			<view class="refund-text">{{ refundInfo?.productName }}</view>
 | 
	
		
			
				|  |  |  			<view class="refund-num-card">
 | 
	
		
			
				|  |  | -				<view class="refund-number">
 | 
	
		
			
				|  |  | -					<view class="text">退款数量<text style="color: #AAAAAA ;">(上限2张)</text></view>
 | 
	
		
			
				|  |  | +				<!-- <view class="refund-number">
 | 
	
		
			
				|  |  | +					<view class="text">退款数量<text style="color: #AAAAAA ;">(上限{{refundNumber?.length}}张)</text></view>
 | 
	
		
			
				|  |  |  					<view class="price-stepper">
 | 
	
		
			
				|  |  | -						<view class="minus">-</view>
 | 
	
		
			
				|  |  | -						<input type="number" />
 | 
	
		
			
				|  |  | -						<view class="add">+</view>
 | 
	
		
			
				|  |  | +						<view class="minus" @click="refundMinus">-</view>
 | 
	
		
			
				|  |  | +						<input type="number" style="text-align: center;" v-model="refundCountTotal" />
 | 
	
		
			
				|  |  | +						<view class="add" @click="refundAdd">+</view>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | +				</view> -->
 | 
	
		
			
				|  |  |  				<!-- 包场 -->
 | 
	
		
			
				|  |  | -				<view class="c-scheduled-card">
 | 
	
		
			
				|  |  | +				<!-- <view class="c-scheduled-card">
 | 
	
		
			
				|  |  |  					<view class="title">退款信息</view>
 | 
	
		
			
				|  |  |  					<view class="schedule-address">
 | 
	
		
			
				|  |  |  						<view class="text">场馆</view>
 | 
	
		
			
				|  |  | -						<view class="name">体育馆综合训练馆(观山湖店)</view>
 | 
	
		
			
				|  |  | +						<view class="name">{{ refundInfo?.address }}</view>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  | -					<view class="schedule-address">
 | 
	
		
			
				|  |  | -						<view class="text">场次</view>
 | 
	
		
			
				|  |  | -						<view class="">
 | 
	
		
			
				|  |  | -							<view class="time-box" v-for="item in 3">
 | 
	
		
			
				|  |  | -								<view class="time">06-11(周三)11:00-12:00|羽毛球1</view>
 | 
	
		
			
				|  |  | -								<view class="time-icon">
 | 
	
		
			
				|  |  | -									<zzx-icon name="selected" size="14"></zzx-icon>
 | 
	
		
			
				|  |  | -								</view>
 | 
	
		
			
				|  |  | -							</view>
 | 
	
		
			
				|  |  | -						</view>
 | 
	
		
			
				|  |  | -					</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | +				</view> -->
 | 
	
		
			
				|  |  |  				<view class="refund-price">
 | 
	
		
			
				|  |  |  					<view class="p-text">退款金额<text style="color: #AAAAAA ;">(实付金额)</text></view>
 | 
	
		
			
				|  |  | -					<view class="p-price">¥45.9</view>
 | 
	
		
			
				|  |  | +					<view class="p-price">¥{{ refundInfo?.price }}</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="refund-account">
 | 
	
		
			
				|  |  |  					<view class="a-text">退款账户</view>
 | 
	
	
		
			
				|  | @@ -401,9 +361,9 @@
 | 
	
		
			
				|  |  |  			<view class="refund-cause-card">
 | 
	
		
			
				|  |  |  				<view class="c-title">退款原因<text style="color: #AAAAAA ;">(必选)</text></view>
 | 
	
		
			
				|  |  |  				<view class="c-cause-list">
 | 
	
		
			
				|  |  | -					<view class="cause-list" v-for="item in 10">
 | 
	
		
			
				|  |  | -						<view class="cause">价格不划算</view>
 | 
	
		
			
				|  |  | -						<zzx-icon :name="selected ? 'selected' : 'unchecked'" size="14"></zzx-icon>
 | 
	
		
			
				|  |  | +					<view class="cause-list" v-for="item in refundList" :key="item.id" @click="selectRefundType(item)">
 | 
	
		
			
				|  |  | +						<view class="cause">{{ item.name }}</view>
 | 
	
		
			
				|  |  | +						<zzx-icon :name="isSelectType == item.id ? 'selected' : 'unchecked'" size="14"></zzx-icon>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
	
		
			
				|  | @@ -426,10 +386,29 @@ import { onLoad, onShow, onShareAppMessage, onUnload } from '@dcloudio/uni-app';
 | 
	
		
			
				|  |  |  import { http } from '@/utils/http'
 | 
	
		
			
				|  |  |  import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
 | 
	
		
			
				|  |  |  const qrcode = ref();
 | 
	
		
			
				|  |  | -const pricePopup = ref()  //价格
 | 
	
		
			
				|  |  | -const refundPopup = ref()  //退款
 | 
	
		
			
				|  |  | -const selected = ref(false)
 | 
	
		
			
				|  |  | -const orderPageInfo = ref()
 | 
	
		
			
				|  |  | +const pricePopup = ref();  //价格
 | 
	
		
			
				|  |  | +const refundPopup = ref();  //退款
 | 
	
		
			
				|  |  | +const selected = ref(false);
 | 
	
		
			
				|  |  | +const orderPageInfo = ref();
 | 
	
		
			
				|  |  | +const refundList = ref([{
 | 
	
		
			
				|  |  | +	id: 1,
 | 
	
		
			
				|  |  | +	name: '价格不划算'
 | 
	
		
			
				|  |  | +}, {
 | 
	
		
			
				|  |  | +	id: 2,
 | 
	
		
			
				|  |  | +	name: '场地无法提供使用'
 | 
	
		
			
				|  |  | +}, {
 | 
	
		
			
				|  |  | +	id: 3,
 | 
	
		
			
				|  |  | +	name: '不需要了'
 | 
	
		
			
				|  |  | +}, {
 | 
	
		
			
				|  |  | +	id: 4,
 | 
	
		
			
				|  |  | +	name: '重新购买'
 | 
	
		
			
				|  |  | +}, {
 | 
	
		
			
				|  |  | +	id: 5,
 | 
	
		
			
				|  |  | +	name: '场馆要求改用其他方式/平台付款'
 | 
	
		
			
				|  |  | +}, {
 | 
	
		
			
				|  |  | +	id: 6,
 | 
	
		
			
				|  |  | +	name: '其他原因'
 | 
	
		
			
				|  |  | +}])
 | 
	
		
			
				|  |  |  onLoad((option) => {
 | 
	
		
			
				|  |  |  	orderPageInfo.value = option
 | 
	
		
			
				|  |  |  	console.log(option, '路由参数');
 | 
	
	
		
			
				|  | @@ -483,6 +462,65 @@ const hasPendingUsageItems = computed(() => {
 | 
	
		
			
				|  |  |  const getStatusText = (status: number): string => {
 | 
	
		
			
				|  |  |  	return statusMap[status as keyof typeof statusMap] || ''
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +// ===========发起退款start===========
 | 
	
		
			
				|  |  | +const refundInfo = ref()
 | 
	
		
			
				|  |  | +const refundCountTotal = ref(0);
 | 
	
		
			
				|  |  | +const refundNumber = ref([])
 | 
	
		
			
				|  |  | +const openRefund = (e) => {
 | 
	
		
			
				|  |  | +	refundNumber.value = orderDetailInfo?.value.proInfoList.filter(item => item.orderStatus == 1)
 | 
	
		
			
				|  |  | +	refundInfo.value = e
 | 
	
		
			
				|  |  | +	refundCountTotal.value = 0
 | 
	
		
			
				|  |  | +	refundFromData.value.orderProInfoIds = e.id
 | 
	
		
			
				|  |  | +	refundPopup?.value.open()
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +const refundMinus = () => {
 | 
	
		
			
				|  |  | +	if (refundCountTotal.value > 0) {
 | 
	
		
			
				|  |  | +		refundCountTotal.value--
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +const refundAdd = () => {
 | 
	
		
			
				|  |  | +	if (refundCountTotal.value > (refundNumber.value.length - 1)) return TipsUtils.tips_toast('已达可退款上限')
 | 
	
		
			
				|  |  | +	refundCountTotal.value++
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +const isSelectType = ref()
 | 
	
		
			
				|  |  | +const selectRefundType = (item) => {
 | 
	
		
			
				|  |  | +	refundFromData.value.reason = item.name
 | 
	
		
			
				|  |  | +	isSelectType.value = item.id
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +// 确定退款
 | 
	
		
			
				|  |  | +const refundFromData = ref({
 | 
	
		
			
				|  |  | +	orderCode: '',
 | 
	
		
			
				|  |  | +	orderProInfoIds: '',
 | 
	
		
			
				|  |  | +	reason: '',
 | 
	
		
			
				|  |  | +})
 | 
	
		
			
				|  |  | +const refund_btn = async () => {
 | 
	
		
			
				|  |  | +	if (refundFromData.value.reason == '') {
 | 
	
		
			
				|  |  | +		return TipsUtils.tips_toast('请选择退款原因')
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	refundFromData.value.orderCode = orderDetailInfo?.value.orderCode
 | 
	
		
			
				|  |  | +	let res: any = await TipsUtils.tips_alert('确定要申请退款吗?', true)
 | 
	
		
			
				|  |  | +	if (res.confirm) {
 | 
	
		
			
				|  |  | +		http.post('/order/refundOrder', refundFromData.value, { loading: true }).then((res) => {
 | 
	
		
			
				|  |  | +			TipsUtils.tips_toast(res.result.message)
 | 
	
		
			
				|  |  | +			RouterUtils.to_page(`/pages/index/refundDetail/index?orderId=${orderDetailInfo?.value.id}&orderProInfoId=${refundFromData.value.orderProInfoIds}`)
 | 
	
		
			
				|  |  | +		})
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +// ===========发起退款end===========
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +// 查看子订单状态
 | 
	
		
			
				|  |  | +// <!-- orderStatus:0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款 -->
 | 
	
		
			
				|  |  | +const selectOrderInfo = (e:any, i:number) => {
 | 
	
		
			
				|  |  | +	if (e.orderStatus == 5 || e.orderStatus == 6) {
 | 
	
		
			
				|  |  | +		RouterUtils.to_page(`/pages/index/refundDetail/index?orderId=${orderDetailInfo?.value.id}&orderProInfoId=${e.id}`)
 | 
	
		
			
				|  |  | +	} else {
 | 
	
		
			
				|  |  | +		RouterUtils.to_page(`/pages/index/tryUseRecord/index?ticketNo=${e.ticketNo}&proInfoList=${JSON.stringify(orderDetailInfo?.value.proInfoList)}&selectValue=${i}`)
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  const download_qrcode = () => { //下载二维码,增加授权判断
 | 
	
		
			
				|  |  |  	// #ifdef MP-WEIXIN
 | 
	
		
			
				|  |  |  	uni.authorize({
 | 
	
	
		
			
				|  | @@ -527,9 +565,6 @@ const download_qrcode = () => { //下载二维码,增加授权判断
 | 
	
		
			
				|  |  |  	});
 | 
	
		
			
				|  |  |  	// #endif
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -const refund_btn = () => {
 | 
	
		
			
				|  |  | -	RouterUtils.to_page('/pages/index/refundDetail/index')
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const submitBooking = () => {
 | 
	
		
			
				|  |  |  	uni.makePhoneCall({
 | 
	
	
		
			
				|  | @@ -1249,18 +1284,17 @@ const getSignUrl = (signFlowId: string) => {
 | 
	
		
			
				|  |  |  				line-height: 40rpx;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	.application-btn {
 | 
	
		
			
				|  |  | -		width: 152rpx;
 | 
	
		
			
				|  |  | -		height: 48rpx;
 | 
	
		
			
				|  |  | -		background: #C8FF0C;
 | 
	
		
			
				|  |  | -		border-radius: 8rpx;
 | 
	
		
			
				|  |  | -		font-size: 28rpx;
 | 
	
		
			
				|  |  | -		color: #222222;
 | 
	
		
			
				|  |  | -		text-align: center;
 | 
	
		
			
				|  |  | -		line-height: 48rpx;
 | 
	
		
			
				|  |  | -		margin-top: 20rpx;
 | 
	
		
			
				|  |  | +		.application-btn {
 | 
	
		
			
				|  |  | +			width: 152rpx;
 | 
	
		
			
				|  |  | +			height: 44rpx;
 | 
	
		
			
				|  |  | +			background: #C8FF0C;
 | 
	
		
			
				|  |  | +			border-radius: 8rpx;
 | 
	
		
			
				|  |  | +			font-size: 24rpx;
 | 
	
		
			
				|  |  | +			color: #222222;
 | 
	
		
			
				|  |  | +			text-align: center;
 | 
	
		
			
				|  |  | +			line-height: 44rpx;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 |