修复:补全托盘追溯位置回退

This commit is contained in:
焦龙言
2026-07-27 11:50:37 +08:00
parent 8361c11c4c
commit 2ab075f095
2 changed files with 26 additions and 6 deletions
@@ -35,12 +35,12 @@
<el-table-column label="变更后状态" prop="afterState" min-width="140" />
<el-table-column label="变更前位置" min-width="180" :show-overflow-tooltip="true">
<template #default="scope">
{{ locationLabel(scope.row.beforeWarehouseName, scope.row.beforeSiteName, scope.row.beforeLineName) }}
{{ formatLocation(scope.row.beforeWarehouseName, scope.row.beforeWarehouseId, scope.row.beforeSiteName, scope.row.beforeSiteId, scope.row.beforeLineName, scope.row.beforeLineId) }}
</template>
</el-table-column>
<el-table-column label="变更后位置" min-width="180" :show-overflow-tooltip="true">
<template #default="scope">
{{ locationLabel(scope.row.afterWarehouseName, scope.row.afterSiteName, scope.row.afterLineName) }}
{{ formatLocation(scope.row.afterWarehouseName, scope.row.afterWarehouseId, scope.row.afterSiteName, scope.row.afterSiteId, scope.row.afterLineName, scope.row.afterLineId) }}
</template>
</el-table-column>
<el-table-column label="变更前数量" prop="beforeRemainingPackages" width="110" align="right" />
@@ -97,8 +97,13 @@ function sourceLabel(sourceType, sourceId) {
return sourceType ? `${sourceType} #${sourceId}` : '—'
}
function locationLabel(warehouseName, siteName, lineName) {
return [warehouseName, siteName, lineName].filter(Boolean).join(' / ') || '—'
function formatLocation(warehouseName, warehouseId, siteName, siteId, lineName, lineId) {
const locations = [
warehouseName || (warehouseId === undefined || warehouseId === null ? undefined : `仓库#${warehouseId}`),
siteName || (siteId === undefined || siteId === null ? undefined : `现场#${siteId}`),
lineName || (lineId === undefined || lineId === null ? undefined : `产线#${lineId}`)
]
return locations.filter(Boolean).join(' / ') || '—'
}
function invalidateListRequest() {