fix: display measurements throughout overseas fulfillment

This commit is contained in:
2026-09-18 14:59:14 +08:00
parent d77d145405
commit 0ab2302720
21 changed files with 222 additions and 33 deletions
@@ -60,8 +60,9 @@ describe('DispatchesView', () => {
[['edit'], ['查看', '打印BOL', '编辑'], false],
[['cancel'], ['查看', '打印BOL', '取消'], false],
[['transfer-delivery'], ['查看', '打印BOL', '转派送'], false],
[['edit', 'transfer-delivery'], ['查看', '打印BOL', '转派送', ''], true],
[['edit', 'cancel'], ['查看', '打印BOL', '编辑', ''], true],
[['edit', 'cancel', 'transfer-delivery'], ['查看', '打印BOL', '编辑', ''], true],
[['edit', 'cancel', 'transfer-delivery'], ['查看', '打印BOL', '转派送', ''], true],
])('uses the row action threshold for permissions %j', async (allowed, labels, overflow) => {
canPermission.mockImplementation(code => allowed.some(action => code === 'platform:overseas-warehouse:dispatch:' + action))
const wrapper = mount(DispatchesView, { global: { plugins: [ElementPlus] } })
@@ -129,6 +130,8 @@ describe('DispatchesView', () => {
expect(source).toContain('permission.dispatchEdit')
expect(source).toContain('permission.dispatchCancel')
expect(source).toContain('permission.dispatchTransferDelivery')
expect(source).toContain("import RowActions, { type RowActionItem } from '@/shared/components/RowActions.vue'")
expect(source).toContain("{ key: 'transfer', label: '转派送', priority: 250")
expect(source).toMatch(/function isPendingDeparture\(row: DispatchListItem\)\s*{\s*return row\.statusCode === 'PENDING_DEPARTURE'/)
expect(source).toMatch(/access\.can\(permission\.dispatchEdit\)\s*&&\s*isPendingDeparture\(row\)/)
expect(source).toMatch(/access\.can\(permission\.dispatchTransferDelivery\)\s*&&\s*\['PENDING_DEPARTURE', 'PICKING', 'READY_TO_DEPART'\]\.includes\(row\.statusCode\)/)