修复:补全托盘追溯位置回退
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user