<template>
    <div>
        <el-card class="!border-none mb-4" shadow="never">
            <el-form class="mb-[-16px]" :model="queryParams" inline>
                <el-form-item label="合同名称" prop="num">
                    <el-input class="w-[280px]" v-model="queryParams.contract_name" clearable placeholder="请输入单据编号" />
                </el-form-item>
                <el-form-item label="项目名称" prop="project">
                    <el-input class="w-[280px]" v-model="queryParams.project_name" clearable placeholder="请输入项目名称" />
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="resetPage">查询</el-button>
                    <el-button @click="resetParams">重置</el-button>
                    <!-- <export-data class="ml-2.5" :fetch-fun="apiJianliProjectProgressReportLists" :params="queryParams"
                        :page-size="pager.size" /> -->
                </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">
                    <el-table-column type="selection" width="55" />
                    <el-table-column label="项目编号" prop="project_num" show-overflow-tooltip />
                    <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
                    <el-table-column label="关联合同" prop="contract_name" show-overflow-tooltip />
                    <el-table-column label="咨询类型" prop="types" show-overflow-tooltip />
                    <el-table-column label="行业" prop="industry_nature" show-overflow-tooltip />
                    <el-table-column label="项目负责人" prop="project_director" show-overflow-tooltip />
                    <el-table-column label="委托单位" prop="aunit" show-overflow-tooltip />
                    <el-table-column label="所在省份" prop="province" show-overflow-tooltip />
                    <el-table-column label="所在市区" prop="city" show-overflow-tooltip />
                    <!-- <el-table-column label="进度状态" prop="working_hours" show-overflow-tooltip /> -->
                    <el-table-column label="计划进度" prop="working_hours" show-overflow-tooltip align='center'>
                        <el-table-column label="计划开始日期" prop="starting" show-overflow-tooltip />
                        <el-table-column label="计划结束日期" prop="endtime" show-overflow-tooltip />
                        <el-table-column label="计划工期（天）" prop="jhgq" show-overflow-tooltip />
                    </el-table-column>
                    <el-table-column label="实际进度" prop="working_hours" show-overflow-tooltip align='center'>
                        <el-table-column label="实际开始日期" prop="actual_starting" show-overflow-tooltip />
                        <el-table-column label="实际结束日期" prop="actual_endtime" show-overflow-tooltip />
                        <el-table-column label="实际工期（天）" prop="duration" show-overflow-tooltip />
                        <el-table-column label="已完成进度（%）" prop="done_progress" show-overflow-tooltip />
                    </el-table-column>
                </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="jianliProjectProgressReportLists">
import { usePaging } from '@/hooks/usePaging'
import { apiproject_schedule_statistics } from '@/api/data_report'

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


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




getLists()
</script>
