添加页面
This commit is contained in:
@ -122,17 +122,20 @@
|
||||
</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 class="text-center flex items-center text-28rpx mt-28rpx justify-end"
|
||||
@click="comboCard.handleDeleteOrder(OrderSource.TeaRoom)">
|
||||
<view class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx flex items-center justify-center">
|
||||
删除订单
|
||||
</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 class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx flex items-center justify-center"
|
||||
@click="comboCard.handleCancelOrder(OrderSource.TeaRoom)">取消订单</view>
|
||||
<view class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44] flex items-center justify-center"
|
||||
@click="comboCard.handleToPayOrder(OrderSource.TeaRoom)">去支付</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
@ -144,19 +147,25 @@
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/home/home_image5.png`"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="flex items-center">
|
||||
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">茶艺师</view>
|
||||
<view class="w-168rpx h-40rpx relative mr-44rpx">
|
||||
<view class="absolute left-0 top-0 h-36rpx flex items-start">
|
||||
<wd-img :src="`${OSS}icon/icon_gold_medal.png`" width="36rpx" height="36rpx"></wd-img>
|
||||
<view class="flex-1" @click="comboCard.handleToOrderDetail">
|
||||
<view class="flex items-center relative">
|
||||
<view class="w-400rpx flex items-center">
|
||||
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">茶艺师</view>
|
||||
<view class="w-160rpx h-40rpx relative mr-44rpx">
|
||||
<view class="absolute left-0 top-0 h-36rpx flex items-start">
|
||||
<wd-img :src="`${OSS}icon/icon_gold_medal.png`" width="36rpx" height="36rpx"></wd-img>
|
||||
</view>
|
||||
<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="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">
|
||||
|
||||
<view class="font-400 text-28rpx leading-20rpx text-[#4C9F44] flex items-center absolute top-6rpx right-0">
|
||||
<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>
|
||||
|
||||
@ -174,6 +183,25 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 操作按钮 -->
|
||||
<view>
|
||||
<view v-if="orderStatus === OrderStatus.Finished || orderStatus === OrderStatus.Cancelled"
|
||||
class="flex items-center text-28rpx mt-28rpx justify-end"
|
||||
@click="comboCard.handleDeleteOrder(OrderSource.TeaSpecialist)">
|
||||
<view class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] flex items-center justify-center">
|
||||
删除订单
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderStatus === OrderStatus.Pending"
|
||||
class="flex items-center text-28rpx mt-28rpx justify-end">
|
||||
<view class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx flex items-center justify-center"
|
||||
@click="comboCard.handleCancelOrder(OrderSource.TeaSpecialist)">
|
||||
取消订单
|
||||
</view>
|
||||
<view class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44] flex items-center justify-center"
|
||||
@click="comboCard.handleToPayOrder(OrderSource.TeaSpecialist)">去支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 取消订单, 删除订单 -->
|
||||
@ -223,8 +251,8 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 删除茶室订单
|
||||
handleDeleteTeaRoomOrder: () => {
|
||||
// 删除订单
|
||||
handleDeleteOrder: (source: string) => {
|
||||
message.confirm({
|
||||
title: '确定删除订单?',
|
||||
msg: '删除订单后无法恢复,是否确认删除订单?',
|
||||
@ -237,6 +265,26 @@
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then((res) => {
|
||||
switch (source) {
|
||||
case OrderSource.Direct:
|
||||
// TODO 这里调用删除直营订单的接口
|
||||
break;
|
||||
case OrderSource.Franchise:
|
||||
// TODO 这里调用删除加盟订单的接口
|
||||
break;
|
||||
case OrderSource.DouYin:
|
||||
// TODO 这里调用删除抖音订单的接口
|
||||
break;
|
||||
case OrderSource.TeaRoom:
|
||||
// TODO 这里调用删除茶室订单的接口
|
||||
break;
|
||||
case OrderSource.TeaSpecialist:
|
||||
// TODO 这里调用删除茶室订单的接口
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// 点击确认按钮回调事件
|
||||
toast.info('删除订单成功')
|
||||
}).catch(() => {
|
||||
@ -244,8 +292,8 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 取消茶室订单
|
||||
handleCancelTeaRoomOrder: () => {
|
||||
// 取消订单
|
||||
handleCancelOrder: (source: string) => {
|
||||
message.confirm({
|
||||
title: '确定取消订单?',
|
||||
msg: '取消订单后无法恢复,优惠券可退回',
|
||||
@ -258,6 +306,25 @@
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then((res) => {
|
||||
switch (source) {
|
||||
case OrderSource.Direct:
|
||||
// TODO 这里调用删除直营订单的接口
|
||||
break;
|
||||
case OrderSource.Franchise:
|
||||
// TODO 这里调用删除加盟订单的接口
|
||||
break;
|
||||
case OrderSource.DouYin:
|
||||
// TODO 这里调用删除抖音订单的接口
|
||||
break;
|
||||
case OrderSource.TeaRoom:
|
||||
// TODO 这里调用删除茶室订单的接口
|
||||
break;
|
||||
case OrderSource.TeaSpecialist:
|
||||
// TODO 这里调用删除茶室订单的接口
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// 点击确认按钮回调事件
|
||||
toast.info('订单取消成功')
|
||||
}).catch(() => {
|
||||
@ -265,7 +332,7 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到团购订单详情页
|
||||
// 跳转到订单详情页
|
||||
handleToOrderDetail: () => {
|
||||
// TODO 这里要对不同类型的订单进行区分跳转一个是直营的一个市加盟的
|
||||
switch (props.type) {
|
||||
@ -289,6 +356,44 @@
|
||||
url: `/bundle/order/tea-room/order-detail?orderStatus=${props.orderStatus}`
|
||||
})
|
||||
break;
|
||||
case OrderSource.TeaSpecialist:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/tea-specialist/order-detail?orderStatus=${props.orderStatus}`
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
// 支付
|
||||
handleToPayOrder: (source: string) => {
|
||||
switch (source) {
|
||||
case OrderSource.Direct:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/platform/direct-order-detail?orderStatus=${props.orderStatus}&toPay=true`
|
||||
})
|
||||
break;
|
||||
case OrderSource.Franchise:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/platform/franchise-order-detail?orderStatus=${props.orderStatus}&toPay=true`
|
||||
})
|
||||
break;
|
||||
case OrderSource.DouYin:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/douyin/douyin-order-detail?orderStatus=${props.orderStatus}&toPay=true`
|
||||
})
|
||||
break;
|
||||
case OrderSource.TeaRoom:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/tea-room/order-detail?orderStatus=${props.orderStatus}&toPay=true`
|
||||
})
|
||||
break;
|
||||
case OrderSource.TeaSpecialist:
|
||||
uni.navigateTo({
|
||||
url: `/bundle/order/tea-specialist/order-detail?orderStatus=${props.orderStatus}&toPay=true`
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user