<template>
	<div>
		<common-merchant ref="common" @asynCallBack="asynCallBack"></common-merchant>
		<top-header :pageTitle="pageTitle"></top-header>

		<div class="mui-content">
			<div class="vongi-car-hisdat">
				<div class="vongi-car-carp">
					{{detail.carNumber}}
				</div>
			</div>
			<div class="vongi-editme vongi-popup-center">
				<form class="mui-input-group margin10">
					<div class="mui-input-row">
						<label>车辆状态</label>
						<p v-text="detail.parkingStatusStr"></p>
					</div>
					<div class="mui-input-row">
						<label>已停时长</label>
						<p v-text="detail.inTimeStr"></p>
					</div>
					<div class="mui-input-row">
						<label>登记时间</label>
						<p v-text="detail.couponCreateTime"></p>
					</div>
				</form>
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>协议商户</label>
						<p v-text="detail.merchantName">金盆洗脚城</p>
					</div>
					<div class="mui-input-row">
						<label>停车位置</label>
						<p v-text="detail.parkingName"></p>
					</div>
					<div class="mui-input-row">
						<label>赠送抵扣券</label>
						<p v-text="detail.couponMoney+'元'"></p>
					</div>
					<div class="mui-input-row">
						<label>入场时间</label>
						<p v-text="detail.inParkTime"></p>
					</div>
					<div class="mui-input-row">
						<label>离场时间</label>
						<p v-text="detail.outParkTime?detail.outParkTime:'--'"></p>
					</div>
				</form>
			</div>
		</div>

		<loading :visible="isLoading"></loading>
	</div>
</template>

<script>
	import * as API_Merchant from '@/apis/merchant'
	import CommonMerchant from '@/components/CommonMerchant.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		name: 'MerchantHistoryInfo',
		components: {
			CommonMerchant,
			Loading,
			TopHeader,
		},
		data() {
			return {
				isLoading: false,

				pageTitle: '登记详情',

				id: this.$route.query.id,

				detail: {}
			}
		},
		created() {},
		methods: {
			//获取详情
			getInfo() {
				this.isLoading = true;
				API_Merchant.discountTicketDetail(this.id).then(response => {

					this.isLoading = false;

					this.detail = response;

				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			asynCallBack() {

			},
		},
		mounted() {
			this.getInfo();
		},
		destroyed() {

		},
		computed: {
			...mapGetters({
				openId: 'wx_openid',
			})
		}
	}
</script>

<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style src="$project/assets/css/iconfont.css"></style>
<style>
</style>
