<view class="container">
  <view class="tab-bar">
    <view wx:for="{{tabList}}" wx:key="{{index}}" bindtap="toggleTab" data-index="{{index}}" class="tab-bar-item {{ index == tabIndex ? 'active' : '' }}">{{ item }}</view>
  </view>
  <view style='height:40rpx;margin-left:20rpx;margin-top:20px;margin-bottom: 20rpx;'>
    <!-- <text style='font-size:24rpx;color:red;'>
      * 非保税仓商品不允许再来一单，需门店扫描二维码进行购买
    </text> -->
  </view>
  <view class="orders" wx:for="{{orderList}}" wx:if="{{orderList[index].id>0}}" wx:key="{{index}}">
    <view class="list-group">
      <navigator class="list-cell" url="../orderDetail/orderDetail?id={{item.id}}&&tabIndex={{tabIndex}}&&isRefundStatus={{item.isRefundStatus}}&&refundStatus={{item.refundStatus}}&&approvalRemark={{item.approvalRemark}}">
        <view class="list-cell-bd">
          <view class="list-label" style="color: #FE7200;">
            
            <image wx:if="{{item.orderBizType==00}}" src="../../../static/images/service-bao.png" class="search-icon-shop"></image>
            <text class="biz-type" wx:if="{{item.orderBizType==00}}">{{item.merchName}}{{item.storeName}} - 保税仓 </text>
            <image wx:if="{{item.orderBizType==02}}" src="../../../static/images/service-zs.png" class="search-icon-shop"></image>
            <text class="biz-type" wx:if="{{item.orderBizType==02}}">{{item.merchName}}{{item.storeName}} - 保税展示</text>
            <image wx:if="{{item.orderBizType==10}}" src="../../../static/images/service-ziti.png" class="search-icon-shop"></image>
            <text class="biz-type" wx:if="{{item.orderBizType==10}}">{{item.merchName}}{{item.storeName}} - 现场速递</text>
            <image wx:if="{{item.orderBizType==11}}" src="../../../static/images/service-ptsp.png" class="search-icon-shop"></image>
            <text class="biz-type" wx:if="{{item.orderBizType==11}}">{{item.merchName}}{{item.storeName}} - 普通商品</text> 
            
            <!-- <text class="add_time">{{item.add_time}}{{orderList[0].id}}</text> -->            
            <text class="add_time" wx:if="{{tabIndex!=5}}">{{tabIndex!=5 && item.order_status != 401 && item.pay_status!=7 && item.pay_status!=8?item.order_status_text:""}}{{item.order_status == 201 && item.isRefundStatus?"(维权申请中)":""}}{{item.pay_status==7?"订单关闭":""}}{{item.pay_status==8?"支付失败":""}}
            </text>
            <text class="add_time" wx:if="{{tabIndex!=5 && item.order_status==401}}">{{item.pay_status==3 && item.order_status==401?'微信退款中':""}}{{item.pay_status==4 && item.order_status == 401?"已退款":""}}{{item.pay_status==5 && item.order_status == 401?"退款关闭":""}}{{item.pay_status==6 && item.order_status == 401?"退款异常":""}}
            </text>
          </view>
        </view>
        <view class="list-cell-ft router">

        </view>
      </navigator>
      <view class="list-cell">
        <view class="list-cell-hd order-image-hd">
          <navigator url="../orderDetail/orderDetail?id={{item.id}}&&tabIndex={{tabIndex}}&&isRefundStatus={{item.isRefundStatus}}&&refundStatus={{item.refundStatus}}&&approvalRemark={{item.approvalRemark}}">
            <image class="order-image" src="{{item.goodsList[0].list_pic_url}}"></image>
          </navigator>
        </view>
        <view class="list-cell-bd">
          <navigator url="../orderDetail/orderDetail?id={{item.id}}&&tabIndex={{tabIndex}}&&isRefundStatus={{item.isRefundStatus}}&&refundStatus={{item.refundStatus}}&&approvalRemark={{item.approvalRemark}}">
            <view class="order-details">
              <view class="order-details-cell" wx:if="{{ index < 4 }}" wx:for="{{item.goodsList}}" wx:for-item="cell" wx:key="{{index}}">
                <text class="name">{{cell.goods_name}}</text>
                <text class="num">x{{cell.number}}</text>
              </view>
              <view wx:if="{{ item.goodsList.length > 4 }}" class="order-details-cell">
                <text>...</text>
              </view>
              <view class="order-details-cell">
                <text style="margin-left: auto;">共{{item.goodsCount}}份，实付<text class="price">￥{{item.actual_price}}</text></text>
              </view>
            </view>
          </navigator>
        </view>
      </view>
      <!-- 订单配送中 -->
      <!-- <view class="list-cell" wx:if="{{item.order_status==300}}">
        <map id="map" longitude="{{item.markers[0].longitude}}" latitude="{{item.markers[0].latitude}}" show-location include-points markers="{{item.markers}}" style="width: 100%; height: 30vh;z-index: 600"></map>
      </view> -->
      
      <view class="list-cell-tk" wx:if="{{tabIndex ==5 && (item.order_status == 401 || item.order_status == 402)}}">
      <image src="../../../static/images/service-tk.png" class="search-icon-shop3"></image>
        <text style='font-size: 26rpx;margin-left:5rpx'>
        {{item.order_status == 401?"仅退款 退款成功":""}}
        {{item.order_status == 402?"退货退款 退款成功":""}}
        </text>
      </view>
      <!-- <view class="list-cell-wq" wx:if="{{item.order_status == 201 && item.isRefundStatus}}">
        <text class='names'>
        维权申请中
        </text>
      </view> -->
      <view class="list-cell-check" wx:if="{{item.buyerPayCheck == 2}}">
      <image src="../../../static/images/service-jg.png" class="search-icon-shop2"></image>
        <text class='names'>
        您的订付人身份证姓名不一致
        </text>
      </view>

      <view class="list-cell">
        <view class="btn-box">
          <button wx:if="{{tabIndex != 5}}" class="{{item.orderBizType==00 && currentStoreId == item.store_id?'btn':'btn-disabel'}}" data-order-id="{{item.id}}" data-goods-type="{{item.orderBizType}}" data-is-Store='{{currentStoreId == item.store_id}}' catchtap="{{item.orderBizType==00 && currentStoreId == item.store_id ?'againBuy':'againBuyDisabel'}}">再来一单</button>
          <button class="btn" wx:if="{{item.order_status==300 && tabIndex != 5}}" data-shipping-No="{{item.shipping_no}}" data-shipping-Code="{{item.shipping_code}}" data-order-id="{{item.id}}" data-goods-type="{{item.orderBizType}}" catchtap="getWuliuList">查看物流</button>
          <button class="btn" data-actual-price="{{item.actual_price}}" data-order-id="{{item.id}}" data-order-index="{{index}}" catchtap="payOrder" wx:if="{{item.handleOption.pay && item.dateformat && tabIndex != 5}}">去付款 {{item.dateformat.min}}{{item.dateformat?':':''}}{{item.dateformat.sec}}</button>
          <button wx:if="{{item.order_status==201 && tabIndex != 5 && !item.isRefundStatus}}" class="btn" data-order-Id="{{item.id}}" data-actual-Price="{{item.actual_price}}" data-merch-Order-Sn="{{item.merchOrderSn}}" data-is-Store='{{currentStoreId == item.store_id}}' catchtap="applyRefund">申请维权</button>
        </view>
      </view>
    </view>
  </view>
</view>
<view class="orders" wx:if="{{!orderList[0].id}}">
  <view class="no-data">
    <image src="/static/images/tip-null.png"></image>
    <text>暂无订单</text>
  </view>
</view>