fix: 运费列表保留金额格式,空顺丰运费显示月结

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-10-21 19:31:11 +08:00
1 parent d259004f9d
commit 0fb3ee50e3
3 files changed
+59 -81

No files matched your search

@@ -175,7 +175,11 @@
</div>
</div>
<div
v-if="row.freight?.id || row.freight?.transportMode || row.transport?.etaTime"
v-if="
row.freight?.id ||
row.freight?.transportMode ||
row.transport?.etaTime
"
class="sample-card__section sample-card__section--transport"
>
<div class="sample-card__section-label">运输与运费</div>
@@ -190,10 +194,8 @@
<div class="data-label">运费(元)</div>
<div class="data-value"
>{{
freightAmountText(
row.freight?.transportMode,
row.freight?.freightAmount
) === '月结'
String(row.freight?.transportMode || '').trim() === 'sfkd' &&
(row.freight?.freightAmount == null || row.freight?.freightAmount === '')
? '月结'
: row.freight?.freightAmount != null
? '¥' + formatMoneyDisplay(row.freight.freightAmount)
@@ -524,7 +526,12 @@
<span v-else class="muted-dash">—</span>
</template>
</el-table-column>
<el-table-column label="备注" min-width="140" align="center" show-overflow-tooltip>
<el-table-column
label="备注"
min-width="140"
align="center"
show-overflow-tooltip
>
<template #default="{ row }">{{ row.remark || '—' }}</template>
</el-table-column>
<el-table-column
@@ -583,7 +590,9 @@
<div
class="data-grid"
:class="String(sp.payMode) === 'fq' ? 'data-grid--6' : 'data-grid--3'"
:class="
String(sp.payMode) === 'fq' ? 'data-grid--6' : 'data-grid--3'
"
>
<div class="data-item">
<div class="data-label">缴费模式</div>
@@ -654,9 +663,7 @@
<div class="sample-pay-readonly__tr-title">
转账记录
<span
v-if="(sch.transfers || []).length"
class="sample-pay-readonly__tr-count"
<span v-if="(sch.transfers || []).length" class="sample-pay-readonly__tr-count"
>({{ (sch.transfers || []).length }} 笔)</span
>
</div>
@@ -786,7 +793,12 @@
align="center"
show-overflow-tooltip
/>
<el-table-column label="附件" min-width="280" align="left" header-align="center">
<el-table-column
label="附件"
min-width="280"
align="left"
header-align="center"
>
<template #default="{ row }">
<ProtocolAttachmentReadonly
v-if="refundRecordAttachments(row).length"
@@ -870,7 +882,9 @@
</div>
<div class="data-item">
<div class="data-label">每期间隔(月)</div>
<div class="data-value">{{ dash(payment?.installmentIntervalMonths) }}</div>
<div class="data-value">{{
dash(payment?.installmentIntervalMonths)
}}</div>
</div>
<div class="data-item">
<div class="data-label">分期开始时间</div>
@@ -1124,32 +1138,17 @@
align="center"
header-align="center"
/>
<el-table-column
label="变更类型"
min-width="110"
align="center"
header-align="center"
>
<el-table-column label="变更类型" min-width="110" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="statusChangeTagType(String(row.changeType || ''))" size="small">
{{ statusChangeTypeLabel(String(row.changeType || '')) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="变更时间"
min-width="170"
align="center"
header-align="center"
>
<el-table-column label="变更时间" min-width="170" align="center" header-align="center">
<template #default="{ row }">{{ dash(row.changeTime) }}</template>
</el-table-column>
<el-table-column
label="状态流转"
min-width="160"
align="center"
header-align="center"
>
<el-table-column label="状态流转" min-width="160" align="center" header-align="center">
<template #default="{ row }">{{ statusChangeFlow(row) }}</template>
</el-table-column>
<el-table-column
@@ -1161,12 +1160,7 @@
>
<template #default="{ row }">{{ statusChangeDesc(row) }}</template>
</el-table-column>
<el-table-column
label="操作人"
min-width="120"
align="center"
header-align="center"
>
<el-table-column label="操作人" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ dash(row.operatorUserName) }}</template>
</el-table-column>
</el-table>
@@ -1237,7 +1231,6 @@
} from '@/api/admin'
import { downloadAttachmentFile } from '@/utils/download-attachment'
import { formatMoneyDisplay } from '@/utils/money-format'
import { freightAmountText } from '@/utils/sf-express-freight'
import {
protocolStatusDisplayLabel,
protocolStatusTagType,
@@ -1442,14 +1435,13 @@
*/
const v1PayPeriods = computed(() => {
const details = paymentDetails.value
if (!details.length)
return [] as Array<{
scheduleNo: number
dueAmount: number | null
dueDate: string
paidAmount: number
transfers: Array<Record<string, any>>
}>
if (!details.length) return [] as Array<{
scheduleNo: number
dueAmount: number | null
dueDate: string
paidAmount: number
transfers: Array<Record<string, any>>
}>
const paidOf = (rows: Array<Record<string, any>>) =>
rows
@@ -1467,7 +1459,9 @@
: payment.value?.contractAmount != null
? Number(payment.value.contractAmount)
: null,
dueDate: String(payment.value?.lumpSumDeadline || details[0]?.installmentDueDate || ''),
dueDate: String(
payment.value?.lumpSumDeadline || details[0]?.installmentDueDate || ''
),
paidAmount: paidOf(details),
transfers: details
}
@@ -1584,7 +1578,9 @@
}
const basicMotherNameDisplay = computed(() =>
dash(partyCustomer.value?.motherName || props.listRow?.motherName || protocol.value?.motherName)
dash(
partyCustomer.value?.motherName || props.listRow?.motherName || protocol.value?.motherName
)
)
const dialogTitle = computed(() => {
@@ -145,10 +145,14 @@
header-align="center"
>
<template #default="{ row }">{{
freightAmountText(
row.transportMode,
row.freightAmount ?? row.freightDraft?.freightAmount
)
isSfExpress(row.transportMode) &&
(row.freightAmount == null || row.freightAmount === '')
? '月结'
: row.freightAmount != null &&
row.freightAmount !== '' &&
Number.isFinite(Number(row.freightAmount))
? '¥' + formatMoneyDisplay(row.freightAmount)
: '—'
}}</template>
</el-table-column>
<el-table-column
@@ -303,7 +307,8 @@
type FreightUnlinkRow
} from '@/components/business/freight-unlink-dialog/index.vue'
import { formatDisplayOrDash } from '@/utils/datetime-display'
import { freightAmountText } from '@/utils/sf-express-freight'
import { formatMoneyDisplay } from '@/utils/money-format'
import { isSfExpress } from '@/utils/sf-express-freight'
import {
receptionSourceLabel,
receptionSourceTagType,
@@ -152,10 +152,8 @@
<div class="data-label">运费(元)</div>
<div class="data-value"
>{{
freightAmountText(
row.freight?.transportMode,
row.freight?.freightAmount
) === '月结'
String(row.freight?.transportMode || '').trim() === 'sfkd' &&
(row.freight?.freightAmount == null || row.freight?.freightAmount === '')
? '月结'
: row.freight?.freightAmount != null
? '¥' + formatMoneyDisplay(row.freight.freightAmount)
@@ -448,32 +446,17 @@
align="center"
header-align="center"
/>
<el-table-column
label="变更类型"
min-width="110"
align="center"
header-align="center"
>
<el-table-column label="变更类型" min-width="110" align="center" header-align="center">
<template #default="{ row }">
<el-tag :type="statusChangeTagType(String(row.changeType || ''))" size="small">
{{ statusChangeTypeLabel(String(row.changeType || '')) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="变更时间"
min-width="170"
align="center"
header-align="center"
>
<el-table-column label="变更时间" min-width="170" align="center" header-align="center">
<template #default="{ row }">{{ dash(row.changeTime) }}</template>
</el-table-column>
<el-table-column
label="状态流转"
min-width="160"
align="center"
header-align="center"
>
<el-table-column label="状态流转" min-width="160" align="center" header-align="center">
<template #default="{ row }">{{ statusChangeFlow(row) }}</template>
</el-table-column>
<el-table-column
@@ -485,12 +468,7 @@
>
<template #default="{ row }">{{ statusChangeDesc(row) }}</template>
</el-table-column>
<el-table-column
label="操作人"
min-width="120"
align="center"
header-align="center"
>
<el-table-column label="操作人" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ dash(row.operatorUserName) }}</template>
</el-table-column>
</el-table>
@@ -537,7 +515,6 @@
import { formatDisplayOrDash } from '@/utils/datetime-display'
import { computed, nextTick, ref, watch } from 'vue'
import { formatMoneyDisplay } from '@/utils/money-format'
import { freightAmountText } from '@/utils/sf-express-freight'
import { Close } from '@element-plus/icons-vue'
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
import SampleQcInfoGroupedPanel from '@/components/business/sample-qc-info-grouped-panel/index.vue'