<navbar home back text="订单详情"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class='order' tt:if="{{showPage}}">
  <view tt:if="{{order.orderStatus==1}}" class='tips'>
    <image class='success' src='{{succUrl}}' mode='widthFix'></image>
    <view tt:if="{{order.salePrice/100==0}}" class='msg'>
      <text>交易成功</text>
      <!-- <text>请尽快到门店使用，有效期至{{}}</text> -->
    </view>
    <view tt:if="{{order.salePrice/100!=0}}" class='msg'>
      <text>付款成功</text>
      <!-- <text>请尽快到门店使用，有效期至{{}}</text> -->
    </view>
  </view>

  <view class='section'>
    <view class='sectionTit'>
      <text>{{order.title}}</text>
    </view>
    <view class='detail_msg' bindtap="goDetail">
      <view class='logo'>
        <image mode='aspectFill' src='{{order.coverImg}}'></image>
      </view>
      <view class='info'>
        <view class="salePriceStr ">
          <view class='rmb'>¥</view>
          <view class="pri01">{{(order.payment)/100}}</view>
          <view class="throgh">{{(order.price)/100}}</view>
        </view>
        <view class="subTitle">
          <text>{{order.subTitle}}</text>
        </view>
        <view class="xidanTiem">
          <text>下单时间：</text>{{createDate}}
        </view>

        

        <image class="infoArrow" src="{{chevronUrl}}" mode='widthFix'></image>
        <view class="goRefund"  catchtap="goRefund" data-id="{{order.id}}" tt:if="{{order.couponOrderStatus==0||order.couponOrderStatus==3}}">{{order.couponOrderStatus==0?'申请退款':'退款进度'}}</view>
      </view>
    </view>
  </view>

  <view class="zhuangtai">
    <image tt:if="{{order.couponOrderStatus==1}}" src="{{wm01Url}}" mode='widthFix'></image>
    <image tt:if="{{order.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image>
    <image tt:if="{{order.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image>
    <image tt:if="{{order.couponOrderStatus==0&&order.validStatus==0}}" src="{{wm04Url}}" mode='widthFix'></image>

    <view class="panel" tt:if="{{order.couponOrderStatus==0&&order.validStatus!=0}}">
      <view class="canWrap">
        <canvas canvas-id="qrcode" style="width: 1200rpx; height: 800rpx;" />
      </view>
      <image src="{{tempFilePath}}" mode="aspectFit" />
      <view class="closeRq" tt:if="{{showhieRq}}" bindtap="setRq">
        <image class="updataRqCode" mode='widthFix' src="{{upDataRqUrlF}}"></image>
        <view class="upDataRq">点一点刷新二维码</view>
      </view>
      <view class="coedTiem" tt:if="{{!showhieRq&&expiredSeconds>1}}">二维码在
        <text style="color:red">{{expiredSeconds}}s</text>
        后失效
      </view>
      <!-- <view class="barnum buy"><text>兑换码:</text>{{code}}</view> -->
    </view>

  </view>




  <view class='classif'>
    <!-- 
      couponOrderStatus
      0 未使用
      1 已使用
      2 已过期
      3 已经退款
     -->
    <!-- 
       orderStatus
       1
       只有支付完成的时
       才显示兑换码
      -->
    <!-- bindtap="powerDrawer"  -->
    <view tt:if="{{order.orderStatus==1&&order.type!=100&&order.type!=5&&order.type!=51}}"
      data-couponOrderStatus="{{order.couponOrderStatus}}" data-title="{{order.title}}"
      data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.couponOrderId}}"
      data-validstatus="{{order.validStatus}}" class='dhCode'>
      <view style="width:86%;clear: both;">
        <text class="fl">兑换码：</text>
        <text class="fr" tt:if="{{order.validStatus!=0}}">{{order.couponOrderId}}</text>
      </view>
      <view>
        <!-- <image class="spcode" src="{{spcodeUrl}}" mode='widthFix'></image>
        <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> -->
      </view>
    </view>

    <view class='dhCode'  bindtap="goPaySnapshoot" data-id="{{order.id}}" tt:if="{{(order.orderStatus!=0&&order.orderStatus!=2)}}">
      <view style="width:86%;clear: both;">
        <text class="fl">交易快照：可作为交易争执的判断依据</text>

      </view>
      <view>
        <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image>
      </view>
    </view>
    <!-- <view>
      <text>下单时间</text>
      <text class='fr'>{{createDate}}</text>
    </view> -->
    <view class='dhCode'>
      <text class='bianhao'>订单编号：</text>
      <text>{{order.id}}</text>
    </view>
    <view class='wuliu' tt:if="{{order.type==11}}">
      <text class='left'>物流状态：</text>
      <text
        class="right">{{(order.shippingStatus==10||order.shippingStatus==14)?"待自提":order.shippingStatus==15?"已自提":order.shippingStatus==20?"待发货":order.shippingStatus==24?"待收货":order.shippingStatus==25?"已收货":""}}</text>
    </view>
    <view class='wuliu' tt:if="{{order.shippingType==2&&order.deliveryInfo}}">
      <text class='left'>物流公司：</text>
      <text class="right">{{order.deliveryInfo.courierInput}}</text>
    </view>
    <view class='wuliu' tt:if="{{order.shippingType==2&&order.deliveryInfo}}">
      <text class='left'>快递单号：</text>

      <view class="left">{{order.deliveryInfo.expressageIdInput}}</view>

      <view class="copeCode" bindtap="copeCode" data-text="{{order.deliveryInfo.expressageIdInput}}">复制</view>
      <text class="goInquire" bindtap="gokuaidi" data-nu="{{order.deliveryInfo.expressageIdInput}}">查询物流</text>
    </view>

    <!-- <view>
      <text tt:if="{{order.type == 8}}">原价</text>
      <text tt:if="{{order.type != 8}}">面额</text>
      <text class="jine1" tt:if="{{order.unit==0}}">{{order.price/100}}元</text>
      <text class="jine1" tt:if="{{order.unit==1}}">{{order.price/100}}小时</text>
    </view> -->
    <view style="overflow: hidden; padding-left: 5%;padding-right: 5%;height: 96rpx;line-height: 96rpx;">
      <text class='left'>实付金额：</text>
      <view class='right'>
        <text class='RMB'>¥</text>
        <text class='jine'>{{order.payment/100}}</text>
      </view>
    </view>
  </view>
  <!-- 适用门店 -->
  <store merchantVoList="{{order.merchantVoList}}" tt:if="{{order.type!=12}}"></store>

  <vieW class="groupTitleBox">
    <view class="groupTitle" tt:if="{{order.itemGroup.length>0}}">团购详情</view>
  </vieW>

  <view class="groupTextBox" tt:if="{{order.itemGroup.length>0}}" tt:for="{{order.itemGroup}}">
    <view class="groupTitleS" tt:if="{{item.group_name}}">{{item.group_name}}</view>
    <view class="groupDetailsBox" tt:for="{{item.item_list}}" tt:for-item="itemChi">
      <view class="groupTiemBox">
        <view class="yuandian"></view>
        <view class="groupTiemName">{{itemChi.name}}（{{itemChi.count}}份）</view>
        <view class="groupTiemPay">¥{{itemChi.price/100}}</view>
      </view>
    </view>
  </view>


  <view class='notes'>
    <view class="notesH">购买须知</view>
    <view class="timeText">有效期</view>
    <view class="Hchild">{{order.validStartDate}}至{{order.validEndDate}}</view>
    <view class="timeText">可用时间</view>
    <view class="Hchild">•商家营业时间可用</view>
    <view class="timeText">预约消费</view>
    <view class="Hchild">• 不需预约，高峰时段可能需要排队</view>
    <view class="Hchild">• 团购券不支持配送或外卖</view>
    <view class="timeText">使用规则</view>
    <text class="notesText">{{order.remark}}</text>
    <!-- <text tt:if="{{curHtml==''}}" class="notesText">{{order.remark}}</text> -->
    <!-- <view tt:if="{{curHtml!=''}}">
      <rich-text nodes="{{curHtml}}"></rich-text>
    </view> -->
  </view>
  <!-- 子券列表 -->
  <view class="childList" tt:if="{{order.type==12}}">
    <view class="childTitle">礼券：</view>
    <view class="childItme" tt:for="{{order.giftCouponList}}" tt:key="{{item}}">

      <view class="chaildDetBox">
        <image mode='aspectFill' class="chaildImg" src="{{item.coverImg}}"></image>
        <view class="childDataBox">
          <view class="orderName">{{item.title}}</view>
          <view class="childPriceStr">面额：{{item.priceStr}}元</view>
        </view>
      </view>
    </view>
  </view>
  <!-- 待付款 显示立即购买的按钮 -->
  <view tt:if="{{(order.orderStatus==0&&order.salePrice!=0)||(order.orderStatus==7&&order.salePrice!=0)}}"
    class="buy-view app-border-top">
    <button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{orderFlag?order.composeOrderId:order.id}}"
      disabled='{{showButton}}' class="{{mouldType!=1?'buy':'buyX'}}">立即支付</button>
  </view>
  <view class='game' bindtap="gotogame" tt-if="{{showIf&&order.orderStatus!=0}}">
    <view class='game-entry'>
      <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image>
    </view>
  </view>
  <!-- <button type="primary" open-type="share" tt:if="{{order.type == 100 && supportTransfer==1&&cardIf}}" class='support-tansfer'>
    <image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> -->
  <view class="sign"
    tt:if="{{order.couponOrderStatus == 0 &&order.type == 11 && order.shippingType == 2 && order.shippingStatus== 24}}"
    bindtap="setShow">签收
  </view>
  <view class="evaluate" bindtap="goEvaluate"  tt:if="{{evaluateFlag}}">去评价</view>
  <view class="explainText" tt:if="{{serviceUrl!=''&&(order.orderStatus==1||order.orderStatus==3||order.orderStatus==4||order.orderStatus==5)}}">对本订单有疑问或纠纷，请点击下方联系抖音官方客服</view>
  <view class="serviceBox" tt:if="{{serviceUrl!=''&&(order.orderStatus==1||order.orderStatus==3||order.orderStatus==4||order.orderStatus==5)}}" bindtap="goWebView">
    <image src="../../../assets/images/service1.png" class="serviceImg" ></image>
    <view class="serviceText"> 抖音官方客服</view>
  </view>

  
</view>



<view class="showT" tt:if="{{showFlag}}" bindtap="hieShow">
  <view class="titleBxo">
    <view class="text">是否确认收到商品？</view>
    <view class="p">签收后将完成订单</view>
    <view class="btnBox">
      <view class="le" bindtap="verify">确认签收</view>
      <view class="ri" bindtap="hieShow">取消</view>
    </view>
  </view>
</view>
<!--  -->
