<template>
  <div>
    <scroll-view scroll-y="true" class="scroll-Y">
      <van-checkbox-group v-model="checkedList" @change="checkboxChange" checked-color="#064C8A">
        <div class="container" v-if="memberLevelDiscount">
          <div class="item">
            <div class="title">会员等级减免</div>
            <div class="content">{{ memberGrade.memberGradeText || '' }}减免{{ memberGrade.discountTime || 0 }}小时。可优惠{{ memberGrade.discountFee || 0 }}元</div>
          </div>
          <van-checkbox color="#fff" name="member" :disabled="isCheck('member')" />
          <!-- :checked="isCheck('member')" -->
          <div class="member-discount-info" v-if="isMemberDiscountDisabled">当日已使用</div>
        </div>
        <div class="container" v-if="enableConsume">
          <div class="item">
            <div class="title">消费减免</div>
            <!-- <uni-view class="content" v-if="parkInfoEntity.parkMallCode === 1 && parkInfoEntity.expirationDate">{{reduceDiscountMessage}}</uni-view> -->
            <div class="content" v-if="orderDetail.parkInfo.parkMallCode !== 1">
              {{ todayReduceDiscountMessage }}
            </div>
            <uni-number-box
              v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0"
              :min="1"
              :max="maxReduceDiscount"
              v-model="reduceHours"
              @input="reducesChange"
            ></uni-number-box>
          </div>
          <van-checkbox name="reduces" color="#fff" :disabled="isCheck('reduces')" />
          <!-- :checked="isCheck('reduces')" -->
        </div>
      </van-checkbox-group>
    </scroll-view>
    <div class="flewx">
      <div class="flewx-content">
        合计<span style="color: #333; font-weight: 600; font-size: 36px; padding-left: 0px">{{ actualPayFee | currency }}</span>
        元
        <span style="color: #999; padding-left: 0px; font-size: 28px">已优惠{{ usingTotalDiscount | currency }}元</span>
      </div>
      <div class="flewx_index3" @click="confirm">确定</div>
    </div>
  </div>
</template>

<script>
import parkingFeeDiscountsJs from '../../mixins/parkingFeeDiscounts';

export default {
  mixins: [parkingFeeDiscountsJs],
};
</script>

<style lang="less" scoped>
//@import '../../styles/common.less';

.scroll-Y {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f4f7ff;
}

.container {
  background-color: #fafbff;
  width: calc(100% - 100px);
  margin: 30px;
  padding-left: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  line-height: 70px;
  position: relative;
  height: inherit;
  border: 1px solid #d8dae0;

  .item {
    width: 570px;
    padding: 20px 0;

    .title {
      font-size: 34px;
    }

    .content {
      font-size: 28px;
      color: #989898;
    }
  }

  .member-discount-info {
    font-size: 20px;
    position: absolute;
    right: 12px;
    bottom: 0;
    color: #989898;
  }

  .page_img {
    width: 49px;
    height: 49px;
    border: 1px solid #e6e6e6;
    border-radius: 50%;
    overflow: hidden;

    img {
      width: 50px;
      height: 50px;
      margin-left: -1px;
    }
  }
}

.flewx {
  width: 100%;
  height: 130px;
  background-color: #fff;
  position: fixed;
  bottom: 0;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  // padding-bottom: constant(safe-area-inset-bottom);
  // padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: 20px;

  .flewx-content {
    position: absolute;
    left: 16px;
  }

  .flewx_index3 {
    width: 150px;
    height: 70px;
    border-radius: 45px;
    text-align: center;
    font-size: 30px;
    line-height: 70px;
    color: #fff;
    // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
    background: #064c8a;
    box-shadow: 2px 3px 5px #888888;
    position: absolute;
    right: 16px;
  }

  .blue_flewx_index3 {
    .color-background-color('blue');
  }

  .green_flewx_index3 {
    .color-background-color('green');
  }
}

/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  background-color: red !important;
  border-radius: 50% !important;
  border: 1px solid red;
}

/deep/ checkbox .wx-checkbox-input {
  border-radius: 50% !important;
}
</style>
