<template>
	<view class="active-card">
		
		<view class="order-status" v-if="item.orderStatus == '0'">未付款</view>
		<view class="order-status" v-if="item.orderStatus == '1'">已付款</view>
		<view class="order-status" v-if="item.orderStatus == '2'">已完成</view>
		<view class="order-status" v-if="item.orderStatus == '3'">退款中</view>
		<view class="order-status" v-if="item.orderStatus == '4'">已退款</view>
		
		
		<view class="active-title">
			<text class="font-32">订单编号：{{item.orderCode}}</text>
		</view>
		<view class="active-time flex align-center">
			<text>下单时间：{{item.createTime}}</text>
		</view>
		
		
		<view class="active-title">
			<text>订购项目：{{item.subItems}}</text>
		</view>
		 <view class="active-time2 flex align-center">
			<text>订单金额：¥{{item.totalPrice}}</text>
		</view>
		
		<view class="footer">
			<view @click="toShouhou" class="order-botton gray">售后退款</view>
			<view @click="seeDetail" class="order-botton red">订单详情</view>
			
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			text:{
				type:String,
				default:'查看详情'
			},
			item:{
				type:Object,
			},
			i:{
				type:Number,
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			seeDetail() {
				this.$emit('seeDetail',this.item)
			},
			toShouhou() {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.active-card {
		
		background: #ffffff;
		border-radius: 12rpx;
		box-shadow: 3rpx 3rpx 6rpx 5rpx rgba(0,0,0,0.16); 
		overflow: hidden;
		padding: 10rpx;
		margin-bottom: 20rpx;
		position: relative;
		
		.order-status{
			position: absolute;
			right: 18rpx;
			top: 50rpx;
			font-size: 24rpx;
			color: red;
		}
		
		.order-botton {
			font-size: 24rpx;
			color: red;
			padding: 10rpx;
			width: 100rpx;
			line-height: 40rpx;
			border-radius: 30rpx;
			text-align: center;
			margin-left: 10rpx;
			float: right;
			border: 1rpx solid #ccc;
		}
		
		.active-title {
			word-wrap:break-word;
			word-break:break-all; 
			font-size: 28rpx;
			color: #000;
			font-weight: 700;
			margin-top: 20rpx;
			line-height: 60rpx;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		
		.active-time {
			word-wrap:break-word;
			word-break:break-all; 
			color: #707070;
			font-size: 28rpx;
			margin: 20rpx 0;
			image {
				width: 33rpx;
				height: 33rpx;
				margin-right: 27rpx;
			}
			/* 文本不会换行显示 */
			white-space: nowrap;
			/* 超出盒子部分隐藏 */
			overflow: hidden;
			/* 文本超出的部分打点显示 */
			text-overflow: ellipsis;
		}
		.active-add {
			color: #707070;
			font-size: 28rpx;
			word-wrap:break-word;
			word-break:break-all; 
			/* 文本不会换行显示 */
			white-space: nowrap;
			/* 超出盒子部分隐藏 */
			overflow: hidden;
			/* 文本超出的部分打点显示 */
			text-overflow: ellipsis;
			// overflow: hidden;/*这个参数根据需求来决定要不要*/
			image {
				width: 30rpx;
				height: 35rpx;
				margin-right: 27rpx;
			}
		}
		.active-time2 {
			color: #707070;
			font-size: 28rpx;
			margin: 20rpx 0;
			image {
				width: 33rpx;
				height: 33rpx;
				margin-right: 27rpx;
			}
		}
		
		.active-menu {
			margin-top: 21rpx;
			padding: 0 10rpx;
			.menu-price {
				font-size: 32rpx;
				.price {
					color: #D33D3E;
					font-size: 34rpx;
					font-weight: 500;
				}
			}
			.menu-btn {
				width: 213rpx;
				height: 79rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #00CCCC;
				font-size: 30rpx;
				font-weight: 500;
			}
			.menu-btn::after {
				content: " ";
				width: 15rpx;
				height: 15rpx;
				border-bottom: 3rpx solid #00CCCC;
				border-right: 3rpx solid #00CCCC;
				transform: rotate(-45deg);
				margin-left: 8rpx;
			}
		}
	}
	
	.red {
		border-color: red !important;
		color: red !important;
	}
	
	.gray {
		border-color: #999 !important;
		color: #888 !important;
	}
</style>