<view class="container" catchtap="close">
  <!-- 导航栏 -->
  <view class="type-navbar padding flex-vertical fs30">
    <view class="type-box flex-center {{activeCategoryId==item.id?'chtypebox':''}}" wx:for="{{categories}}" bindtap="changeTab" data-id="{{item.id}}">
      <view>{{item.name}}</view>
    </view>
  </view>
  <view class="itemMax">
    <!-- 预约项目 -->
    <view wx:for="{{tm_order_list}}">
      <!-- 商品编号和状态 -->
      <view class="Commodity_number flex-vertical-between fs26 padding">
        <!--商品编号 -->
        <text class="order_number ellipsis-1" selectable='true'>订单编号：{{item.Number}}</text>
        <!-- 订单状态 -->
        <view class="flex-center state">
          <view wx:if="{{item.State==0}}">未服务</view>
          <view wx:if="{{item.State==1}}">已服务</view>
          <view wx:if="{{item.State==2}}">已过期</view>
          <view wx:if="{{item.State==3}}">已取消</view>
          <view wx:if="{{item.State==4}}">已评价</view>
        </view>
      </view>

      <!-- 项目属性 -->
      <navigator class="items padding flex-vertical" url="/packageG/pages/user/my_service/tment_details?number={{item.Number}}">

        <view class="flex-center fs26">
          <view class="itemimage">
            <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="tm_order_list[{{index}}].ImageUrl" binderror="bind_bnerr1" data-img="{{item.ImageUrl}}"></image>
          </view>
          <!-- 项目内容 -->
          <view class="details">
            <view class="item flex-vertical base">
              <view class="itemname flex-level-right">预约门店:</view>
              <view class="itemvalue ellipsis-1">{{item.StorageName}}</view>
            </view>
            <view class="item flex-vertical base">
              <view class="itemname flex-level-right">预约项目:</view>
              <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view>
            </view>
            <view class="item flex-vertical base">
              <block wx:if="{{item.State==1 || item.State==4}}">
                <view class="itemname flex-level-right">服务美容师:
                </view>
              </block>
              <block wx:else>
                <view class="itemname flex-level-right">预约美容师:
                </view>
              </block>
              <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view>
            </view>
            <view class="item flex-vertical base">
              <view class="itemname flex-level-right">预约时间:</view>
              <view>{{item.ArrangeTime}}</view>
            </view>
            <view class="item flex-vertical base" wx:if="{{item.WriteTime==''?false:true}}">
              <view class="itemname flex-level-right">服务时间:</view>
              <view>{{item.WriteTime}}</view>
            </view>
          </view>

        </view>
      </navigator>
      <view class="Unim flex-right-vertical fs26 padding">
        <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{item.Number}}"></image>
        <block wx:if="{{item.State==0}}">
          <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view>
        </block>
        <block wx:else>
          <navigator url="/packageA/pages/my_service/tment_details?number={{item.Number}}&userid={{options.userid}}" class="Unimportance flex-level">查看详情</navigator>
        </block>
        <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/packageA/pages/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}&userid={{options.userid}}">更改时间</navigator>
        <navigator wx:if="{{item.State==1}}" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}&userid={{options.userid}}" class="important Unimportance flex-level">发表评价</navigator>
        <navigator wx:if="{{item.State==2 || item.State==3}}" url="/packageA/pages/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}&userid={{options.userid}}" class="important Unimportance flex-level">重新预约</navigator>
        <navigator wx:if="{{item.State==4}}" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}&userid={{options.userid}}" class="important Unimportance flex-level">评价详情</navigator>
      </view>
    </view>
    <view class="exactly flex-center fs26" wx:if="{{ismore && tm_order_list.length>=3}}">
      <view class="line"></view>
      <view class="exactly_text">到底了</view>
      <view class="line"></view>
    </view>
  </view>
</view>

<!-- 无预约订单 -->
<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}" catchtap="close">
  <view class="flex-level">
    <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image>
  </view>
  <view class="flex-level fs30 xc-ash">无预约记录</view>
  <view class="flex-level">
    <navigator url="/pages/user/my_service/i_service" bindtap="goto">
      <view class="flex-center fs32 white">立即预约</view>
    </navigator>
  </view>
</view>
<my_confirm id="my_confirm"></my_confirm>
<!--  制作一个圆球导航  -->
<nav_b id="nav_b"></nav_b>
<!-- 弹出框扫描 -->
<qr_code id="qc_com"></qr_code>
<warn id="warn"></warn>