<!--pages/create-order/index.wxml-->
<view class="sg-container" style="padding-top: 70rpx">
  <view class="sg-tabs sg-flex sg-align-center sg-space-around sg-fix-top" style="z-index: 100">
    <block wx:for="{{tabs}}" wx:key="index">
      <view class="sg-tab sg-pad {{index == tabIndex ? 'sg-seleted' : 'sg-gray-color'}}" bindtap="switchTab"
        data-index="{{index}}">{{item}}({{stat[index]}})</view>
    </block>
  </view>
  <view>
    <view class="sg-pad" wx:if="{{tabIndex == 0}}">
      <view class="sg-item sg-white-bg sg-pad sg-margin-tb" wx:for="{{list[0]}}" wx:key="index" bindtap="navigate"
        data-url="/pages/note-detail/index?id={{item.id}}">
        <view class="sg-flex sg-align-center sg-space-between sg-font-small">
          <view class="sg-flex sg-align-center">
            <view class="sg-margin-right">{{item.created_at}}</view>
            <view>{{item.type == 1 ? '租赁通知' : '调用通知'}}</view>
          </view>
          <van-button type="danger" round size="mini">new</van-button>
        </view>
        <view class="sg-gray-color sg-pad-tb-sm sg-bottom-border">{{item.content}}</view>
        <view class="sg-flex sg-align-center sg-space-between sg-pad-tb-sm">
          <view>查看详情</view>
          <van-icon name="arrow" />
        </view>
      </view>
    </view>
    <view class="sg-pad" wx:if="{{tabIndex == 1}}">
      <view class="sg-item sg-white-bg sg-pad sg-margin-tb" wx:for="{{list[1]}}" wx:key="index" bindtap="navigate"
        data-url="/pages/note-detail/index?id={{item.id}}">
        <view class="sg-flex sg-align-center sg-space-between sg-font-small">
          <view class="sg-flex sg-align-center">
            <view class="sg-margin-right">{{item.created_at}}</view>
            <view>{{item.type == 1 ? '租赁通知' : '调用通知'}}</view>
          </view>
        </view>
        <view class="sg-gray-color sg-pad-tb-sm sg-bottom-border">{{item.content}}</view>
        <view class="sg-flex sg-align-center sg-space-between sg-pad-tb-sm">
          <view>查看详情</view>
          <van-icon name="arrow" />
        </view>
      </view>
    </view>
  </view>
  <block wx:if="{{tabIndex == 0}}">
    <view class="sg-submit-box sg-pad sg-fix-bottom sg-flex sg-align-center sg-center" bindtap="doAction"
      data-type="has_read">
      全部已读
    </view>
  </block>
  <view class="sg-submit-box sg-fix-bottom sg-flex sg-align-center sg-center" wx:if="{{tabIndex == 1}}">
    <view class="sg-action sg-draft sg-pad sg-border-right" bindtap="doAction" data-type="empty">全部清空</view>
  </view>
</view>