明树Git Lab

Commit 826a8f44 authored by zhanghan's avatar zhanghan

开发年度计划

parent 9dfe1c8a
......@@ -522,151 +522,6 @@
title="项目年度计划表格(单位:万元)"
name="项目年度计划表格(单位:万元)"
>
<el-table
:data="annualPlanIndicators"
style="width: 100%"
border
:cell-style="tableCellStyle"
>
<!-- 层级缩进列(对应截图的多层级) -->
<el-table-column
prop="indicatorName"
label="指标名称"
min-width="320"
>
<template #default="{ row }">
<!-- <span :style="{ textIndent: `${row.level * 20}px` }">
{{ row.indicatorName }}
</span> -->
<div style="display: flex">
<div
style="
text-align: center;
display: flex;
align-items: center;
"
>
年度投资完成以及资金来源
</div>
<div style="display: flex; flex-direction: column">
<div
style="
display: flex;
flex: 1;
align-items: center;
"
>
计划资金来源(全口径)
</div>
<div
style="
display: flex;
flex: 1;
align-items: center;
"
>
资金来源(新口径)
</div>
</div>
<div style="display: flex; flex-direction: column">
<div>合计:</div>
<div style="display: flex">
<div
style="
display: flex;
flex: 1;
align-items: center;
"
>
资本金
</div>
<div
style="
display: flex;
flex-direction: column;
flex: 1;
"
>
<div
style="
display: flex;
flex: 1;
align-items: center;
"
>
小记
</div>
<div
style="
display: flex;
flex: 1;
align-items: center;
"
>
能见方
</div>
<div
style="
display: flex;
flex: 1;
align-items: center;
"
>
外部股东
</div>
</div>
</div>
<div>
<div>债务融资</div>
<div>
<div>小记</div>
<div>其中并非项目我方贷款/担保额</div>
</div>
</div>
<div>
<div>回款在投入</div>
</div>
<div>
<div>其他</div>
<div>
<div>小记</div>
<div>其中:我方其他出资</div>
</div>
</div>
</div>
</div>
</template>
</el-table-column>
<!-- 合计列 -->
<el-table-column label="合计" width="120" align="right">
<template #default="{ row }">
<span>{{
row.total ? row.total.toFixed(2) : "0.00"
}}</span>
</template>
</el-table-column>
<!-- 动态时间列(与财务表格共享) -->
<el-table-column
v-for="time in dynamicTimeList"
:key="time"
:label="time"
width="140"
align="center"
>
<template #default="{ row }">
<el-input-number
v-model="row[time]"
:min="0"
:precision="2"
controls-position="right"
@change="handleAnnualPlanChange(row)"
:disabled="isPreview"
style="width: 100%"
/>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</el-form>
......@@ -681,7 +536,6 @@
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus";
// 初始化全局变量
const router = useRouter();
const route = useRoute();
......@@ -1145,7 +999,7 @@ const updateAllTotalRow = () => {
dynamicTimeList.value.forEach((time) => (totalRow[time] = 0));
totalRow.parentCode.forEach((code) => {
const childRow = financialIndicators.value.find(
(item) => item.serialNumber === code
(item) => item.serialNumber === code,
);
if (childRow) {
totalRow.total += Number(childRow.total) || 0;
......@@ -1165,7 +1019,7 @@ const updateAnnualPlanTotalRow = () => {
dynamicTimeList.value.forEach((time) => (totalRow[time] = 0));
totalRow.parentCode.forEach((code) => {
const childRow = annualPlanIndicators.value.find(
(item) => item.indicatorName === code
(item) => item.indicatorName === code,
);
if (childRow) {
totalRow.total += Number(childRow.total) || 0;
......@@ -1180,12 +1034,12 @@ const updateAnnualPlanTotalRow = () => {
// ========== 批量初始化所有行合计 ==========
const initAllRowTotal = () => {
financialIndicators.value.forEach(
(row) => !row.isTotal && updateRowTotal(row)
(row) => !row.isTotal && updateRowTotal(row),
);
updateAllTotalRow();
annualPlanIndicators.value.forEach(
(row) => !row.isTotal && updateRowTotal(row)
(row) => !row.isTotal && updateRowTotal(row),
);
updateAnnualPlanTotalRow();
};
......@@ -1197,7 +1051,7 @@ const fillFinancialTable = (backfillData) => {
const backfillRow = backfillData.find(
(item) =>
item.serialNumber === frontRow.serialNumber &&
item.indicatorName === frontRow.indicatorName
item.indicatorName === frontRow.indicatorName,
);
if (!backfillRow) return;
frontRow.total = Number(backfillRow.total) || 0;
......@@ -1213,7 +1067,7 @@ const fillAnnualPlanTable = (backfillData) => {
if (!Array.isArray(backfillData) || backfillData.length === 0) return;
annualPlanIndicators.value.forEach((frontRow) => {
const backfillRow = backfillData.find(
(item) => item.indicatorName === frontRow.indicatorName
(item) => item.indicatorName === frontRow.indicatorName,
);
if (!backfillRow) return;
frontRow.total = Number(backfillRow.total) || 0;
......@@ -1273,7 +1127,7 @@ const getJsqtzjcDetail = () => {
// 提取后端已有的时间字段(过滤非时间字段)
const firstRow = data.kyjcxx[0];
dynamicTimeList.value = Object.keys(firstRow).filter((key) =>
/^\d{4}(-\d{2})?$/.test(key)
/^\d{4}(-\d{2})?$/.test(key),
);
} else {
generateDynamicTime(); // 无数据则生成默认时间
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment