合并 admin web 冲突并同步库存接口测试

This commit is contained in:
2026-08-21 11:28:39 +08:00
6 changed files with 30 additions and 7 deletions
+6
View File
@@ -13,6 +13,12 @@
- 应收款统计从 `pages/FinanceReceivableStatisticsView.vue`、`api/finance.ts` 进入,只汇总指定生成月份的 CNY 正式应收结算单。
- 统计月份使用 `yyyy-MM`;当前页打印留在页面,Excel 通过 `FINANCE_RECEIVABLE_STATISTICS` 进入 File 下载中心异步导出。
## 费用付款与凭证快速入口
- 入库费用的应付/直接已付表单在 `../unified-orders/components/InboundFeeDetailManager.vue`,柜次费用在 `../loading-lists/components/ContainerFeesPanel.vue`;对应 API 分别为 `../unified-orders/api/inboundFeeDetails.ts`、`../loading-lists/api/containerFees.ts`。
- `DIRECT_PAID` 必须提交已付时间、付款方式,以及付款流水号或至少一个付款凭证;凭证由费用 API 调用 `/platform/finance/v1/vouchers` 上传为 `FINANCE_VOUCHER`,并绑定当前客户。
- 后端事实入口为 Firstleg `FeePaymentSnapshotValidator`、入库/柜次费用服务,文件元数据归 File;Finance 只消费已发布的费用来源快照,不在前端或 Finance 中重建付款事实。
## 权限与验证
- 列表和详情只读遵守 `*:list` 统一语义;确认、审核、导出、上传等写入或产出文件的动作继续使用独立权限。
@@ -70,7 +70,8 @@ describe('FinanceCustomerAccountsView delivery', () => {
it('keeps term editing aligned with the account summary and nearby actions', () => {
for (const marker of ['class="term-section"', 'class="term-editor"', '账期天数', '#footer', '保存账期']) expect(page).toContain(marker)
expect(page).toContain('grid-template-columns: repeat(4, minmax(0, 1fr))')
expect(page).toContain('grid-template-columns: repeat(3, minmax(0, 1fr))')
for (const metric of ['总成本(CNY)', '已付成本(CNY)', '总成本', '已付成本', '待付金额']) expect(page).toContain(metric)
expect(page).toContain('grid-template-columns: 120px minmax(0, 220px)')
expect(page).toContain('justify-content: start')
expect(page).toContain('class="surface-panel finance-account-detail__surface"')
@@ -551,7 +551,8 @@ watch(() => [route.name, String(route.params.customerId || '')], ([name, custome
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-metric:nth-child(3) {
.account-metric:nth-child(3),
.account-metric:nth-child(5) {
padding-left: 0;
border-left: 0;
}
@@ -586,7 +587,8 @@ watch(() => [route.name, String(route.params.customerId || '')], ([name, custome
.account-metric,
.account-metric:first-child,
.account-metric:nth-child(3) {
.account-metric:nth-child(3),
.account-metric:nth-child(5) {
padding-left: 0;
}
@@ -15,7 +15,7 @@ describe('overseas inventory API', () => {
await getInventorySummary(query)
expect(overseasHttp.get).toHaveBeenNthCalledWith(1, '/platform/v1/last-leg/inventory/balances', { params: query })
expect(overseasHttp.get).toHaveBeenNthCalledWith(2, '/platform/v1/last-leg/inventory/summary', { params: { skuCode: 'SKU-1', warehouseLocationCode: 'A-01' } })
expect(overseasHttp.get).toHaveBeenNthCalledWith(2, '/platform/v1/last-leg/inventory/summary', { params: { page: 1, size: 200, skuCode: 'SKU-1', warehouseLocationCode: 'A-01' } })
})
it('uses the read-only position and ledger endpoints without customer scope', async () => {
@@ -117,9 +117,8 @@ export async function listInventoryBalances(query: InventoryBalanceQuery) {
}
export async function getInventorySummary(query: InventoryBalanceQuery) {
const { page: _page, size: _size, ...summaryParams } = params(query)
const response = await overseasHttp.get<ApiEnvelope<InventoryDashboardDto>, ApiEnvelope<InventoryDashboardDto>>(
'/platform/v1/last-leg/inventory/summary', { params: summaryParams },
'/platform/v1/last-leg/inventory/summary', { params: params({ ...query, page: 1, size: 200 }) },
)
return unwrapApiResponse(response)
}