2022-10-28 15:37:07 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="app">
|
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="CommodityOrder" @tap="goorder">商品订单
|
2023-03-08 09:46:11 +08:00
|
|
|
<image class="picture" src="../../static/huijiantou.png" mode=""></image>
|
2022-10-28 15:37:07 +08:00
|
|
|
</view>
|
2023-01-10 10:35:17 +08:00
|
|
|
<view class="center" v-if="list">
|
2022-11-01 16:26:34 +08:00
|
|
|
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
|
2022-10-28 15:37:07 +08:00
|
|
|
<image src="/static/Tobepaid.png" mode=""></image>
|
|
|
|
|
<span>待付款</span>
|
2023-01-10 10:35:17 +08:00
|
|
|
<view class="orderCount" v-if="list.waitPayCount>0&&list.waitPayCount<100">
|
|
|
|
|
{{list.waitPayCount}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderCount" v-if="list.waitPayCount>=100">
|
|
|
|
|
99+
|
|
|
|
|
</view>
|
2022-10-28 15:37:07 +08:00
|
|
|
</view>
|
2022-11-01 16:26:34 +08:00
|
|
|
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
|
2022-10-28 15:37:07 +08:00
|
|
|
<image src="/static/received.png" mode=""></image>
|
|
|
|
|
<span>待收货</span>
|
2023-01-10 10:35:17 +08:00
|
|
|
<view class="orderCount" v-if="list.waitReceivedGoodsCount>0&&list.waitReceivedGoodsCount<100">
|
|
|
|
|
{{list.waitReceivedGoodsCount}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderCount" v-if="list.waitReceivedGoodsCount>=100">
|
|
|
|
|
99+
|
|
|
|
|
</view>
|
2022-10-28 15:37:07 +08:00
|
|
|
</view>
|
2023-01-10 10:35:17 +08:00
|
|
|
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
|
2022-10-28 15:37:07 +08:00
|
|
|
<image src="/static/evaluated.png" mode=""></image>
|
|
|
|
|
<span>待评价</span>
|
2023-01-10 10:35:17 +08:00
|
|
|
<view class="orderCount" v-if="list.receivedGoodsCount>0&&list.receivedGoodsCount<100">
|
|
|
|
|
{{list.receivedGoodsCount}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderCount" v-if="list.receivedGoodsCount>=100">
|
|
|
|
|
99+
|
|
|
|
|
</view>
|
2022-11-23 16:41:09 +08:00
|
|
|
</view>
|
2023-01-10 10:35:17 +08:00
|
|
|
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')">
|
2022-10-28 15:37:07 +08:00
|
|
|
<image src="/static/finished.png" mode=""></image>
|
|
|
|
|
<span>已完成</span>
|
2023-01-10 10:35:17 +08:00
|
|
|
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
|
|
|
|
|
{{list.evaluatedCount}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderCount" v-if="list.evaluatedCount>=100">
|
|
|
|
|
99+
|
|
|
|
|
</view> -->
|
2022-10-28 15:37:07 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2022-11-03 17:26:15 +08:00
|
|
|
<view class="service" @tap="gonursestation">
|
2022-11-23 16:41:09 +08:00
|
|
|
<view class="serviceorder">护理站服务订单</view>
|
2022-10-28 15:37:07 +08:00
|
|
|
<view class="pictures">
|
2023-03-08 09:46:11 +08:00
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
2022-10-28 15:37:07 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-01-10 10:35:17 +08:00
|
|
|
<u-toast ref="uToast" />
|
2022-10-28 15:37:07 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-01-10 10:35:17 +08:00
|
|
|
import {
|
|
|
|
|
orderCount
|
|
|
|
|
} from '@/api/order/index.js'
|
2022-10-28 15:37:07 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-01-10 10:35:17 +08:00
|
|
|
list: null,
|
2022-10-28 15:37:07 +08:00
|
|
|
}
|
|
|
|
|
},
|
2023-01-10 10:35:17 +08:00
|
|
|
onShow() {
|
|
|
|
|
let that = this
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
|
|
|
|
if (value) {
|
|
|
|
|
orderCount(value).then(res => {
|
|
|
|
|
this.list = res.data
|
2022-11-23 16:41:09 +08:00
|
|
|
})
|
2023-01-10 10:35:17 +08:00
|
|
|
} else {
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
title: '请登录',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000',
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2022-11-01 16:26:34 +08:00
|
|
|
//护理站服务订单
|
|
|
|
|
gonursestation() {
|
2022-10-28 15:37:07 +08:00
|
|
|
uni.navigateTo({
|
2022-11-01 16:26:34 +08:00
|
|
|
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
|
2022-10-28 15:37:07 +08:00
|
|
|
})
|
|
|
|
|
},
|
2022-11-01 16:26:34 +08:00
|
|
|
//待收货
|
|
|
|
|
goreceive(item) {
|
2022-10-28 15:37:07 +08:00
|
|
|
uni.navigateTo({
|
2022-11-01 16:26:34 +08:00
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
2022-10-28 15:37:07 +08:00
|
|
|
})
|
|
|
|
|
},
|
2022-11-01 16:26:34 +08:00
|
|
|
//全部订单
|
2022-10-28 15:37:07 +08:00
|
|
|
goorder() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/CommodityOrder/CommodityOrder'
|
|
|
|
|
})
|
|
|
|
|
},
|
2022-11-01 16:26:34 +08:00
|
|
|
//已完成
|
2023-01-10 10:35:17 +08:00
|
|
|
goEVALUATED(item) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//待评价
|
2022-11-01 16:26:34 +08:00
|
|
|
gocompleted(item) {
|
2022-10-28 15:37:07 +08:00
|
|
|
uni.navigateTo({
|
2022-11-01 16:26:34 +08:00
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
2022-10-28 15:37:07 +08:00
|
|
|
})
|
|
|
|
|
},
|
2022-11-01 16:26:34 +08:00
|
|
|
//待付款
|
|
|
|
|
gopaid(item) {
|
2022-10-28 15:37:07 +08:00
|
|
|
uni.navigateTo({
|
2022-11-01 16:26:34 +08:00
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
2022-10-28 15:37:07 +08:00
|
|
|
})
|
|
|
|
|
},
|
2023-01-10 10:35:17 +08:00
|
|
|
},
|
2022-10-28 15:37:07 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.app {
|
|
|
|
|
background-color: #F4F5F7;
|
|
|
|
|
width: 100%;
|
|
|
|
|
color: #000000;
|
|
|
|
|
padding: 3%;
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.service {
|
|
|
|
|
width: 99%;
|
|
|
|
|
height: 105rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
margin-top: 3%;
|
|
|
|
|
|
|
|
|
|
.pictures {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-left: 48%;
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
width: 18rpx;
|
|
|
|
|
height: 27rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.serviceorder {
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
margin-left: 5%;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
width: 99%;
|
|
|
|
|
height: 344rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
|
|
|
|
.center {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
|
|
image {
|
2023-01-10 10:35:17 +08:00
|
|
|
width: 100rpx;
|
|
|
|
|
height: 80rpx;
|
2022-11-01 16:26:34 +08:00
|
|
|
margin-left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
2022-10-28 15:37:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.OrderStatus {
|
2023-01-10 10:35:17 +08:00
|
|
|
padding-top: 50rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
.orderCount {
|
|
|
|
|
background-color: red;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
// padding: 0 5rpx ;
|
|
|
|
|
line-height: 40rpx;
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
// display: inline-block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 30rpx;
|
|
|
|
|
right: -20rpx;
|
|
|
|
|
}
|
2022-10-28 15:37:07 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.picture {
|
|
|
|
|
margin-left: 70%;
|
|
|
|
|
width: 18rpx;
|
|
|
|
|
height: 27rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.CommodityOrder {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 90%;
|
|
|
|
|
height: 110rpx;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
margin-left: 5%;
|
|
|
|
|
border-bottom: 1rpx solid #D8D4D4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|