fix: 冲销明细费用项目子列文案按业务区分并对齐设计图占位符

This commit is contained in:
刘泉佳
2026-11-10 14:29:11 +08:00
parent da616f83c5
commit 58b208201a
+20 -13
View File
@@ -3,42 +3,42 @@
<el-table v-loading="loading" :data="rows" border>
<el-table-column type="index" label="序号" width="64" fixed="left" align="center" />
<el-table-column prop="arrivalAddress" label="到货地址" min-width="150" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.arrivalAddress) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.arrivalAddress) }}</template>
</el-table-column>
<el-table-column prop="actualDepartureTime" label="实际发货时间" width="150" align="center">
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : formatDateTime(row.actualDepartureTime) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : formatDateTime(row.actualDepartureTime) }}</template>
</el-table-column>
<el-table-column prop="completionTime" label="实际完成时间" width="150" align="center">
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : formatDateTime(row.completionTime) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : formatDateTime(row.completionTime) }}</template>
</el-table-column>
<el-table-column prop="transportType" label="运输类型" width="100" align="center">
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.transportType) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.transportType) }}</template>
</el-table-column>
<el-table-column prop="cargoName" label="货物名称" min-width="110" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.cargoName) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.cargoName) }}</template>
</el-table-column>
<el-table-column prop="cargoType" label="货物类型" min-width="110" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.cargoType) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.cargoType) }}</template>
</el-table-column>
<el-table-column prop="transportQuantity" label="运输总量" width="110" align="center">
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.transportQuantity) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.transportQuantity) }}</template>
</el-table-column>
<el-table-column prop="mileage" label="里程 (KM)" width="100" align="center">
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.mileage) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.mileage) }}</template>
</el-table-column>
<el-table-column prop="batchNo" label="批次号" width="100" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.manualFlag === 1 ? '—' : displayValue(row.batchNo) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.batchNo) }}</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号" min-width="160" align="center" show-overflow-tooltip />
<!-- 按费用项目动态分组列头,每组三列:结算金额/未开票费用/本次开票金额 -->
<!-- 按费用项目动态分组列头,每组三列:结算金额/未开票(收票)金额/本次开票(收票)金额,文案随业务类型切换 -->
<el-table-column v-for="group in feeItemGroups" :key="group.name" :label="group.name" align="center">
<el-table-column :label="'结算金额'" width="110" align="center">
<el-table-column label="结算金额" width="110" align="center">
<template #default="{ row }">{{ formatMoney(row.settlementAmounts[group.name]) }}</template>
</el-table-column>
<el-table-column :label="'未开票费用'" width="110" align="center">
<el-table-column :label="remainLabel" width="110" align="center">
<template #default="{ row }">{{ formatMoney(row.beforeRemainAmounts[group.name]) }}</template>
</el-table-column>
<el-table-column :label="'本次开票金额'" width="120" align="center">
<el-table-column :label="currentLabel" width="120" align="center">
<template #default="{ row }">{{ formatMoney(row.writeOffAmounts[group.name]) }}</template>
</el-table-column>
</el-table-column>
@@ -68,6 +68,13 @@ export default {
};
},
computed: {
// 费用项目分组子列文案随业务切换:开票为"未开票金额/本次开票金额",收票/付款为"未收票金额/本次收票金额"
remainLabel() {
return this.bizType === 'invoice_apply' ? '未开票金额' : '未收票金额';
},
currentLabel() {
return this.bizType === 'invoice_apply' ? '本次开票金额' : '本次收票金额';
},
feeItemGroups() {
const names = [];
this.rows.forEach(row => {