<template>
	<view class="details-item" @click.stop="checkEvent">
		<view class="details-select" v-if="isEdit">
			<text class="iconfont iconxuanzhong" v-if="isCheck"> </text>
			<text class="iconfont iconweixuanzhong" v-else> </text>
		</view>
		<view class="details-main">
			<view class="item-header">
				<text class="name">销售单 | {{info.orderSn}} </text>
			</view>
			<view class="item-row">
				<view class="mark">{{ info.addTime }}</view>
			</view>
			<view class="item-row">
				<view class="mark">金额：{{ info.actPrice }}</view>
				<view class="price">{{ info.actPrice }}</view>
			</view>
		</view>
	</view>
</template>
<script>
export default {
	props: {
		info: {
			required: true
		},
		isEdit: {
			type: Boolean,
			default: false
		},
		isCheck: {
			type: Boolean,
			default: false
		}
	},
	methods: {
		checkEvent() {
			if (this.isEdit) {
				this.$emit("click", this.info);
			}
		}
	}
};
</script>
<style lang="scss" scoped>
.details-item {
	display: flex;
	align-items: center;
	padding: 30upx 20upx;
	margin-bottom: 20upx;
	background-color: #fff;
	border-radius: 10upx;
	.details-select {
		margin-right: 30upx;
		.iconfont {
			font-size: 40upx;
			color: #dddddd;
		}
		.iconxuanzhong {
			color: $mainColor;
		}
	}
	.details-main {
		flex: 1;
	}
	.item-header {
		display: flex;
		align-items: center;
		.logo {
			margin-right: 20upx;
			width: 50upx;
			height: 50upx;
			border-radius: 50%;
		}
		.name {
			font-size: 28upx;
			font-family: PingFang SC;
			font-weight: 600;
			color: #333333;
		}
	}
	.item-row {
		margin-top: 20upx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.mark {
			font-size: 28upx;
			font-weight: 400;
			color: #666666;
		}
		.price {
			display: flex;
			align-items: center;
			font-size: 28upx;
			font-weight: 600;
			color: #333333;
			.iconfont {
				font-size: 28upx;
				color: #999999;
			}
		}
	}
}
</style>
