<template>
	<view class="app">
		<view class="content">
			<view class="CommodityOrder" @tap="goorder">商品订单
				<image class="picture" src="../../static/jiantou.png" mode=""></image>
			</view>
			<view class="center">
				<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
					<image src="/static/Tobepaid.png" mode=""></image>
					<span>待付款</span>
				</view>
				<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
					<image src="/static/received.png" mode=""></image>
					<span>待收货</span>
				</view>
				<!-- 	<view class="OrderStatus">
					<image src="/static/evaluated.png" mode=""></image>
					<span>待评价</span>
				</view> -->
				<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
					<image src="/static/finished.png" mode=""></image>
					<span>已完成</span>
				</view>
			</view>
		</view>
		<view class="service" @tap="gonursestation">
			<view class="serviceorder" >护理站服务订单</view>
			<view class="pictures">
				<image src="../../static/jiantou.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			//护理站服务订单
			gonursestation() {
				uni.navigateTo({
					url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
				})
			},
			//待收货
			goreceive(item) {
				uni.navigateTo({
					url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
				})
			},
			//全部订单
			goorder() {
				uni.navigateTo({
					url: '/pages/CommodityOrder/CommodityOrder'
				})
			},
			//已完成
			gocompleted(item) {
				uni.navigateTo({
					url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
				})
			},
			//待付款
			gopaid(item) {
				uni.navigateTo({
					url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
				})
			},
		}
	}
</script>

<style lang="scss">
	.app {
		background-color: #F4F5F7;
		width: 100%;
		height: 100vh;
		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 {
					width: 83rpx;
					height: 72rpx;
					margin-left: 50%;
					transform: translateX(-50%);
				}

				.OrderStatus {
					margin-top: 8%;
				}
			}

			.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>
