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

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
@@ -323,8 +323,10 @@ const reportPageContracts = {
queryKeys: ['pageNum', 'pageSize', 'beginTime', 'endTime', 'palletCode', 'eventType'],
columnKeys: [
'occurredAt', 'eventType', 'sourceType', 'sourceId', 'palletCode',
'beforeState', 'afterState', 'beforeWarehouseName', 'beforeSiteName',
'beforeLineName', 'afterWarehouseName', 'afterSiteName', 'afterLineName',
'beforeState', 'afterState', 'beforeWarehouseName', 'beforeWarehouseId',
'beforeSiteName', 'beforeSiteId', 'beforeLineName', 'beforeLineId',
'afterWarehouseName', 'afterWarehouseId', 'afterSiteName', 'afterSiteId',
'afterLineName', 'afterLineId',
'beforeRemainingPackages', 'afterRemainingPackages', 'operatorName'
]
}
@@ -785,6 +787,19 @@ test('六个只读报表页面逐页满足 API、权限、筛选、列和异步
assert.match(source, new RegExp(`\\b${columnKey}\\b`), `${resource} 缺少核心列 ${columnKey}`)
}
if (resource === 'palletTrace') {
assert.match(
source,
/formatLocation\(\s*scope\.row\.beforeWarehouseName,\s*scope\.row\.beforeWarehouseId,\s*scope\.row\.beforeSiteName,\s*scope\.row\.beforeSiteId,\s*scope\.row\.beforeLineName,\s*scope\.row\.beforeLineId\s*\)/,
'palletTrace 变更前位置必须同时传入仓库、现场和产线的名称与 ID'
)
assert.match(
source,
/formatLocation\(\s*scope\.row\.afterWarehouseName,\s*scope\.row\.afterWarehouseId,\s*scope\.row\.afterSiteName,\s*scope\.row\.afterSiteId,\s*scope\.row\.afterLineName,\s*scope\.row\.afterLineId\s*\)/,
'palletTrace 变更后位置必须同时传入仓库、现场和产线的名称与 ID'
)
}
assert.match(source, /<el-date-picker\b[\s\S]*?type="daterange"[\s\S]*?value-format="YYYY-MM-DD"/)
assert.match(source, /<el-table\b[^>]*v-loading="loading"[^>]*:data="reportList"/)
assert.match(source, /<template\s+#empty>[\s\S]*?<el-empty\b/)