<!--nova-tourism/pages/homestay/homestay-order/index.wxml-->
<nav type="back" background-color="#46a9a4" title="提交订单" frontColor="#ffffff" />

<view class="page-section">
	<!-- 房间详情 -->
	<cell-list detail="{{room}}" arrowText="房间详情" bind:arrowtap="navigate" data-type="room"></cell-list>
	<van-divider customStyle="margin: 0;" />
	<!-- 订房必读 -->
	<cell-list detail="{{note}}" icon="warning" iconColor="#f01740" bind:arrowtap="showNotePop" bind:tap="showNotePop">
	</cell-list>
</view>
<!-- <nova-calendar show="{{ true }}" title="请选择日期" color="#FFE300"></nova-calendar> -->
<view class="page-section">
	<view class="card-list page-section-spacing">
		<view class="text spacing-small">入住信息</view>
		<van-divider customStyle="margin: 8rpx;" />
		<list-item label="入住时长" content="{{date}}" arrow="arrow" bind:tap="checkDate"></list-item>
		<van-divider customStyle="margin: 8rpx;" />
		<list-item label="入住人数" content="{{peopleNum}}" arrow="arrow-down" bind:tap="checkNum"></list-item>
		<van-divider customStyle="margin: 8rpx;" />
		<list-item label="住客信息" arrow="arrow" arrowText="添加/编辑" data-type="customer" bind:arrowtap="navigate">
			<view slot="content">
				<view wx:if="{{customers.length > 0}}">
					<view wx:for="{{customers}}" wx:key="index" wx:for-item="customer"><text
							class="text">{{customer['realname']}}\t</text></view>
				</view>
				<block wx:else>
					<text class="text-small grey">请添加信息</text>
				</block>
			</view>
		</list-item>
	</view>
</view>
<view class="page-section page-section-spacing">
	<list-item label="在线支付" content="{{count}}晚">
		<view slot="end"><text class="text-small">共</text><text class="text red">￥{{count*room.price}}</text></view>
	</list-item>
	<van-divider customStyle="margin: 8rpx;" />
	<list-item label="房费" arrow arrowText="￥{{count*room.price}}"></list-item>
	<list-item label="{{info}}" labelClass="text-small" arrow arrowText="￥{{room.price}}" arrowTextClass="grey"
		wx:for="{{priceInfoArr}}" wx:key="index" wx:for-item="info">
	</list-item>
</view>

<view class="page-section-spacing" style="padding-bottom: 180rpx;">
	<!-- <view class="text  spacing-small">退款规则</view>
  <view class="text-small spacing-small grey "><text>入住前1天12:00前退订，可获100%退款。之后退定将不 予退款。</text></view> -->
	<view class="text  spacing-small">预订说明</view>
	<view class="text-small spacing-small grey"><text>订单需等酒店或供应商确认后才生效，订单确认结果以短信或邮件通知为准；请在订单生效后再至酒店前台办理入住。</text></view>
</view>

<!-- 底部栏 -->
<view class="footer-bar">
	<view class="price">￥{{count*room.price}}</view>
	<van-button color="#46a9a4" round size="normal" class="btn" bind:tap="submit"><text style="color:#ffffff;">立即预订</text>
	</van-button>
</view>

<!-- 支付组件 -->
<payment style="z-index: 99999;" id='payMent' show="{{showPayment}}" tradeNo="{{tradeNo}}" price="{{count*room.price}}"
	bind:payResult='acceptResult' showType="all" />

<!-- 订房须知 -->
<modal show="{{showNote}}" closeable title="订房须知" bind:close="closeModal" bind:enter="closeModal">
	<rich-text slot="content" nodes="{{note.detail}}" style="width: 100%;height: 100%; margin: 0 auto;"></rich-text>
</modal>

<!-- 日期选择 default-date="{{date}}"-->
<van-calendar show="{{ showDate }}" bind:close="closeDate" type="range" bind:unselect="unselectDate"
	bind:confirm="enterDate" color="#46a9a4" formatter="{{ checkedFormatter }}" bind:select="selectDate" title="请选择日期"
	default-date="{{[start,end]}}" max-range="{{ 28 }}" />
<!-- default-date="{{defaultDate}}" -->

<!-- 人数选择 -->
<van-picker wx:if="{{ showNumPicker }}" show-toolbar title="入住人数" columns="{{columns}}" bind:change="numPickerChange"
	bind:cancel="numPickerCancel" bind:confirm="numPickerEnter" class="num-picker" default-index="{{ room.merber }}" />
