<template>
	<viwe>
		<view class="card_box">
			<view class="card_head_box">
				<view class="card_head_item" v-for="(item,index) in 8" :key="index"></view>
			</view>
			<view class="card">
				<!-- 订单头部 -->
				
				<view class="card_item" v-for="(item,index) in listinfo.detailList" :key="index">
					<view class="head">
						<view class="head_left">
							<text class="placeNum">第{{item.placeNum}}次下单</text>
							<text class="placeTime">{{item.placeTime}}</text>
						</view>
						
					</view>
					<!-- 订单详情 -->
					<view class="shop-info">
						<view class="item" v-for="(items,indexs) in item.info" :key="indexs">
							<view class="cover">
								<u-image width="152" height="152" radius="16" :src='items.productImg'></u-image>
							</view>
							<view class="info">
								<text class="productName">{{items.productName}}</text>
								<text class="productSkuName" v-if="items.productSkuName">{{items.productSkuName}}</text>
							</view>
								
							<view class="price">
								<view class="priceAmount">￥{{items.priceAmount}}</view>
								<view class="num">x{{items.num}}</view>
							</view>
						</view>
					</view>
					<view class="status">未付款</view>
					<view class="totalAmount">
						<view class="label">小计￥</view>
						<view class="price"> {{item.totalAmount}} </view>
					</view>
					
					<view class="semicircle_icon" v-if="index > 0">
						<view class="semicircle_left_icon"></view>
						<view class="semicircle_right_icon"></view>
					</view>
				</view>
				<view class="total-wrap">
					<view>总计￥</view>
					<view class="price"> {{listinfo.payAmount}} </view>
				</view>
			
			</view>
		</view>
		<view class="orderInfo">
			<view class="row" @click="copyHandle(listinfo.orderNo)">
				<text class="t">订单编号：</text>
				<text class="info">{{listinfo.orderNo}}（点击复制）</text>
			</view>
			<view class="row">
				<text class="t">下单时间：</text>
				<text class="info">{{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}</text>
			</view>
			<view class="row">
				<text class="t">下单门店：</text>
				<text class="info">{{listinfo.name}}</text>
			</view>
			<view class="row">
				<text class="t">订单类型：</text>
				<text class="info">{{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}</text>
			</view>
			<view class="row">
				<text class="t">备注：</text>
				<text class="info"></text>
			</view>
			<view class="row">
				<text class="t">就餐人数：</text>
				<text class="info">{{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}</text>
			</view>
		</view>
	</viwe>

</template>

<script>
	export default {
	
		data() {
			return {
				
				
			}
		},
		props:{
			listinfo:{
				type: Object
			}
		},
		mounted() {
		},
		methods: {
			
			/**
			 * 复制订单号
			 * @param {Object} e
			 */
			copyHandle(e) {
				uni.setClipboardData({
					data: e,
					success() {
						uni.showToast({
							title: '复制成功',
							icon: 'none'
						});
					}
				});
			},
			
			
		}
	}
</script>

<style lang="scss">
	.card_box{
		background-color: #fff;
		// box-shadow: 0rpx 8rpx 12rpx 2rpx rgba(87,86,86,0.35);
		position: relative;
		width: 100%;
		height: 100%;
		box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
		border-radius: 18rpx;
		padding-bottom: 32rpx;
		.card_head_box{
			width: 100%;
			display: flex;
			justify-content: space-between;
			position: absolute;
			top: -22.5rpx;
			padding: 0 44rpx;
			.card_head_item{
				width: 45rpx;
				height: 45rpx;
				background-color: #f9f9f9;
				border-radius: 50%;
				box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
			}
		
		}
		
		.card {
			// background-color: #fff;
			border-radius: 20upx;
			margin-bottom: 28upx;
			position: relative;
			.card_item{
				display: flex;
				flex-direction: column;
				position: relative;
				.head {
					display: flex;
					justify-content: space-between;
					padding: 50rpx 34rpx 32rpx 34rpx;
					.head_left{
						display: flex;
						align-items: center;
						.placeNum{
							font-weight: bold;
							font-size: 32rpx;
							color: #333333;
							margin-right: 32rpx;
							flex-shrink: 0;
						}
						.placeTime{
							font-weight: 400;
							font-size: 32rpx;
							color: #666666;
							flex-shrink: 0;
						}
					}
					
				}
				
				.shop-info {
					padding: 0 34rpx;
					border-bottom: 2rpx dashed #e5e5e5;
					.item:nth-child(1) {
						margin-top: 0;
					}
				
					.item {
						margin-bottom: 32rpx;
						display: flex;
						.cover{
							
						}
						.info {
							flex: 1;
							display: flex;
							flex-direction: column;
							padding-left: 16upx;
							.productName{
								font-weight: bold;
								font-size: 28rpx;
								color: #333333;
								margin-top: 20rpx;
							}
							.productSkuName{
								font-weight: 400;
								font-size: 24rpx;
								color: #999999;
								  display: -webkit-box;
								  -webkit-box-orient: vertical;
								  -webkit-line-clamp: 3;
								  overflow: hidden;
								  text-overflow: ellipsis;
							}
							.n {
								font-size: 24upx;
								color: #999;
							}
						}
						.price{
							display: flex;
							flex-direction: column;
							align-items: flex-end;
							padding-left: 68rpx;
							.priceAmount{
								font-weight: 500;
								font-size: 28rpx;
								color: #333333;
								margin-top: 26rpx;
							}
							.num{
								font-weight: 400;
								font-size: 24rpx;
								color: #999999;
								margin-top: 22rpx;
							}
						}
					}
				}
				.status{
					align-self: flex-end;
					width: 92rpx;
					height: 40rpx;
					line-height: 40rpx;
					text-align: center;
					background: #999999;
					border-radius: 10rpx 10rpx 10rpx 10rpx;
					font-weight: 400;
					font-size: 22rpx;
					color: #FFFFFF;
					margin-top: 32rpx;
					margin-right: 32rpx;
				}
				.totalAmount {
					width: 100%;
					display: flex;
					justify-content: flex-end;
					align-items: flex-end;
					padding: 0 34rpx;
					margin-top: 32rpx;
					.label{
						font-weight: bold;
						font-size: 28rpx;
						color: #333333;
					}
					.price{
						font-weight: bold;
						font-size: 36rpx;
						color: #333333;
					}
				}
				.semicircle_icon{
					width: 100%;
					position: absolute;
					top: -22.5rpx;
					left: 0;
					display: flex;
					justify-content: space-between;
					.semicircle_left_icon{
						width: 45rpx;
						height: 45rpx;
						margin-left: -22.5rpx;
						background-color: #f9f9f9;
						border-radius: 50%;
						box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
						
					}
					.semicircle_right_icon{
						width: 45rpx;
						height: 45rpx;
						margin-right: -22.5rpx;
						background-color: #f9f9f9;
						border-radius: 50%;
						box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
					
					}
				}
			}
				
			.total-wrap {
				width: 100%;
				display: flex;
				justify-content: flex-end;
				align-items: flex-end;
				padding: 0 34rpx;
				font-weight: bold;
				font-size: 28rpx;
				color: #333333;
				margin-top: 64rpx;
				.price{
					font-weight: bold;
					font-size: 36rpx;
				}
			}
			
			
		
			.order_footer{
				display: flex;
				flex-direction: column;
				padding: 34rpx;
				position: relative;
				
				
				
			}
		
			
		}
	}
	.orderInfo{
		background: #FFFFFF;
		border-radius: 18rpx 18rpx 18rpx 18rpx;
		margin-top: 32rpx;
		padding: 32rpx 34rpx;
		box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
		.row {
			display: flex;
			justify-content: space-between;
			margin-bottom: 32rpx;
					
			.t {
				font-weight: bold;
				font-size: 28rpx;
				color: #333333;
			}
					
			.info {
				font-weight: 400;
				font-size: 28rpx;
				color: #666666;
			}
		}
		.row:last-child{
			margin-bottom: none;
		}
		
	}
	
	
	.fixedview {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		
		.flex-between {
			width: 100%;
			padding: 36rpx 54rpx 102rpx 54rpx;
			background: #FFFFFF;
	
			.fixedview_one {
				display: flex;
				align-items: flex-end;
				.fixedview_oneone {
					font-weight: 400;
					font-size: 28rpx;
					color: #666666;
				}
	
				.fixedview_onetow {
					font-weight: bold;
					font-size: 32rpx;
					color: #333333;
	
					text {
						font-size: 24rpx;
					}
				}
			}
	
			.fixedview_tow {
				width: 140rpx;
				height: 56rpx;
				line-height: 56rpx;
				text-align: center;
				background: #E3AD7F;
				border-radius: 12rpx 12rpx 12rpx 12rpx;
				font-weight: 400;
				font-size: 28rpx;
				color: #FFFFFF;
			}
		}
	}
</style>
