<template>
    <div>

        <el-card>
            <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
                <el-form-item label="开始生效日期" prop="field101">
                    <el-date-picker v-model="formData.field101" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                        :style="{ width: '100%' }" placeholder="请选择" clearable></el-date-picker>
                </el-form-item>
                <el-form-item label="年化利率(%)" prop="field102">
                    <el-date-picker v-model="formData.field102" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                        :style="{ width: '100%' }" placeholder="请选择年化利率(%)" clearable></el-date-picker>
                </el-form-item>
                <el-form-item label="备注" prop="field104">
                    <el-input v-model="formData.field104" type="textarea" placeholder="请输入备注"
                        :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item size="large">
                    <el-button type="primary" @click="submitForm">提交</el-button>
                    <el-button @click="resetForm">重置</el-button>
                </el-form-item>
            </el-form>
        </el-card>

    </div>
</template>
<script>
export default {
    components: {},
    props: [],
    data() {
        return {
            formData: {
                field101: null,
                field102: null,
                field104: undefined,
            },
            rules: {
                field101: [{
                    required: true,
                    message: '请选择',
                    trigger: 'change'
                }],
                field102: [{
                    required: true,
                    message: '请选择年化利率(%)',
                    trigger: 'change'
                }],
                field104: [],
            },
        }
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {
        submitForm() {
            this.$refs['elForm'].validate(valid => {
                if (!valid) return
                // TODO 提交表单
            })
        },
        resetForm() {
            this.$refs['elForm'].resetFields()
        },
    }
}

</script>
<style></style>
  