<template>
	<view class="slot">
		<view class="line">
			<view class="label">商品总价</view>
			<view class="value">{{ orderInfo.total_amount}}</view>
		</view>
		<view class="line">
			<view class="label">优惠券</view>
			<view class="value">-{{ orderInfo.coupon_amount}}</view>
		</view>
		<view class="line">
			<view class="label">运费</view>
			<view class="value">{{ orderInfo.express_fee}}</view>
		</view>
		<view class="line">
			<view class="label">应付款</view>
			<view class="value price">{{ orderInfo.actual_total_amount}}</view>
		</view>
		<u-line color="#eee" margin="0 0 30rpx" />
		<view class="line">
			<view class="label">订单编号</view>
			<view class="value">
				{{ orderInfo.order_no}}
				<text class="copy" @click="$copyByUniappApi(orderInfo.order_no)">复制</text>
			</view>
		</view>
		<view class="line">
			<view class="label">收货地址</view>
			<view class="value">{{ addressInfo.realname}}, {{ addressInfo.mobile}},  {{ addressInfo.province+addressInfo.city+addressInfo.area+addressInfo.street}}</view>
		</view>
		<view class="line">
			<view class="label">留言</view>
			<view class="value">{{ orderInfo.remark}}</view>
		</view>
		<view class="line">
			<view class="label">创建时间</view>
			<view class="value">{{ orderInfo.createtime}}</view>
		</view>
		<view class="line" v-if="orderInfo.pay_time">
			<view class="label">付款时间</view>
			<view class="value">{{ orderInfo.pay_time}}</view>
		</view>
		<view class="line" v-if="orderInfo.send_time">
			<view class="label">发货时间</view>
			<view class="value">{{ orderInfo.send_time}}</view>
		</view>
		<view class="line" v-if="orderInfo.ack_time">
			<view class="label">成交时间</view>
			<view class="value">{{ orderInfo.ack_time}}</view>
		</view>
		<view class="line" v-if="orderInfo.cancel_time">
			<view class="label">取消时间</view>
			<view class="value">{{ orderInfo.cancel_time}}</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'line-info-operate',
	props: {
		// 配置项
		orderInfo: {
			type: Object,
			default: () => {
				return {};
			}
		},
		addressInfo: {
			type: Object,
			default: () => {
				return {};
			}
		}
	}
};
</script>

<style lang="scss" scoped>
.slot {
	padding: 30rpx 0rpx;
}
.line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30rpx;
	.label {
		// width: 204rpx;
		font-size: 28rpx;
		color: $app-theme-text-color;
	}
	.value {
		// width: 320rpx;
		max-width: 500rpx;
		flex: 1;
		padding: 0 30rpx;
		text-align: right;
		font-size: 28rpx;
		color: $app-theme-text-color;
	}
	.price{
		color: $app-theme-text-money-color;
	}
	.copy {
		font-size: 28rpx;
		color: $app-theme-color;
		margin-left: 20rpx;
	}
}
</style>
