cash-out.vue 2.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
<template>
  <div class="cash-out">
    <van-cell-group style="margin-bottom: 10px;">
      <van-field
        v-model="bank"
        label="所属银行"
        right-icon="arrow"
        placeholder="请选择"
        size="large"
        class="bank"
        readonly
      />
    </van-cell-group>
    <div class="detail">
      <p style="font-size: 24px">提现金额</p>
      <van-field v-model="money" type="number" label="¥" class="money" />
      <div class="remain">
        <span style="color: #666666"
          >可提现金额{{ remainMoney.toFixed(2) }}</span
        >
        <span class="all" @click="allIn">全部提现</span>
      </div>
      <div class="real">
        <p class="real-item">
          <span>实际到账</span>
          <span>94.19</span>
        </p>
        <p class="real-item">
          <span>税款</span>
          <span>6.34</span>
        </p>
        <p class="explain">
          <span>扣税说明</span>
          <img
            class="explain-img"
            src="@/assets/images/explain.png"
            alt="解释"
          />
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "CashOut",
  data() {
    return {
      bank: "",
      money: 100,
      remainMoney: 100
    };
  },
  methods: {
    allIn() {
      this.money = this.remainMoney;
    }
  }
};
</script>

<style lang="scss" scoped>
.cash-out {
  padding: 10px 0;
  font-family: "PingFang-SC-Medium";
  .bank {
    ::v-deep .van-field__control {
      text-align: right;
    }
  }
  .detail {
    height: 380px;
    padding: 10px 16px;
    background-color: #ffffff;

    .money {
      box-sizing: border-box;
      margin: 0 0 10px;
      border-bottom: 1px solid #eeeeee;
      ::v-deep .van-field__label {
        width: 16px;
        height: 21px;
        font-size: 28px;
        line-height: 20px;
        color: #333333;
      }

      ::v-deep .van-field__control {
        font-size: 23px;
        color: #333333;
      }
    }

    .remain {
      padding: 10px 16px;
      font-size: 12px;

      .all {
        padding-left: 20px;
        color: #88c678;
      }
    }

    .real {
      padding: 10px 16px;
      font-size: 14px;
      background-color: #f9f9f9;
      .real-item {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
      }
      .explain {
        position: relative;
        span {
          color: #999999;
        }
        .explain-img {
          position: absolute;
          top: 50%;
          transform: translateY(-50%);
          width: 14px;
          height: 14px;
          margin-left: 8px;
        }
      }
    }
  }
}
</style>