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
@@ -102,3 +102,21 @@ Shop-admin SHALL provide an aftersale list and detail workspace filtered to the
- **WHEN** an authorized shop user appends a localized message
- **THEN** the message appears in the same chronological aftersale thread visible to the buyer
### Requirement: Merchant freight template management
Shop-admin SHALL provide a freight template management page for the signed-in shop user's own shop only, listing the shop's templates with their default flag, always-free toggle, pricing method, minor-unit fees, integer unit sizes, free-shipping threshold, and region rules. Create, edit, default-toggle, region-rule editing, and delete SHALL go through the shared `@vmall/shared` contract, and making a template default SHALL reflect the server's single-default outcome. The page SHALL use `@vmall/ui` primitives and shared tokens.
#### Scenario: manage a template and its region rules
- **WHEN** a shop user creates a by-piece template, adds a region rule with higher fees, and saves
- **THEN** reloading the page shows the template and rule from the backend
#### Scenario: default template toggle
- **WHEN** a shop user marks a second template as default
- **THEN** the page shows exactly that template as default after the server confirms
### Requirement: Merchant shipping company selection
When a shop user ships an order from the fulfillment view, shop-admin SHALL offer the shipping companies from the shared dictionary and require a selection before marking the order shipped. The chosen company SHALL reach the backend through the shared contract and appear on the order after shipping.
#### Scenario: ship with a selected company
- **WHEN** a shop user selects a shipping company and confirms shipment
- **THEN** the order shows the shipped state and the selected company