<template>
  <div class="auto">
    <validator name="v">
    <form class="form-horizontal select-overspread ">
      <div class="row">
        <div class="col-sm-8 form-group">
          <label class="font_normal_body" for="f_taxpayer_id">纳税人识别号</label>
          <input class="input_search" placeholder="纳税人识别号" style="width:70%" type="text"
                 v-model="baseinfo.base.f_taxpayer_id" v-next-el="addressphone">
        </div>
        <div class="col-sm-4 form-group">
          <label class="font_normal_body" for="f_paper_name">名&emsp;&emsp;称</label>
          <input class="input_search" placeholder="名称" style="width:60%" type="text" v-el:papername
                 v-model="baseinfo.base.f_paper_name" v-next-el="paperaccount">
        </div>
      </div>
      <div class="row">
        <div class="col-sm-8 form-group">
          <label class="font_normal_body" for="f_address_phone">地址电话&emsp;&emsp;</label>
          <input class="input_search" placeholder="地址-电话" style="width:70%" type="text" v-el:addressphone
                 v-model="baseinfo.base.f_address_phone" v-next-el="papername">
        </div>
        <div class="col-sm-4 form-group" :class="[$v.pty.required ? 'has-error' : '']">
          <label class="font_normal_body" for="f_paper_type">*票据类型</label>
          <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.pty.selectedItems"
                 v-validate:pty='{required: true }'>
          <v-select :options='papertype'
                    :value-single="true"
                    :value.sync="baseinfo.base.f_paper_type" close-on-select
                    placeholder='票据类型'
          v-ref:pty></v-select>
        </div>
      </div>
      <div class="row">
        <div class="col-sm-8 form-group">
          <label class="font_normal_body " for="f_paper_account">开户行及账号</label>
          <input class="input_search" placeholder="银行名称" style="width:70%" type="text" v-el:paperaccount
                 v-model="baseinfo.base.f_paper_account">
        </div>
        <div class="col-sm-4 form-group">
          <label class="font_normal_body" for="f_contact_user">联系人名</label>
          <input class="input_search" placeholder="联系人姓名" style="width:60%" type="text" v-el:contactuser
                 v-model="baseinfo.base.f_contact_user" >
        </div>
      </div>
      <div class="row">
        <div class="col-sm-8 form-group">
          <label class="font_normal_body " for="f_paper_account">推送票据邮箱</label>
          <input class="input_search" placeholder="推送票据邮箱" style="width:70%" type="text" v-el:f_email
                 v-model="baseinfo.base.f_email">
        </div>
      </div>

    </form>
    </validator>
  </div>
</template>
<script>
export default {
  title: '基本信息',
  data () {
    return {
      papertype: this.$appdata.getParam('票据类型') ? [{label: '请选择', value: ''}, ...this.$appdata.getParam('票据类型')] : []
    }
  },
  props: ['baseinfo']
}
</script>
