detail.vue 2.24 KB
<template>
	<u-popup :show="showPop" :round="20" @close="showPop = false" closeable>
		<view class="son-wrap">
			<view class="detail-title">
				订单明细
			</view>

			<view style="flex: 1; overflow-y: scroll">
				<view class="content-box">
					<text> {{ merchantName }}({{ name }}) </text>

					<view class="content-right">
						<view>¥{{ sellingPrice }}x{{ buyNum }}</view>
						<view v-if="productDepositTotal">押金:{{ productDepositTotal }}</view>
					</view>
				</view>
				<!-- ---------------------------------------额外服务------------------------------------------- -->
				<view class="content-box" v-for="(item, index) of chooseService" :key="index">
					<text>
						{{ item.name }}
					</text>

					<view class="content-right">
						<view>¥{{ item.sellingPrice }}x{{ buyNum }}</view>
						<view v-if="item.depositTotal">押金:{{ item.depositTotal }}</view>
					</view>
				</view>
				<view class="content-box" v-if="chooseCouponObj && chooseCouponObj.savedMoney > 0">
					<text></text>

					<text class="content-right">{{ parseFloat(chooseCouponObj.savedMoney.toFixed(2)) }} </text>
				</view>

				<view class="content-box content-total">
					<text> 合计 </text>

					<text class="content-right">
						¥<text style="font-size: 36rpx">{{ sellTotal }}</text>
					</text>
				</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
export default {
  props: [
    'merchantName', 
    'name', 
    'buyNum',
    'sellingPrice',
    'productDepositTotal',
    'chooseCouponObj',
    'chooseService',
    'sellTotal'
  ],
  data() {
    return {
      showPop: false, //控制弹窗显示隐藏
    }
  },

  methods: {}
}
</script>

<style scoped="scoped">
.son-wrap {
	position: relative;
	height: 65vh;
	display: flex;
	flex-direction: column;
}
.detail-title {
	text-align: center;
	font-size: 32rpx;
	font-weight: bold;
	padding: 30rpx 24rpx;
	border-radius: 20rpx 20rpx 0 0;
}
.content-box {
	padding: 0 30rpx;
	border-bottom: 1px solid #f0f0f0;
	height: 120rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 28rpx;
}
.content-right {
	text-align: right;
	flex-shrink: 0;
	margin-left: 20rpx;
}
.content-total {
	color: #f45803;
	font-weight: bolder;
	font-size: 32rpx;
}
</style>