This commit is contained in:
Jimmy
2026-04-27 23:53:47 +08:00
parent 0cea74ad97
commit 5c7e489e1c
5 changed files with 123 additions and 57 deletions

View File

@@ -320,45 +320,76 @@
</template>
</el-table-column>
<el-table-column label="历史最新基准价 (¥)" align="center" min-width="120">
<!-- 单价列 (并排显示) -->
<el-table-column label="历史基准单价(¥)" align="center" min-width="120">
<template slot-scope="scope">
<span v-if="scope.row.totalLatest > 0" v-text="scope.row.totalLatest.toFixed(2)"></span>
<span v-if="scope.row.latestUnitPrice > 0" style="color: #606266;">
¥<span v-text="scope.row.latestUnitPrice.toFixed(2)"></span>
</span>
<span v-else style="color: #C0C4CC;">-</span>
</template>
</el-table-column>
<el-table-column label="期间 A 最新价 (¥)" align="center" min-width="140">
<el-table-column label="期间 A 单价(¥)" align="center" min-width="120">
<template slot-scope="scope">
<span v-if="scope.row.periodAUnitPrice > 0" style="color: #606266;">
¥<span v-text="scope.row.periodAUnitPrice.toFixed(2)"></span>
</span>
<span v-else style="color: #C0C4CC;">-</span>
</template>
</el-table-column>
<el-table-column label="期间 B 单价(¥)" align="center" min-width="120">
<template slot-scope="scope">
<span v-if="scope.row.periodBUnitPrice > 0" style="color: #606266;">
¥<span v-text="scope.row.periodBUnitPrice.toFixed(2)"></span>
</span>
<span v-else style="color: #C0C4CC;">-</span>
</template>
</el-table-column>
<!-- 总成本列 -->
<el-table-column label="历史基准总成本(¥)" align="center" min-width="130">
<template slot-scope="scope">
<span v-if="scope.row.totalLatest > 0">
<strong v-text="scope.row.totalLatest.toFixed(2)"></strong>
</span>
<span v-else style="color: #C0C4CC;">-</span>
</template>
</el-table-column>
<el-table-column label="期间 A 总成本(¥)" align="center" min-width="150">
<template slot-scope="scope">
<el-tooltip effect="dark" :content="getStatusText(scope.row.showAStatus)" placement="top" :disabled="scope.row.showAStatus !== 'fallback'">
<span style="display: flex; justify-content: center; align-items: center;">
<span class="status-dot" :class="'dot-' + scope.row.showAStatus"></span>
<span v-if="scope.row.totalPeriodA > 0" v-text="scope.row.totalPeriodA.toFixed(2)"></span>
<strong v-if="scope.row.totalPeriodA > 0" v-text="scope.row.totalPeriodA.toFixed(2)"></strong>
<span v-else style="color: #C0C4CC; margin-left: 2px;">-</span>
</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="期间 B 最新价 (¥)" align="center" min-width="140">
<el-table-column label="期间 B 总成本(¥)" align="center" min-width="150">
<template slot-scope="scope">
<el-tooltip effect="dark" :content="getStatusText(scope.row.showBStatus)" placement="top" :disabled="scope.row.showBStatus !== 'fallback'">
<span style="display: flex; justify-content: center; align-items: center;">
<span class="status-dot" :class="'dot-' + scope.row.showBStatus"></span>
<span v-if="scope.row.totalPeriodB > 0" v-text="scope.row.totalPeriodB.toFixed(2)"></span>
<strong v-if="scope.row.totalPeriodB > 0" v-text="scope.row.totalPeriodB.toFixed(2)"></strong>
<span v-else style="color: #C0C4CC; margin-left: 2px;">-</span>
</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="差异对比 (B - A)" align="center" min-width="120">
<el-table-column label="差异对比 (总成本 B - A)" align="center" min-width="140">
<template slot-scope="scope">
<span v-if="scope.row.totalPeriodA > 0 && scope.row.totalPeriodB > 0">
<span v-if="scope.row.totalPeriodB > scope.row.totalPeriodA" class="price-up">
<i class="el-icon-top"></i> <span v-text="(scope.row.totalPeriodB - scope.row.totalPeriodA).toFixed(2)"></span>
<span v-if="scope.row.totalPeriodB > 0">
<span v-if="scope.row.totalPeriodB > (scope.row.totalPeriodA || 0)" class="price-up">
<i class="el-icon-top"></i> <span v-text="(scope.row.totalPeriodB - (scope.row.totalPeriodA || 0)).toFixed(2)"></span>
</span>
<span v-else-if="scope.row.totalPeriodB < scope.row.totalPeriodA" class="price-down">
<i class="el-icon-bottom"></i> <span v-text="(scope.row.totalPeriodA - scope.row.totalPeriodB).toFixed(2)"></span>
<span v-else-if="scope.row.totalPeriodB < (scope.row.totalPeriodA || 0)" class="price-down">
<i class="el-icon-bottom"></i> <span v-text="((scope.row.totalPeriodA || 0) - scope.row.totalPeriodB).toFixed(2)"></span>
</span>
<span v-else style="color: #909399;">持平</span>
</span>