feat(freight): shop freight templates, server-side checkout fees, company dictionary (add-freight-templates)

This commit is contained in:
Chengdong Zhang
2026-09-24 15:03:51 +08:00
parent 5b426486ac
commit 473d19d089
44 changed files with 2409 additions and 67 deletions
+15
View File
@@ -263,3 +263,18 @@ The Mall SHALL use the shared selected API adapter to expose an after-sale actio
- **WHEN** the aftersale domain is configured for fixed data
- **THEN** Mall list, detail, messages, cancellation, tracking, and refund-history flows behave deterministically through the same shared methods
### Requirement: Checkout shipping fee display
Checkout SHALL show each shop group's delivery fee and the combined shipping total computed by the server, alongside the merchandise and order totals in the selected currency. Changing the selected shipping address SHALL refresh the fee breakdown before submission, and payment and order detail SHALL show the persisted `shipping_fee` from the order payload. Fees SHALL come only from the shared `@vmall/shared` contract; the fixed-data adapter SHALL implement the same quote surface as a fallback so checkout works without the backend.
#### Scenario: per-shop fees at checkout
- **WHEN** a shopper's checkout spans two shops with different templates
- **THEN** each shop group shows its own delivery fee and the summary shows their sum
#### Scenario: address change updates fees
- **WHEN** the shopper selects an address whose region rule raises shipping
- **THEN** the displayed per-shop fees and total update to the server's new calculation
#### Scenario: fixed adapter quotes fees
- **WHEN** the shipping surface is configured to fixed data
- **THEN** checkout renders deterministic per-shop delivery fees through the same shared client methods