<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-input v-model="formData.field101" placeholder="请输入组织名称" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="部门名称" prop="field102">
                    <el-input v-model="formData.field102" placeholder="请输入部门名称" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="账户编码" prop="field103">
                    <el-input v-model="formData.field103" placeholder="系统自动填写" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="开户银行" prop="field104">
                    <el-input v-model="formData.field104" placeholder="请输入开户银行" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="开户名称" prop="field105">
                    <el-input v-model="formData.field105" placeholder="请输入开户名称" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="账号" prop="field106">
                    <el-input v-model="formData.field106" placeholder="请输入账号" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="开户日期" prop="field107">
                    <el-date-picker v-model="formData.field107" 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="field108">
                    <el-input v-model="formData.field108" placeholder="请输入期初金额" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="备注" prop="field109">
                    <el-input v-model="formData.field109" 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: undefined,
                field102: undefined,
                field103: undefined,
                field104: undefined,
                field105: undefined,
                field106: undefined,
                field107: null,
                field108: undefined,
                field109: undefined,
            },
            rules: {
                field101: [{
                    required: true,
                    message: '请输入组织名称',
                    trigger: 'blur'
                }],
                field102: [{
                    required: true,
                    message: '请输入部门名称',
                    trigger: 'blur'
                }],
                field103: [{
                    required: true,
                    message: '系统自动填写',
                    trigger: 'blur'
                }],
                field104: [{
                    required: true,
                    message: '请输入开户银行',
                    trigger: 'blur'
                }],
                field105: [{
                    required: true,
                    message: '请输入开户名称',
                    trigger: 'blur'
                }],
                field106: [{
                    required: true,
                    message: '请输入账号',
                    trigger: 'blur'
                }],
                field107: [],
                field108: [{
                    required: true,
                    message: '请输入期初金额',
                    trigger: 'blur'
                }],
                field109: [],
            },
        }
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {
        submitForm() {
            this.$refs['elForm'].validate(valid => {
                if (!valid) return
                // TODO 提交表单
            })
        },
        resetForm() {
            this.$refs['elForm'].resetFields()
        },
    }
}

</script>
<style></style>
  