From e62278e1c97cbb9f8c35e7525f4411b2bdd72450 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Fri, 25 Sep 2026 22:23:11 +0800 Subject: [PATCH] feat(client): add customs documents and sailing prices pages --- src/modules/first-leg/routes.ts | 18 ++++- .../first-leg/views/CustomsDocumentsView.vue | 78 +++++++++++++++++++ .../first-leg/views/SailingPricesView.vue | 27 +++++++ src/navigation/clientNavigation.test.mjs | 6 +- src/navigation/clientNavigation.ts | 2 + 5 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 src/modules/first-leg/views/CustomsDocumentsView.vue create mode 100644 src/modules/first-leg/views/SailingPricesView.vue diff --git a/src/modules/first-leg/routes.ts b/src/modules/first-leg/routes.ts index 3a460a9..15cc38a 100644 --- a/src/modules/first-leg/routes.ts +++ b/src/modules/first-leg/routes.ts @@ -1,4 +1,4 @@ -import { FileText, Ship } from '@lucide/vue' +import { Calculator, FileText, Ship } from '@lucide/vue' import type { ClientModuleManifest } from '../types.ts' export const firstLegModule = { @@ -44,5 +44,21 @@ export const firstLegModule = { release: 'active', meta: { title: '快速下单', description: '按渠道、目的仓和产品 SKU 快速生成订单草稿', permission: 'order:first-leg:quick-create' }, }, + { + path: 'first-leg/customs-documents', + name: 'first-leg-customs-documents', + component: () => import('./views/CustomsDocumentsView.vue'), + release: 'active', + meta: { title: '报关资料', description: '管理装柜后的退税报关资料与回执', permission: 'order:first-leg:list' }, + navigation: { key: 'first-leg-customs-documents', title: '报关资料', icon: FileText }, + }, + { + path: 'first-leg/sailing-prices', + name: 'first-leg-sailing-prices', + component: () => import('./views/SailingPricesView.vue'), + release: 'active', + meta: { title: '船期价格', description: '查询渠道、参考船期与预估运费', permission: 'order:first-leg:list' }, + navigation: { key: 'first-leg-sailing-prices', title: '船期价格', icon: Calculator }, + }, ], } satisfies ClientModuleManifest diff --git a/src/modules/first-leg/views/CustomsDocumentsView.vue b/src/modules/first-leg/views/CustomsDocumentsView.vue new file mode 100644 index 0000000..592d86d --- /dev/null +++ b/src/modules/first-leg/views/CustomsDocumentsView.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/modules/first-leg/views/SailingPricesView.vue b/src/modules/first-leg/views/SailingPricesView.vue new file mode 100644 index 0000000..17b13ed --- /dev/null +++ b/src/modules/first-leg/views/SailingPricesView.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/navigation/clientNavigation.test.mjs b/src/navigation/clientNavigation.test.mjs index 5674fbb..b767e1b 100644 --- a/src/navigation/clientNavigation.test.mjs +++ b/src/navigation/clientNavigation.test.mjs @@ -52,7 +52,7 @@ test('organises customer-relevant business pages under five task-oriented sideba { title: '首页', children: undefined }, { title: '订单中心', - children: ['头程订单', '海外采购', '美国本土卡', '美本土散板'], + children: ['头程订单', '报关资料', '船期价格', '海外采购', '美国本土卡', '美本土散板'], }, { title: '海外仓', @@ -86,6 +86,8 @@ test('flattens visible leaves with unique paths', () => { assert.deepEqual(paths, [ '/', '/orders/first-leg', + '/first-leg/customs-documents', + '/first-leg/sailing-prices', '/cross-border/procurement', '/cross-border/domestic-trucking', '/cross-border/pallet-shipping', @@ -109,7 +111,7 @@ test('flattens visible leaves with unique paths', () => { test('filters inaccessible leaves and empty navigation groups', () => { const visible = filterNavigationByPermissions(clientNavigation, ['account:profile:view', 'order:first-leg:list']) - assert.deepEqual(getNavigationLeaves(visible).map((item) => item.path), ['/orders/first-leg']) + assert.deepEqual(getNavigationLeaves(visible).map((item) => item.path), ['/orders/first-leg', '/first-leg/customs-documents', '/first-leg/sailing-prices']) assert.deepEqual(visible.map((item) => item.title), ['订单中心']) assert.equal(getFirstAccessiblePath(['account:profile:view']), '/account/profile') assert.equal(getFirstAccessiblePath([]), '/forbidden') diff --git a/src/navigation/clientNavigation.ts b/src/navigation/clientNavigation.ts index b664e2f..4d3319a 100644 --- a/src/navigation/clientNavigation.ts +++ b/src/navigation/clientNavigation.ts @@ -52,6 +52,8 @@ export const clientNavigation: ClientNavigationNode[] = [ icon: ClipboardList, children: [ requireLeaf('first-leg-orders', '头程订单'), + requireLeaf('first-leg-customs-documents', '报关资料'), + requireLeaf('first-leg-sailing-prices', '船期价格'), requireLeaf('cross-border-procurement'), requireLeaf('cross-border-domestic-trucking'), requireLeaf('cross-border-pallet-shipping'),