<template>
    <el-card shadow="never" class="!border-none">
        <el-form ref="formRef" class="mb-[-16px]" :model="modelValue" :inline="true">
            <el-form-item label="提交人">
                <el-input class="w-[280px]" placeholder="请输入" v-model="modelValue.submitName" clearable @keyup.enter="$emit('resetPage')" />
            </el-form-item>
            <el-form-item label="提交时间">
                <el-date-picker
                    v-model="modelValue.submitDate"
                    type="datetimerange"
                    range-separator="至"
                    start-placeholder="开始时间"
                    end-placeholder="结束时间"
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="$emit('resetPage')">查询</el-button>
                <el-button @click="$emit('resetParams')">重置</el-button>
            </el-form-item>
        </el-form>
    </el-card>
</template>

<script setup lang="ts">
defineProps({
    modelValue: {
        type: Object,
        default: () => ({
            submitName: '',
            submitDate: ''
        })
    }
})
defineEmits(['resetPage', 'resetParams'])
</script>
<style scoped></style>
