<!--nova-tourism/pages/my/my-order/order-detail/index.wxml-->
<nav type="back" background-color="#ffffff" frontColor="#000000" title="订单详细" />
<view class="all">
  <view class="title" wx:if="{{order.status=='200'||order.status=='500'||order.status=='601'||order.status=='602'}}">订单处理中</view>
  <view class="title" wx:if="{{order.status=='300'}}">订单进行中</view>
  <view class="title" wx:if="{{order.status=='400'||order.status=='700'||order.status=='800'}}">订单已完成</view>
  <view class="cardbox">
    <view class="title2">{{order.store.storeName}}</view>
    <view class="roombox">
      <image src="{{order.targetObject[0].image}}"></image>
      <view class="room">
        <view class="room-name">{{order.targetObject[0].name}}</view>

        <view class="room-text">
          <block wx:if="{{order.specMap[order.targetObject[0].objectId].spec}}">
            {{order.specMap[order.targetObject[0].objectId].spec}}
            <van-icon name="cross" />{{order.specMap[order.targetObject[0].objectId].count}}
          </block>
          <block wx:for="{{order.specMap[order.targetObject[0].objectId].list}}" wx:key="index">
            {{item.spec}}
            <van-icon name="cross" />{{item.count}}
          </block>
        </view>
      </view>
    </view>
    <view class="textbox">
      <view class="text1">
        <view class="tex1">实付款</view>
        <view class="tex2">￥{{order.totalPrice}}</view>
      </view>
      <view class="text1">
        <view class="tex1">订单编号</view>
        <view class="tex3" data-str="{{order.orderNum}}" bind:tap="copyStr">
          <view class="tex3-1">{{order.orderNum||'暂无'}} |</view>
          <view class="tex3-2">复制</view>
        </view>
      </view>
      <view class="text1">
        <view class="tex1">付款时间</view>
        <view class="tex3">
          {{order.payTime||'暂无'}}
        </view>
      </view>
      <!-- <view class="text1" data-url="/common/pages/nova-express/index?num=YT8746219700214&com=yuantong" bind:tap="tourl"> -->
      <view wx:if="{{order.distributeType=='delivery'}}" class="text1" bind:tap="toExpress">
        <view class="tex1">发货时间</view>
        <view class="tex3">
          {{order.startTime||statusMap[order.status]}}
        </view>
      </view>
      <block wx:if="{{order.trackingNumber}}">
        <view class="text1">
          <view class="tex1">物流单号</view>
          <view class="tex3" data-str="{{order.trackingNumber}}" bind:tap="copyStr">
            <view class="tex3-1">{{order.trackingNumber}} |</view>
            <view class="tex3-2">复制</view>
          </view>
        </view>
      </block>

      <view class="text1">
        <view class="tex1">申请开票</view>
        <view class="tex3">
          本订单由商家开具，无法显示开票
        </view>
      </view>
      <view class="text1">
        <view class="tex1">收货地址</view>
        <view class="tex3" style="width: 532rpx;display: flex;justify-content: flex-end;">
          <text wx:if="{{order.distributeType=='delivery'}}">{{order.info.address||'暂无'}}</text>
          <text wx:else>民宿自提</text>
        </view>
      </view>
      <view class="btn">
        <block wx:if="{{order.status=='400'||order.status=='800'}}">
          <view data-url="/nova-tourism/pages/my/my-order/my-refund/refund-good/index?oid={{order.objectId}}" bind:tap="tourl">退换</view>
        </block>
      </view>
    </view>
  </view>
</view>

<view style="margin: 0 20rpx;" wx:if="{{order.store.objectId}}">
  <suggest store_id="{{order.store.objectId}}"></suggest>
</view>