<template>
    <div>
        <el-card class="!border-none mb-4" shadow="never">
            <el-form class="mb-[-16px]" :model="queryParams" inline>
                <el-form-item label="回收日期" prop="recovery_date">
                    <el-date-picker class="flex-1 !flex" v-model="queryParams.recovery_date" clearable type="date"
                        value-format="YYYY-MM-DD" placeholder="请选择回收日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item label="录入人" prop="create_user">
                    <el-input class="w-[250px]" v-model="queryParams.create_user" clearable placeholder="请输入录入人" />
                </el-form-item>

                <el-form-item>
                    <el-button type="primary" @click="resetPage">查询</el-button>
                    <el-button @click="resetParams">重置</el-button>
                </el-form-item>
            </el-form>
        </el-card>
        <el-card class="!border-none" v-loading="pager.loading" shadow="never">
            <div class="mt-4">
                <el-table border :data="pager.lists" @selection-change="handleSelectionChange">
                    <el-table-column type="selection" width="55" />
                    <el-table-column label="序号" type="index" width="55" />
                    <el-table-column label="回收单据" prop="contract_code" />
                    <el-table-column label="合同名称" prop="contract_name" />
                    <el-table-column label="履约金到期时间" prop="performance_money_expiration_time" />
                    <el-table-column label="履约金金额" prop="performance_money" show-overflow-tooltip />
                    <el-table-column label="回收金额" prop="recovery_amount" show-overflow-tooltip />
                    <el-table-column label="回收日期" prop="recovery_date" show-overflow-tooltip />
                    <el-table-column label="录入人" prop="applier" show-overflow-tooltip />
                    <el-table-column label="录入日期" prop="" show-overflow-tooltip />
                </el-table>
            </div>
            <div class="flex justify-end mt-4">
                <pagination v-model="pager" @change="getLists" />
            </div>
        </el-card>

    </div>
</template>

<script lang="ts" setup name="bidDocumentExaminationLists">
import { usePaging } from '@/hooks/usePaging'
import { apiperformance_money_recovery_search } from '@/api/financial_bid_statistics'
import feedback from '@/utils/feedback'




// 查询条件
const queryParams = reactive({
    recovery_date: '',
    create_user: '',
})

// 选中数据
const selectData = ref<any[]>([])

// 表格选择后回调事件
const handleSelectionChange = (val: any[]) => {
    selectData.value = val.map(({ id }) => id)
}


// 分页相关
const { pager, getLists, resetParams, resetPage } = usePaging({
    fetchFun: apiperformance_money_recovery_search,
    params: queryParams
})







getLists()
</script>
