完善功能
This commit is contained in:
@ -195,12 +195,13 @@
|
||||
<view class="bg-white rounded-16rpx p-30rpx">
|
||||
<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>
|
||||
<!-- <wd-img width="190rpx" height="190rpx" :src="`${OSS}images/home/home_image5.png`" mode="scaleToFill"></wd-img> -->
|
||||
<wd-img width="190rpx" height="190rpx" :src="comboOrder.group.img" mode="scaleToFill" v-if="orderType === OrderSource.Combo"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<!-- 非茶艺师退款 -->
|
||||
<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>
|
||||
<view class="flex justify-between items-center" @click="handleToTGComboHooks(storeId, comboId)" v-if="orderType === OrderSource.TeaSpecialist">
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx w-362rpx line-1">{{ comboOrder.group.title }} </view>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
</view>
|
||||
<!-- 茶艺师退款 -->
|
||||
@ -209,8 +210,8 @@
|
||||
<view class="text-[#909399] text-26rpx leading-36rpx">¥324.22</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx">
|
||||
<view>3小时</view>
|
||||
<view>x1</view>
|
||||
<view v-if="orderType === OrderSource.Combo">{{ comboOrder.group.hour }}小时</view>
|
||||
<view v-if="orderType === OrderSource.Combo">x1</view>
|
||||
</view>
|
||||
<!-- 茶艺师退显示车马费-->
|
||||
<view class="flex justify-between items-center text-26rpx leading-36rpx text-[#909399] mt-18rpx" v-if="orderType === OrderSource.TeaSpecialist">
|
||||
@ -219,7 +220,7 @@
|
||||
</view>
|
||||
<view class="text-[#606266] text-right mt-26rpx">
|
||||
<text class="text-24rpx leading-34rpx mr-12rpx">实付</text>
|
||||
<text class="tetx-32rpx leading-36rpx">¥29.32</text>
|
||||
<text class="tetx-32rpx leading-36rpx">¥{{ comboOrder.order_amount }}</text>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
@ -299,6 +300,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { OrderStatusTitle, PersonalReasonMap, MerchantReasonMap, ReasonMap, OrderSource, OrderStatus } from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
import type { ITeaRoomPackageOrderDetailsResult } from '@/api/types/tea-room'
|
||||
import { getTeaRoomPackageOrderDetail } from '@/api/tea-room'
|
||||
import { handleToTGComboHooks } from '@/hooks/useOrder'
|
||||
|
||||
/** 表单相关 **/
|
||||
const reasonText = ref<string>('') // 显示售后原因文本
|
||||
@ -331,15 +335,69 @@
|
||||
const orderType = ref<string>('') // 订单类型:团购、抖音、茶艺师退款
|
||||
const orderStatus = ref<string>('') // 订单状态:待使用、退款等
|
||||
|
||||
// 订单
|
||||
const orderId = ref<number>(0)
|
||||
const storeId = ref<number>(0)
|
||||
const comboId = ref<number>(0)
|
||||
|
||||
// 团购套餐
|
||||
const comboOrder = ref<ITeaRoomPackageOrderDetailsResult>({
|
||||
pay: 0,
|
||||
pay_way_title: '',
|
||||
order_amount: '',
|
||||
order_sn: '',
|
||||
order_status: 0,
|
||||
dtime: '',
|
||||
pay_dtime: '',
|
||||
group: {
|
||||
id: 0,
|
||||
title: '',
|
||||
img: '',
|
||||
hour: '',
|
||||
},
|
||||
store: {
|
||||
id: 0,
|
||||
address: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
name: '',
|
||||
image: '',
|
||||
contact_phone: '',
|
||||
store_id: 0,
|
||||
distance: '',
|
||||
operation_type: 1
|
||||
}
|
||||
})
|
||||
|
||||
onLoad((args) => {
|
||||
// 这里暂时使用 OrderSource.Combo 这个,因为平台团购类型下面都是有共同的售后
|
||||
title.value = OrderStatusTitle[OrderSource.Combo][args.orderStatus] || '订单详情'
|
||||
|
||||
orderId.value = Number(args.orderId)
|
||||
orderType.value = args.orderType
|
||||
orderStatus.value = args.orderStatus
|
||||
storeId.value = Number(args.storeId)
|
||||
comboId.value = Number(args.comboId)
|
||||
|
||||
if (orderType.value === OrderSource.Combo) {
|
||||
// 获取团购套餐订单详情
|
||||
AfterSales.handleInitComboDetails()
|
||||
}
|
||||
})
|
||||
|
||||
const AfterSales = {
|
||||
/**
|
||||
* 获取套餐详情
|
||||
*/
|
||||
handleInitComboDetails: async () => {
|
||||
const res = await getTeaRoomPackageOrderDetail({
|
||||
id: orderId.value,
|
||||
latitude: uni.getStorageSync('latitude'),
|
||||
longitude: uni.getStorageSync('longitude')
|
||||
})
|
||||
comboOrder.value = res.details
|
||||
},
|
||||
|
||||
handleToCombo: () => {
|
||||
toast.info('跳转到套餐详情')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user