<template>
	<view class="container">
		<u-form :model="white" ref="uForm" style="background-color: #ffffff;" :label-style="formLabelCss" label-width="180">
			<u-form-item label="持有人">{{white.memberName}}</u-form-item>
			<u-form-item label="持有人电话" prop="memberPhone">{{white.memberPhone}}</u-form-item>
			<u-form-item label="车牌号码" prop="memberCarNum">{{white.memberCarNum}}</u-form-item>
			<u-form-item label="使用场所" prop="parkingName">
				{{white.parkingName}}
			</u-form-item>
			<u-form-item label="使用期限">
				<!-- <u-input :value="expireDateRange" type="select" @click="showCalendar = true;" placeholder="选择起始截止日期"/> -->
			</u-form-item>
			
			<u-form-item prop="memberStartTime">
			   {{white.memberStartTime}}
			</u-form-item>
			
			<u-form-item  prop="memberEndTime">
			   {{white.memberEndTime}}
			</u-form-item>
			
			<u-form-item label="类型">
				<text>{{white.memberType==0?'充电附赠':(white.memberType==1?'正式会员':'')}}</text>
			</u-form-item>	
			
			
		</u-form>
		
		
		
	</view>
</template>

<script>
	import * as api from '@/apis/whiteBill.js'
	
	export default {
		data() {
			return {
				formLabelCss:{
					'color':'#7d7d7d'
				},
				isUpdate:false,
				white:{
					memberName:'',
					memberPhone:'',
					memberCarNum:'',
					parkingName:'',
					memberStartTime:'',
					memberEndTime:'',
					parkId:'',
					memberType:null
				},
				timePickShow:false,
				parkSelShow:false,
				myParkSites:[],
				showCalendar:false,
				timePickFor:'',
				timePickParams:{
					year: true,
					month: true,
					day: true,
					hour: true,
					minute: true,
					second: true
				}
			}
		},
		
		onLoad(opts){
			this.loadDate(opts.id);
			
		},
		
		methods: {
			
			
			loadDate(id){
				uni.showLoading({
					title:'加载中...'
				});
				
				api.getOne(id).then(resp => {
					console.log(resp)
					uni.hideLoading();
					if(!resp.success){
						return;
					}
					
					//this.memberRecord=resp.data;
					let {memberName,memberPhone,memberCarNum,parkingName,memberStartTime,memberEndTime,parkId,memberType,id}=resp.data;
					this.white={memberName,memberPhone,memberCarNum,parkingName,memberStartTime,memberEndTime,parkId,memberType,id};
					console.log(this.white);
					
				}).catch(error => {
					uni.hideLoading();
				});
			}
		}
		
	}
</script>

<style>
	page{
			
			background-color: #f4f4f4;
			font-family: '华文行楷';
			height: 100%;
		}
	.u-form-item{
		padding:10rpx 20rpx;
	}
	.btn-bar{
		margin:40rpx 0rpx;
		padding:0rpx 20rpx;
		display: flex;
		flex-flow: row nowrap;
		justify-content: center;
		align-items: center;
	}
	
	.custom-btn{
		flex:1;
		border-top-right-radius: 20rpx !important;
		border-bottom-right-radius: 0rpx;
	}
	
	
</style>
