<template>
  <div v-loading="loading">
    <div class="white-box">
      <el-form ref="form" :model="form" label-width="100px" style="width:500px;">
        <el-form-item label="选择发放年度">
          <el-date-picker
              v-model="form.year"
              type="year"
              value-format="yyyy"
              placeholder="选择年">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="备注">
          <el-input type="textarea" :row="2" placeholder="请输入内容" v-model="form.remark"></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="onSubmit" :loading="submitButtonStat">提交</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import store from '@/utils/vuexStore'
import network from '@/utils/network'
import tool from '@/utils/tool'

export default {
  name: 'user_cf-lx-apply',
  created () {

  },
  mounted () {

  },
  data () {
    return {
      form: {
        year: null,
        remark: null,
      },
      types: null,
      apps: null,
      closeSwitch: null,
      loading: false,
      submitButtonStat: false,
    }
  },
  methods: {
    onSubmit () {
      this.submitButtonStat = true
      let path = 'bonus/cf-lx-apply'
      network.postData(path, this.form).then(response => {
        this.$message({
          message: response,
          type: 'success'
        })
        this.$router.back()
        this.submitButtonStat = false
      }).catch(response => {
        this.submitButtonStat = false
      })
    },
  }
}
</script>

<style scoped>

</style>