<!--pages/orderDetail/orderDetail.wxml-->
<view class="order_status">
  <view class="order_title">Order status</view>
  <view class="status">{{orderInfo.status==1?'unpaid':orderInfo.status==2?'paid':'closed'}}</view>
</view>
<view class="order">
  <!--商品清单  -->
  <view class="goods_list">
    <block wx:for="{{goodsList}}" wx:key="goodsList" wx:if="{{index < showLimit}}">
      <view class="goods_item">
        <view class="goods_image">
          <image mode="aspectFill" src="{{item.img}}"></image>
        </view>
        <view class="goods_info">
          <view class="goods_title">{{item.title}}<text decode='{{true}}'>&ensp;</text> {{item.attr_title}}</view>
          <view class="goods_price">￥ {{item.price}}</view>
        </view>
        <view class="goods_count">x {{item.goods_num}}</view>
      </view>
    </block>
    <view class="show_more" bindtap="viewMore" wx:if="{{goodsList.length > 3}}">{{showLimit > 3?'hide':'more'}}</view>
    <view class="totol_pirce">
      <text>total price:</text>
      <text class="pirce">￥ {{orderInfo.price}}</text>
    </view>
  </view>

  <!-- 桌位信息  -->
  <!-- <block wx:if="{{orderType == 1}}"> -->
  <view class="order_info table {{orderInfo.order_type == 2?'active':'hide'}}">
    <form wx:if="{{orderInfo.order_type == 2}}" bindsubmit="submitOrder" report-submit="true">
      <view class="row">
        <view class="row_title">Dining place :</view>
        <view class="row_content">{{orderInfo.seat}}</view>
      </view>
      <view class="row" wx:if="{{checkHack.showPersonNum}}">
        <view class="row_title">number :</view>
        <view class="row_content"><input disabled type="number" bindinput="syncDelivery" data-attr="meals_num"  value="{{orderInfo.meals_num}}" maxlength="2" /></view>
      </view>
      <view class="tips" wx:if="{{orderInfo.mark.length>0}}">
        <view class="tips_header">remarks:</view>
        <view class="row_content"><textarea disabled bindinput="syncRemarks" maxlength="200" value="{{orderInfo.mark}}" /></view>
      </view>
      <button class="pay_btn btn1" wx:if="{{orderInfo.status == 1}}" formType="submit">wechat pay</button>
      <!-- <button class="pay_btn btn2">取消订单</button> -->
    </form>
  </view>
  <!-- </block> -->
  <!-- 外卖信息 -->
  <!-- <block wx:else> -->
  <view class="order_info takeaway {{orderInfo.order_type == 1?'active':'hide'}}">
    <form wx:if="{{orderInfo.order_type == 1}}" bindsubmit="submitOrder" report-submit="true">
      <!-- <view class="order_title">Delivery information</view> -->
      <view class="row">
        <view class="row_title">name :</view>
        <view class="row_content"><input disabled type="text" bindinput="syncDelivery" data-attr="name" value="{{orderInfo.address_name}}" maxlength="30" /></view>
      </view>
      <view class="row">
        <view class="row_title">phone :</view>
        <view class="row_content"><input disabled type="number" bindinput="syncDelivery" data-attr="phone"  value="{{orderInfo.address_phone}}" maxlength="11" /></view>
      </view>
      <view class="row">
        <view class="row_title">address :</view>
        <view class="row_content"><input disabled type="text" bindinput="syncDelivery" data-attr="address"  value="{{orderInfo.address_info}}" /></view>
      </view>
      <view class="row" wx:if="{{checkHack.showPersonNum}}">
        <view class="row_title">number :</view>
        <view class="row_content"><input disabled type="number" bindinput="syncDelivery" data-attr="meals_num" value="{{orderInfo.meals_num}}" maxlength="2" /></view>
      </view>
      <view class="tips">
        <view class="tips_header">remarks:</view>
        <view class="row_content"><textarea bindinput="syncRemarks" maxlength="300" value="{{orderInfo.mark}}"  /></view>
      </view>
       <button class="pay_btn" wx:if="{{orderInfo.status == 1}}" formType="submit">wechat pay</button> 
      <!-- <button>取消订单</button> -->
    </form>
  </view>
  <!-- </block> -->

  <!-- </block> -->
  <!-- 上店自提信息 -->
  <!-- <block wx:else> -->
  <view class="order_info takeaway {{orderInfo.order_type == 3?'active':'hide'}}">
    <form wx:if="{{orderInfo.order_type == 3}}" bindsubmit="submitOrder" report-submit="true">
      <!-- <view class="order_title">Delivery information</view> -->
      <view class="row">
        <view class="row_title">name :</view>
        <view class="row_content"><input disabled type="text" bindinput="syncDelivery" data-attr="name" value="{{orderInfo.address_name}}" maxlength="30" /></view>
      </view>
      <view class="row">
        <view class="row_title">phone :</view>
        <view class="row_content"><input disabled type="number" bindinput="syncDelivery" data-attr="phone"  value="{{orderInfo.address_phone}}" maxlength="11" /></view>
      </view>
      <view class="row">
        <view class="row_title">code :</view>
        <view class="row_content"><input disabled type="text" bindinput="syncDelivery" data-attr="address"  value="{{orderInfo.kexiao_sn}}" /></view>
      </view>
      <view class="row">
        <view class="row_title">time :</view>
        <view class="row_content"><input disabled type="text" bindinput="syncDelivery" data-attr="address"  value="{{orderInfo.time}}" /></view>
      </view>
      <!-- <view class="row">
        <view class="row_title">详细地址 :</view>
        <view class="row_content"><input disabled type="text" bindinput="syncDelivery" data-attr="address"  value="{{orderInfo.address_info}}" /></view>
      </view> -->
      <view class="row" wx:if="{{checkHack.showPersonNum}}">
        <view class="row_title">number :</view>
        <view class="row_content"><input disabled type="number" bindinput="syncDelivery" data-attr="meals_num" value="{{orderInfo.meals_num}}" maxlength="2" /></view>
      </view>
      <view class="tips">
        <view class="tips_header">remarks:</view>
        <view class="row_content"><textarea bindinput="syncRemarks" maxlength="300" value="{{orderInfo.mark}}"  /></view>
      </view>
       <button class="pay_btn" wx:if="{{orderInfo.status == 1}}" formType="submit">wechat pay</button> 
      <!-- <button>取消订单</button> -->
    </form>
  </view>
  <!-- </block> -->
</view>

