This commit is contained in:
2026-10-19 17:56:31 +08:00
parent 5a46198bf0
commit 5c28cd7c79
84 changed files with 3356 additions and 3630 deletions
@@ -44,12 +44,12 @@ describe('inbound fee-detail API', () => {
it('keeps an empty supplier category as null and rejects an unknown non-empty category', async () => {
vi.mocked(http.get).mockResolvedValue({ code: '200', data: { records: [
{ id: 31, feeTypeName: '拖车费', feeCode: 'TRUCKING', supplierCategory: 'TRUCKING', warehousePayable: true },
{ id: 31, feeTypeName: '拖车费', feeCode: 'TRUCKING', defaultPrice: '60.25', supplierCategory: 'TRUCKING', warehousePayable: true },
{ id: 33, feeTypeName: '缺少类别', feeCode: 'MISSING', warehousePayable: true },
] } })
await expect(listInboundFeeItemOptions()).resolves.toMatchObject([
{ id: 31, feeCode: 'TRUCKING', supplierCategory: 'TRUCKING' },
{ id: 33, feeCode: 'MISSING', supplierCategory: null },
{ id: 31, feeCode: 'TRUCKING', defaultPrice: 60.25, supplierCategory: 'TRUCKING' },
{ id: 33, feeCode: 'MISSING', defaultPrice: null, supplierCategory: null },
])
vi.mocked(http.get).mockResolvedValue({ code: '200', data: { records: [
{ id: 32, feeTypeName: '未知费用', feeCode: 'UNMAPPED', supplierCategory: 'UNKNOWN', warehousePayable: true },