<nav type="back" background-color="#46a9a4" title="核销" />
<block wx:if="{{isHide}}">
  <van-empty description="非本店订单" />
</block>
<block wx:else>
  <block wx:if="{{id}}">
    <view class="top">
      <image class="top-image" src="{{order.room.images[0]||'https://file-cloud.fmode.cn/EbxZUK5lBI/20250412/e1hjn1052809193.jpg'}}" mode="aspectFit"></image>
      <view class="title">
        <view class="order-name">{{order.room.name}}</view>
        <view class="order-time">营业时间：{{order.room.open_time}}</view>
        <view class="order-price">房间单价：￥{{order.room.price}}</view>
      </view>
    </view>

    <view class="ruleBox">
      <view style="margin-bottom: 10rpx;">订房须知</view>
      <view class="list">
        <view class="key">入离</view>
        <view class="value">{{chickRoom.book_rules.time||'12:00后入住,12:00前退房'}}</view>
      </view>
      <view class="list">
        <view class="key">发票</view>
        <view class="value">{{chickRoom.book_rules.ticket||'发票由民宿经营者（房东）提供'}}</view>
      </view>
      <view class="list">
        <view class="key">退订</view>
        <view class="value" style="color: #7E9F86;">{{chickRoom.book_rules.unsubscribe||'仅限30分钟内免费取消'}}</view>
      </view>
      <view class="list">
        <view class="key">　　　　　</view>
        <view class="value">
          <text>{{chickRoom.book_rules.other_1||'订单确认30分钟后,取消订单将扣除当日全部房费（订单需等商家确认后生效，订单确认结果以公众号，短信为准，如订单不确认将全额退款至您的付款账号）'}}</text>
        </view>
      </view>
    </view>

    <view class="ruleBox orderBox">
      <view style="margin-bottom: 10rpx;">订单信息</view>
      <view class="list">
        <view class="key">订单编号：</view>
        <view class="value">{{order.orderNum}}</view>
      </view>
      <view class="list">
        <view class="key">订单状态：</view>
        <view class="value">{{statusMap[order.status]}}</view>
      </view>
      <view class="list">
        <view class="key">入住人姓名：</view>
        <view class="value">{{order.name||order.mobile||order.user.nickname||order.user.mobile}}</view>
      </view>
      <view class="list">
        <view class="key">下单时间：</view>
        <view class="value">{{order.createdAt}}</view>
      </view>
      <view class="list">
        <view class="key">入住时间：</view>
        <view class="value">{{order.startTime}} - {{order.endTime}}</view>
      </view>
      <view class="list">
        <view class="key">入住天数：</view>
        <view class="value">{{order.day}}</view>
      </view>
      <view class="list">
        <view class="key">订单总额：</view>
        <view class="value">￥{{order.totalPrice}}</view>
      </view>
    </view>
  </block>
  <block wx:if="{{!id}}">
    <van-empty description="暂无" />
  </block>

  <block wx:if="{{order.status==100||order.status==500||order.status==602}}">
    <view class="bommon" bindtap="submit">登记入住</view>
  </block>
  <block wx:if="{{order.status==200||order.status==102||order.status==104}}">
    <view class="bommon" bindtap="submit">确认核销</view>
  </block>
</block>