对接订单管理接口
This commit is contained in:
@ -12,24 +12,24 @@
|
||||
<view class="bg-white mx-30rpx rounded-10rpx px-30rpx py-32rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="152rpx" height="152rpx" :src="`${OSS}images/reserve_room/reserve_room_image2.png`"></wd-img>
|
||||
<wd-img width="152rpx" height="152rpx" :src="order.main_image"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1" @click="ComboCard.handleToOrderDetail">
|
||||
<view class="flex items-center relative">
|
||||
<view class="w-400rpx line-1 font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">
|
||||
这里是套餐的名字这里是套餐的名这里是套餐的名字这里是套餐的名字这里是套餐的名字这里是套餐的名字这里是套餐的名字这里是套餐的名字字
|
||||
{{ order.title }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mt-16rpx">
|
||||
<view class="font-400 text-[#606266] text-26rpx leading-36rpx mr-8rpx">ID:1270304172</view>
|
||||
<wd-icon name="file-copy" size="32rpx" color='#707070' @click="copy(123)"></wd-icon>
|
||||
<view class="font-400 text-[#606266] text-26rpx leading-36rpx mr-8rpx">ID:{{order.code}}</view>
|
||||
<wd-icon name="file-copy" size="32rpx" color='#707070' @click="copy(order.code)"></wd-icon>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center">
|
||||
<price-format color="#FF5951" :first-size="36" :second-size="36" :subscript-size="24" :price="23.02"></price-format>
|
||||
<view class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx mx-14rpx">5.1折</view>
|
||||
<price-format color="#BFC2CC" :first-size="22" :second-size="22" :subscript-size="22" :price="23.02" lineThrough></price-format>
|
||||
<price-format color="#FF5951" :first-size="36" :second-size="36" :subscript-size="24" :price="order.discount_price"></price-format>
|
||||
<view class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx mx-14rpx">{{ order.discount }}折</view>
|
||||
<price-format color="#BFC2CC" :first-size="22" :second-size="22" :subscript-size="22" :price="order.price" lineThrough></price-format>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -47,9 +47,9 @@
|
||||
v-model="changePrice"
|
||||
no-border
|
||||
custom-class="!rounded-16rpx !text-30rpx !leading-48rpx !border-2rpx !border-solid !border-[#F0F0F0] !w-[100%]"
|
||||
custom-input-class="!h-96rpx !pl-10rpx">
|
||||
custom-input-class="!h-96rpx !px-20rpx">
|
||||
<template #prefix>
|
||||
<text class="pl-28rpx">¥</text>
|
||||
<text class="p-28rpx">¥</text>
|
||||
</template>
|
||||
</wd-input>
|
||||
</view>
|
||||
@ -57,7 +57,7 @@
|
||||
<view class="flex items-center mt-24rpx">
|
||||
<view class="font-400 text-28rpx leading-40rpx text-[#303133] mr-26rpx w-100rpx whitespace-nowrap">门市价</view>
|
||||
<view class="">
|
||||
<price-format color="#303133" :first-size="30" :second-size="30" :subscript-size="30" :price="23.02"></price-format>
|
||||
<price-format color="#303133" :first-size="30" :second-size="30" :subscript-size="30" :price="order.price"></price-format>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -71,61 +71,60 @@
|
||||
<view class="">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-28rpx">
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/reserve_room/reserve_room_image2.png`"></wd-img>
|
||||
<wd-img width="200rpx" height="200rpx" :src="order.main_image"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1" @click="ComboCard.handleToOrderDetail">
|
||||
<view class="flex-1" @click="router.navigateTo(`/bundle/setmeal/detail?id=${order.id}`)">
|
||||
<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>
|
||||
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">{{ order.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mt-16rpx">
|
||||
<view class="font-400 text-[#606266] text-26rpx leading-36rpx mr-8rpx">ID:1270304172</view>
|
||||
<wd-icon name="file-copy" size="32rpx" color='#707070' @click="copy(123)"></wd-icon>
|
||||
<view class="font-400 text-[#606266] text-26rpx leading-36rpx mr-8rpx">ID:{{ order.code }}</view>
|
||||
<wd-icon name="file-copy" size="32rpx" color='#707070' @click="copy(order.code)"></wd-icon>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center">
|
||||
<price-format color="#FF5951" :first-size="36" :second-size="36" :subscript-size="24" :price="23.02"></price-format>
|
||||
<view class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx mx-14rpx">5.1折</view>
|
||||
<price-format color="#BFC2CC" :first-size="22" :second-size="22" :subscript-size="22" :price="23.02" lineThrough></price-format>
|
||||
<price-format color="#FF5951" :first-size="36" :second-size="36" :subscript-size="24" :price="order.discount_price"></price-format>
|
||||
<view class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx mx-14rpx">{{ order.discount }}折</view>
|
||||
<price-format color="#BFC2CC" :first-size="22" :second-size="22" :subscript-size="22" :price="order.price" lineThrough></price-format>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="font-400 text-[#606266] text-26rpx leading-36rpx mt-42rpx flex items-center justify-between">
|
||||
<view class="">
|
||||
<text class="font-400 text-26rpx text-[#606266] leading-36rpx mr-10rpx">年售</text>
|
||||
<text class="font-bold text-26rpx text-[#606266] leading-36rpx ">96</text>
|
||||
<text class="font-bold text-26rpx text-[#606266] leading-36rpx ">{{ order.sold }}</text>
|
||||
</view>
|
||||
<templalte v-if="1 > 0">
|
||||
<template v-if="order.status == 1">
|
||||
<view class="flex items-center">
|
||||
<!-- 上架 -->
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx mr-18rpx" @click='ComboCard.handleMore'>更多</view>
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx mr-12rpx"
|
||||
@click="ComboCard.handleOpenChangePricePopup()">改价</view>
|
||||
<!-- <view class="font-500 text-28rpx text-[#303133] leading-40rpx mr-18rpx" @click='ComboCard.handleMore'>更多</view> -->
|
||||
<!-- <view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx mr-12rpx"
|
||||
@click="ComboCard.handleOpenChangePricePopup()">改价</view> -->
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx mr-12rpx"
|
||||
@click="ComboCard.handleDelisted()"> 下架</view>
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx"
|
||||
@click="router.navigateTo('/bundle/setmeal/add?type=edit')">编辑</view>
|
||||
@click="router.navigateTo(`/bundle/setmeal/add?type=edit&id=${order.id}`)">编辑</view>
|
||||
</view>
|
||||
</templalte>
|
||||
</template>
|
||||
|
||||
<templalte v-if="1 < 0">
|
||||
<template v-if="order.status == 0">
|
||||
<view class="flex items-center">
|
||||
<!-- 下架 -->
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx mr-12rpx"
|
||||
@click="ComboCard.handleOpenChangePricePopup()">删除</view>
|
||||
@click="ComboCard.handleDelteSetmealOrder()">删除</view>
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx mr-12rpx"
|
||||
@click="ComboCard.handleAdd()"> 上架</view>
|
||||
<view class="font-500 text-28rpx text-[#303133] leading-40rpx border-2rpx border-solid border-[#ECECEC] rounded-8rpx text-center py-4rpx px-28rpx"
|
||||
@click="router.navigateTo('/bundle/setmeal/add?type=edit')">编辑</view>
|
||||
@click="router.navigateTo(`/bundle/setmeal/add?type=edit&id=${order.id}`)">编辑</view>
|
||||
</view>
|
||||
</templalte>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 茶室管理端-订单管理 -->
|
||||
<view v-if="type === OrderSource.Admin" class="bg-white rounded-10rpx p-30rpx">
|
||||
<view class="flex justify-between items-center">
|
||||
@ -133,7 +132,7 @@
|
||||
<view class="mr-10rpx flex items-center">
|
||||
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_tea_room.png`"></wd-img>
|
||||
</view>
|
||||
<view class="flex items-center w-400rpx" @click="router.navigateTo(`/pages/order/order-detail?storeId=${order.store_id}`)">
|
||||
<view class="flex items-center w-400rpx">
|
||||
<view class="font-bold text-30rpx leading-42rpx text-[#303133] mr-10rpx line-1">{{ order.store_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -151,7 +150,7 @@
|
||||
<wd-img width="200rpx" height="200rpx" :src="`${OSS}images/home/home_image5.png`"></wd-img>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view @click="ComboCard.handleToOrderDetail">
|
||||
<view @click="ComboCard.handleToOrderDetail(order.id)">
|
||||
<view class="font-500 text-30rpx text-[#303133] leading-42rpx line-1 w-400rpx">{{ order.room_name }}</view>
|
||||
<view class="font-400 leading-36rpx text-26rpx text-[#606266] mt-34rpx">
|
||||
<view>预约时间:{{ order.day_time }} {{ order.start_time }}-{{ order.end_time }}</view>
|
||||
@ -164,7 +163,7 @@
|
||||
<!-- 操作按钮 -->
|
||||
<template v-if="order.order_status === AdminOrderStatus.ToUse || order.order_status === AdminOrderStatus.Consuming">
|
||||
<view class="text-center 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"
|
||||
<view v-if="order.order_status === AdminOrderStatus.Consuming" class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#9CA3AF] text-[#303133] mr-28rpx flex items-center justify-center"
|
||||
@click="ComboCard.handleReleaseOrder(order.id)">释放时间</view>
|
||||
<view class="w-178rpx h-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44] flex items-center justify-center"
|
||||
@click="ComboCard.handleCancelOrder(order.id)">取消订单</view>
|
||||
@ -190,7 +189,8 @@
|
||||
import { useMessage } from 'wot-design-uni'
|
||||
import { toast } from '@/utils/toast'
|
||||
import { handleReleaseTeaRoomOrderHookds, handleCancelOrderHooks, handleDeleteOrderHooks } from '@/hooks/useOrder'
|
||||
import { router } from '@/utils/tools'
|
||||
import { router, copy } from '@/utils/tools'
|
||||
import { toggleTeaSpecialistOrderPackageStatus, deleteTeaSpecialistOrderPackage } from '@/api/order'
|
||||
|
||||
// 改价弹窗
|
||||
const showChangePricePopup = ref<boolean>(false)
|
||||
@ -208,7 +208,7 @@
|
||||
|
||||
const props = defineProps({
|
||||
/**
|
||||
* 类型: 直营(direct)、加盟(franchise)、抖音(douyin) 等
|
||||
* 类型:
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
@ -228,8 +228,10 @@
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
handleToOrderDetail: () => {
|
||||
router.navigateTo('/bundle/setmeal/detail')
|
||||
handleToOrderDetail: (id: number) => {
|
||||
if (props.type == OrderSource.Admin) {
|
||||
router.navigateTo(`/pages/order/order-detail?id=${id}`)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -253,7 +255,6 @@
|
||||
ComboCard.handleOpenChangePricePopup()
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 下架商品
|
||||
*/
|
||||
@ -269,8 +270,10 @@
|
||||
confirmButtonProps: {
|
||||
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
|
||||
}
|
||||
}).then((res) => {
|
||||
}).then(async (res) => {
|
||||
if (res.action == 'confirm') {
|
||||
await toggleTeaSpecialistOrderPackageStatus(props.order.id, 0)
|
||||
emit('refresh')
|
||||
toast.info('下架成功')
|
||||
}
|
||||
// 点击确认按钮回调事件
|
||||
@ -283,13 +286,60 @@
|
||||
* 上架商品
|
||||
*/
|
||||
handleAdd: () => {
|
||||
toast.info('上架成功')
|
||||
message.confirm({
|
||||
title: '您确认要上架该商品吗?',
|
||||
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(async (res) => {
|
||||
if (res.action == 'confirm') {
|
||||
await toggleTeaSpecialistOrderPackageStatus(props.order.id, 1)
|
||||
emit('refresh')
|
||||
toast.info('上架成功')
|
||||
}
|
||||
// 点击确认按钮回调事件
|
||||
}).catch(() => {
|
||||
// 点击取消按钮回调事件
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除套餐
|
||||
*/
|
||||
handleDelteSetmealOrder: () => {
|
||||
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(async (res) => {
|
||||
if (res.action == 'confirm') {
|
||||
await deleteTeaSpecialistOrderPackage(props.order.id)
|
||||
emit('refresh')
|
||||
toast.info('删除成功')
|
||||
}
|
||||
// 点击确认按钮回调事件
|
||||
}).catch(() => {
|
||||
// 点击取消按钮回调事件
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 编辑商品
|
||||
*/
|
||||
handleEdit: () => {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@ -333,7 +383,7 @@
|
||||
handleCancelOrder: (orderId: number) => {
|
||||
message.confirm({
|
||||
title: '确定取消订单?',
|
||||
msg: '取消订单后无法恢复,优惠券可退回',
|
||||
msg: '取消订单后无法恢复,是否确定取消订单?',
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
cancelButtonProps: {
|
||||
|
||||
Reference in New Issue
Block a user