<template>
  <div class="form-box">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="姓名" label-width="100px">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="性别" label-width="100px">
        <el-select v-model="form.sex" placeholder="请选择">
          <el-option label="男" value="shanghai"></el-option>
          <el-option label="女" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="手机号" label-width="100px">
        <el-input v-model="form.phone"></el-input>
      </el-form-item>
      <el-form-item label="邮箱" label-width="100px">
        <el-input v-model="form.emil"></el-input>
      </el-form-item>
      <el-form-item label="发票抬头" label-width="100px">
        <el-input v-model="form.fp"></el-input>
      </el-form-item>
      <el-form-item label="纳税人识别号" label-width="100px">
        <el-input v-model="form.num"></el-input>
      </el-form-item>
      <el-form-item label="职务" label-width="100px">
        <el-input v-model="form.zw"></el-input>
      </el-form-item>
      <el-form-item label="单/合住" label-width="100px">
        <el-select v-model="form.zf" placeholder="请选择">
          <el-option label="男" value="shanghai"></el-option>
          <el-option label="女" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="付款方式" label-width="100px">
        <el-select v-model="form.fk" placeholder="请选择">
          <el-option label="男" value="shanghai"></el-option>
          <el-option label="女" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="身份证号" label-width="100px">
        <el-input v-model="form.code"></el-input>
      </el-form-item>
      <el-form-item label="地址" label-width="100px">
        <el-input type="textarea" v-model="form.desc"></el-input>
      </el-form-item>
      <el-form-item label="培训需求" label-width="100px">
        <el-input type="textarea" v-model="form.xq"></el-input>
      </el-form-item>
      <el-form-item label-width="100px">
        <el-upload
          class="upload-demo"
          drag
          action="https://jsonplaceholder.typicode.com/posts/"
          multiple>
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
          <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
        </el-upload>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">提交</el-button>
        <el-button @click="back">返回</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: {
        name: '',
        sex: '',
        phone: '',
        emil: ''
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!');
    },
    back() {
      this.$router.go(-1)
    }
  }
}
</script>
<style lang="scss" scoped>
.form-box{
  padding: 30px 0;
  width: 500px;
  margin: 0 auto;
}
</style>
