From e062365ca77752000fbe5db454fa667a1b29fa83 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Wed, 9 Sep 2026 17:17:21 +0800 Subject: [PATCH 1/4] test: extend overseas client regression --- .../views/relabelAttachments.test.mjs | 11 +++++++---- src/navigation/clientNavigation.test.mjs | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs b/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs index 243d8d9..55dc852 100644 --- a/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs +++ b/src/modules/overseas-warehouse/views/relabelAttachments.test.mjs @@ -42,11 +42,14 @@ test('贴标货物明细支持手动添加和编辑', () => { assert.match(view, / { - assert.match(view, /el-tab-pane label="箱唛换标" name="carton"/) - assert.match(view, /el-tab-pane label="SKU 换标" name="sku"/) +test('贴标货物明细通过单一换标类型选择三种模式', () => { + assert.match(view, //) + assert.match(view, /只换箱唛<\/el-radio-button>/) + assert.match(view, /只换 SKU 标签<\/el-radio-button>/) + assert.match(view, /SKU 和箱唛都换<\/el-radio-button>/) + assert.doesNotMatch(view, /el-tab-pane label="(?:箱唛换标|SKU 换标)"/) assert.match(view, /interface SkuRelabelRow/) - assert.match(view, /来源库存箱 \*/) + assert.match(view, /原 SKU \*/) assert.match(view, /我方箱唛 \*/) assert.match(view, /换标数量(件)\*/) assert.match(view, /buildSkuRelabelItems/) diff --git a/src/navigation/clientNavigation.test.mjs b/src/navigation/clientNavigation.test.mjs index 3bbbd69..1e5afce 100644 --- a/src/navigation/clientNavigation.test.mjs +++ b/src/navigation/clientNavigation.test.mjs @@ -59,7 +59,7 @@ test('keeps only implemented navigation groups visible', () => { }, { title: '海外仓', - children: ['贴标申请', '仓储转运', '货物废弃', '退货换标', '退货库存'], + children: ['贴标申请', '仓储转运', '货物废弃', '退货换标', '退货库存', '退货箱号管理'], }, { title: '订单管理', @@ -107,6 +107,7 @@ test('flattens visible leaves with unique paths', () => { '/overseas-warehouse/cargo-disposal', '/overseas-warehouse/return-relabel', '/overseas-warehouse/return-inventory', + '/overseas-warehouse/return-cartons', '/orders/inbound', '/orders/delivery', '/finance/account', From c08c76c22a786c23084f032b3b11d2c3c47530c1 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 10 Sep 2026 11:17:04 +0800 Subject: [PATCH 2/4] fix: use supported finance pagination bindings --- src/modules/finance/views/FinanceAccountView.test.mjs | 3 +++ src/modules/finance/views/FinanceAccountView.vue | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/finance/views/FinanceAccountView.test.mjs b/src/modules/finance/views/FinanceAccountView.test.mjs index 7c1dbbc..fd863e7 100644 --- a/src/modules/finance/views/FinanceAccountView.test.mjs +++ b/src/modules/finance/views/FinanceAccountView.test.mjs @@ -39,6 +39,9 @@ test('renders server balances, ledger and recharge states without internal ident assert.match(viewSource, /v-loading="pageLoading"/) assert.match(viewSource, /function formatAccountAmount[\s\S]*value == null \? '—' : formatAmount\(value\)/) assert.match(viewSource, /formatAccountAmount\(account\?\.actualBalance\)/) + assert.match(viewSource, /v-model:current-page="ledgerPage"/) + assert.match(viewSource, /v-model:current-page="rechargePage"/) + assert.doesNotMatch(viewSource, / { void loadAccountData() }) -
共 {{ ledgerTotal }} 条
+
共 {{ ledgerTotal }} 条
From 354f65afe85f24feb4ad1306782b0a56a4f794e8 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 10 Sep 2026 11:25:50 +0800 Subject: [PATCH 3/4] fix: avoid deprecated finance pagination control --- src/modules/finance/views/FinanceAccountView.test.mjs | 6 +++--- src/modules/finance/views/FinanceAccountView.vue | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/finance/views/FinanceAccountView.test.mjs b/src/modules/finance/views/FinanceAccountView.test.mjs index fd863e7..3c0d176 100644 --- a/src/modules/finance/views/FinanceAccountView.test.mjs +++ b/src/modules/finance/views/FinanceAccountView.test.mjs @@ -39,9 +39,9 @@ test('renders server balances, ledger and recharge states without internal ident assert.match(viewSource, /v-loading="pageLoading"/) assert.match(viewSource, /function formatAccountAmount[\s\S]*value == null \? '—' : formatAmount\(value\)/) assert.match(viewSource, /formatAccountAmount\(account\?\.actualBalance\)/) - assert.match(viewSource, /v-model:current-page="ledgerPage"/) - assert.match(viewSource, /v-model:current-page="rechargePage"/) - assert.doesNotMatch(viewSource, / { void loadAccountData() }) -
共 {{ ledgerTotal }} 条
+
共 {{ ledgerTotal }} 条
From 911623d5a32d8245997aa62027e0720db8097e97 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 10 Sep 2026 11:32:38 +0800 Subject: [PATCH 4/4] fix: normalize finance page metadata --- src/modules/finance/api/account.ts | 27 ++++++++++++++++--- .../finance/views/FinanceAccountView.test.mjs | 2 ++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/modules/finance/api/account.ts b/src/modules/finance/api/account.ts index 1928d09..703036f 100644 --- a/src/modules/finance/api/account.ts +++ b/src/modules/finance/api/account.ts @@ -8,6 +8,23 @@ export interface PageResult { pages: number } +interface PageResultWire extends Omit, 'total' | 'page' | 'size' | 'pages'> { + total: number | string + page: number | string + size: number | string + pages: number | string +} + +function normalizePageResult(result: PageResultWire): PageResult { + return { + ...result, + total: Number(result.total), + page: Number(result.page), + size: Number(result.size), + pages: Number(result.pages), + } +} + export interface FinanceAccount { currencyCode: 'CNY' actualBalance: string @@ -71,20 +88,22 @@ export function getFinanceAccount() { return apiRequest({ method: 'GET', url: '/client/finance/v1/account' }) } -export function getAccountLedger(page: number, size: number) { - return apiRequest>({ +export async function getAccountLedger(page: number, size: number) { + const result = await apiRequest>({ method: 'GET', url: '/client/finance/v1/account/ledger', params: { page, size }, }) + return normalizePageResult(result) } -export function getRechargeRequests(page: number, size: number) { - return apiRequest>({ +export async function getRechargeRequests(page: number, size: number) { + const result = await apiRequest>({ method: 'GET', url: '/client/finance/v1/recharge-requests', params: { page, size }, }) + return normalizePageResult(result) } export function getRechargeChannels() { diff --git a/src/modules/finance/views/FinanceAccountView.test.mjs b/src/modules/finance/views/FinanceAccountView.test.mjs index 3c0d176..db18376 100644 --- a/src/modules/finance/views/FinanceAccountView.test.mjs +++ b/src/modules/finance/views/FinanceAccountView.test.mjs @@ -42,6 +42,8 @@ test('renders server balances, ledger and recharge states without internal ident assert.match(viewSource, /:default-current-page="ledgerPage"/) assert.match(viewSource, /:default-current-page="rechargePage"/) assert.doesNotMatch(viewSource, /