1、调整导入运单
2、调整对账
This commit is contained in:
@@ -145,7 +145,9 @@
|
||||
:align="column.align || 'center'"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">{{ formatDetailCell(row, column.prop) }}</template>
|
||||
<template #default="{ row }">
|
||||
{{ formatFeeDetailCell(row, column.prop) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
@@ -398,12 +400,14 @@
|
||||
maxlength="300"
|
||||
placeholder="请输入调整原因"
|
||||
/>
|
||||
<span v-else-if="column.prop === 'adjustAmountText'">
|
||||
{{ fixedTwoDecimals(row.adjustAmount) }}
|
||||
</span>
|
||||
<span v-else-if="column.prop === 'afterAmountText'">
|
||||
{{ fixedTwoDecimals(row.afterAmount) }}
|
||||
<span v-else-if="column.prop === 'originalAmountText'">
|
||||
{{
|
||||
Number(row.adjustAmount || 0) !== 0
|
||||
? fixedTwoDecimals(row.afterAmount)
|
||||
: fixedTwoDecimals(row.originalAmount)
|
||||
}}
|
||||
</span>
|
||||
|
||||
<span v-else>{{ formatDetailCell(row, column.prop) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -1135,7 +1139,13 @@ export default {
|
||||
},
|
||||
feeDetailColumns() {
|
||||
const baseColumns = feeDetailBaseColumns.filter(column => column.prop !== 'freightAmount');
|
||||
return [...baseColumns, ...this.dynamicFeeColumns, ...feeDetailTailColumns];
|
||||
const hasAdjustment = this.feeRows.some(row => Number(row.adjustAmount || 0) !== 0);
|
||||
const tailColumns = feeDetailTailColumns.map(col =>
|
||||
col.prop === 'originalAmountText' && hasAdjustment
|
||||
? { ...col, label: '调整后金额' }
|
||||
: col
|
||||
);
|
||||
return [...baseColumns, ...this.dynamicFeeColumns, ...tailColumns];
|
||||
},
|
||||
displayTableColumns() {
|
||||
const columns = this.tableColumns.filter(
|
||||
@@ -1181,7 +1191,7 @@ export default {
|
||||
adjustFeeColumns() {
|
||||
const baseColumns = feeDetailBaseColumns.filter(column => column.prop !== 'freightAmount');
|
||||
const tailColumns = feeDetailTailColumns.filter(column => column.prop !== 'remark');
|
||||
const afterAmountIndex = tailColumns.findIndex(column => column.prop === 'afterAmountText');
|
||||
const afterAmountIndex = tailColumns.findIndex(column => column.prop === 'originalAmountText');
|
||||
tailColumns.splice(afterAmountIndex + 1, 0, {
|
||||
label: '调整原因',
|
||||
prop: 'changeReason',
|
||||
@@ -2596,6 +2606,22 @@ export default {
|
||||
}
|
||||
return this.formatCell(row?.[prop]);
|
||||
},
|
||||
formatFeeDetailCell(row, prop) {
|
||||
if (prop !== 'originalAmountText') return this.formatDetailCell(row, prop);
|
||||
|
||||
const adjustAmount = Number(row?.adjustAmount || 0);
|
||||
if (adjustAmount === 0) return this.formatDetailCell(row, prop);
|
||||
|
||||
const adjustedAmount = Number(
|
||||
row?.afterAmount ?? row?.adjustedAmount ?? row?.settlementAmount
|
||||
);
|
||||
if (Number.isFinite(adjustedAmount)) return this.fixedTwoDecimals(adjustedAmount);
|
||||
|
||||
const originalAmount = Number(row?.originalAmount ?? row?.originalAmountText);
|
||||
return Number.isFinite(originalAmount)
|
||||
? this.fixedTwoDecimals(originalAmount + adjustAmount)
|
||||
: this.formatCell(row?.afterAmountText);
|
||||
},
|
||||
formatCell(value) {
|
||||
return value === null || value === undefined || value === '' ? '-' : value;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user