<view class="container">
  <view class="order-info">
    <view class="item">
      <view class="label">下单时间：</view>
      <view class="txt">{{orderInfo.addTime}}</view>
    </view>
    <view class="item">
      <view class="label">订单编号：</view>
      <view class="txt">{{orderInfo.orderSn}}</view>
    </view>
    <view class="item">
      <view class="label">订单留言：</view>
      <view class="txt">{{orderInfo.message}}</view>
    </view>
    <view class="item-c">
      <view class="r">
        <view class="btn active" bindtap="cancelOrder" wx:if="{{handleOption.cancel}}">取消订单</view>
        <view class="btn active" bindtap="payOrder" wx:if="{{handleOption.pay}}">去付款</view>
        <view class="btn active" bindtap="confirmOrder" wx:if="{{handleOption.confirm}}">确认收货</view>
        <view class="btn active" bindtap="deleteOrder" wx:if="{{handleOption.delete}}">删除订单</view>
        <view class="btn active" bindtap="refundOrder" wx:if="{{handleOption.refund}}">申请退款</view>
        <view class="btn active" bindtap="aftersaleOrder" wx:if="{{handleOption.aftersale}}">申请售后</view>
      </view>
    </view>
  </view>

  <view class="order-goods">
    <view class="h">
      <view class="label">商品信息</view>
      <view class="status">{{orderInfo.orderStatusText}}</view>
    </view>
    <view class="goods">
      <view class="item" wx:for="{{orderGoods}}" wx:key="id">
        <view class="img">
          <image src="{{item.picUrl}}"></image>
        </view>
        <view class="info">
          <view class="t">
            <text class="name">{{item.goodsName}}</text>
            <text class="number">x{{item.number}}</text>
          </view>
          <view class="attr">{{item.specifications}}</view>
          <view class="price">￥{{item.price}}</view>
          <view class="btn active" wx:if="{{handleOption.comment && (item.comment == 0)}}">
            <navigator url="../../commentPost/commentPost?ogid={{item.id}}">去评价</navigator>
          </view>
          <view class="btn active" wx:if="{{handleOption.rebuy}}">
            <navigator url="../../goods/goods?id={{item.goodsId}}">再次购买</navigator>
          </view>
        </view>
      </view>
    </view>

    <view class="order-bottom">
      <view class="address">
        <view class="t">
          <text class="name">{{orderInfo.consignee}}</text>
          <text class="mobile">{{orderInfo.mobile}}</text>
        </view>
        <view class="b">{{orderInfo.address}}</view>
      </view>
      <view class="total">
        <view class="t">
          <text class="label">商品合计：</text>
          <text class="txt">￥{{orderInfo.goodsPrice}}元</text>
        </view>
        <view class="t">
          <text class="label">订单运费：</text>
          <text class="txt">￥{{orderInfo.freightPrice}}元</text>
        </view>
        <view class="t">
          <text class="label">订单优惠：</text>
          <text class="txt">-￥{{orderInfo.couponPrice}}元</text>
        </view>
        <view class="t">
          <text class="label">订单实付：</text>
          <text class="txt">￥{{orderInfo.actualPrice}}元</text>
        </view>        
      </view>
    </view>
  </view>

  <view class="order-express" bindtap="expandDetail" wx:if="{{ orderInfo.expNo }}">
    <view class="order-express">
      <view class="title">
        <view class="t">快递公司：{{orderInfo.expName}}</view>
        <view class="b">物流单号：{{orderInfo.expNo}}</view>
      </view>
      <van-icon class="ti" name="arrow" />      
    </view>
    <view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
      <view class="trace">
        <view class="acceptStation">{{iitem.AcceptStation}}</view>
        <view class="acceptTime">{{iitem.AcceptTime}}</view>
      </view>
    </view>
  </view>
</view>