diff --git a/src/modules/overseas-warehouse/routes.ts b/src/modules/overseas-warehouse/routes.ts index 12294d0..1ccd99c 100644 --- a/src/modules/overseas-warehouse/routes.ts +++ b/src/modules/overseas-warehouse/routes.ts @@ -38,7 +38,7 @@ export const overseasWarehouseModule = { { path: 'overseas-warehouse/return-cartons', name: 'overseas-return-cartons', component: () => import('./views/ReturnInventoryView.vue'), props: { cartonOnly: true }, release: 'active', - meta: { title: '退货箱号管理', description: '查询合箱后的退货箱号和箱内库存', permission: 'merchant:overseas-warehouse:return-inventory:list' }, + meta: { title: '退货箱号管理', description: '查询签收及合箱生成的退货箱号和箱内库存', permission: 'merchant:overseas-warehouse:return-inventory:list' }, navigation: { key: 'overseas-return-cartons', icon: Boxes }, }, ], diff --git a/src/modules/overseas-warehouse/views/ReturnInventoryView.test.mjs b/src/modules/overseas-warehouse/views/ReturnInventoryView.test.mjs index 184c0c0..695a27d 100644 --- a/src/modules/overseas-warehouse/views/ReturnInventoryView.test.mjs +++ b/src/modules/overseas-warehouse/views/ReturnInventoryView.test.mjs @@ -5,6 +5,14 @@ import test from 'node:test' const inventory = readFileSync(new URL('./ReturnInventoryView.vue', import.meta.url), 'utf8') const orders = readFileSync(new URL('./ReturnOrdersView.vue', import.meta.url), 'utf8') +test('desktop filters reserve six slots and inventory time and statuses have readable presentation', () => { + assert.match(inventory, /grid-template-columns: repeat\(4, minmax\(150px, 1fr\)\) 130px auto/) + assert.match(inventory, /white-space: nowrap/) + assert.match(inventory, /cartonStatusLabel\(cartonDetail.status\)/) + assert.match(inventory, /formatInventoryTime\(row.createdAt\)/) + assert.match(inventory, /formatInventoryTime\(row.updatedAt\)/) +}) + test('inventory failures are visible and are not presented as empty inventory', () => { assert.match(inventory, /catch \(error\)/) assert.match(inventory, /([]) const warehouseError = ref('') const warehousesLoading = ref(false) +function formatInventoryTime(value?: string) { return value ? value.replace('T', ' ').slice(0, 19) : '—' } +function cartonStatusLabel(value: string) { return ({ AVAILABLE: '可用', MERGED: '已合箱', OUTBOUNDED: '已出库' } as Record)[value] || '—' } function warehouseLabel(warehouseId: string) { const warehouse = warehouses.value.find(item => String(item.id) === String(warehouseId)) return warehouse ? `${warehouse.warehouseName} · ${warehouse.warehouseCode}` : '—' @@ -141,7 +143,7 @@ onMounted(() => { void load(); void loadWarehouses() })

{{ props.cartonOnly ? '退货箱号管理' : '退货库存管理' }}

{{ props.cartonOnly ? '查询签收及合箱生成的退货箱号、箱规和箱内 SKU 明细。' : '库存数量以仓库 PDA 确认实收后的入账数量为准。' }}

-
+
@@ -155,7 +157,7 @@ onMounted(() => { void load(); void loadWarehouses() }) - + @@ -167,7 +169,7 @@ onMounted(() => { void load(); void loadWarehouses() }) - + @@ -175,11 +177,11 @@ onMounted(() => { void load(); void loadWarehouses() }) - + @@ -187,6 +189,6 @@ onMounted(() => { void load(); void loadWarehouses() })