<template>
  <scroll-view
    style="background-color: #f4f7ff"
    class="scroll-Y"
    id="slideview"
    scroll-y
    lower-threshold="50"
    scroll-top="0"
    scroll-left="0"
    scroll-with-animation="false"
    enable-back-to-top="false"
    @scrolltolower="bindscrolltolower"
  >
    <div>
      <!-- <LoginDom></LoginDom> -->
      <div
        :class="['choice_card', index === 0 && 'mt30']"
        v-for="(item, index) in list"
        :key="index"
        @click="toDetail(item.id)"
      >
        <div class="carno-box">
          <div class="carno">{{ item.vehicleNo }}</div>
          <div class="servicefee">{{ item.actualPayFee | currency }}</div>
        </div>
        <div class="choice_card_index">{{ item.parkName }} </div>
        <div class="choice_card_index orderno-box">
          <div class="orderno">订单号 : {{ item.orderNo }}</div>
          <van-icon name="arrow" />
        </div>
        <div class="choice_card_index">
          <div>入场时间 : {{ item.enterTime }}</div>
        </div>
        <div class="choice_card_index mb0 pb0">
          <div>停车时长 : {{ item.serviceMin | parkingTime }}</div>
          <div :class="['status-box', item.payStatus !== 1 && 'other']">
            <!-- {{ ['支付成功', '支付失败', '已退款'][item.refundStatus] }} -->
            {{ item.refundStatus !== 'NO_REFUND' ? '已退款' : {'PAID': '支付成功', 'FAILED': '支付失败'}[item.paymentStatus || 'FAIED'] }}
          </div>
        </div>
      </div>
      <div class="notice-info">
        <!-- 为确保用户可以执行下滑动作，设置单次响应的数据量为4 -->
        <div
          >{{ numberOfElements? '查看更多' : '没有更多数据了' }}
        </div>
      </div>
      <div style="height: 10vh;"></div>
    </div>
  </scroll-view>
</template>

<script>
import parkingFeeListJs from '../../mixins/parkingFeeList'
export default {
  mixins:[parkingFeeListJs]
}
</script>

<style lang="less" scoped>
.scroll-Y {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f2f2f2;
}

.wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.parkingFeeList-item {
  background: #fff;
  display: flex;
  flex-direction: column;
  margin-top: 8px;

  .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 36px;
    box-sizing: border-box;

    span {
      font-size: 16px;
    }
  }

  .item-bottom {
    border-top: 1px solid #f2f2f2;
    display: flex;
    flex-direction: column;
    padding: 0px 36px;
    box-sizing: border-box;
    padding-top: 8px;

    div {
      display: flex;
      flex-direction: column;
    }

    span {
      color: #999;
      font-size: 14px;
      margin-bottom: 10px;
    }
  }
}

.choice_card {
  width: calc(100% - 120px);
  margin-left: 30px;
  // margin-top: 30px;
  margin-bottom: 30px;
  padding: 30px;
  // border-radius: 20px;
  position: relative;
  background-color: #fafbff;
  border-radius: 4px;
  border: 1px solid #d8dae0;
  &.mt30 {
    margin-top: 30px;
  }
  .carno-box {
    display: flex;
    padding-bottom: 18px;
    border-bottom: 1px solid #d8dae0;
    justify-content: space-between;
    margin-bottom: 20px;
    .carno {
      font-size: 36px;
      color: #333333;
      font-weight: 600;
      line-height: 50px;
    }
    .servicefee {
      font-size: 30px;
      font-weight: 600;
      color: #333333;
      line-height: 42px;
    }
  }

  .choice_card_index {
    font-size: 28px;
    font-weight: 400;
    color: #999999;
    line-height: 40px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    &.mt0 {
      margin-top: 0;
    }
    &.mb0 {
      margin-bottom: 0;
    }
    &.pb0 {
      padding-bottom: 0;
    }
    .status-box {
      font-size: 30px;
      font-weight: 400;
      color: #064c8a;
      line-height: 42px;
      &.other {
        color: #999999;
      }
    }
  }
  .orderno-box {
    display: flex;
    justify-content: space-between;
  }
}

.notice-info {
  text-align: center;
  color: #b5b3b3;
  padding-bottom: 30px;

  div {
    margin-bottom: -7px;
  }
}
</style>
