
<template>
    <div class="detail-popup">
        <popup ref="popupRef" title="项目立项详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
            <el-form ref="formRef" :model="formData" label-width="auto">
                <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
                    <el-tab-pane label="概况" name="demo-1">


                        <el-descriptions :column="3" title="基本信息" border>
                            <el-descriptions-item label="组织名称" label-align="left" align="left" label-class-name="my-label">{{ formData.org_name }}</el-descriptions-item>
                            <el-descriptions-item label="部门名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.dept_name }}</el-descriptions-item>
                            <el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label">{{ formData.name }}</el-descriptions-item>
                            <el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_code }}</el-descriptions-item>
                            <el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.custom_name }}</el-descriptions-item>
                            <el-descriptions-item label="项目状态" label-align="left" align="left" label-class-name="my-label">
                                {{ formData.status_text }}
                            </el-descriptions-item>
                            <el-descriptions-item label="项目类型" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_type_name }}</el-descriptions-item>
                            <el-descriptions-item label="立项日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.create_time }}</el-descriptions-item>
                            <el-descriptions-item label="项目所在地" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_address }}</el-descriptions-item>
                            <el-descriptions-item label="战略意义" label-align="left" align="left" label-class-name="my-label"> {{ formData.strategic_significance_text }}</el-descriptions-item>
                            <el-descriptions-item label="所属行业" label-align="left" align="left" label-class-name="my-label"> {{ formData.industry_text }}</el-descriptions-item>
                            <el-descriptions-item label="单位性质" label-align="left" align="left" label-class-name="my-label"> {{ formData.unit_nature_text }}</el-descriptions-item>
                            <el-descriptions-item label="招标方式" label-align="left" align="left" label-class-name="my-label"> {{ formData.bidding_method_text }}</el-descriptions-item>
                            <el-descriptions-item label="投标时间" label-align="left" align="left" label-class-name="my-label"> {{ formData.bidding_time }}</el-descriptions-item>
                            <el-descriptions-item label="预计工期" label-align="left" align="left" label-class-name="my-label"> {{ formData.estimated_construction }}</el-descriptions-item>
                            <el-descriptions-item label="项目估算(万元)" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_estimation }}</el-descriptions-item>
                            <el-descriptions-item label="项目估算(外币)" label-align="left" align="left" label-class-name="my-label"> {{ formData.name }}</el-descriptions-item>
                            <el-descriptions-item label="联系人" label-align="left" align="left" label-class-name="my-label"> {{ formData.contacts }}</el-descriptions-item>
                            <el-descriptions-item label="联系人部门" label-align="left" align="left" label-class-name="my-label"> {{ formData.department }}</el-descriptions-item>
                            <el-descriptions-item label="联系人职位" label-align="left" align="left" label-class-name="my-label"> {{ formData.position }}</el-descriptions-item>
                            <el-descriptions-item label="关系度" label-align="left" align="left" label-class-name="my-label"> {{ formData.telephone }}</el-descriptions-item>
                            <el-descriptions-item label="发现时间" label-align="left" align="left" label-class-name="my-label"> {{ formData.discovery_time }}</el-descriptions-item>
                            <el-descriptions-item label="信息来源" label-align="left" align="left" label-class-name="my-label"> {{ formData.information_sources_text }}</el-descriptions-item>
                            <el-descriptions-item label="负责人" label-align="left" align="left" label-class-name="my-label"> {{ formData.person }}</el-descriptions-item>
                            <el-descriptions-item label="项目内容" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_content }}</el-descriptions-item>
                            <el-descriptions-item label="竞争对手" label-align="left" align="left" label-class-name="my-label"> {{ formData.competitor }}</el-descriptions-item>
                            <el-descriptions-item label="项目建设资金来源" label-align="left" align="left" label-class-name="my-label"> {{ formData.construction_funds_sources_text }}</el-descriptions-item>
                            <el-descriptions-item label="建设单位付款方式" label-align="left" align="left" label-class-name="my-label"> {{ formData.construction_payment_method }}</el-descriptions-item>
                            <el-descriptions-item label="建设单位财务状况" label-align="left" align="left" label-class-name="my-label"> {{ formData.construction_financial_status_text }}</el-descriptions-item>
                            <el-descriptions-item label="建设单位对我方认可度" label-align="left" align="left" label-class-name="my-label"> {{ formData.construction_recognition_text }}</el-descriptions-item>
                            <el-descriptions-item label="我方对建设单位认可度" label-align="left" align="left" label-class-name="my-label"> {{ formData.my_construction_recognition_text }}</el-descriptions-item>
                            <!-- <el-descriptions-item label="项目开始日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.notes }}</el-descriptions-item>
                            <el-descriptions-item label="项目交付日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.notes }}</el-descriptions-item> -->





                            <el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
                                <div v-if="formData.annex && formData.annex.length > 0">
                                    <div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
                                        <a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">文件{{ index + 1 }} 查看</a>
                                    </div>
                                </div>
                                <div v-else>
                                    暂无文件
                                </div>
                            </el-descriptions-item>


                        </el-descriptions>

                    </el-tab-pane>
                    <el-tab-pane label="商机" name="demo-2">
                        <div class="tit">项目跟进</div>
                        <div>
                            <el-table :data="tableData1" stripe style="width: 100%">
                                <el-table-column label="主题" prop='theme' width="180" />
                                <el-table-column label="日期" prop='follow_date' width="180" />
                                <el-table-column label="方案内容" prop='solution_content' />
                                <el-table-column label="类型" prop='follow_type_text' />
                                <el-table-column label="执行人" prop='executor' />
                                <el-table-column label="阶段" prop='follow_stage_text' />
                                <el-table-column label="状态" prop='follow_status_text' />
                                <el-table-column label="项目把握度" prop='project_assurance_text' />
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager1.page_no" v-model:page-size="pager1.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
                        </div>

                        <div class="tit">客户需求</div>
                        <div>
                            <el-table :data="tableData2" stripe style="width: 100%">
                                <el-table-column label="需求主题" prop='theme' width="180" />
                                <el-table-column label="重要程度" prop='importance_text' width="180" />
                                <el-table-column label="记录时间" prop='recording_time' />
                                <el-table-column label="需求内容" prop='demand_content' />
                                <el-table-column label="附件" prop="annex" show-overflow-tooltip>
                                    <template #default="{ row }">
                                        <div v-if="row.annex && row.annex.length > 0">
                                            <div v-for="(item, i) in row.annex " :key='i'>
                                                <el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
                                            </div>
                                        </div>
                                        <div v-else>
                                            暂无文件
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager2.page_no" v-model:page-size="pager2.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total1" @size-change="handleSizeChange2" @current-change="handleCurrentChange2" />
                        </div>

                        <div class="tit">解决方案</div>
                        <div>
                            <el-table :data="tableData3" stripe style="width: 100%">
                                <el-table-column label="解决方案主题" prop='customer_demand_name' width="180" />
                                <el-table-column label="提交时间" prop='submission_time' width="180" />
                                <el-table-column label="方案内容" prop='solution_content' />
                                <el-table-column label="客户反馈" prop='customer_feedback' />
                                <el-table-column label="附件" prop="annex" show-overflow-tooltip>
                                    <template #default="{ row }">
                                        <div v-if="row.annex && row.annex.length > 0">
                                            <div v-for="(item, i) in row.annex " :key='i'>
                                                <el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
                                            </div>
                                        </div>
                                        <div v-else>
                                            暂无文件
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager3.page_no" v-model:page-size="pager3.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total2" @size-change="handleSizeChange3" @current-change="handleCurrentChange3" />
                        </div>

                        <div class="tit">项目概算</div>
                        <div>
                            <el-table :data="tableData4" stripe style="width: 100%">
                                <el-table-column label="概算来源" prop='estimate_source_text' width="180" />
                                <el-table-column label="制单人" prop='create_user' width="180" />
                                <el-table-column label="报价日期" prop='quotation_date' />
                                <el-table-column label="技术人员" prop='technician_name' width="180" />
                                <el-table-column label="概算金额(万元)" prop='estimate_amount' width="180" />
                                <el-table-column label="要求" prop='ask' />
                                <el-table-column label="附件" prop="annex" show-overflow-tooltip>
                                    <template #default="{ row }">
                                        <div v-if="row.annex && row.annex.length > 0">
                                            <div v-for="(item, i) in row.annex " :key='i'>
                                                <el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
                                            </div>
                                        </div>
                                        <div v-else>
                                            暂无文件
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager4.page_no" v-model:page-size="pager4.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total3" @size-change="handleSizeChange4" @current-change="handleCurrentChange4" />
                        </div>

                        <div class="tit">竞争对手</div>
                        <div>
                            <el-table :data="tableData5" stripe style="width: 100%">
                                <el-table-column label="竞争对手名称" prop='competitor_name' width="180" />
                                <el-table-column label="竞争对手联系人" prop='competitor_contacts' width="180" />
                                <el-table-column label="联系人电话" prop='competitor_contacts_phone' />
                                <el-table-column label="竞争能力" prop='competitive_power' />
                                <el-table-column label="竞争对手优势" prop='competitor_advantages' />
                                <el-table-column label="竞争对手劣势" prop='competitor_disadvantages' />
                                <el-table-column label="备注" prop='remark' />
                                <el-table-column label="附件" prop="annex" show-overflow-tooltip>
                                    <template #default="{ row }">
                                        <div v-if="row.annex && row.annex.length > 0">
                                            <div v-for="(item, i) in row.annex " :key='i'>
                                                <el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
                                            </div>
                                        </div>
                                        <div v-else>
                                            暂无文件
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager5.page_no" v-model:page-size="pager5.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total4" @size-change="handleSizeChange5" @current-change="handleCurrentChange5" />
                        </div>

                    </el-tab-pane>
                    <el-tab-pane label="投标" name="demo-3">
                        <div class="tit">投标决策</div>
                        <div>
                            <el-table :data="tableData6" stripe style="width: 100%">
                                <el-table-column label="流程编号" prop='code' width="180" />
                                <el-table-column label="项目估算(万元)" prop='project_estimation' width="180" />
                                <el-table-column label="资金来源" prop='bidding_project_fund_source' />
                                <el-table-column label="投标时间" prop='bidding_time' />
                                <el-table-column label="招标方式" prop='bid_type' />
                                <el-table-column label="有无保证金" prop='is_margin' />
                                <el-table-column label="保证金金额" prop='margin_amount' />
                                <el-table-column label="开标日期" prop='bid_opening_date' />
                                <el-table-column label="项目把握度" prop='project_assurance' />
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager6.page_no" v-model:page-size="pager6.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total5" @size-change="handleSizeChange6" @current-change="handleCurrentChange6" />
                        </div>

                        <div class="tit">购买标书</div>
                        <div>
                            <el-table :data="tableData7" stripe style="width: 100%">
                                <el-table-column label="流程编号" prop='code' width="180" />
                                <el-table-column label="投标公司名称" prop='bid_company_name' width="180" />
                                <el-table-column label="招标公司名称" prop='invite_tenders_company_name' />
                                <el-table-column label="标书编号" prop='bid_document_no' />
                                <el-table-column label="购买人员" prop='buyer' />
                                <el-table-column label="购买标书金额" prop='amount' />
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager7.page_no" v-model:page-size="pager7.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total6" @size-change="handleSizeChange7" @current-change="handleCurrentChange7" />
                        </div>

                        <div class="tit">标书审查</div>
                        <div>
                            <el-table :data="tableData8" stripe style="width: 100%">
                                <el-table-column label="流程编号" prop='code' width="180" />
                                <el-table-column label="标书编号" prop='bid_document_no' width="180" />
                                <el-table-column label="购买人员" prop='buyer' />
                                <el-table-column label="投标公司名称" prop='bid_company_name' />
                                <el-table-column label="投标时间" prop='bidding_time' />
                                <el-table-column label="开标日期" prop='bid_opening_date' />
                                <el-table-column label="总金额" prop='total_amount' />
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager8.page_no" v-model:page-size="pager8.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total7" @size-change="handleSizeChange8" @current-change="handleCurrentChange8" />
                        </div>

                        <div class="tit">投标结果</div>
                        <div>
                            <el-table :data="tableData9" stripe style="width: 100%">
                                <el-table-column label="投标编号" prop='bid_document_examination_code' width="180" />
                                <el-table-column label="投标时间" prop='bidding_time' width="180" />
                                <el-table-column label="开标日期" prop='bid_opening_date' />
                                <el-table-column label="是否中标" prop='is_successful_text' width="180" />
                                <el-table-column label="中标单位" prop='bidder_company' width="180" />
                                <el-table-column label="中标金额" prop='bidder_amount' />

                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager9.page_no" v-model:page-size="pager9.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total8" @size-change="handleSizeChang9" @current-change="handleCurrentChange9" />
                        </div>

                        <div class="tit">投标保证金</div>
                        <div>
                            <el-table :data="tableData10" stripe style="width: 100%">
                                <el-table-column label="流程编号" prop='bidding_decision_code' width="180" />
                                <el-table-column label="投标时间" prop='bidding_time' width="180" />
                                <el-table-column label="预计退还时间" prop='refund_date' />
                                <el-table-column label="申请人" prop='applier' />
                                <el-table-column label="保证金金额	" prop='margin_amount' />
                                <el-table-column label="已退金额" prop='refund_amount' />
                                <el-table-column label="未退金额" prop='not_refund_amount' />
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager10.page_no" v-model:page-size="pager10.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total9" @size-change="handleSizeChange10" @current-change="handleCurrentChange10" />
                        </div>
                        <div class="tit">退投标保证金</div>
                        <div>
                            <el-table :data="tableData11" stripe style="width: 100%">
                                <el-table-column label="投标时间" prop='bidding_time' width="180" />
                                <el-table-column label="退款日期" prop='refund_date' width="180" />
                                <el-table-column label="账户编码" prop='bank_account_info.account_sn' />
                                <el-table-column label="开户银行" prop='bank_account_info.deposit_bank' />
                                <el-table-column label="退款金额" prop='refund_amount' />
                                <el-table-column label="客户名称" prop='custom_name' />
                                <el-table-column label="创建日期" prop='create_time' />
                            </el-table>
                        </div>
                        <div style="margin: 20px 0;">
                            <el-pagination v-model:current-page="pager11.page_no" v-model:page-size="pager11.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total10" @size-change="handleSizeChange11" @current-change="handleCurrentChange11" />
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="合同" name="demo-4">
                        <div class='tit'>主合同</div>
                        <div>
                            <el-table :data="tableData19" stripe style="width: 100%">
                                <el-table-column label="合同编号" prop='contract_name' width="180" />
                                <el-table-column label="合同名称" prop='contract_code' width="180" />
                                <el-table-column label="合同类型" prop='contract_type_text' />
                                <el-table-column label="负责人" prop='business_director_name' />
                                <el-table-column label="签约日期" prop='contract_date' />
                                <el-table-column label="合同金额" prop='amount' />
                                <el-table-column label="洽商金额" prop='negotiation_amount' />
                                <el-table-column label="实际合同金额" prop='reality_contract_amount' />
                                <el-table-column label="已回款" prop='returned_amount' />
                                <el-table-column label="未回款" prop='not_returned_amount' />
                                <el-table-column label="已开票" prop='invoicing_amount' />
                                <el-table-column label="未开票" prop='not_invoicing_amount' />
                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager19.page_no" v-model:page-size="pager19.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total18" @size-change="handleSizeChange19" @current-change="handleCurrentChange19" />
                        </div>
                        <div class='tit' style="margin: 20px 0;">合同洽商</div>
                        <div>
                            <el-table :data="tableData20" stripe style="width: 100%">
                                <el-table-column label="洽商编号" prop='negotiation_no' width="180" />
                                <el-table-column label="洽商单名称" prop='negotiation_name' width="180" />
                                <el-table-column label="合同编号" prop='contract_code' />
                                <el-table-column label="洽商类别" prop='negotiation_type' />
                                <el-table-column label="签约日期" prop='contract_date' />
                                <el-table-column label="业务负责人" prop='business_director' />
                                <el-table-column label="洽商金额" prop='negotiation_amount' />
                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager20.page_no" v-model:page-size="pager20.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total19" @size-change="handleSizeChange20" @current-change="handleCurrentChange20" />
                        </div>
                    </el-tab-pane>

                    <el-tab-pane label="预算" name="demo-5">
                        <div class='tit'>分包预算</div>
                        <div>
                            <el-table :data="tableData21" stripe style="width: 100%">
                                <el-table-column label="工作类型" prop='work_type' width="180" />
                                <el-table-column label="工作内容" prop='work_content' width="180" />
                                <el-table-column label="项目特征" prop='project_features' />
                                <el-table-column label="单位" prop='unit' />
                                <!-- <el-table-column label="首次预算量" prop='classification' />
                                <el-table-column label="预算调整量" prop='is_solve_text' /> -->
                                <el-table-column label="预算工作量" prop='num' />
                                <el-table-column label="单价" prop='price' />
                                <el-table-column label="金额" prop='amount' />
                                <el-table-column label="已分包量" prop='has_subcontract_num' />
                                <el-table-column label="剩余工作量" prop='residue_num' />
                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager21.page_no" v-model:page-size="pager21.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total20" @size-change="handleSizeChange21" @current-change="handleCurrentChange21" />
                        </div>

                    </el-tab-pane>
                    <el-tab-pane label="采购" name="demo-8">
                        <div class='tit'>采购合同</div>
                        <div>
                            <el-table :data="tableData26" stripe style="width: 100%">
                                <el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
                                <el-table-column label="供应商名称" prop="contract_name" show-overflow-tooltip />
                                <el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
                                <el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
                                <el-table-column label="合同金额" prop="contract_amount" show-overflow-tooltip />
                                <!-- <el-table-column label="实际合同金额" prop="negotiation_amount" show-overflow-tooltip /> -->
                                <el-table-column label="已付款金额" prop="has_pay_amount" show-overflow-tooltip />
                                <el-table-column label="未付款金额" prop="not_pay_amount" show-overflow-tooltip />
                                <el-table-column label="已开票金额" prop="invoice_amount" show-overflow-tooltip />
                                <el-table-column label="未开票金额" prop="not_invoice_amount" show-overflow-tooltip />
                                <el-table-column label="已入库数量" prop="has_storage_num" show-overflow-tooltip />
                                <el-table-column label="未入库数量" prop="not_storage_num" show-overflow-tooltip />
                                <el-table-column label="数量" prop="num" show-overflow-tooltip />
                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager26.page_no" v-model:page-size="pager26.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total25" @size-change="handleSizeChange26" @current-change="handleCurrentChange26" />
                        </div>

                    </el-tab-pane>
                    <el-tab-pane label="分包" name="demo-9">

                        <div class='tit'>分包合同</div>
                        <div>
                            <el-table :data="tableData27" stripe style="width: 100%">
                                <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
                                <el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
                                <el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
                                <el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
                                <el-table-column label="签订日期" prop="signing_date" show-overflow-tooltip />
                                <el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip />
                                <el-table-column label="合同金额" prop="contract_amount" show-overflow-tooltip />
                                <!-- <el-table-column label="税率" prop="tax_rate" show-overflow-tooltip /> -->
                                <el-table-column label="洽商金额" prop="negotiation_amount" show-overflow-tooltip />
                                <el-table-column label="不含税金额" prop="excluding_tax_amount" show-overflow-tooltip />
                                <el-table-column label="实际合同金额" prop="reality_contract_amount" show-overflow-tooltip />
                                <el-table-column label="已付款金额" prop="has_pay_amount" show-overflow-tooltip />
                                <el-table-column label="未付款金额" prop="not_pay_amount" show-overflow-tooltip />
                                <el-table-column label="已开票金额" prop="invoice_amount" show-overflow-tooltip />
                                <el-table-column label="未开票金额" prop="not_invoice_amount" show-overflow-tooltip />
                                <el-table-column label="已退款金额" prop="refund_amount" show-overflow-tooltip />
                                <el-table-column label="结算差异" prop="settlement_difference" show-overflow-tooltip />

                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager27.page_no" v-model:page-size="pager27.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total26" @size-change="handleSizeChange27" @current-change="handleCurrentChange27" />
                        </div>
                        <div class='tit' style="margin: 20px 0;">分包洽商</div>
                        <div>
                            <el-table :data="tableData28" stripe style="width: 100%">
                                <el-table-column label="洽商编号" prop="negotiation_no" show-overflow-tooltip />
                                <el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
                                <el-table-column label="洽商单名称" prop="negotiation_name" show-overflow-tooltip />
                                <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
                                <el-table-column label="项目编号" prop="project_code" show-overflow-tooltip />
                                <el-table-column label="供应商" prop="supplier_name" show-overflow-tooltip />
                                <el-table-column label="洽商类别" prop="negotiation_type_text" show-overflow-tooltip />
                                <el-table-column label="签订日期" prop="sign_date" show-overflow-tooltip />
                                <el-table-column label="洽商报价金额" prop="warranty_amount" show-overflow-tooltip />
                                <el-table-column label="洽商质保金额" prop="negotiation_amount" show-overflow-tooltip />
                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager28.page_no" v-model:page-size="pager28.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total27" @size-change="handleSizeChange28" @current-change="handleCurrentChange28" />
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="收款" name="demo-14">Task</el-tab-pane>
                    <el-tab-pane label="付款" name="demo-15">
                        <div class='tit'>收票记录</div>
                        <div>
                            <el-table :data="tableData22" stripe style="width: 100%">
                                <el-table-column label="开票日期" prop='invoicing_date' width="180" />
                                <el-table-column label="提交人" prop='commitor' width="180" />
                                <el-table-column label="发票类型" prop='invoice_type' />
                                <el-table-column label="发票编号" prop='invoice_no' width="180" />
                                <el-table-column label="发票税率(%)" prop='invoice_tax_rate' width="180" />
                                <el-table-column label="发票金额" prop='invoice_amount' />
                                <el-table-column label="不含税金额" prop='amount_excluding_tax' />
                                <el-table-column label="税额" prop='tax' />

                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager22.page_no" v-model:page-size="pager22.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total21" @size-change="handleSizeChange22" @current-change="handleCurrentChange22" />
                        </div>


                        <div class='tit' style="margin:20px 0">付款计划</div>
                        <div>
                            <el-table :data="tableData23" stripe style="width: 100%">
                                <el-table-column label="计划付款日期" prop='pay_date' width="180" />
                                <el-table-column label="期次" prop='period' width="180" />
                                <el-table-column label="状态" prop='status' />
                                <el-table-column label="金额" prop='amount' />
                                <el-table-column label="已付款" prop='competitor_advantages' />
                                <el-table-column label="未付款" prop='competitor_disadvantages' />
                                <el-table-column label="备注" prop='remark' />

                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager23.page_no" v-model:page-size="pager23.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total22" @size-change="handleSizeChange23" @current-change="handleCurrentChange23" />
                        </div>


                        <div class='tit' style="margin:20px 0">付款记录</div>
                        <div>
                            <el-table :data="tableData24" stripe style="width: 100%">
                                <el-table-column label="付款单号" prop='competitor_name' width="180" />
                                <el-table-column label="合同编号" prop='contract_no' width="180" />
                                <el-table-column label="供应商名称" prop='supplier_name' />
                                <el-table-column label="合同类型" prop='contract_type' />
                                <el-table-column label="期次" prop='period' />
                                <el-table-column label="付款日期" prop='pay_date' />
                                <el-table-column label="付款性质" prop='payment_natrue' />
                                <el-table-column label="付款方式" prop='pay_type' />
                                <el-table-column label="开票状态" prop='' />
                                <el-table-column label="付款金额" prop='amount' />

                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager24.page_no" v-model:page-size="pager24.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total23" @size-change="handleSizeChange24" @current-change="handleCurrentChange24" />
                        </div>


                        <div class='tit' style="margin:20px 0">退款记录</div>
                        <div>
                            <el-table :data="tableData25" stripe style="width: 100%">
                                <el-table-column label="合同编号" prop='contract_no' width="180" />
                                <el-table-column label="合同名称" prop='contract_nanme' width="180" />
                                <el-table-column label="供应商名称" prop='supplier_name' width="180" />
                                <el-table-column label="合同类型" prop='contract_type' width="180" />
                                <el-table-column label="退款日期" prop='refund_date' width="180" />
                                <el-table-column label="退款原因" prop='reason' />
                                <el-table-column label="退款方式" prop='refund_type' />
                                <el-table-column label="退款金额" prop='refund_amount' />

                            </el-table>
                        </div>

                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager25.page_no" v-model:page-size="pager25.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total24" @size-change="handleSizeChange25" @current-change="handleCurrentChange25" />
                        </div>


                    </el-tab-pane>
                    <el-tab-pane label="人力" name="demo-12">

                        <el-tabs v-model="active" class="demo-tabs">
                            <el-tab-pane label="项目人员" name="first-1">
                                <div>
                                    <el-table :data="tableData12" stripe style="width: 100%">
                                        <el-table-column label="姓名" prop='name' width="180" />
                                        <el-table-column label="身份证号" prop='idcard' width="180" />
                                        <el-table-column label="手机号" prop='mobile' />
                                        <el-table-column label="工种" prop='work_type_text' />
                                        <el-table-column label="人工单价" prop='unit_price' />
                                        <el-table-column label="每日生活费" prop=' ' />
                                        <el-table-column label="期初收入" prop='opening_income' />
                                        <el-table-column label="日结收入" prop='daily_income' />
                                        <el-table-column label="完工量收入" prop='work_income' />
                                        <el-table-column label="总收入" prop='total_income' />
                                        <el-table-column label="总支出" prop='pay_out' />
                                        <el-table-column label="余额" prop='balance' />
                                    </el-table>
                                </div>
                                <div style="margin: 20px 0;">
                                    <el-pagination v-model:current-page="pager12.page_no" v-model:page-size="pager12.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total11" @size-change="handleSizeChange12" @current-change="handleCurrentChange12" />
                                </div>

                            </el-tab-pane>
                            <el-tab-pane label="劳动合同" name="first-2">
                                <div>
                                    <el-table :data="tableData13" stripe style="width: 100%">
                                        <el-table-column label="姓名" prop='project_name' width="180" />
                                        <el-table-column label="身份证号" prop='person_idcard' width="180" />
                                        <el-table-column label="合同状态" prop='contract_status_text' />
                                        <el-table-column label="合同类别" prop='contract_type_text' />
                                        <el-table-column label="合同名称" prop='contract_title_text' />
                                        <el-table-column label="合同签定日期" prop='signing_date' />
                                        <el-table-column label="起始时间" prop='start_date' />
                                        <el-table-column label="终止时间" prop='end_date' />

                                        <el-table-column label="备注" prop='remark' />
                                        <el-table-column label="合同附件" prop="annex" show-overflow-tooltip>
                                            <template #default="{ row }">
                                                <div v-if="row.annex && row.annex.length > 0">
                                                    <div v-for="(item, i) in row.annex " :key='i'>
                                                        <el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
                                                    </div>
                                                </div>
                                                <div v-else>
                                                    暂无文件
                                                </div>
                                            </template>
                                        </el-table-column>

                                    </el-table>
                                </div>
                                <div style="margin: 20px 0;">
                                    <el-pagination v-model:current-page="pager13.page_no" v-model:page-size="pager13.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total12" @size-change="handleSizeChange13" @current-change="handleCurrentChange13" />
                                </div>
                            </el-tab-pane>
                            <el-tab-pane label="保险记录" name="first-3">
                                <div>
                                    <el-table :data="tableData14" stripe style="width: 100%">
                                        <el-table-column label="姓名" prop='project_name' width="180" />
                                        <el-table-column label="身份证号" prop='person_idcard' width="180" />
                                        <el-table-column label="投保日期" prop='insurance_date' />
                                        <el-table-column label="到期日期" prop='due_date' />
                                        <el-table-column label="保险种类" prop='type_text' />
                                        <el-table-column label="保单号" prop='insurance_no' />
                                        <el-table-column label="投保金额（万元）" prop='insured_amount' />
                                        <el-table-column label="保险公司" prop='insurance_company' />


                                    </el-table>
                                </div>
                                <div style="margin: 20px 0;">
                                    <el-pagination v-model:current-page="pager14.page_no" v-model:page-size="pager14.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total13" @size-change="handleSizeChange14" @current-change="handleCurrentChange14" />
                                </div>
                            </el-tab-pane>
                            <el-tab-pane label="项目考勤" name="first-4">

                                <div>
                                    <el-table :data="tableData15" stripe style="width: 100%">
                                        <el-table-column label="日记工单号" prop='attendance_code' width="180" />
                                        <el-table-column label="日期" prop='attendance_date' width="180" />
                                        <el-table-column label="出勤人数" prop='competitor_contacts_phone' />
                                        <el-table-column label="记工数量	" prop='work_record_num_total' />
                                        <el-table-column label="日工资合计" prop="daily_salary_total" show-overflow-tooltip />
                                        <el-table-column label="日生活费合计" prop="daily_living_total" show-overflow-tooltip />
                                        <el-table-column label="日补贴合计" prop="daily_subsidy_total" show-overflow-tooltip />
                                        <el-table-column label="日其它合计" prop="daily_other_total" show-overflow-tooltip />
                                        <el-table-column label="日收入合计" prop="daily_income_total" show-overflow-tooltip />

                                        <el-table-column label="备注" prop='remark' />

                                    </el-table>
                                </div>
                                <div style="margin: 20px 0;">
                                    <el-pagination v-model:current-page="pager15.page_no" v-model:page-size="pager15.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total14" @size-change="handleSizeChange15" @current-change="handleCurrentChange15" />
                                </div>
                            </el-tab-pane>
                            <el-tab-pane label="考勤明细" name="first-5">
                                <div>
                                    <el-table :data="tableData16" stripe style="width: 100%">
                                        <el-table-column label="日记工单号" prop='attendance_code' width="180" />
                                        <el-table-column label="日期" prop='attendance_date' width="180" />
                                        <el-table-column label="姓名" prop="person_name" show-overflow-tooltip />
                                        <el-table-column label="身份证号" prop="person_idcard" show-overflow-tooltip />
                                        <el-table-column label="工种" prop="work_type_text" show-overflow-tooltip />
                                        <el-table-column label="上班时间" prop="work_start_time" show-overflow-tooltip />
                                        <el-table-column label="下班时间" prop="work_end_time" show-overflow-tooltip />
                                        <el-table-column label="记工数量" prop="work_record_num" show-overflow-tooltip />
                                        <el-table-column label="日工资" prop="daily_salary" show-overflow-tooltip />
                                        <el-table-column label="日生活费" prop="daily_living" show-overflow-tooltip />
                                        <el-table-column label="日补贴" prop="daily_subsidy" show-overflow-tooltip />
                                        <el-table-column label="日其它" prop="daily_other" show-overflow-tooltip />
                                        <el-table-column label="日收入" prop="daily_income" show-overflow-tooltip />
                                        <el-table-column label="备注" prop="remark" show-overflow-tooltip />

                                    </el-table>
                                </div>
                                <div style="margin: 20px 0;">
                                    <el-pagination v-model:current-page="pager16.page_no" v-model:page-size="pager16.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total15" @size-change="handleSizeChange16" @current-change="handleCurrentChange16" />
                                </div>
                            </el-tab-pane>
                            <el-tab-pane label="工资付款" name="first-6">
                                <div>
                                    <el-table :data="tableData17" stripe style="width: 100%">
                                        <el-table-column label="工资付款单号" prop='payment_code' width="180" />
                                        <el-table-column label="日期" prop='apply_date' width="180" />
                                        <el-table-column label="姓名" prop='person_name' />
                                        <el-table-column label="身份证号" prop='person_idcard' />
                                        <el-table-column label="工种" prop='person_work_type_text' />
                                        <el-table-column label="总收入" prop='total_income' />
                                        <el-table-column label="总支出" prop='total_pay_out' />
                                        <el-table-column label="未发放" prop='balance' />
                                        <el-table-column label="本次付款金额" prop='apply_amount' />
                                        <el-table-column label="备注" prop='remark' />
                                    </el-table>
                                </div>
                                <div style="margin: 20px 0;">
                                    <el-pagination v-model:current-page="pager17.page_no" v-model:page-size="pager17.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total16" @size-change="handleSizeChange17" @current-change="handleCurrentChange17" />
                                </div>
                            </el-tab-pane>
                        </el-tabs>



                    </el-tab-pane>
                    <el-tab-pane label="计划" name="demo-6">Config</el-tab-pane>
                    <el-tab-pane label="材料" name="demo-7">Role</el-tab-pane>


                    <el-tab-pane label="进度" name="demo-10">Role</el-tab-pane>
                    <el-tab-pane label="任务" name="demo-11">Task</el-tab-pane>

                    <el-tab-pane label="机具" name="demo-13">Task</el-tab-pane>
                    <el-tab-pane label="费用" name="demo-16">Task</el-tab-pane>
                    <el-tab-pane label="文档" name="demo-17">Task</el-tab-pane>
                    <el-tab-pane label="结算" name="demo-18">Task</el-tab-pane>
                    <el-tab-pane label="售后" name="demo-19">
                        <div>
                            <el-table :data="tableData18" stripe style="width: 100%">
                                <el-table-column label="工单编号" prop='custom_service_code' width="180" />
                                <el-table-column label="合同编号" prop='contract_code' width="180" />
                                <el-table-column label="投诉主题" prop='name' />
                                <el-table-column label="日期" prop='date' />
                                <el-table-column label="分类" prop='classification' />
                                <el-table-column label="是否解决" prop='is_solve_text' />
                                <el-table-column label="解决日期" prop='done_date' />

                            </el-table>
                        </div>
                        <div style="margin: 10px 0;">
                            <el-pagination v-model:current-page="pager18.page_no" v-model:page-size="pager18.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total17" @size-change="handleSizeChange18" @current-change="handleCurrentChange18" />
                        </div>


                    </el-tab-pane>
                    <el-tab-pane label="统计" name="demo-20">Task</el-tab-pane>

                </el-tabs>
            </el-form>
        </popup>
    </div>
</template>

<script lang="ts" setup name="customdetail">

import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiCustomDetail } from '@/api/custom'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import type { TabsPaneContext } from 'element-plus'
import { apiCustomerDemandLists } from '@/api/customer_demand'
import { apiProjectFollowUpLists } from '@/api/project_follow_up'
import { apiCustomerDemandSolutionLists } from '@/api/customer_demand_solution'
import { apiProjectEstimateLists } from '@/api/project_estimate'
import { apiCompetitorLists } from '@/api/competitor'
import { apiBidBiddingDecisionLists } from '@/api/bid_bidding_decision'
import { apiBidBuyBiddingDocumentLists } from '@/api/bid_buy_bidding_document'
import { apiBidResultLists } from '@/api/bid_result'
import { apiBidDocumentExaminationLists } from '@/api/bid_document_examination'
import { bidapplyLists } from '@/api/bidbbond'
import { bidrefundLists } from '@/api/refundbidDeposit'
import { projectpersonnelLists } from '@/api/project_personnel'
import { projectlaborcontractLists } from '@/api/project_labor_contract'
import { insurancemanagementLists } from '@/api/project_insurance_management'
import { attendanceRecordLists } from '@/api/project_attendance_record'
import { attendancedetailLists } from '@/api/project_attendance_detail'
import { projectsalaryDetailLists } from '@/api/project_salary_detail'
import { apiCustomServiceLists } from '@/api/custom_service'
import { apiContractLists } from '@/api/contract'
import { apiContractNegotiationLists } from '@/api/contract_negotiation'
import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail'

import { paymentplanLists } from '@/api/paymentplan'
import { apifinancereceiptLists } from '@/api/receiptrecord'
import { paymentapplyLists } from '@/api/paymentrequest'
import { apiFinancerefundLists } from '@/api/refundrecord'
import { apiProcurementContractLists } from '@/api/procurement_contract'

import { apiSubcontractingContractLists } from '@/api/subcontracting_contract'

import { apinegotiationLists } from '@/api/subcontractor'
const active = ref('first-1')
const activeName = ref('demo-1')
const handleClick = (tab: TabsPaneContext, event: Event) => {
    console.log(tab, event)
}
defineProps({
    dictData: {
        type: Object as PropType<Record<string, any[]>>,
        default: () => ({})
    }
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const formDataannex = reactive([])
const datas = reactive({
    provinceOptions: [],
    cityOptions: [],
    areaOptions: [],
});

const pager1 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager2 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager3 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager4 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager5 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager6 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager7 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager8 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager9 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager10 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager11 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager12 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager13 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager14 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})

const pager15 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager16 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})

const pager17 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager18 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})

const pager19 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})

const pager20 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})

const pager21 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})


const pager22 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})


const pager23 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})


const pager24 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager25 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager26 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager27 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager28 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager29 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})
const pager30 = reactive({
    page_size: 10,
    page_no: 1,
    project_id: ""
})



const total = ref(0)
const total1 = ref(0)
const total2 = ref(0)
const total3 = ref(0)
const total4 = ref(0)
const total5 = ref(0)
const total6 = ref(0)
const total7 = ref(0)
const total8 = ref(0)
const total9 = ref(0)
const total10 = ref(0)
const total11 = ref(0)
const total12 = ref(0)
const total13 = ref(0)
const total14 = ref(0)
const total15 = ref(0)
const total16 = ref(0)
const total17 = ref(0)
const total18 = ref(0)
const total19 = ref(0)
const total20 = ref(0)
const total21 = ref(0)

const total22 = ref(0)
const total23 = ref(0)

const total24 = ref(0)

const total25 = ref(0)
const total26 = ref(0)
const total27 = ref(0)
const total28 = ref(0)
const tableData1 = ref([])
const tableData2 = ref([])
const tableData3 = ref([])
const tableData4 = ref([])
const tableData5 = ref([])
const tableData6 = ref([])
const tableData7 = ref([])
const tableData8 = ref([])
const tableData9 = ref([])
const tableData10 = ref([])
const tableData11 = ref([])
const tableData12 = ref([])
const tableData13 = ref([])
const tableData14 = ref([])
const tableData15 = ref([])
const tableData16 = ref([])
const tableData17 = ref([])
const tableData18 = ref([])
const tableData19 = ref([])
const tableData20 = ref([])

const tableData21 = ref([])
const tableData22 = ref([])

const tableData23 = ref([])

const tableData24 = ref([])
const tableData25 = ref([])

const tableData26 = ref([])
const tableData27 = ref([])
const tableData28 = ref([])
const tableData29 = ref([])
const tableData30 = ref([])

// 表单数据
const formData = reactive({

})

//条数
const handleSizeChange1 = (val: number) => {
    pager1.page_size = val
    followUpLists()
}
const handleSizeChange2 = (val: number) => {

    pager2.page_size = val
    demandList()
}
const handleSizeChange3 = (val: number) => {

    pager3.page_size = val
    solutionLists()
}
const handleSizeChange4 = (val: number) => {

    pager4.page_size = val
    estimateLists()
}
const handleSizeChange5 = (val: number) => {

    pager5.page_size = val
    competitorLists()
}
const handleSizeChange6 = (val: number) => {
    pager6.page_size = val
    decisionLists()
}
const handleSizeChange7 = (val: number) => {

    pager7.page_size = val
    buydocumentLists()
}
const handleSizeChange8 = (val: number) => {

    pager8.page_size = val
    examinationLists()
}
const handleSizeChange9 = (val: number) => {

    pager9.page_size = val
    bidResultLists()
}
const handleSizeChange10 = (val: number) => {

    pager10.page_size = val
    applyLists()
}

const handleSizeChange11 = (val: number) => {

    pager11.page_size = val

    refundLists()
}

const handleSizeChange12 = (val: number) => {

    pager12.page_size = val

    personnelLists()
}

const handleSizeChange13 = (val: number) => {

    pager13.page_size = val

    laborcontractLists()
}

const handleSizeChange14 = (val: number) => {

    pager14.page_size = val

    insurancemanagementlists()
}


const handleSizeChange15 = (val: number) => {

    pager15.page_size = val

    attendanceRecord()
}

const handleSizeChange16 = (val: number) => {

    pager16.page_size = val

    attendancedetail()

}
const handleSizeChange17 = (val: number) => {

    pager16.page_size = val

    attendancedetail()

}


const handleSizeChange18 = (val: number) => {

    pager18.page_size = val

    customServiceLists()

}
const handleSizeChange19 = (val: number) => {

    pager19.page_size = val

    contractLists()
}

const handleSizeChange20 = (val: number) => {

    pager20.page_size = val
    contcractNegotiationLists()
}
const handleSizeChange21 = (val: number) => {

    pager21.page_size = val

    customServiceLists()
}

const handleSizeChange22 = (val: number) => {

    pager22.page_size = val

    customServiceLists()
}
const handleSizeChange23 = (val: number) => {

    pager23.page_size = val

    customServiceLists()
}

const handleSizeChange24 = (val: number) => {

    pager24.page_size = val

    customServiceLists()
}

const handleSizeChange25 = (val: number) => {

    pager25.page_size = val

    customServiceLists()
}

const handleSizeChange26 = (val: number) => {

    pager26.page_size = val

    customServiceLists()
}


const handleSizeChange27 = (val: number) => {

    pager27.page_size = val

    customServiceLists()
}


const handleSizeChange28 = (val: number) => {

    pager28.page_size = val

    customServiceLists()
}


const handleSizeChange29 = (val: number) => {

    pager29.page_size = val

    customServiceLists()
}




const handleSizeChange30 = (val: number) => {

    pager30.page_size = val

    customServiceLists()
}



//分页
const handleCurrentChange1 = (val: number) => {
    console.log(`current page: ${val}`)
    pager1.page_no = val
    followUpLists()
}
const handleCurrentChange2 = (val: number) => {
    console.log(`current page: ${val}`)
    pager2.page_no = val
    demandList()
}
const handleCurrentChange3 = (val: number) => {
    console.log(`current page: ${val}`)
    pager3.page_no = val
    solutionLists()
}
const handleCurrentChange4 = (val: number) => {
    console.log(`current page: ${val}`)
    pager4.page_no = val
    estimateLists()
}
const handleCurrentChange5 = (val: number) => {
    pager5.page_no = val
    console.log(`current page: ${val}`)
    decisionLists()
}
const handleCurrentChange6 = (val: number) => {
    pager6.page_no = val
    console.log(`current page: ${val}`)
    decisionLists()
}
const handleCurrentChange7 = (val: number) => {
    pager7.page_no = val
    console.log(`current page: ${val}`)
    buydocumentLists()
}
const handleCurrentChange8 = (val: number) => {
    pager8.page_no = val
    console.log(`current page: ${val}`)
    examinationLists()
}
const handleCurrentChange9 = (val: number) => {
    pager9.page_no = val
    console.log(`current page: ${val}`)
    bidResultLists()
}
const handleCurrentChange10 = (val: number) => {
    pager10.page_no = val
    console.log(`current page: ${val}`)
    applyLists()
}
const handleCurrentChange11 = (val: number) => {
    pager11.page_no = val
    console.log(`current page: ${val}`)

    refundLists()
}

const handleCurrentChange12 = (val: number) => {
    pager12.page_no = val
    console.log(`current page: ${val}`)
    personnelLists()
}
const handleCurrentChange13 = (val: number) => {
    pager13.page_no = val
    console.log(`current page: ${val}`)

    laborcontractLists()
}

const handleCurrentChange14 = (val: number) => {
    pager14.page_no = val
    console.log(`current page: ${val}`)

    insurancemanagementlists()
}

const handleCurrentChange15 = (val: number) => {
    pager15.page_no = val
    console.log(`current page: ${val}`)

    attendanceRecord()
}
const handleCurrentChange16 = (val: number) => {
    pager16.page_no = val
    console.log(`current page: ${val}`)

    attendancedetail()
}

const handleCurrentChange17 = (val: number) => {
    pager17.page_no = val
    console.log(`current page: ${val}`)

    salarypaymentLists()

}

const handleCurrentChange18 = (val: number) => {
    pager18.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}

const handleCurrentChange19 = (val: number) => {
    pager19.page_no = val
    console.log(`current page: ${val}`)

    contractLists()
}


const handleCurrentChange20 = (val: number) => {
    pager20.page_no = val
    console.log(`current page: ${val}`)

    contcractNegotiationLists()
}

const handleCurrentChange21 = (val: number) => {
    pager21.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}


const handleCurrentChange22 = (val: number) => {
    pager22.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}


const handleCurrentChange23 = (val: number) => {
    pager23.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}

const handleCurrentChange24 = (val: number) => {
    pager24.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}


const handleCurrentChange25 = (val: number) => {
    pager25.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}
const handleCurrentChange26 = (val: number) => {
    pager26.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}


const handleCurrentChange27 = (val: number) => {
    pager27.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}


const handleCurrentChange28 = (val: number) => {
    pager28.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}

const handleCurrentChange29 = (val: number) => {
    pager29.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}


const handleCurrentChange30 = (val: number) => {
    pager30.page_no = val
    console.log(`current page: ${val}`)

    customServiceLists()
}













//获取客户跟进进路
const followUpLists = () => {
    apiProjectFollowUpLists(pager5).then((res) => {
        tableData1.value = res.lists

        total.value = res.count

    })
}
//获取客户需求列表
const demandList = () => {
    apiCustomerDemandLists(pager5).then((res) => {
        tableData1.value = res.lists
        total1.value = res.count

    })
}


// 解决方案列表
const solutionLists = () => {
    apiCustomerDemandSolutionLists(pager5).then((res) => {
        tableData3.value = res.lists
        total2.value = res.count

    })
}

// 获取项目概算列表
const estimateLists = () => {
    apiProjectEstimateLists(pager4).then((res) => {
        tableData4.value = res.lists
        total3.value = res.count
    })
}

// 获取竞争对手列表
const competitorLists = () => {
    apiCompetitorLists(pager5).then((res) => {
        tableData5.value = res.lists
        total4.value = res.count
    })
}

//获取投标决策列表
const decisionLists = () => {
    apiBidBiddingDecisionLists(pager6).then((res) => {
        tableData6.value = res.lists
        total5.value = res.count
    })
}
//获取购买标书列表
const buydocumentLists = () => {
    apiBidBuyBiddingDocumentLists(pager7).then((res) => {
        tableData7.value = res.lists
        total6.value = res.count
    })
}
//获取标书审查列表
const examinationLists = () => {
    apiBidDocumentExaminationLists(pager8).then((res) => {
        tableData8.value = res.lists
        total7.value = res.count
    })
}
//获取投标结果列表
const bidResultLists = () => {
    apiBidResultLists(pager9).then((res) => {
        tableData9.value = res.lists
        total8.value = res.count
    })
}
//获取投标保证金列表
const applyLists = () => {
    bidapplyLists(pager10).then((res) => {
        tableData10.value = res.lists
        total9.value = res.count
    })
}
//获取退投标保证金列表
const refundLists = () => {
    bidrefundLists(pager11).then((res) => {
        tableData11.value = res.lists
        total10.value = res.count
    })
}
//获取项目人员列表

const personnelLists = () => {
    projectpersonnelLists(pager12).then((res) => {
        tableData12.value = res.lists
        total11.value = res.count
    })
}
//获取劳动合同列表

const laborcontractLists = () => {
    projectlaborcontractLists(pager13).then((res) => {
        tableData13.value = res.lists
        total12.value = res.count
    })
}

//获取保险管理列表

const insurancemanagementlists = () => {
    insurancemanagementLists(pager14).then((res) => {
        tableData14.value = res.lists
        total13.value = res.count
    })
}
//获取考勤记录列表

const attendanceRecord = () => {
    attendanceRecordLists(pager15).then((res) => {
        tableData15.value = res.lists
        total14.value = res.count
    })
}

//获取考勤明细列表

const attendancedetail = () => {
    attendancedetailLists(pager16).then((res) => {
        tableData16.value = res.lists
        total15.value = res.count
    })
}
//获取工资付款列表

const salarypaymentLists = () => {
    projectsalaryDetailLists(pager17).then((res) => {
        tableData17.value = res.lists
        total16.value = res.count
    })
}

//售后信息
const customServiceLists = () => {
    apiCustomServiceLists(pager18).then((res) => {
        tableData18.value = res.lists
        total17.value = res.count
    })
}

//获取项目合同列表
const contractLists = () => {
    apiContractLists(pager19).then((res) => {
        tableData19.value = res.lists
        total18.value = res.count
    })
}

//获取合同洽商列表
const contcractNegotiationLists = () => {
    apiContractNegotiationLists(pager20).then((res) => {
        tableData20.value = res.lists
        total19.value = res.count
    })
}
//获取分包预算列表
const subpackagList = () => {
    subpackagdetailLists(pager21).then((res) => {
        tableData21.value = res.lists
        total20.value = res.count
    })
}

// 获取收票记录列表
const financereceiptLists = () => {
    apifinancereceiptLists(pager22).then((res) => {
        tableData22.value = res.lists
        total21.value = res.count
    })
}

// 获取付款计划列表
const planLists = () => {
    paymentplanLists(pager23).then((res) => {
        tableData23.value = res.lists
        total22.value = res.count
    })
}

//获取付款记录
const payapplyLists = () => {
    paymentapplyLists(pager24).then((res) => {
        tableData24.value = res.lists
        total22.value = res.count
    })
}


//获取退款记录
const financerefundLists = () => {
    apiFinancerefundLists(pager25).then((res) => {
        tableData25.value = res.lists
        total24.value = res.count
    })
}

//获取采购合同

const procurementContractLists = () => {
    apiProcurementContractLists(pager26).then((res) => {
        tableData26.value = res.lists
        total25.value = res.count
    })
}
//获取分包合同
const subcontractingContractLists = () => {
    apiSubcontractingContractLists(pager27).then((res) => {
        tableData27.value = res.lists
        total26.value = res.count
    })
}

//获取分包合同洽商
const negotiationLists = () => {
    apinegotiationLists(pager28).then((res) => {
        tableData28.value = res.lists
        total27.value = res.count
    })
}



// 获取详情
const setFormData = async (data: Record<any, any>) => {
    // for (const key in formData) {
    //     if (data[key] != null && data[key] != undefined) {
    //         //@ts-ignore
    //         formData[key] = data[key]

    //     }

    // }

    pager1.project_id = data.id
    pager2.project_id = data.id
    pager3.project_id = data.id
    pager4.project_id = data.id
    pager5.project_id = data.id
    pager6.project_id = data.id
    pager7.project_id = data.id
    pager8.project_id = data.id
    pager9.project_id = data.id
    pager10.project_id = data.id
    pager11.project_id = data.id
    pager11.project_id = data.id
    pager11.project_id = data.id
    pager12.project_id = data.id
    pager13.project_id = data.id
    pager14.project_id = data.id
    pager15.project_id = data.id
    pager16.project_id = data.id
    pager17.project_id = data.id
    pager18.project_id = data.id
    pager19.project_id = data.id
    pager20.project_id = data.id
    pager21.project_id = data.id
    pager22.project_id = data.id
    pager23.project_id = data.id
    pager24.project_id = data.id
    pager20.project_id = data.id
    pager25.project_id = data.id
    pager26.project_id = data.id
    pager27.project_id = data.id
    pager28.project_id = data.id
    pager29.project_id = data.id
    pager30.project_id = data.id
    Object.assign(formData, data)

    if (data.annex && data.annex.length > 0) {
        const arry1 = data.annex.map((item: any, index: any) => {
            return {
                name: `文件${index + 1}`,
                uri: item
            };
        });
        Object.assign(formDataannex, arry1)
    }
    followUpLists()
    demandList()
    competitorLists()
    solutionLists()
    estimateLists()
    decisionLists()
    buydocumentLists()
    examinationLists()
    bidResultLists()
    applyLists()
    refundLists()
    personnelLists()
    laborcontractLists()
    insurancemanagementlists()
    attendanceRecord()
    attendancedetail()
    salarypaymentLists()
    customServiceLists()
    contractLists()
    contcractNegotiationLists()
    subpackagList()
    financereceiptLists()
    planLists()
    payapplyLists()
    financerefundLists()
    procurementContractLists()
    subcontractingContractLists()
    negotiationLists()
}

const getDetail = async (row: Record<string, any>) => {
    const data = await apiCustomDetail({
        id: formData.id
    })
    setFormData(data)
}


// 提交按钮
const handleSubmit = async () => {
    popupRef.value?.close()

}

//打开弹窗
const open = () => {
    console.log('1111111')
    popupRef.value?.open()
}

// 关闭回调
const handleClose = () => {
    emit('close')
}








defineExpose({
    open,
    setFormData,
    getDetail
})
</script>
<style lang="scss" scoped>
.tit {
    font-size: 1.2em;
    margin-bottom: 10px;
}

:deep(.my-label) {
    width: 150px;
}
</style>
