<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.num" clearable placeholder="请输入单据编号" />
                </el-form-item>
                <el-form-item label="项目名称" prop="project">
                    <el-input class="w-[280px]" v-model="queryParams.project" clearable placeholder="请输入项目名称" />
                </el-form-item>
                <el-form-item label="项目编号" prop="project_num">
                    <el-input class="w-[280px]" v-model="queryParams.project_num" 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 :data="pager.lists">
                    <el-table-column type="selection" width="55" />
                    <el-table-column label="单据编号" prop="num" show-overflow-tooltip />
                    <el-table-column label="项目名称" prop="projectInfo.project_name" show-overflow-tooltip />
                    <el-table-column label="项目编号" prop="projectInfo.project_num" show-overflow-tooltip />
                    <el-table-column label="部门负责人" prop="bm_master" show-overflow-tooltip />
                    <el-table-column label="委托单位" prop="wt_unit" show-overflow-tooltip />
                    <el-table-column label="项目负责人" prop="xm_master" show-overflow-tooltip />
                    <el-table-column label="实际开始日期" prop="start_date" show-overflow-tooltip />
                    <el-table-column label="实际结束日期" prop="end_date" show-overflow-tooltip />
                    <el-table-column label="工期（天）" prop="duration" show-overflow-tooltip />
                    <el-table-column label="工时" prop="working_hours" show-overflow-tooltip />
                    <el-table-column label="累计已完成进度（%）" prop="done_progress" show-overflow-tooltip />
                    <el-table-column label="本阶段完成进度(%)" prop="bjd_progress" show-overflow-tooltip />
                    <el-table-column label="登记人" prop="djr" show-overflow-tooltip />
                    <el-table-column label="登记时间" prop="apptime" show-overflow-tooltip />
                    <el-table-column label="形象进度描述" prop="jdms" 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="jianliProjectProgressReportLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiJianliProjectProgressReportLists, apiJianliProjectProgressReportDelete, apiJianliProjectProgressReportDetail } from '@/api/jianli_project_progress_report'

// 是否显示编辑框


// 查询条件
const queryParams = reactive({
    num: '',
    project: '',
    project_num: '',
    datas: '',
})

// 选中数据


// 获取字典数据
const { dictData } = useDictData('')

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




getLists()
</script>

