<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 border :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>
            </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>
