完善页面整合TS
This commit is contained in:
@ -15,13 +15,13 @@
|
||||
</view>
|
||||
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
|
||||
<view v-if="orderStatus === GroupBuyingCategoryOrderStatus.AfterSaleApply || orderStatus === GroupBuyingCategoryOrderStatus.AfterSaleProcessing">请耐心等待,我们会尽快处理您的请求</view>
|
||||
<view v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded" class="text-center mt-14rpx">
|
||||
<view v-if="orderStatus === OrderSourceOrderStatus.AfterSaleApply || orderStatus === OrderSourceOrderStatus.AfterSaleProcessing">请耐心等待,我们会尽快处理您的请求</view>
|
||||
<view v-if="orderStatus === OrderSourceOrderStatus.Refunded" class="text-center mt-14rpx">
|
||||
|
||||
<view class="text-40rpx text-[#303133] leading-56rpx">
|
||||
<view v-if="orderType !== ReserveCategory.TeaSpecialist">退款成功¥128.00</view>
|
||||
<view v-if="orderType !== OrderSource.TeaSpecialist">退款成功¥128.00</view>
|
||||
<!-- 茶艺师退款需要有退款详情 -->
|
||||
<view v-if="orderType === ReserveCategory.TeaSpecialist" @click="showRefundDetailsPopup = true">
|
||||
<view v-if="orderType === OrderSource.TeaSpecialist" @click="showRefundDetailsPopup = true">
|
||||
退款成功¥128.00
|
||||
<wd-icon name="arrow-right" size="40rpx" color="#666666" custom-class="!bg-[#F8F9FA]"></wd-icon>
|
||||
</view>
|
||||
@ -40,12 +40,12 @@
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<!-- 非茶艺师退款 -->
|
||||
<view class="flex justify-between items-center" @click="afterSales.handleToCombo" v-if="orderType !== ReserveCategory.TeaSpecialist">
|
||||
<view class="flex justify-between items-center" @click="afterSales.handleToCombo" v-if="orderType !== OrderSource.TeaSpecialist">
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx w-362rpx line-1">这是团购套餐的可以点击进 </view>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
</view>
|
||||
<!-- 茶艺师退款 -->
|
||||
<view class="flex justify-between items-center" @click="afterSales.handleToCombo" v-if="orderType === ReserveCategory.TeaSpecialist">
|
||||
<view class="flex justify-between items-center" @click="afterSales.handleToCombo" v-if="orderType === OrderSource.TeaSpecialist">
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx">这是茶艺师名称</view>
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx">¥324.22</view>
|
||||
</view>
|
||||
@ -54,7 +54,7 @@
|
||||
<view>x1</view>
|
||||
</view>
|
||||
<!-- 茶艺师退显示车马费-->
|
||||
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx" v-if="orderType === ReserveCategory.TeaSpecialist">
|
||||
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx" v-if="orderType === OrderSource.TeaSpecialist">
|
||||
<view>车马费(¥3.00元/公里)</view>
|
||||
<view>¥30.90</view>
|
||||
</view>
|
||||
@ -69,7 +69,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 售后原因 -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" @click="showResonPopup = true" v-if="orderStatus === GroupBuyingCategoryOrderStatus.AfterSaleApply">
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" @click="showResonPopup = true" v-if="orderStatus === OrderSourceOrderStatus.AfterSaleApply">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between">
|
||||
<view class="text-32rpx leading-44rpx text-[#303133]">售后原因</view>
|
||||
<view>
|
||||
@ -80,7 +80,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 订单信息(选填) -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx pb-32rpx mx-30rpx mt-20rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.AfterSaleApply">
|
||||
<view class="bg-white rounded-16rpx px-30rpx pb-32rpx mx-30rpx mt-20rpx" v-if="orderStatus === OrderSourceOrderStatus.AfterSaleApply">
|
||||
<view class="pt-32rpx text-[#303133] text-32rpx leading-44rpx">
|
||||
<text>订单信息</text>
|
||||
<text class="text-26rpx text-[#909399] leading-36rpx ml-20rpx">(选填)</text>
|
||||
@ -91,13 +91,13 @@
|
||||
</view>
|
||||
|
||||
<!-- 售后已完成 -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === OrderSourceOrderStatus.Refunded">
|
||||
<view class="text-[#303133] text-32rpx leading-44rpx">售后订单</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="orderType !== ReserveCategory.TeaSpecialist">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="orderType !== OrderSource.TeaSpecialist">
|
||||
<view>售后原因</view>
|
||||
<view>买多了/买错了</view>
|
||||
</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="orderType !== ReserveCategory.TeaSpecialist">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="orderType !== OrderSource.TeaSpecialist">
|
||||
<view>退款金额</view>
|
||||
<view>¥159.22</view>
|
||||
</view>
|
||||
@ -117,19 +117,19 @@
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 h-152rpx"
|
||||
:class="orderStatus === GroupBuyingCategoryOrderStatus.AfterSaleApply ? '' : 'bg-white'"
|
||||
v-if="orderType !== ReserveCategory.TeaSpecialist">
|
||||
:class="orderStatus === OrderSourceOrderStatus.AfterSaleApply ? '' : 'bg-white'"
|
||||
v-if="orderType !== OrderSource.TeaSpecialist">
|
||||
<view class="mt-34rpx">
|
||||
<!-- 待使用 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center text-[#303133]"
|
||||
v-if="orderStatus !== GroupBuyingCategoryOrderStatus.AfterSaleApply">
|
||||
v-if="orderStatus !== OrderSourceOrderStatus.AfterSaleApply">
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx mr-30rpx">联系商家</view>
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx">联系平台</view>
|
||||
</view>
|
||||
|
||||
<!-- 申请售后 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center"
|
||||
v-if="orderStatus === GroupBuyingCategoryOrderStatus.AfterSaleApply" @click="afterSales.handleSubmitRefund">
|
||||
v-if="orderStatus === OrderSourceOrderStatus.AfterSaleApply" @click="afterSales.handleSubmitRefund">
|
||||
<view class="w-630rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -173,7 +173,7 @@
|
||||
<view class="text-36rpx text-[#121212] leading-50rpx text-center pt-50rpx pb-40rpx">费用明细</view>
|
||||
<scroll-view scroll-y class="h-800rpx">
|
||||
<view class="collapse">
|
||||
<wd-collapse v-model="value">
|
||||
<wd-collapse v-model="refundValue">
|
||||
<!-- 茶艺师总费用 -->
|
||||
<wd-collapse-item name="item1">
|
||||
<template #title="{expanded}">
|
||||
@ -298,7 +298,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { GroupBuyingCategory, GroupBuyingCategoryOrderStatus, GroupBuyingStatusTitle, PersonalReasonMap, MerchantReasonMap, ReasonMap, ReserveCategory } from '@/utils/order'
|
||||
import { OrderStatusTitle, PersonalReasonMap, MerchantReasonMap, ReasonMap, OrderSource } from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
|
||||
/** 表单相关 **/
|
||||
@ -322,7 +322,7 @@
|
||||
|
||||
/** 退款详情 **/
|
||||
const showRefundDetailsPopup = ref<boolean>(false) // 是否显示退款详情弹出框
|
||||
const value = ref<string[]>(['item1'])
|
||||
const refundValue = ref<string[]>(['item1'])
|
||||
|
||||
/** 结束 **/
|
||||
|
||||
@ -333,8 +333,8 @@
|
||||
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
|
||||
|
||||
onLoad((args) => {
|
||||
// 这里暂时使用 GroupBuyingCategory.Direct 这个,因为平台团购类型下面都是有共同的售后
|
||||
title.value = GroupBuyingStatusTitle[GroupBuyingCategory.Direct][args.orderStatus] || '订单详情'
|
||||
// 这里暂时使用 OrderSource.Direct 这个,因为平台团购类型下面都是有共同的售后
|
||||
title.value = OrderStatusTitle[OrderSource.Direct][args.orderStatus] || '订单详情'
|
||||
|
||||
orderType.value = args.orderType
|
||||
orderStatus.value = args.orderStatus
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
</view>
|
||||
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
|
||||
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">请在2025.12.31(含)前使用</text>
|
||||
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">品一口香茗,让生活慢下来,从一杯好茶开始</text>
|
||||
<text v-if="orderStatus === OrderStatus.ToUse">请在2025.12.31(含)前使用</text>
|
||||
<text v-if="orderStatus === OrderStatus.Used">品一口香茗,让生活慢下来,从一杯好茶开始</text>
|
||||
</view>
|
||||
|
||||
<!-- 待使用下显示 -->
|
||||
@ -88,10 +88,10 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== GroupBuyingCategoryOrderStatus.Used">
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== OrderStatus.Used">
|
||||
<view class="mt-34rpx">
|
||||
<!-- 待使用 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.ToUse">
|
||||
<view class="w-692rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">立即预定</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -100,8 +100,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { GroupBuyingCategory, GroupBuyingCategoryOrderStatus, GroupBuyingStatusTitle } from '@/utils/order'
|
||||
console.log("🚀 ~ GroupBuyingStatusTitle:", GroupBuyingStatusTitle)
|
||||
import { OrderSource, OrderStatus, OrderStatusTitle } from '@/utils/order'
|
||||
console.log("🚀 ~ OrderStatusTitle:", OrderStatusTitle)
|
||||
import {toast} from '@/utils/toast'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -111,7 +111,7 @@
|
||||
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
|
||||
|
||||
onLoad((args) => {
|
||||
title.value = GroupBuyingStatusTitle[GroupBuyingCategory.DouYin][args.orderStatus] || '订单详情'
|
||||
title.value = OrderStatusTitle[OrderSource.DouYin][args.orderStatus] || '订单详情'
|
||||
|
||||
type.value = args.type
|
||||
orderStatus.value = args.orderStatus
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<view class="content mx-30rpx mt-34rpx">
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" @up="orderList.upCallback">
|
||||
<view class="mb-20rpx" v-for="(item, index) in 10" :key="index">
|
||||
<combo-card :type="GroupBuyingCategory.DouYin"></combo-card>
|
||||
<combo-card :type="OrderSource.DouYin"></combo-card>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
@ -50,7 +50,7 @@
|
||||
import ComboCard from '@/components/order/ComboCard.vue'
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
import { GroupBuyingCategory } from '@/utils/order'
|
||||
import { OrderSource } from '@/utils/order'
|
||||
|
||||
|
||||
/* mescroll */
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
</view>
|
||||
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
|
||||
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">请在2025.12.31(含)前使用</text>
|
||||
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">感谢购买,期待再次光临!</text>
|
||||
<text v-if="orderStatus === OrderStatus.ToUse">请在2025.12.31(含)前使用</text>
|
||||
<text v-if="orderStatus === OrderStatus.Used">感谢购买,期待再次光临!</text>
|
||||
</view>
|
||||
|
||||
<!-- 待使用下显示 -->
|
||||
<view class="mx-30rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="mx-30rpx" v-if="orderStatus === OrderStatus.ToUse">
|
||||
<view class="bg-white rounded-16rpx p-30rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-30rpx">
|
||||
@ -55,7 +55,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 已使用下显示 -->
|
||||
<view class="mx-30rpx coupon-bg" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">
|
||||
<view class="mx-30rpx coupon-bg" v-if="orderStatus === OrderStatus.Used">
|
||||
<view class="flex items-center px-30rpx pt-30rpx pb-40rpx">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
|
||||
@ -146,13 +146,13 @@
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx">
|
||||
<view class="mt-34rpx">
|
||||
<!-- 待使用 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.ToUse">
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133] mr-30rpx" @click="directOrderDetail.handleToRefund">申请退款</view>
|
||||
<view class="w-330rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]" @click="directOrderDetail.handleToChooseTeaRoom">立即预定</view>
|
||||
</view>
|
||||
|
||||
<!-- 已使用 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.Used">
|
||||
<view class="w-630rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">再次预定</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -161,7 +161,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { GroupBuyingCategory, GroupBuyingCategoryOrderStatus, GroupBuyingStatusTitle } from '@/utils/order'
|
||||
import { OrderSource, OrderStatus, OrderStatusTitle } from '@/utils/order'
|
||||
|
||||
import {toast} from '@/utils/toast'
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
|
||||
|
||||
onLoad((args) => {
|
||||
title.value = GroupBuyingStatusTitle[GroupBuyingCategory.Direct][args.orderStatus] || '订单详情'
|
||||
title.value = OrderStatusTitle[OrderSource.Direct][args.orderStatus] || '订单详情'
|
||||
|
||||
type.value = args.type
|
||||
orderStatus.value = args.orderStatus
|
||||
@ -206,7 +206,7 @@
|
||||
// 跳转到申请退款页面
|
||||
handleToRefund: () => {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/after-sales/after-sales?type=direct&orderStatus=${GroupBuyingCategoryOrderStatus.AfterSaleApply}`
|
||||
url: `/bundle/order/after-sales/after-sales?type=direct&orderStatus=${OrderStatus.AfterSaleApply}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
</view>
|
||||
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
|
||||
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">请在2025.12.31(含)前使用</text>
|
||||
<text v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">品一口香茗,让生活慢下来,从一杯好茶开始</text>
|
||||
<text v-if="orderStatus === OrderStatus.ToUse">请在2025.12.31(含)前使用</text>
|
||||
<text v-if="orderStatus === OrderStatus.Used">品一口香茗,让生活慢下来,从一杯好茶开始</text>
|
||||
</view>
|
||||
|
||||
<!-- 待使用下显示 -->
|
||||
<view class="coupon-bg2 p-30rpx mx-30rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="coupon-bg2 p-30rpx mx-30rpx" v-if="orderStatus === OrderStatus.ToUse">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
|
||||
@ -56,7 +56,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 已使用下显示 -->
|
||||
<view class="bg-white rounded-16rpx p-30rpx mx-30rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">
|
||||
<view class="bg-white rounded-16rpx p-30rpx mx-30rpx" v-if="orderStatus === OrderStatus.Used">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
|
||||
@ -110,7 +110,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 订单信息 -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus !== GroupBuyingCategoryOrderStatus.Refunded">
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus !== OrderStatus.Refunded">
|
||||
<view class="text-[#303133] text-32rpx leading-44rpx">订单信息</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>订单编号</view>
|
||||
@ -135,7 +135,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 售后订单 -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === OrderStatus.Refunded">
|
||||
<view class="text-[#303133] text-32rpx leading-44rpx">售后订单</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>售后原因</view>
|
||||
@ -160,15 +160,15 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== GroupBuyingCategoryOrderStatus.Used">
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== OrderStatus.Used">
|
||||
<view class="mt-34rpx">
|
||||
<!-- 待使用 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.ToUse">
|
||||
<view class="w-630rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133]">申请退款</view>
|
||||
</view>
|
||||
|
||||
<!-- 售后完成 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.Refunded">
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133] mr-30rpx">联系商家</view>
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133]">联系平台</view>
|
||||
</view>
|
||||
@ -178,7 +178,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { GroupBuyingCategory, GroupBuyingCategoryOrderStatus, GroupBuyingStatusTitle } from '@/utils/order'
|
||||
import { OrderSource, OrderStatus, OrderStatusTitle } from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -188,7 +188,7 @@
|
||||
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
|
||||
|
||||
onLoad((args) => {
|
||||
title.value = GroupBuyingStatusTitle[GroupBuyingCategory.Franchise][args.orderStatus] || '订单详情'
|
||||
title.value = OrderStatusTitle[OrderSource.Franchise][args.orderStatus] || '订单详情'
|
||||
|
||||
type.value = args.type
|
||||
orderStatus.value = args.orderStatus
|
||||
|
||||
@ -13,8 +13,21 @@
|
||||
<navbar :title="title" custom-class='!bg-[#F6F7F8]'></navbar>
|
||||
</view>
|
||||
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Consuming || orderStatus === ReserveCategoryOrderStatus.Reserved">使用过程中有任何问题,请联系客服</text>
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mb-40rpx mt-20rpx">
|
||||
<view class="text-center" v-if="orderStatus === OrderStatus.Consuming || orderStatus === OrderStatus.Reserved">使用过程中有任何问题,请联系客服</view>
|
||||
<view class="flex items-center justify-center" v-if="orderStatus === OrderStatus.Pending">
|
||||
<view class="flex items-center mr-6rpx">
|
||||
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_time.png`"/>
|
||||
</view>
|
||||
<view class="flex items-center text-26rpx leading-36rpx text-[#909399]">
|
||||
<view>还剩</view>
|
||||
<view class="mx-6rpx">
|
||||
<wd-count-down :time="time" custom-class="!text-[#FF5951]" />
|
||||
</view>
|
||||
<view>订单自动取消</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center" v-if="orderStatus === OrderStatus.Finished">品一口香茗,让生活慢下来,从一杯好茶开始</view>
|
||||
</view>
|
||||
|
||||
<view class="mx-30rpx coupon-bg" >
|
||||
@ -34,7 +47,8 @@
|
||||
<view>3小时</view>
|
||||
<view>x1</view>
|
||||
</view>
|
||||
<view class="text-[#606266] text-right mt-26rpx">
|
||||
<!-- 等待付款不显示实付金额 -->
|
||||
<view class="text-[#606266] text-right mt-26rpx" v-if="orderStatus !== OrderStatus.Pending">
|
||||
<text class="text-24rpx leading-34rpx mr-12rpx">实付</text>
|
||||
<text class="tetx-32rpx leading-36rpx">¥29.32</text>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
@ -48,14 +62,19 @@
|
||||
<view class="mb-20rpx px-30rpx">预约时间:2025-03-18 09:00-12:00</view>
|
||||
<view class="flex justify-between items-center pl-30rpx" >
|
||||
<view>预约时长:3小时</view>
|
||||
<view class="bg-[#4C9F44] rounded-[100rpx_0rpx_0rpx_100rpx] font-bold text-28rpx leading-40rpx text-[#fff] w-170rpx h-56rpx flex justify-center items-center" @click="showRenewPopup = true">一键续订</view>
|
||||
<!-- 已预约和消费中显示一键续订 -->
|
||||
<view v-if="orderStatus === OrderStatus.Reserved || orderStatus === OrderStatus.Consuming"
|
||||
class="bg-[#4C9F44] rounded-[100rpx_0rpx_0rpx_100rpx] font-bold text-28rpx leading-40rpx text-[#fff] w-170rpx h-56rpx flex justify-center items-center"
|
||||
@click="showRenewPopup = true">
|
||||
一键续订
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 开门锁 -->
|
||||
<view class="bg-white rounded-16rpx mx-30rpx mt-20rpx">
|
||||
<!-- 已预约和消费中显示开门锁 -->
|
||||
<view class="bg-white rounded-16rpx mx-30rpx mt-20rpx" v-if="orderStatus === OrderStatus.Reserved || orderStatus === OrderStatus.Consuming">
|
||||
<view class="pt-32rpx text-[#303133] text-32rpx leading-44rpx px-30rpx">开门锁</view>
|
||||
<view class="mt-20rpx">
|
||||
<wd-gap height="2rpx" bg-color="#F6F7F9"></wd-gap>
|
||||
@ -113,6 +132,28 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式 -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="orderStatus === OrderStatus.Pending">
|
||||
<wd-radio-group v-model="pay" shape="dot" checked-color="#4C9F44">
|
||||
<block v-for="(item, index) in PayList" :key="index">
|
||||
<view
|
||||
class="flex justify-between items-center"
|
||||
:class="index !== PayList.length - 1 ? 'mb-40rpx' : ''"
|
||||
>
|
||||
<view class="flex items-center">
|
||||
<wd-img width="50rpx" height="50rpx" :src="`${OSS}${item.icon}`"></wd-img>
|
||||
<view class="ml-20rpx text-30rpx text-[#303133] leading-42rpx">{{ item.name }}</view>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<wd-radio :value="item.value">
|
||||
<view class="text-[#303133] text-26rpx leading-36rpx mr-20rpx" v-if="item.type !== PayCategory.WeChatPay">可用202.22</view>
|
||||
</wd-radio>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</wd-radio-group>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息 -->
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx">
|
||||
<view class="text-[#303133] text-32rpx leading-44rpx">订单信息</view>
|
||||
@ -124,7 +165,7 @@
|
||||
<text class="text-[#4C9F44]">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="orderStatus !== OrderStatus.Pending">
|
||||
<view>交易方式</view>
|
||||
<view>微信支付</view>
|
||||
</view>
|
||||
@ -132,7 +173,7 @@
|
||||
<view>创建时间</view>
|
||||
<view>2019-05-16 12:20:26</view>
|
||||
</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="orderStatus !== OrderStatus.Pending">
|
||||
<view>付款时间</view>
|
||||
<view>2019-05-16 13:20:26</view>
|
||||
</view>
|
||||
@ -140,9 +181,35 @@
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center mt-34rpx">
|
||||
<!-- 已预约 -->
|
||||
<view
|
||||
class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center mt-34rpx"
|
||||
v-if="orderStatus === OrderStatus.Reserved || orderStatus === OrderStatus.Consuming">
|
||||
<view class="w-630rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">分享房间给朋友</view>
|
||||
</view>
|
||||
|
||||
<!-- 待付款 -->
|
||||
<view class="flex items-center justify-between mx-58rpx mt-34rpx" v-if="orderStatus === OrderStatus.Pending">
|
||||
<view class="flex items-center">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] mr-16rpx" @click="orderDetail.handleCancelOrder">取消</view>
|
||||
<view class="flex items-center">
|
||||
<view class="mr-16rpx">
|
||||
<price-format color="#FF5951" :first-size="40" :second-size="40" :subscript-size="28" :price="23.02"></price-format>
|
||||
</view>
|
||||
<view class="flex items-center text-[#4C9F44]" >
|
||||
<view class="text-24rpx mr-10rpx" @click="showCostPopup = true">费用明细</view>
|
||||
<wd-icon name="arrow-down" size="24rpx" color="#4C9F44"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-178rpx h-90rpx leading-90rpx text-center bg-[#4C9F44] rounded-8rpx text-[#fff]">立即预定</view>
|
||||
</view>
|
||||
|
||||
<!-- 交易完成 -->
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center mt-34rpx"
|
||||
v-if="orderStatus === OrderStatus.Finished || orderStatus === OrderStatus.Cancelled">
|
||||
<view class="w-630rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">再次预定</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 一键续订 -->
|
||||
@ -219,15 +286,74 @@
|
||||
<view class="w-630rpx h-90rpx leading-90rpx text-center bg-[#4C9F44] rounded-8rpx text-[#fff] mt-174rpx mx-auto">好的</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
|
||||
<!-- 取消订单 -->
|
||||
<wd-message-box selector="wd-message-box-slot"></wd-message-box>
|
||||
|
||||
<!-- 费用详情 -->
|
||||
<wd-popup v-model="showCostPopup" lock-scroll custom-style="border-radius: 32rpx 32rpx 0rpx 0rpx;" position="bottom">
|
||||
<view class="relative pb-30rpx">
|
||||
<view class="absolute top-18rpx right-30rpx" @click="showCostPopup = false">
|
||||
<wd-img width="60rpx" height='60rpx' :src="`${OSS}icon/icon_close.png`"></wd-img>
|
||||
</view>
|
||||
<view class="text-36rpx text-[#121212] leading-50rpx text-center pt-50rpx pb-40rpx">费用明细</view>
|
||||
<view class="collapse">
|
||||
<view class="px-30rpx">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133]">茶室费</view>
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133] flex items-center">
|
||||
¥640.00
|
||||
</view>
|
||||
</view>
|
||||
<view class="rounded-16rpx py-20rpx">
|
||||
<view class="mb-26rpx">
|
||||
<view class="font-400 text-28rpx leading-40rpx text-[#303133] flex items-center justify-between mb-16rpx">
|
||||
<view>茶室费(¥160元/小时)</view>
|
||||
<view>x4</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="px-30rpx">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133]">优惠</view>
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133] flex items-center text-[#4C9F44]">
|
||||
-¥148.00
|
||||
</view>
|
||||
</view>
|
||||
<view class="rounded-16rpx pt-20rpx">
|
||||
<view class="font-400 text-28rpx leading-40rpx text-[#303133] flex items-center justify-between mb-16rpx">
|
||||
<view>优惠券</view>
|
||||
<view>-¥20</view>
|
||||
</view>
|
||||
|
||||
<view class="font-400 text-28rpx leading-40rpx text-[#303133] flex items-center justify-between mb-16rpx">
|
||||
<view>会员八折</view>
|
||||
<view>-¥20</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mx-60rpx mt-30rpx">
|
||||
<wd-gap height="2rpx" bg-color="#F6F7F9"></wd-gap>
|
||||
</view>
|
||||
<view class="mx-60rpx text-30rpx text-[#303133] leading-42rpx flex items-center justify-between mt-30rpx">
|
||||
<view>实际退款</view>
|
||||
<view>¥698.90</view>
|
||||
</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ReserveCategoryOrderStatus, ReserveCategoryOrderStatusText } from '@/utils/order'
|
||||
import { OrderStatus, OrderSource, OrderStatusTitle } from '@/utils/order'
|
||||
import { useMessage } from 'wot-design-uni'
|
||||
import {toast} from '@/utils/toast'
|
||||
import { PayList, PayCategory, PayValue } from '@/utils/pay'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
const title = ref<string>('')
|
||||
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
|
||||
|
||||
@ -263,15 +389,45 @@
|
||||
const showRenewSuccessPopup = ref<boolean>(false)
|
||||
/** 结束 **/
|
||||
|
||||
// 订单倒计时取消
|
||||
const time = ref<number>(30 * 60 * 60 * 1000)
|
||||
|
||||
// 取消订单弹窗
|
||||
const message = useMessage('wd-message-box-slot')
|
||||
|
||||
// 费用明细
|
||||
const showCostPopup = ref<boolean>(false) // 是否显示退款详情弹出框
|
||||
const costValue = ref<string[]>(['item1'])
|
||||
|
||||
|
||||
onLoad((args) => {
|
||||
title.value = ReserveCategoryOrderStatusText[args.orderStatus] || '订单详情'
|
||||
title.value = OrderStatusTitle[OrderSource.TeaRoom][args.orderStatus] || '订单详情'
|
||||
console.log("🚀 ~ title.value :", title.value )
|
||||
|
||||
orderStatus.value = args.orderStatus
|
||||
})
|
||||
|
||||
const orderDetail = {
|
||||
|
||||
// 取消订单
|
||||
handleCancelOrder: () => {
|
||||
message.confirm({
|
||||
title: '确定取消订单?',
|
||||
msg: '取消订单后无法恢复,优惠券可退回',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
customClass: '!bg-[#F6F7F8] !text-[#303133] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
},
|
||||
confirmButtonProps: {
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then((res) => {
|
||||
// 点击确认按钮回调事件
|
||||
toast.info('订单取消成功')
|
||||
}).catch(() => {
|
||||
// 点击取消按钮回调事件
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -286,4 +442,18 @@
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
:deep() {
|
||||
.wd-collapse-item::after,
|
||||
.wd-collapse-item__header.is-expanded::after {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.wd-collapse-item__body {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -7,70 +7,71 @@
|
||||
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="order-list">
|
||||
<navbar layoutLeft>
|
||||
<view class="order-list sticky top-0 left-0 z-50 bg-[#F6F7F8] pb-10rpx">
|
||||
<wd-navbar safeAreaInsetTop custom-class='!bg-[#F6F7F8]' :bordered="false" placeholder @click-left="orderList.handleBack">
|
||||
<template #left>
|
||||
<view class="flex items-center ml-24rpx">
|
||||
<view @click.stop="orderList.handleChangeMenu(item.type)" class="mr-28rpx" :class="item.type == currentType ? 'text-36rpx text-[#303133] leading-50rpx' : 'text-32rpx text-[#606266] leading-44rpx font-400'" v-for="(item, index) in menuList" :key="index">
|
||||
{{ item.title }}
|
||||
<view class="h-48rpx flex items-center">
|
||||
<view class="mt-4rpx">
|
||||
<wd-icon name="thin-arrow-left" size="30rpx"></wd-icon>
|
||||
</view>
|
||||
<view class="search-box">
|
||||
<wd-search v-model="keywords" hide-cancel placeholder-left light placeholder="搜索茶室订单"></wd-search>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</navbar>
|
||||
<view class="bg-white pb-20rpx">
|
||||
<wd-search v-model="keywords" placeholder="搜索订单信息" hide-cancel placeholder-left custom-class="!h-72rpx"/>
|
||||
</wd-navbar>
|
||||
<view class="tabs">
|
||||
<wd-tabs v-model="tab" swipeable slidable="always" :lazy="false" @click="orderList.handleChangeTabs">
|
||||
<wd-tab title="全部"></wd-tab>
|
||||
<wd-tab title="待付款"></wd-tab>
|
||||
<wd-tab title="预约单"></wd-tab>
|
||||
<wd-tab title="已完结"></wd-tab>
|
||||
</wd-tabs>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tabs">
|
||||
<wd-tabs v-model="tab" swipeable slidable="always" @change="orderList.handleChangeTab" :lazy="false">
|
||||
<wd-tab title="全部">
|
||||
<view class="content mx-30rpx mt-34rpx">
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" @up="orderList.upCallback">
|
||||
<view class="tabs mt-18rpx mx-30rpx">
|
||||
<!-- 这里可以尝试下不重新刷新获取列表 -->
|
||||
<!-- 全部 -->
|
||||
<mescroll-body ref="mescrollItem0" @init="mescrollInit" @down="downCallback" @up="orderList.upCallback" v-if="tab === 0">
|
||||
<view class="mb-20rpx" v-for="(item, index) in 10" :key="index">
|
||||
<combo-card :type="OrderSource.TeaRoom" :order-status="OrderStatus.Pending"></combo-card>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
|
||||
<!-- 待付款 -->
|
||||
<mescroll-body ref="mescrollItem1" @init="mescrollInit" @down="downCallback" @up="orderList.upCallback" v-if="tab === 1">
|
||||
<view class="mb-20rpx" v-for="(item, index) in 10" :key="index">
|
||||
<combo-card></combo-card>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
|
||||
<!-- 预约单 -->
|
||||
<mescroll-body ref="mescrollItem2" @init="mescrollInit" @down="downCallback" @up="orderList.upCallback" v-if="tab === 2">
|
||||
<view class="mb-20rpx" v-for="(item, index) in 10" :key="index">
|
||||
<combo-card></combo-card>
|
||||
</view>
|
||||
</wd-tab>
|
||||
<wd-tab title="待使用">
|
||||
<view class="content mx-30rpx mt-34rpx">
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" @up="orderList.upCallback">
|
||||
</mescroll-body>
|
||||
|
||||
<!-- 已完结 -->
|
||||
<mescroll-body ref="mescrollItem3" @init="mescrollInit" @down="downCallback" @up="orderList.upCallback" v-if="tab === 3">
|
||||
<view class="mb-20rpx" v-for="(item, index) in 10" :key="index">
|
||||
<combo-card></combo-card>
|
||||
</view>
|
||||
</wd-tab>
|
||||
<wd-tab title="已使用">
|
||||
<view class="content mx-30rpx mt-34rpx">
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" @up="orderList.upCallback">
|
||||
</mescroll-body>
|
||||
</view>
|
||||
</wd-tab>
|
||||
</wd-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { OrderSource, OrderStatus } from '@/utils/order'
|
||||
import ComboCard from '@/components/order/ComboCard.vue'
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
|
||||
/* mescroll */
|
||||
const { mescrollInit, downCallback } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
|
||||
|
||||
// 菜单
|
||||
const currentType = ref<number>(1)
|
||||
const menuList = reactive<Array<{ type: number; title: string }>>([
|
||||
{
|
||||
type: 1,
|
||||
title: '直营店',
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
title: '加盟店',
|
||||
}
|
||||
])
|
||||
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
|
||||
|
||||
// 店铺类型
|
||||
|
||||
@ -80,6 +81,18 @@
|
||||
// tab
|
||||
const tab = ref<number>(0)
|
||||
|
||||
onLoad((args) => {
|
||||
if (args.orderType) {
|
||||
if (args.orderType === OrderStatus.Pending) {
|
||||
tab.value = 1
|
||||
} else if (args.orderType === OrderStatus.Reserved) {
|
||||
tab.value = 2
|
||||
} else if (args.orderType === OrderStatus.Finished) {
|
||||
tab.value = 3
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const orderList = {
|
||||
// 上拉加载的回调: 其中num:当前页 从1开始, size:每页数据条数,默认10
|
||||
upCallback: (mescroll) => {
|
||||
@ -122,16 +135,12 @@
|
||||
// })
|
||||
},
|
||||
|
||||
// 切换菜单
|
||||
handleChangeMenu: (type: number) => {
|
||||
currentType.value = type
|
||||
console.log("🚀 ~ currentType.value:", currentType.value)
|
||||
// 返回上一页
|
||||
handleBack: () => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
// 切换tab
|
||||
handleChangeTab: (e: any) => {
|
||||
tab.value = e.index
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -140,6 +149,10 @@
|
||||
background-color: $cz-page-background;
|
||||
}
|
||||
|
||||
.container{
|
||||
height: 150px;width: 100vw;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
:deep() {
|
||||
.wd-tabs,
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
</view>
|
||||
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx mx-102rpx mb-40rpx">
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Serving">服务过程中有任何问题,请联系客服</text>
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Reserved">使用过程中有任何问题,请联系客服</text>
|
||||
<text v-if="orderStatus === OrderStatus.Serving">服务过程中有任何问题,请联系客服</text>
|
||||
<text v-if="orderStatus === OrderStatus.Reserved">使用过程中有任何问题,请联系客服</text>
|
||||
</view>
|
||||
|
||||
<!-- 信息模块 -->
|
||||
@ -87,12 +87,12 @@
|
||||
<view class="text-[#606266] mr-54rpx">服务方式</view>
|
||||
<view class="text-[#303133]">到店服务</view>
|
||||
</view>
|
||||
<view class="text-28rpx leading-40rpx flex items-center mt-22rpx" v-if="orderStatus === ReserveCategoryOrderStatus.Serving">
|
||||
<view class="text-28rpx leading-40rpx flex items-center mt-22rpx" v-if="orderStatus === OrderStatus.Serving">
|
||||
<view class="text-[#606266] mr-54rpx">服务门店</view>
|
||||
<view class="text-[#303133] line-1 w-300rpx">茶馆名称茶馆名称茶馆名称茶馆名称茶馆名称茶馆名称茶馆名称</view>
|
||||
</view>
|
||||
<view class="text-28rpx leading-40rpx flex items-center mt-22rpx">
|
||||
<view class="text-[#606266] mr-54rpx"> {{ orderStatus === ReserveCategoryOrderStatus.Serving ? '门店地址' : '服务地址' }}</view>
|
||||
<view class="text-[#606266] mr-54rpx"> {{ orderStatus === OrderStatus.Serving ? '门店地址' : '服务地址' }}</view>
|
||||
<view class="text-[#303133]">青浦区仓桥路478号</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -100,7 +100,7 @@
|
||||
<view class="text-center mr-20rpx" >
|
||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_nav.png`"/>
|
||||
</view>
|
||||
<view class="text-center" v-if="orderStatus === ReserveCategoryOrderStatus.Serving">
|
||||
<view class="text-center" v-if="orderStatus === OrderStatus.Serving">
|
||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_phone.png`"/>
|
||||
</view>
|
||||
</view>
|
||||
@ -135,12 +135,12 @@
|
||||
|
||||
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx">
|
||||
<view class="mt-34rpx">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === ReserveCategoryOrderStatus.Serving">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.Serving">
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133] mr-30rpx" @click="orderDetail.handleConfirmOrder">确认订单</view>
|
||||
<view class="w-330rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]" @click="orderDetail.handleAgainReeserve">再次预定</view>
|
||||
</view>
|
||||
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === ReserveCategoryOrderStatus.Reserved">
|
||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center" v-if="orderStatus === OrderStatus.Reserved">
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133] mr-30rpx" @click="showRefundRule = true">申请退款</view>
|
||||
<view class="w-330rpx h-90rpx bg-[#F6F7F8] rounded-8rpx text-[#303133]" @click="orderDetail.handleService">联系客服</view>
|
||||
</view>
|
||||
@ -261,7 +261,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ReserveCategoryOrderStatus, ReserveCategoryOrderStatusText } from '@/utils/order'
|
||||
import { OrderStatus, OrderStatusText } from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -315,7 +315,7 @@
|
||||
/** 结束 **/
|
||||
|
||||
onLoad((args) => {
|
||||
title.value = ReserveCategoryOrderStatusText[args.orderStatus] || '订单详情'
|
||||
title.value = OrderStatusText[args.orderStatus] || '订单详情'
|
||||
orderStatus.value = args.orderStatus
|
||||
})
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<!-- 平台团购直营店 -->
|
||||
<view v-if="type === GroupBuyingCategory.Direct" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view v-if="type === OrderSource.Direct" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-10rpx flex items-center">
|
||||
@ -13,9 +13,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="font-400 text-28rpx leading-40rpx">
|
||||
<text class="text-[#4C9F44]" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">待使用</text>
|
||||
<text class="text-[#606266]" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">已使用</text>
|
||||
<text class="text-[#C9C9C9]" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">已退款</text>
|
||||
<text class="text-[#4C9F44]" v-if="orderStatus === OrderStatus.ToUse">待使用</text>
|
||||
<text class="text-[#606266]" v-if="orderStatus === OrderStatus.Used">已使用</text>
|
||||
<text class="text-[#C9C9C9]" v-if="orderStatus === OrderStatus.Refunded">已退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-22rpx">
|
||||
@ -45,7 +45,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 平台团购加盟店和抖音团购 -->
|
||||
<view v-if="type === GroupBuyingCategory.Franchise || type === GroupBuyingCategory.DouYin" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view v-if="type === OrderSource.Franchise || type === OrderSource.DouYin" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-10rpx flex items-center">
|
||||
@ -57,9 +57,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="font-400 text-28rpx leading-40rpx mt-12rpx">
|
||||
<text class="text-[#4C9F44]" v-if="orderStatus === GroupBuyingCategoryOrderStatus.ToUse">待使用</text>
|
||||
<text class="text-[#606266]" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used">已使用</text>
|
||||
<text class="text-[#C9C9C9]" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Refunded">已退款</text>
|
||||
<text class="text-[#4C9F44]" v-if="orderStatus === OrderStatus.ToUse">待使用</text>
|
||||
<text class="text-[#606266]" v-if="orderStatus === OrderStatus.Used">已使用</text>
|
||||
<text class="text-[#C9C9C9]" v-if="orderStatus === OrderStatus.Refunded">已退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-22rpx">
|
||||
@ -76,8 +76,8 @@
|
||||
</view>
|
||||
|
||||
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end">
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx" v-if="type === GroupBuyingCategory.Franchise">申请退款</view>
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]" v-if="type === GroupBuyingCategory.DouYin">立即预定</view>
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx" v-if="type === OrderSource.Franchise">申请退款</view>
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]" v-if="type === OrderSource.DouYin">立即预定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -85,7 +85,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 茶室预约 -->
|
||||
<view v-if="type === ReserveCategory.TeaRoom" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view v-if="type === OrderSource.TeaRoom" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-10rpx flex items-center">
|
||||
@ -97,9 +97,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="font-400 text-28rpx leading-40rpx mt-12rpx text-[#4C9F44]">
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Consuming">消费中</text>
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Reserved">已预约</text>
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Serving">服务中</text>
|
||||
<text v-if="orderStatus === OrderStatus.Consuming">消费中</text>
|
||||
<text v-if="orderStatus === OrderStatus.Reserved">已预约</text>
|
||||
<text v-if="orderStatus === OrderStatus.Serving">服务中</text>
|
||||
<text v-if="orderStatus === OrderStatus.Finished" class="text-[#606266]">完成</text>
|
||||
<text v-if="orderStatus === OrderStatus.Pending" class="text-[#FF5951]" >待付款</text>
|
||||
<text v-if="orderStatus === OrderStatus.Cancelled" class="text-[#C9C9C9]" >订单取消</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-22rpx">
|
||||
@ -117,11 +120,26 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template v-if="orderStatus === OrderStatus.Finished || orderStatus === OrderStatus.Cancelled">
|
||||
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end" @click="comboCard.handleDeleteTeaRoomOrder">
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx">
|
||||
删除订单
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-if="orderStatus === OrderStatus.Pending">
|
||||
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end">
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx" @click="comboCard.handleCancelTeaRoomOrder">取消订单</view>
|
||||
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]">去支付</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 茶艺师预约 -->
|
||||
<view v-if="type === ReserveCategory.TeaSpecialist" class="bg-white rounded-10rpx p-28rpx">
|
||||
<view v-if="type === OrderSource.TeaSpecialist" class="bg-white rounded-10rpx p-28rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/home/home_image5.png`"></wd-img>
|
||||
@ -136,9 +154,9 @@
|
||||
<view class="bg-[#F0F6EF] text-[#006C2D] font-400 text-22rpx leading-32rpx rounded-4rpx text-center w-150rpx ml-18rpx pb-4rpx">金牌茶艺师</view>
|
||||
</view>
|
||||
<view class="font-400 text-28rpx leading-20rpx text-[#4C9F44] flex items-center">
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Consuming">消费中</text>
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Reserved">已预约</text>
|
||||
<text v-if="orderStatus === ReserveCategoryOrderStatus.Serving">服务中</text>
|
||||
<text v-if="orderStatus === OrderStatus.Consuming">消费中</text>
|
||||
<text v-if="orderStatus === OrderStatus.Reserved">已预约</text>
|
||||
<text v-if="orderStatus === OrderStatus.Serving">服务中</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -157,11 +175,16 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 取消订单, 删除订单 -->
|
||||
<wd-message-box selector="wd-message-box-slot"></wd-message-box>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="ComboCard">
|
||||
import { GroupBuyingCategory, GroupBuyingCategoryOrderStatus, ReserveCategory, ReserveCategoryOrderStatus } from '@/utils/order'
|
||||
import { OrderSource, OrderStatus } from '@/utils/order'
|
||||
import { useMessage } from 'wot-design-uni'
|
||||
import { toast } from '@/utils/toast'
|
||||
|
||||
/**
|
||||
* ComboCard 套餐卡片组件
|
||||
@ -176,7 +199,7 @@
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
default: GroupBuyingCategory.Direct
|
||||
default: OrderSource.Direct
|
||||
},
|
||||
/**
|
||||
* 订单类型: 待使用、退款等
|
||||
@ -184,10 +207,14 @@
|
||||
*/
|
||||
orderStatus: {
|
||||
type: String,
|
||||
default: GroupBuyingCategoryOrderStatus.ToUse
|
||||
default: OrderStatus.ToUse
|
||||
}
|
||||
})
|
||||
|
||||
// 取消订单弹窗
|
||||
const message = useMessage('wd-message-box-slot')
|
||||
|
||||
|
||||
const comboCard = {
|
||||
// 跳转到对饮茶室的详情页
|
||||
handleToStore: () => {
|
||||
@ -196,25 +223,72 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 删除茶室订单
|
||||
handleDeleteTeaRoomOrder: () => {
|
||||
message.confirm({
|
||||
title: '确定删除订单?',
|
||||
msg: '删除订单后无法恢复,是否确认删除订单?',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
customClass: '!bg-[#F6F7F8] !text-[#303133] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
},
|
||||
confirmButtonProps: {
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then((res) => {
|
||||
// 点击确认按钮回调事件
|
||||
toast.info('删除订单成功')
|
||||
}).catch(() => {
|
||||
// 点击取消按钮回调事件
|
||||
})
|
||||
},
|
||||
|
||||
// 取消茶室订单
|
||||
handleCancelTeaRoomOrder: () => {
|
||||
message.confirm({
|
||||
title: '确定取消订单?',
|
||||
msg: '取消订单后无法恢复,优惠券可退回',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
customClass: '!bg-[#F6F7F8] !text-[#303133] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
},
|
||||
confirmButtonProps: {
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then((res) => {
|
||||
// 点击确认按钮回调事件
|
||||
toast.info('订单取消成功')
|
||||
}).catch(() => {
|
||||
// 点击取消按钮回调事件
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到团购订单详情页
|
||||
handleToOrderDetail: () => {
|
||||
// TODO 这里要对不同类型的订单进行区分跳转一个是直营的一个市加盟的
|
||||
switch (props.type) {
|
||||
case 'Direct':
|
||||
case OrderSource.Direct:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/platform/direct-order-detail?orderStatus=${props.orderStatus}`
|
||||
})
|
||||
break;
|
||||
case 'Franchise':
|
||||
case OrderSource.Franchise:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/platform/franchise-order-detail?orderStatus=${props.orderStatus}`
|
||||
})
|
||||
break;
|
||||
case 'DouYin':
|
||||
case OrderSource.DouYin:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/douyin/douyin-order-detail?orderStatus=${props.orderStatus}`
|
||||
})
|
||||
break;
|
||||
case OrderSource.TeaRoom:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/tea-room/order-detail?orderStatus=${props.orderStatus}`
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 平台团购直营店待使用 -->
|
||||
<view class="mt-30rpx font-500 leading-48rpx" v-if="type === 'Direct' && orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="mt-30rpx font-500 leading-48rpx" v-if="type === 'Direct' && orderStatus === OrderStatus.ToUse">
|
||||
<view class="text-26rpx text-[#606266]">有效期:2025.04.04-2025.12.31</view>
|
||||
<view class="text-28rpx text-[#303133] mt-18rpx">
|
||||
<text class="mr-20rpx">券码 1052 4258 5654 125</text>
|
||||
@ -38,7 +38,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 平台团购直营店已使用 -->
|
||||
<view class="coupon-bg" v-if="type === 'Direct' && orderStatus === GroupBuyingCategoryOrderStatus.Used">
|
||||
<view class="coupon-bg" v-if="type === 'Direct' && orderStatus === OrderStatus.Used">
|
||||
<view class="flex items-center px-30rpx pt-30rpx pb-40rpx" @click="comboCoupon.handleToStore">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
|
||||
@ -71,7 +71,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 平台团购加盟-待使用 -->
|
||||
<view class="coupon-bg2 p-30rpx" v-if="type === 'Franchise' && orderStatus === GroupBuyingCategoryOrderStatus.ToUse">
|
||||
<view class="coupon-bg2 p-30rpx" v-if="type === 'Franchise' && orderStatus === OrderStatus.ToUse">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
|
||||
@ -107,7 +107,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 抖音团购已使用 -->
|
||||
<view class="bg-white rounded-16rpx p-30rpx" v-if="orderStatus === GroupBuyingCategoryOrderStatus.Used && type === 'DouYin'">
|
||||
<view class="bg-white rounded-16rpx p-30rpx" v-if="orderStatus === OrderStatus.Used && type === 'DouYin'">
|
||||
<view class="flex items-center" @click="comboCoupon.handleToStore">
|
||||
<view class="mr-30rpx">
|
||||
<wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img>
|
||||
@ -131,7 +131,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="ComboCoupon">
|
||||
import { GroupBuyingCategoryOrderStatus } from '@/utils/order'
|
||||
import { OrderStatus } from '@/utils/order'
|
||||
|
||||
/**
|
||||
* Combo 套餐券组件
|
||||
|
||||
@ -236,7 +236,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {TeaRoomOrderStatus, TeaSpecialistOrderStatus} from '@/utils/order'
|
||||
import {OrderStatus} from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -252,18 +252,18 @@
|
||||
// 茶室订单
|
||||
const roomMenuList = reactive([
|
||||
{ id: 1, title: '全部订单', icon: `${OSS}icon/icon_room_all_order.png`, badge: '', type: 'all' },
|
||||
{ id: 2, title: '待付款', icon: `${OSS}icon/icon_room_wait_pay_order.png`, badge: '', type: TeaRoomOrderStatus.Pending },
|
||||
{ id: 3, title: '预约单', icon: `${OSS}icon/icon_room_reserve_order.png`, badge: '', type: TeaRoomOrderStatus.Reserved },
|
||||
{ id: 4, title: '已完结', icon: `${OSS}icon/icon_room_finish_order.png`, badge: '', type: TeaRoomOrderStatus.Finished },
|
||||
{ id: 2, title: '待付款', icon: `${OSS}icon/icon_room_wait_pay_order.png`, badge: '', type: OrderStatus.Pending },
|
||||
{ id: 3, title: '预约单', icon: `${OSS}icon/icon_room_reserve_order.png`, badge: '', type: OrderStatus.Reserved },
|
||||
{ id: 4, title: '已完结', icon: `${OSS}icon/icon_room_finish_order.png`, badge: '', type: OrderStatus.Finished },
|
||||
])
|
||||
|
||||
// 茶艺师订单
|
||||
const teaReserveMenuList = reactive([
|
||||
{ id: 1, title: '全部订单', icon: `${OSS}icon/icon_tea_all_order.png`, badge: '', type: 'all' },
|
||||
{ id: 2, title: '待付款', icon: `${OSS}icon/icon_tea_wait_pay_order.png`, badge: '', type: TeaSpecialistOrderStatus.Pending },
|
||||
{ id: 3, title: '预约单', icon: `${OSS}icon/icon_tea_reserve_order.png`, badge: '', type: TeaSpecialistOrderStatus.Reserved },
|
||||
{ id: 4, title: '待确认', icon: `${OSS}icon/icon_tea_wait_confirm_order.png`, badge: '', type: TeaSpecialistOrderStatus.Confirm },
|
||||
{ id: 4, title: '已完结', icon: `${OSS}icon/icon_tea_finish_order.png`, badge: '', type: TeaSpecialistOrderStatus.Finished },
|
||||
{ id: 2, title: '待付款', icon: `${OSS}icon/icon_tea_wait_pay_order.png`, badge: '', type: OrderStatus.Pending },
|
||||
{ id: 3, title: '预约单', icon: `${OSS}icon/icon_tea_reserve_order.png`, badge: '', type: OrderStatus.Reserved },
|
||||
{ id: 4, title: '待确认', icon: `${OSS}icon/icon_tea_wait_confirm_order.png`, badge: '', type: OrderStatus.Confirm },
|
||||
{ id: 4, title: '已完结', icon: `${OSS}icon/icon_tea_finish_order.png`, badge: '', type: OrderStatus.Finished },
|
||||
])
|
||||
|
||||
// 更多服务
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" @up="reserve.upCallback" :up="upOption">
|
||||
<view v-for="(item, index) in 5" :key="index" >
|
||||
<view class="mb-20rpx" @click="reserve.handleToReserveRoomOrder">
|
||||
<combo-card :type="ReserveCategory.TeaRoom" :order-status="ReserveCategoryOrderStatus.Consuming"></combo-card>
|
||||
<combo-card :type="OrderSource.TeaRoom" :order-status="OrderStatus.Consuming"></combo-card>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
@ -46,7 +46,7 @@
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" @up="reserve.upCallback" :up="upOption">
|
||||
<view v-for="(item, index) in 5" :key="index" >
|
||||
<view class="mb-20rpx" @click="reserve.handleToTeaSpecialistOrder">
|
||||
<combo-card :type="ReserveCategory.TeaSpecialist" :order-status="ReserveCategoryOrderStatus.Consuming"></combo-card>
|
||||
<combo-card :type="OrderSource.TeaSpecialist" :order-status="OrderStatus.Consuming"></combo-card>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
@ -59,7 +59,7 @@
|
||||
import ComboCard from '@/components/order/ComboCard.vue'
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
import { ReserveCategory, ReserveCategoryOrderStatus } from '@/utils/order'
|
||||
import { OrderSource, OrderStatus } from '@/utils/order'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const navbarHeight = Number(inject('navbarHeight')) + 42 + 14 // 42为tabs的高度 14是边距值
|
||||
@ -134,14 +134,14 @@
|
||||
// 茶室预约-跳转到对应的订单页
|
||||
handleToReserveRoomOrder: () => {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/tea-room/order-detail?orderStatus=${ReserveCategoryOrderStatus.Consuming}`
|
||||
url: `/bundle/order/tea-room/order-detail?orderStatus=${OrderStatus.Consuming}`
|
||||
})
|
||||
},
|
||||
|
||||
// 茶艺师预约-跳转到对应的订单页
|
||||
handleToTeaSpecialistOrder: () => {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/tea-specialist/order-detail?orderStatus=${ReserveCategoryOrderStatus.Serving}`
|
||||
url: `/bundle/order/tea-specialist/order-detail?orderStatus=${OrderStatus.Serving}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -1,85 +1,3 @@
|
||||
// 团购类型
|
||||
export enum GroupBuyingCategory {
|
||||
Direct = 'direct', // 直营店
|
||||
Franchise = 'franchise', // 加盟店
|
||||
DouYin = 'douyin' // 抖音团购
|
||||
}
|
||||
|
||||
// 店铺类型对应名称
|
||||
export const GroupBuyingCategoryText: Record<GroupBuyingCategory, string> = {
|
||||
[GroupBuyingCategory.Direct]: '直营店',
|
||||
[GroupBuyingCategory.Franchise]: '加盟店',
|
||||
[GroupBuyingCategory.DouYin]: '抖音',
|
||||
}
|
||||
|
||||
// 通用团购订单状态(仅团购业务的三个)
|
||||
export enum GroupBuyingCategoryOrderStatus {
|
||||
ToUse = 'toUse', // 待使用
|
||||
Used = 'used', // 已使用(交易完成)
|
||||
Refunded = 'refunded', // 已退款
|
||||
AfterSaleApply = 'afterSaleApply', // 申请售后
|
||||
AfterSaleProcessing = 'afterSaleProcessing' // 申请售后中
|
||||
}
|
||||
|
||||
// 对应名称
|
||||
export const GroupBuyingStatusText: Record<GroupBuyingCategoryOrderStatus, string> = {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '已使用',
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '已退款',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleApply]: '申请售后',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
}
|
||||
|
||||
// 对应tabbar显示的标题
|
||||
export const GroupBuyingStatusTitle: Record<GroupBuyingCategory, Record<GroupBuyingCategoryOrderStatus, string>> = {
|
||||
[GroupBuyingCategory.Direct]: {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '交易完成',
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '售后完成',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleApply]: '申请售后',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
},
|
||||
[GroupBuyingCategory.Franchise]: {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '交易完成',
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '售后完成',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleApply]: '申请售后',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
},
|
||||
[GroupBuyingCategory.DouYin]: {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '已使用', // DouYin专属
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '售后完成',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleApply]: '申请售后',
|
||||
[GroupBuyingCategoryOrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
}
|
||||
}
|
||||
|
||||
// 不同门团购型可用状态映射(目前两类相同,后期若不同可单独调整)
|
||||
export const CategoryStatusMap: Record<GroupBuyingCategory, GroupBuyingCategoryOrderStatus[]> = {
|
||||
[GroupBuyingCategory.Direct]: [
|
||||
GroupBuyingCategoryOrderStatus.ToUse,
|
||||
GroupBuyingCategoryOrderStatus.Used,
|
||||
GroupBuyingCategoryOrderStatus.Refunded,
|
||||
GroupBuyingCategoryOrderStatus.AfterSaleApply,
|
||||
GroupBuyingCategoryOrderStatus.AfterSaleProcessing
|
||||
],
|
||||
[GroupBuyingCategory.Franchise]: [
|
||||
GroupBuyingCategoryOrderStatus.ToUse,
|
||||
GroupBuyingCategoryOrderStatus.Used,
|
||||
GroupBuyingCategoryOrderStatus.Refunded,
|
||||
GroupBuyingCategoryOrderStatus.AfterSaleApply,
|
||||
GroupBuyingCategoryOrderStatus.AfterSaleProcessing
|
||||
],
|
||||
[GroupBuyingCategory.DouYin]: [
|
||||
GroupBuyingCategoryOrderStatus.ToUse,
|
||||
GroupBuyingCategoryOrderStatus.Used,
|
||||
GroupBuyingCategoryOrderStatus.Refunded,
|
||||
GroupBuyingCategoryOrderStatus.AfterSaleApply,
|
||||
GroupBuyingCategoryOrderStatus.AfterSaleProcessing
|
||||
]
|
||||
}
|
||||
|
||||
// 预约服务分类
|
||||
export enum ReserveServiceCategory {
|
||||
ReserveRoom = 'ReserveRoom', // 预约茶室
|
||||
@ -125,63 +43,126 @@ export const ReasonMap: Record<number, string> = {
|
||||
|
||||
/** 结束 **/
|
||||
|
||||
/** 预约(茶室、茶艺师预约) **/
|
||||
|
||||
// 预约类型
|
||||
export enum ReserveCategory {
|
||||
TeaRoom = 'teaRoom', // 直营店
|
||||
// 订单来源
|
||||
export enum OrderSource {
|
||||
Direct = 'direct', // 直营店
|
||||
Franchise = 'franchise', // 加盟店
|
||||
DouYin = 'douyin', // 抖音团购
|
||||
TeaRoom = 'teaRoom', // 茶室
|
||||
TeaSpecialist = 'teaSpecialist' // 茶艺师
|
||||
}
|
||||
|
||||
// 预约类型对应名称
|
||||
export const ReserveCategoryText: Record<ReserveCategory, string> = {
|
||||
[ReserveCategory.TeaRoom]: '茶室预约',
|
||||
[ReserveCategory.TeaSpecialist]: '茶艺师预约',
|
||||
// 订单来源对应名称
|
||||
export const OrderSourceText: Record<OrderSource, string> = {
|
||||
[OrderSource.Direct]: '直营店',
|
||||
[OrderSource.Franchise]: '加盟店',
|
||||
[OrderSource.DouYin]: '抖音',
|
||||
[OrderSource.TeaRoom]: '茶室',
|
||||
[OrderSource.TeaSpecialist]: '茶艺师',
|
||||
}
|
||||
|
||||
// 通用订单状态
|
||||
export enum ReserveCategoryOrderStatus {
|
||||
// 订单状态
|
||||
export enum OrderStatus {
|
||||
Consuming = 'consuming', // 消费中
|
||||
Reserved = 'reserved', // 已预约
|
||||
Serving = 'serving' // 服务中(茶艺师订单独有的)
|
||||
}
|
||||
|
||||
// 对应名称
|
||||
export const ReserveCategoryOrderStatusText: Record<ReserveCategoryOrderStatus, string> = {
|
||||
[ReserveCategoryOrderStatus.Consuming]: '消费中',
|
||||
[ReserveCategoryOrderStatus.Reserved]: '已预约',
|
||||
[ReserveCategoryOrderStatus.Serving]: '服务中'
|
||||
}
|
||||
|
||||
/** 结束 **/
|
||||
|
||||
|
||||
/** 茶室订单 **/
|
||||
export enum TeaRoomOrderStatus {
|
||||
Reserved = 'reserved', // 预约单(已预约)
|
||||
Serving = 'serving', // 服务中(茶艺师订单独有的)
|
||||
Pending = 'pending', // 待付款
|
||||
Reserved = 'reserved', // 预约单
|
||||
Finished = 'finished' // 已完结
|
||||
}
|
||||
|
||||
export const TeaRoomOrderStatusText: Record<TeaRoomOrderStatus, string> = {
|
||||
[TeaRoomOrderStatus.Pending]: '待付款',
|
||||
[TeaRoomOrderStatus.Reserved]: '预约单',
|
||||
[TeaRoomOrderStatus.Finished]: '已完结'
|
||||
}
|
||||
/** 结束 **/
|
||||
|
||||
/** 茶艺师订单 **/
|
||||
export enum TeaSpecialistOrderStatus {
|
||||
Pending = 'pending', // 待付款
|
||||
Reserved = 'reserved', // 预约单
|
||||
Confirm = 'confirm', // 待确认
|
||||
Finished = 'finished' // 已完结
|
||||
Finished = 'finished', // 已完结
|
||||
Cancelled = 'cancelled', // 已取消
|
||||
ToUse = 'toUse', // 待使用
|
||||
Used = 'used', // 已使用(交易完成)
|
||||
Refunded = 'refunded', // 已退款
|
||||
AfterSaleApply = 'afterSaleApply', // 申请售后
|
||||
AfterSaleProcessing = 'afterSaleProcessing', // 申请售后中
|
||||
}
|
||||
|
||||
export const TeaSpecialistOrderStatusText: Record<TeaSpecialistOrderStatus, string> = {
|
||||
[TeaSpecialistOrderStatus.Pending]: '待付款',
|
||||
[TeaSpecialistOrderStatus.Reserved]: '预约单',
|
||||
[TeaSpecialistOrderStatus.Confirm]: '待确认',
|
||||
[TeaSpecialistOrderStatus.Finished]: '已完结'
|
||||
// 订单状态对应名称
|
||||
export const OrderStatusText: Record<OrderStatus, string> = {
|
||||
[OrderStatus.Consuming]: '消费中',
|
||||
[OrderStatus.Reserved]: '预约单',
|
||||
[OrderStatus.Serving]: '服务中',
|
||||
[OrderStatus.Pending]: '待付款',
|
||||
[OrderStatus.Confirm]: '待确认',
|
||||
[OrderStatus.Finished]: '已完结',
|
||||
[OrderStatus.Cancelled]: '已取消',
|
||||
[OrderStatus.ToUse]: '待使用',
|
||||
[OrderStatus.Used]: '已使用',
|
||||
[OrderStatus.Refunded]: '已退款',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
}
|
||||
|
||||
// 对应tabbar显示的标题
|
||||
export const OrderStatusTitle: Record<OrderSource, Record<OrderStatus, string>> = {
|
||||
[OrderSource.TeaRoom]: {
|
||||
[OrderStatus.Consuming]: '消费中',
|
||||
[OrderStatus.Reserved]: '预约单',
|
||||
[OrderStatus.Serving]: '服务中',
|
||||
[OrderStatus.Pending]: '等待付款',
|
||||
[OrderStatus.Confirm]: '待确认',
|
||||
[OrderStatus.Finished]: '交易完成',
|
||||
[OrderStatus.Cancelled]: '订单取消',
|
||||
[OrderStatus.ToUse]: '待使用',
|
||||
[OrderStatus.Used]: '交易完成',
|
||||
[OrderStatus.Refunded]: '售后完成',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
},
|
||||
[OrderSource.TeaSpecialist]: {
|
||||
[OrderStatus.Consuming]: '消费中',
|
||||
[OrderStatus.Reserved]: '预约单',
|
||||
[OrderStatus.Serving]: '服务中',
|
||||
[OrderStatus.Pending]: '待付款',
|
||||
[OrderStatus.Confirm]: '待确认',
|
||||
[OrderStatus.Finished]: '已完结',
|
||||
[OrderStatus.Cancelled]: '已取消',
|
||||
[OrderStatus.ToUse]: '待使用',
|
||||
[OrderStatus.Used]: '交易完成',
|
||||
[OrderStatus.Refunded]: '售后完成',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
},
|
||||
[OrderSource.Direct]: {
|
||||
[OrderStatus.Consuming]: '消费中',
|
||||
[OrderStatus.Reserved]: '预约单',
|
||||
[OrderStatus.Serving]: '服务中',
|
||||
[OrderStatus.Pending]: '待付款',
|
||||
[OrderStatus.Confirm]: '待确认',
|
||||
[OrderStatus.Finished]: '已完结',
|
||||
[OrderStatus.Cancelled]: '已取消',
|
||||
[OrderStatus.ToUse]: '待使用',
|
||||
[OrderStatus.Used]: '交易完成',
|
||||
[OrderStatus.Refunded]: '售后完成',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
},
|
||||
[OrderSource.Franchise]: {
|
||||
[OrderStatus.Consuming]: '消费中',
|
||||
[OrderStatus.Reserved]: '预约单',
|
||||
[OrderStatus.Serving]: '服务中',
|
||||
[OrderStatus.Pending]: '待付款',
|
||||
[OrderStatus.Confirm]: '待确认',
|
||||
[OrderStatus.Finished]: '已完结',
|
||||
[OrderStatus.Cancelled]: '已取消',
|
||||
[OrderStatus.ToUse]: '待使用',
|
||||
[OrderStatus.Used]: '交易完成',
|
||||
[OrderStatus.Refunded]: '售后完成',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
},
|
||||
[OrderSource.DouYin]: {
|
||||
[OrderStatus.Consuming]: '消费中',
|
||||
[OrderStatus.Reserved]: '预约单',
|
||||
[OrderStatus.Serving]: '服务中',
|
||||
[OrderStatus.Pending]: '待付款',
|
||||
[OrderStatus.Confirm]: '待确认',
|
||||
[OrderStatus.Finished]: '已完结',
|
||||
[OrderStatus.Cancelled]: '已取消',
|
||||
[OrderStatus.ToUse]: '待使用',
|
||||
[OrderStatus.Used]: '已使用', // DouYin专属
|
||||
[OrderStatus.Refunded]: '售后完成',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleProcessing]: '申请售后中'
|
||||
}
|
||||
}
|
||||
/** 结束 **/
|
||||
|
||||
Reference in New Issue
Block a user