<template>
    <myTable :baseData="baseData"></myTable>
    <myTable :baseData="baseData1"></myTable>
</template>

<script setup>

import { ref, reactive, defineProps } from "vue"
import myTable from "./myTable.vue"
import { apiSubcontractingContractLists } from '@/api/subcontracting_contract'
import { apinegotiationLists } from '@/api/subcontractor'

const props = defineProps({
    project_id: Number
})

const baseData1 = reactive({
    fetchFun: apinegotiationLists,
    tit: "分包洽商",
    queryParams: { project_id: props.project_id },

    columnList: [
        { label: '洽商编号', prop: 'negotiation_no' },
        { label: '合同编号', prop: 'contract_no' },
        { label: '洽商单名称', prop: 'negotiation_name' },
        { label: '项目名称', prop: 'project_name' },
        { label: '项目编号', prop: 'project_code' },
        { label: '供应商', prop: 'supplier_name' },
        { label: '洽商类别', prop: 'negotiation_type_text' },
        { label: '洽商报价金额', prop: 'warranty_amount' },
        { label: '洽商质保金额', prop: 'negotiation_amount' },

    ]
})

const baseData = reactive({
    fetchFun: apiSubcontractingContractLists,
    tit: "分包合同",
    queryParams: { project_id: props.project_id },

    columnList: [
        { label: '项目名称', prop: 'project_name' },
        { label: '合同编号', prop: 'contract_no' },
        { label: '合同名称', prop: 'contract_name' },
        { label: '供应商名称', prop: 'supplier_name' },
        { label: '合同类型', prop: 'contract_type' },
        { label: '合同金额', prop: 'contract_amount' },
        { label: '洽商金额', prop: 'negotiation_amount' },
        { label: '不含税金额', prop: 'excluding_tax_amount' },
        { label: '实际合同金额', prop: 'reality_contract_amount' },
        { label: '已付款金额', prop: 'has_pay_amount' },
        { label: '已开票金额', prop: 'invoice_amount' },
        { label: '未开票金额', prop: 'not_invoice_amount' },
        { label: '已退款金额', prop: 'refund_amount' },
        { label: '结算差异', prop: 'settlement_difference' },
    ]
})


</script>