<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="点击选择项目" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="项目编码" prop="field105">
                    <el-input v-model="formData.field105" placeholder="系统自动填写" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="合同编号" prop="field106">
                    <el-input v-model="formData.field106" placeholder="点击选择合同" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="合同名称" prop="field107">
                    <el-input v-model="formData.field107" placeholder="系统自动填写" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="合同类型" prop="field108">
                    <el-input v-model="formData.field108" placeholder="系统自动填写" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="收票日期" prop="field109">
                    <el-time-picker v-model="formData.field109" format="HH:mm:ss" value-format="HH:mm:ss"
                        :picker-options='{ "selectableRange": "00:00:00-23:59:59" }' :style="{ width: '100%' }"
                        placeholder="请选择收票日期" clearable></el-time-picker>
                </el-form-item>
                <el-form-item label="票据编号" prop="field110">
                    <el-input v-model="formData.field110" placeholder="请输入票据编号" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="收票银行" prop="field111">
                    <el-input v-model="formData.field111" placeholder="系统自动填写" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="收票账户编码" prop="field112">
                    <el-input v-model="formData.field112" placeholder="系统自动生成" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="汇票类型" prop="field113">
                    <el-radio-group v-model="formData.field113" size="medium">
                        <el-radio v-for="(item, index) in field113Options" :key="index" :label="item.value"
                            :disabled="item.disabled">{{ item.label }}</el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="汇票承兑银行" prop="field114">
                    <el-input v-model="formData.field114" placeholder="请输入汇票承兑银行" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="汇票到期日期" prop="field116">
                    <el-date-picker v-model="formData.field116" 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="field117">
                    <el-input v-model="formData.field117" placeholder="系统自动填写" :disabled='true' clearable
                        :style="{ width: '100%' }"></el-input>
                </el-form-item>
                <el-form-item label="收款金额" prop="field118">
                    <el-input v-model="formData.field118" placeholder="请输入收款金额" clearable :style="{ width: '100%' }">
                    </el-input>
                </el-form-item>
                <el-form-item label="备注" prop="field119">
                    <el-input v-model="formData.field119" 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: undefined,
                field108: undefined,
                field109: null,
                field110: undefined,
                field111: undefined,
                field112: undefined,
                field113: undefined,
                field114: undefined,
                field116: null,
                field117: undefined,
                field118: undefined,
                field119: undefined,
            },
            rules: {
                field101: [{
                    required: true,
                    message: '请输入组织名称',
                    trigger: 'blur'
                }],
                field102: [{
                    required: true,
                    message: '请输入部门名称',
                    trigger: 'blur'
                }],
                field103: [{
                    required: true,
                    message: '点击选择客户',
                    trigger: 'blur'
                }],
                field104: [],
                field105: [],
                field106: [],
                field107: [],
                field108: [],
                field109: [{
                    required: true,
                    message: '请选择收票日期',
                    trigger: 'change'
                }],
                field110: [{
                    required: true,
                    message: '请输入票据编号',
                    trigger: 'blur'
                }],
                field111: [{
                    required: true,
                    message: '系统自动填写',
                    trigger: 'blur'
                }],
                field112: [{
                    required: true,
                    message: '系统自动生成',
                    trigger: 'blur'
                }],
                field113: [{
                    required: true,
                    message: '汇票类型不能为空',
                    trigger: 'change'
                }],
                field114: [{
                    required: true,
                    message: '请输入汇票承兑银行',
                    trigger: 'blur'
                }],
                field116: [{
                    required: true,
                    message: '请选择汇票到期日期',
                    trigger: 'change'
                }],
                field117: [{
                    required: true,
                    message: '系统自动填写',
                    trigger: 'blur'
                }],
                field118: [{
                    required: true,
                    message: '请输入收款金额',
                    trigger: 'blur'
                }],
                field119: [],
            },
            field113Options: [{
                "label": "银行承兑汇票",
                "value": 1
            }, {
                "label": "商业承兑汇票",
                "value": 2
            }],
        }
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {
        submitForm() {
            this.$refs['elForm'].validate(valid => {
                if (!valid) return
                // TODO 提交表单
            })
        },
        resetForm() {
            this.$refs['elForm'].resetFields()
        },
    }
}

</script>
<style></style>
  