<page-plugin isAuth="{{authInfo['SF_ERP_SALE_ORDERS_VIEW']}}" loading="{{loading}}"
  is-login="{{isLogin}}" bind:handleLogin="handleLogin">
  <empty-plugin wx:if="{{list.length == 0}}" />
  <card-plugin wx:for="{{ list }}" wx:key="order_no">
    <view slot="header" style="display: flex;justify-content: space-between;width: 100%;">
      <text>{{ item.order_no }}</text>
      <view
        style="font-weight: normal;min-width: 1.5em;border: 1rpx solid #eee;text-align: center;color: #999;border-radius: 25%;">
        {{index + 1}}
      </view>
    </view>
    <view slot="content">
      <card-item-plugin label="自定义单号" value="{{item.custom_order_no}}" />
      <card-item-plugin label="订单类型" value="{{item.category_name}}" />
      <card-item-plugin label="经销商名称" value="{{item.custom_name}}" />
      <card-item-plugin label="经销商手机" value="{{item.custom_phone}}" />
      <card-item-plugin label="客户名称" value="{{item.end_user_name}}" />
      <card-item-plugin label="客户手机" value="{{item.end_user_phone}}" />
      <card-item-plugin label="客户地址" value="{{item.end_user_address}}" />
      <card-item-plugin label="创建日期" value="{{item.create_date}}" />
    </view>
    <view slot="footer" class="card-plugin-footer">
      <t-button size="small" theme="primary" bind:tap="onOrderToTop" data-index="{{index}}">移至顶部
      </t-button>
    </view>
  </card-plugin>
</page-plugin>