<!--

  会员充值记录列表页面， 数据渲染 
   业务： 会员充值记录

  @author terrfly
  @site https://www.jeequan.com
  @date 2022/11/30 07:07
-->
<template>
	<view class="card">
		<view class="card-content" >
			<view class="card-content-title">
				<view class="card-content-title-left">
					<!-- <image :src="props.record.avatarUrl" /> -->
					<text>{{ props.record.storeName }}[{{ props.record.storeId }}]</text>
				</view>
				<!-- <view class="card-content-title-right">
					<text v-if="props.record.type == 1">下单奖励 </text>
					<text v-if="props.record.type == 2">消费退款 </text>
					<text>{{ cal.cert2Dollar(props.record.entryAmount) }}</text>
				</view> -->
			</view>
			<view class="card-content-line"></view>
			<view class="card-content-body">
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">流水号</text>
					<text>{{ props.record.flowNo }}</text>
				</view>
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">顾客uid</text>
					<text class="card-content-body-row-text">{{ props.record.payUserId }}</text>
				</view>
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">变动类型</text>
					<text v-if="props.record.type == 1">下单奖励</text>
					<text v-if="props.record.type == 2">消费退款</text>
				</view>
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">变动前余额</text>
					<text>{{cal.cert2Dollar(props.record.beforeAmt) }}</text>
				</view>
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">变动金额</text>
					<text>{{ cal.cert2Dollar(props.record.changeAmt) }}</text>
				</view>
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">变动后余额</text>
					<text>{{ cal.cert2Dollar(props.record.afterAmt) }}</text>
				</view>
				<view class="card-content-body-row">
					<text class="card-content-body-row-text">更新日期</text>
					<text>{{ props.record.updatedAt }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { reactive, ref } from 'vue'
import cal from '@/commons/utils/cal.js'
import go from '@/commons/utils/go.js'
import datamap from '@/commons/utils/datamap.js'


// 定义传入属性
const props = defineProps({
  record: { type: Object, default: () => {} }, // 渲染对象
})


</script>

<style lang="scss" scoped>
	.card {
		width: 690rpx;
		
		margin: 30rpx auto;
	}
	.card-content {
		border-radius: 20rpx;
		background-color: $J-bg-ff;
		margin: 10rpx 0;
	}
	
	.card-content-title {
		height: 100rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 0 30rpx;
		
		.card-content-title-left {
			height: 100rpx;
			display: flex;
			color: #000000ff;
			font-size: 30rpx;
			flex-direction: row;
			align-items: center;
			
			image {
				width: 40rpx;
				height: 40rpx;
				border-radius: 50%;
			}
			text {
				padding-left: 10rpx;
			}
		}
		.card-content-title-right {
			font-weight: 600;
			color: #000000ff;
			
			text:first-child {
				font-size: 20rpx;
			}
			text:last-child {
				font-size: 30rpx;
			}
		}
	}
	
	.card-content-line {
		border-bottom: 2rpx solid rgba(0, 0, 0, 0.06);
	}
	
	.card-content-body {
		padding: 20rpx;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: space-evenly;
		box-sizing: border-box;
		
		.card-content-body-row {
			display: flex;
			flex-direction: row;
            align-items: center;
			justify-content: flex-start;
			opacity: 1;
			// padding-left: 50rpx;
			height: 60rpx;
			text:first-child {
				width: 150rpx;
				color: #999999ff;
				font-size: 26rpx;
				font-weight: 400;
				text-align: right;
				padding-right: 20rpx;
			}
			text:last-child {
				color: #000000ff;
				font-size: 26rpx;
				font-weight: 400;
			}
			
			.order {
				display: flex;
				flex-direction: row;
				align-items: center;
				
				.order-spot {
					width: 10rpx;
					height: 10rpx;
					border-radius: 50%;
				}
				.order-text {
					padding-left: 10rpx;
					color: #000000ff;
					font-size: 26rpx;
					font-weight: 400;
				}
			}
		}
	}
</style>
