bindCard.vue 5.21 KB
<template>
  <v-layout id="BindCard" column justify-center align-center>
    <v-flex>
      <v-card id="CardInfoBlock" flat height="19rem">
        <div class="NameBlock FormLine">
          <div class="labelBlock">
            <span>持卡人</span>        
          </div>
          <v-text-field
            v-model="form.name"
            color="light-gold"
            class="BindCardInput "
            name="PhoneInput"
            placeholder="请输入持卡人姓名"
            id='NameInput'
            single-line
          ></v-text-field>
        </div>
        <div class="IdBlock FormLine">
          <div class="labelBlock">
            <span>身份证号</span>        
          </div>
          <v-text-field
            v-model="form.idNo"
            color="light-gold"
            class="BindCardInput "
            name="IdInput"
            placeholder="请输入身份证号"
            id='IdInput'
            single-line
          ></v-text-field>
        </div>
        <div class="CardNoBlock FormLine">
          <div class="labelBlock">
            <span>银行卡号</span>        
          </div>
          <v-text-field
            v-model="form.cardNo"
            color="light-gold"
            class="BindCardInput "
            name="CardNoInput"
            placeholder="请输入银行卡号"
            id='CardNoInput'
            single-line
          ></v-text-field>
        </div>
        <div class="BankBlock FormLine" @click="pickerDisplay = true">
          <div class="labelBlock">
            <span>选择银行</span>        
          </div>
          <div class="pickerValueBlock" v-if="!form.bank">{{'请选择'}} 
            <v-icon class="addCardIcon">keyboard_arrow_right</v-icon>
          </div>
          <div class="pickerValueBlockValue" v-if="!!form.bank" >
            {{form.bank}}
          </div>
          <Picker 
            :data="banks" 
            title="请选择银行" 
            @pickerClose="pickerDisplay = false" 
            @select="pickerValueChange"
            :display="pickerDisplay"/>      
        </div>
        <div class="PhoneBlock FormLine">
          <div class="labelBlock">
            <span>预留手机号</span>        
          </div>
          <v-text-field
            v-model="form.phone"
            color="light-gold"
            class="BindCardInput "
            name="PhoneInput"
            placeholder="务必输入预留手机号"
            id='PhoneInput'
            single-line
          ></v-text-field>
        </div>
        <div class="HintLine">
          注意:请您避免绑定<span>银行卡、结算卡</span>
        </div>
      </v-card>
      <div class="ConfirmButtonBlock">
        <v-btn depressed id="ConfirmButton">确  定</v-btn>
      </div>
    </v-flex>
  </v-layout>
</template>

<script>
import {wechatShareSetting} from '@/helper'
import Picker from '@/components/Picker'
export default {
  layout: 'lightGold',
  data:() => ({
    form: {
      phone: '',
      verificationCode: '',
      bank: ''
    },
    banks: [[{ text: '招商银行' },
          { text: '建设银行' },
          { text: '工商银行' },
          { text: '农业银行' },
          { text: '中国银行' }]],
    pickerDisplay: false,
  }),
  components: {
    Picker
  },
  mounted() {
    wechatShareSetting(this.$axios, this.$store)
  },
  methods: {
    pickerValueChange(val, index, text) {
      this.form.bank = text[0]
    }
  }
}
</script>

<style lang="scss" scoped>
  #BindCard {

    #CardInfoBlock {
      width: 90vw;
      margin-top: 2rem;
      background: #FFFFFF;
      border-radius: 2px;
      padding: 0 1.3rem;

      .FormLine {
        height: 3.5rem;
        position: relative;

        .labelBlock {
          line-height: 3.5rem;
          height: 3.5rem;
          position: absolute;
          font-size: 1rem;
          font-weight: bold;
        }
        .BindCardInput {
          padding-top: 0.75rem;
        }
        .pickerValueBlock {
          padding-top: 0.75rem;
          text-align: right;
          font-size: 1rem;
        }
        .pickerValueBlockValue {
          padding-top: 0.75rem;
          padding-left: 6.7rem;
          font-size: 1rem;
        }
      }

      /deep/ #NameInput {
        margin-left: 6.7rem;
      }
      /deep/ #IdInput {
        margin-left: 6.7rem;
      }
      /deep/ #CardNoInput {
        margin-left: 6.7rem;
      }
      /deep/ #PhoneInput {
        margin-left: 6.7rem;
      }
      /deep/ input#BankInput {
        margin-left: 6.7rem;
      }
      .BankBlock {
        border-bottom: 1px solid rgba(0, 0, 0, .4);
      }
      .HintLine {
        font-size: 0.9rem;
        text-align: center;
        color: #9D9D9D;

        span {
          color: $light-gold;
        }
      }


      ::-moz-placeholder { color: #9D9D9D; }
      ::-webkit-input-placeholder { color:#9D9D9D; }
      :-ms-input-placeholder { color:#9D9D9D; }
    }
    
    .ConfirmButtonBlock {
      width: 90vw;
      margin: 4.5rem auto 2.5rem auto;

      #ConfirmButton {
        color: #484646;
        background-image: linear-gradient(-213deg, #DAB269 0%, #E7C78C 92%);
        border-radius: 2px;
        width: 100%;
        height: 2.8rem;
        font-size: 18px;
        margin: auto;
      }
    }
  }
</style>