<template>
    <myTable :baseData="baseData"></myTable>
    <myTable :baseData="baseData1"></myTable>
    <myTable :baseData="baseData2"></myTable>
    <myTable :baseData="baseData3"></myTable>
    <myTable :baseData="baseData4"></myTable>
</template>

<script setup>

import { ref, reactive, defineProps } from "vue"
import { apiBidBiddingDecisionLists } from '@/api/bid_bidding_decision'
import { apiBidBuyBiddingDocumentLists } from '@/api/bid_buy_bidding_document'
import { apiBidDocumentExaminationLists } from '@/api/bid_document_examination'
import { apiBidResultLists } from '@/api/bid_result'
import { bidapplyLists } from '@/api/bidbbond'
import { bidrefundLists } from '@/api/refundbidDeposit'
import myTable from "./myTable.vue"

const props = defineProps({
    project_id: Number
})



const baseData = reactive({
    fetchFun: apiBidBiddingDecisionLists,
    tit: "投标决策",
    queryParams: { project_id: props.project_id },
    columnList: [
        { label: '流程编号', prop: 'code' },
        { label: '项目估算(万元)', prop: 'project_estimation' },
        { label: '资金来源', prop: 'bidding_project_fund_source' },
        { label: '投标时间', prop: 'bidding_time' },
        { label: '招标方式', prop: 'bid_type' },
        { label: '有无保证金', prop: 'is_margin' },
        { label: '保证金金额', prop: 'margin_amount' },
        { label: '开标日期', prop: 'bid_opening_date' },
        { label: '项目把握度', prop: 'project_assurance' },
    ]
})

const baseData1 = reactive({
    fetchFun: apiBidDocumentExaminationLists,
    tit: "标书审查",
    queryParams: { project_id: props.project_id },
    columnList: [
        { label: '流程编号', prop: 'code' },
        { label: '标书编号', prop: 'bid_document_no' },
        { label: '购买人员', prop: 'buyer' },
        { label: '投标公司名称', prop: 'bid_company_name' },
        { label: '投标时间', prop: 'bidding_time' },
        { label: '开标日期', prop: 'bid_opening_date' },
        { label: '总金额', prop: 'total_amount' },
    ]
})
const baseData2 = reactive({
    fetchFun: apiBidResultLists,
    tit: "投标结果",
    queryParams: { project_id: props.project_id },
    columnList: [
        { label: '投标编号', prop: 'bid_document_examination_code' },
        { label: '投标时间', prop: 'bidding_time' },
        { label: '开标日期', prop: 'bid_opening_date' },
        { label: '是否中标', prop: 'is_successful_text' },
        { label: '中标单位', prop: 'bidder_company' },
        { label: '中标金额', prop: 'bidder_amount' },
    ]
})

const baseData3 = reactive({
    fetchFun: bidapplyLists,
    tit: "投标保证金",
    queryParams: { project_id: props.project_id },
    columnList: [
        { label: '流程编号', prop: 'bidding_decision_code' },
        { label: '投标时间', prop: 'bidding_time' },
        { label: '预计退还时间', prop: 'refund_date' },
        { label: '申请人', prop: 'applier' },
        { label: '保证金金额', prop: 'margin_amount' },
        { label: '已退金额', prop: 'refund_amount' },
        { label: '未退金额', prop: 'not_refund_amount' },
    ]
})

const baseData4 = reactive({
    fetchFun: bidrefundLists,
    tit: "退投标保证金",
    queryParams: { project_id: props.project_id },
    columnList: [
        { label: '投标时间', prop: 'bidding_time' },
        { label: '退款日期', prop: 'refund_date' },
        { label: '账户编码', prop: 'bank_account_info' },
        { label: '开户银行', prop: 'bank_account_info' },
        { label: '退款金额', prop: 'refund_amount' },
        { label: '客户名称', prop: 'custom_name' },
        { label: '创建日期', prop: 'create_time' },

    ]
})


</script>
<style >
.tit {
    font-size: 1.2em;
    margin-bottom: 10px;
}
</style>