<template name="refund">
	<view class="record-template" v-if="isEmpty">
		<!-- 支付记录 -->
		<view class="record-content">
			<view class="record-title">
				<view class="record-title-l">退款记录</view>
				<view class="record-title-r">
					已退款：<text class="red">￥{{ returnedPurchaseFee != null ? returnedPurchaseFee.toFixed(2) : '0.00'}}</text>
				</view>
			</view>
			<view class="record-list">
				<view class="record-item" v-for="(item,index) in returnedPurchaseList" :key="index">
					<view class="item-time">{{item.confirmReturnTime}}</view>
					<view class="item-nums">{{item.returnedWay =='4' ? '无支付无退款' : '￥'+item.refundFee.toFixed(2)}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		name:"refund",
		props:{
			returnedPurchaseList:{
				type:Array
			},
			returnedPurchaseFee:{
				type:Number
			}
		},
		data() {
			return{
				isEmpty:false,
				isOpen:false,
			}
		},
		created(){
			this.initData(this.returnedPurchaseList)
		},
		computed: {
		
		},
		methods:{
			initData(res) {
				if(res!=''){
					this.isEmpty = true
				}else{
					this.isEmpty = false
					this.refundData = res;
				}
			},
		}
	}
</script>

<style lang="scss">
	.record-template{
		width: 100%;
		height: auto;
		background: #FFFFFF;
		float: left;
		margin-top: 24rpx;
		padding-bottom: 40rpx;
		.record-content{
			width: 702rpx;
			padding: 20rpx 24rpx;
			height: auto;
			.record-title{
				width: 100%;
				font-size: $font-size-base;
				color: $text-color;
				text-align: left;
				line-height: 40rpx;
				margin-bottom: 12rpx;
				float: left;
				.record-title-l{
					font-weight: bold;
					float: left;
				}
				.record-title-r{
					float: right;
					.red{
						color: #FF2A2A;
						font-weight: bold;
					}
				}
			}
			.record-empty{
				font-size: $font-size-base;
				color: $text-color;
				text-align: left;
				line-height: 40rpx;
			}
			.record-list{
				width: 100%;
				height: auto;
				float: left;
				margin-top: 12rpx;
				.record-item{
					height: 40rpx;
					width: 100%;
					padding: 12rpx 0;
					font-size: $font-size-base;
					line-height: 40rpx;
					float: left;
					.item-time{
						float: left;
						color: #999999;
					}
					.item-nums{
						font-weight: bold;
						float: right;
						color: $text-color;
					}
				}
			}
		}
	}
</style>
