master
王文杰 8 months ago
parent 4d2140661d
commit abbddcc8e1

@ -1,8 +1,6 @@
<script setup lang="ts">
import { OrderState, orderStateList } from '@/services/constants'
import {
getOrderByIdAPI
} from '@/services/order'
import { getOrderByIdAPI } from '@/services/order'
import type { LogisticItem, OrderResult } from '@/types/order'
import { onLoad, onReady } from '@dcloudio/uni-app'
import { ref, getCurrentInstance, unref } from 'vue'
@ -24,22 +22,20 @@ onLoad((options) => {
const order = ref<OrderResult>()
const getMemberOrderByIdData = async (orderId) => {
const params = {
id: orderId,
location: {
orderId: orderId,
latitude: 31.163973,
longitude: 121.404032,
},
}
const res = await getOrderByIdAPI(params)
if (resizeBy.code == 200) {
order.value = res.data
if (res.code == 200) {
const data = res.data
const str = data.appointmentTimeStart.slice(0, 10)
const start = data.appointmentTimeStart.slice(11, 16)
const end = data.appointmentTimeEnd.slice(11, 16)
data.appointmentTime = str + ' ' + start + '-' + end
order.value = data
}
}
onLoad((options) => {
orderStatus.value = options.status || 'PENDING'
// getMemberOrderByIdData()
// buttonDriving()
})
//
const handleCancleOrder = () => {
//
@ -64,11 +60,36 @@ const handleAcceptConfirm = () => {
<template v-if="1">
<view class="order-detail">
<view class="status">
<view class="title">待接单中</view>
<view class="desc">预约时间2023-11-12 11:55</view>
<template v-if="order.orderStatus.code == '520192817293693253'">
<view class="title">{{ order.orderStatus.desc }}</view>
<view class="desc">预约时间{{ order.appointmentTime }}</view>
<view class="action">
<view class="button" @click="handleCancleOrder"></view>
</view>
</template>
</view>
<view class="module">
<view class="title">订单编号{{ order.orderNumber }}</view>
<view class="orderDetails">{{ order.orderDetails[0].productName }}</view>
</view>
<view class="module info">
<view class="title">取件信息</view>
<view class="item">
<view class="label">取件时间</view>
<view class="val">{{ order.appointmentTime }}</view>
</view>
<view class="item">
<view class="label">取件地址</view>
<view class="val">{{ order.recycleAddress }}</view>
</view>
<view class="item">
<view class="label">下单时间</view>
<view class="val">{{ order.creatorTime }}</view>
</view>
<view class="item">
<view class="label">备注</view>
<view class="val">{{ order.remark }}</view>
</view>
</view>
</view>
</template>
@ -119,204 +140,47 @@ page {
}
}
}
}
.toolbar {
position: fixed;
left: 0;
right: 0;
bottom: calc(var(--window-bottom));
z-index: 1;
height: 100rpx;
display: flex;
align-items: center;
justify-content: space-around;
border-top: 1rpx solid #ededed;
border-bottom: 1rpx solid #ededed;
background-color: #fff;
box-sizing: content-box;
.button {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
height: 100%;
font-size: 26rpx;
border-right: 1rpx solid #ccc;
color: #fff;
.concat {
width: 48rpx;
height: 44rpx;
}
.concat-img {
width: 48rpx;
height: 44rpx;
}
}
.primary {
color: #fff;
background: linear-gradient(158deg, #51b6ff -10%, #3775f6 129%);
}
}
}
.popup-root {
padding: 30rpx 30rpx 50rpx;
border-radius: 10rpx 10rpx 0 0;
overflow: hidden;
background: linear-gradient(180deg, #d2eeff -7%, rgba(255, 255, 255, 0) 38%), #ffffff;
box-shadow: 0px -2px 8px 0px rgba(133, 155, 180, 0.4);
position: relative;
.module {
margin: 20rpx;
padding: 10rpx;
min-height: 300rpx;
background: #FFFFFF;
box-shadow: 0px 0px 8px 0px rgba(161, 161, 177, 0.12);
.title {
text-align: left;
margin-bottom: 30rpx;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #e1e7f2;
.text {
font-size: 30rpx;
}
.close {
position: absolute;
right: 0;
top: 0;
padding: 23rpx 50rpx;
color: #333;
font-size: 30rpx;
text-align: center;
}
}
.cont {
.info1 {
padding: 20rpx 0;
min-height: 100rpx;
width: 100%;
border-bottom: 2rpx solid #e1e7f2;
.loction {
display: flex;
flex-direction: row;
width: 100%;
justify-content: space-between;
.text {
color: #3d3d3d;
width: 80%;
-webkit-line-clamp: 1;
}
.num {}
}
.coming-time {
margin: 10rpx 0;
display: flex;
flex-direction: row;
color: #3d3d3d;
.label {}
color: #3D3D3D;
font-size: 28rpx;
padding: 10rpx;
border-bottom: 2rpx solid #F2F2F2;
}
.people {
color: #3d3d3d;
.label {}
.orderDetails {
padding: 10rpx;
}
&.info {
.title {
color: #0D0D26;
font-size: 32rpx;
}
.info2 {
padding: 20rpx 0;
min-height: 100rpx;
border-bottom: 2rpx solid #e1e7f2;
.item {
display: flex;
flex-direction: row;
margin: 20rpx 0;
.label {
color: #999a9f;
}
}
justify-content: space-between;
padding: 20rpx;
border-bottom: 2rpx solid #F2F2F2;
&:last-child {
border: none;
}
.time-status {
margin: 20rpx 0;
display: flex;
flex-direction: row;
.label {
font-size: 32rpx;
}
.time {
color: #e30000;
}
}
}
}
.description {
font-size: 28rpx;
padding: 0 20rpx;
.tips {
color: #444;
margin-bottom: 12rpx;
}
.cell {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15rpx 0;
color: #666;
color: #3D3D3D;
width: 120rpx;
}
.icon::before {
content: '\e6cd';
font-family: 'erabbit' !important;
font-size: 38rpx;
color: #999;
.val {
font-size: 28rpx;
color: #3D3D3D;
flex: 1
}
.icon.checked::before {
content: '\e6cc';
font-size: 38rpx;
color: #3775F6;
}
}
.footer {
display: flex;
justify-content: space-between;
padding: 30rpx 0 40rpx;
font-size: 28rpx;
color: #444;
.button {
flex: 1;
height: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx;
color: #444;
border-radius: 72rpx;
border: 1rpx solid #ccc;
}
.primary {
color: #fff;
background-color: #3775F6;
border: none;
}
}
</style>

@ -193,7 +193,7 @@ const onRefresherrefresh = async () => {
</view>
<view class="foot">
<view class="time"> 预约时间 {{ item.appointmentTime }}</view>
<view class="cancle" @click="handleCancle(item.id)"></view>
<view class="cancle" v-if="props.orderState == 'PENDING'" @click="handleCancle(item.id)"></view>
</view>
</view>
<!-- 底部提示文字 -->

@ -139,7 +139,7 @@ export const getMemberOrderAPI = (data: OrderListParams) => {
// 订单详情
export const getOrderByIdAPI = (data: any) => {
return http<OrderListResult>({
method: 'POST',
method: 'GET',
url: `/recycle-order/info`,
data,
})

@ -11,8 +11,8 @@
* 4. token
*/
import { useMemberStore } from '@/stores'
// const baseURL = 'http://192.168.0.166:8808/api'
const baseURL = 'http://222.71.165.188:8808/api'
const baseURL = 'http://192.168.0.166:8808/api'
// const baseURL = 'http://222.71.165.188:8808/api'
// 添加拦截器
const httpInterceptor = {
// 拦截前触发

Loading…
Cancel
Save