This commit is contained in:
zmj 2024-05-22 13:40:48 +08:00
parent d69b0f5c0e
commit 3f8d261bd7
3 changed files with 44 additions and 28 deletions

View File

@ -20,9 +20,10 @@
</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 border :data="pager.lists" show-summary :summary-method="getSummaries">
<el-table-column label="合同名称" prop="contract_name" :render-header="pager.calcWidth" />
<el-table-column :render-header="pager.calcWidth" label="合同编号" prop="contract_code" />
<el-table-column :render-header="pager.calcWidth" label="合同类型" prop="contract_type_text"
@ -35,32 +36,21 @@
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="合同签订金额" prop="signed_amount"
show-overflow-tooltip />
<!-- <el-table-column :render-header="pager.calcWidth" label="开票日期" prop="" show-overflow-tooltip /> -->
<el-table-column :render-header="pager.calcWidth" label="已开票金额" prop="total_invoice_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="未开票金额" prop="not_total_invoice_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="开票已回款金额" prop="invoice_has_refund_amount"
show-overflow-tooltip />
<el-table-column label="开票未回款金额" prop="invoice_not_refund_amount" show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="合同未回款金额" prop="" show-overflow-tooltip>
<el-table-column :render-header="pager.calcWidth" label="开票未回款金额" prop="invoice_not_refund_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="合同未回款金额" prop="notHk" show-overflow-tooltip>
<template #default="{ row }">
{{ (+row.signed_amount) - (+row.total_refund_amount) }}
</template>
</el-table-column>
<el-table-column :render-header="pager.calcWidth" label="回款日期" prop="refund_date"
show-overflow-tooltip />
<!-- <el-table-column label="备注" prop="reamrk" show-overflow-tooltip /> -->
<!-- <el-table-column :render-header="pager.calcWidth" label="已到账金额" prop="total_refund_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="已结算金额" prop="total_settlement_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="未到账金额" prop="not_total_refund_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="回款未开票金额" prop="refund_not_invoice_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="合同结算日期" prop="settlement_date"
show-overflow-tooltip /> -->
<el-table-column label="操作" width="150" fixed="right">
<template #default="{ row }">
<el-button v-perms="['contract.contract_negotiation/delete']" type="primary" link
@ -153,6 +143,35 @@ const handleDetail = async (row: any) => {
}
}
const getSummaries = (param) => {
const { columns, data } = param;
const sumPropList = ['total_invoice_amount', 'not_total_invoice_amount', 'invoice_has_refund_amount', 'invoice_not_refund_amount', 'notHk']
const sums: string[] = [];
columns.forEach((item, index) => {
if (index === 0) {
sums[index] = '总价';
}
else if (sumPropList.includes(item.property)) {
const values = data.map((items) => {
if (item.property == 'notHk') {
return Number(items.signed_amount) - Number(items.total_refund_amount)
} else {
return Number(items[item.property])
}
});
sums[index] = values.reduce((prev, curr) =>
Number(prev) + Number(curr), 0
);
sums[index] += ' 元';
}
else {
sums[index] = '';
}
})
return sums;
}
//
const handleDown = async (id: number | any[]) => {
let res = await apiMarketingContractdownload({ id })

View File

@ -15,7 +15,7 @@ const detailConfig = {
},
{
label: "建设单位",
value: "build_unit"
value: "build_unit_name"
},
{
label: "建设区域",
@ -39,7 +39,7 @@ const detailConfig = {
},
{
label: "关联合同",
value: "contract"
value: "contract_name"
},
{
label: "合同金额",
@ -76,15 +76,15 @@ const detailConfig = {
},
{
label: "监管部门",
value: "supervision_department"
value: "supervision_department_text"
},
{
label: "实施部门",
value: "implementation_department"
value: "implementation_department_text"
},
{
label: "项目部",
value: "project_department"
value: "project_department_text"
},
{
label: "工程状态",
@ -92,7 +92,7 @@ const detailConfig = {
},
{
label: "项目负责人员",
value: "project_manager"
value: "project_manager_name"
},
{
label: "甲方单位",

View File

@ -84,22 +84,19 @@
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="行业" prop="industry_text"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="性质" prop="nature_text"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="性质" prop="nature_text" show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="建设单位" prop="build_unit_name"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="建设区域" prop="build_area_text"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="项目地址" prop="address"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="项目地址" prop="address" show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="项目等级" prop="project_level_text"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="总投资(元)" prop="total_investment"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="立项日期" prop="initiation_date"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="关联合同" prop="contract"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="关联合同" prop="contract" show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="合同金额" prop="contract_amount"
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="合同服务内容" prop="contract_content"
@ -121,7 +118,7 @@
show-overflow-tooltip />
<el-table-column :render-header="pager.calcWidth" label="甲方单位" prop="part_a_unit"
show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button v-perms="['supervision_project.supervision_project/edit']" type="primary" link
@click="handleEdit(row)">