|
|
|
@ -17,6 +17,17 @@ const memberStore = useMemberStore()
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
orderState: string
|
|
|
|
|
}>()
|
|
|
|
|
// const statusLabel = computed(() => {
|
|
|
|
|
// const orderTabs = {
|
|
|
|
|
// PENDING: '待接单',
|
|
|
|
|
// UNPROCESSED: '待服务',
|
|
|
|
|
// RECYCLING: '回收中',
|
|
|
|
|
// FINISHED: '已完成',
|
|
|
|
|
// CANCELED: '已取消',
|
|
|
|
|
// }
|
|
|
|
|
// const res = orderTabs[props.orderState]
|
|
|
|
|
// return res
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
|
const queryParams: Required<OrderListParams> = {
|
|
|
|
@ -50,9 +61,9 @@ const getMemberOrderData = async () => {
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
res.data.list.forEach((e) => {
|
|
|
|
|
const str = e.appointmentTimeStart.slice(0, 10)
|
|
|
|
|
const start = e.appointmentTimeStart.slice(11, 13)
|
|
|
|
|
const end = e.appointmentTimeEnd.slice(11, 13)
|
|
|
|
|
e.appointmentTime = str + ' ' + start + end
|
|
|
|
|
const start = e.appointmentTimeStart.slice(11, 16)
|
|
|
|
|
const end = e.appointmentTimeEnd.slice(11, 16)
|
|
|
|
|
e.appointmentTime = str + ' ' + start + '-' + end
|
|
|
|
|
})
|
|
|
|
|
// 数组追加
|
|
|
|
|
orderList.value.push(...res.data.list)
|
|
|
|
@ -168,9 +179,18 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
<view class="item" v-for="item in orderList" :key="item.id">
|
|
|
|
|
<view class="hd" @click="handleDetail(item.id)">
|
|
|
|
|
<view class="num">订单编号:{{ item.orderNumber }}</view>
|
|
|
|
|
<view class="img"></view>
|
|
|
|
|
<view class="statusLabel">{{ item.orderStatus.desc }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="md" @click="handleDetail(item.id)">
|
|
|
|
|
<!-- <view class="orderDetails" v-for="detail in item.orderDetails" :key="detail.id">
|
|
|
|
|
<view class="productName">{{ detail.productName }}</view>
|
|
|
|
|
<view class="productName">{{ detail.productWeight.desc }}</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
<view class="orderDetails">
|
|
|
|
|
<view class="productName">{{ item.orderDetails[0].productName }}</view>
|
|
|
|
|
<!-- <view class="productName">{{ item.orderDetails[0].productWeight.desc }}</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="md" @click="handleDetail(item.id)"></view>
|
|
|
|
|
<view class="foot">
|
|
|
|
|
<view class="time"> 预约时间: {{ item.appointmentTime }}</view>
|
|
|
|
|
<view class="cancle" @click="handleCancle(item.id)">取消订单</view>
|
|
|
|
@ -187,7 +207,6 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
// 订单列表
|
|
|
|
|
.orders {
|
|
|
|
|
.item {
|
|
|
|
|
min-height: 100rpx;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
margin: 20rpx 20rpx 0;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
@ -195,6 +214,12 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
.hd {
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.statusLabel {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #FF7D00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.md {
|
|
|
|
|
padding: 10rpx;
|
|
|
|
@ -210,9 +235,9 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
.cancle {
|
|
|
|
|
border: 2rpx solid #F2F2F2;
|
|
|
|
|
border: 2rpx solid #E30000;
|
|
|
|
|
padding: 8rpx 20rpx;
|
|
|
|
|
color: #0D0D26;
|
|
|
|
|
color: #E30000;
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -373,4 +398,4 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
padding: 20rpx 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|