33 lines
1.5 KiB
Markdown
33 lines
1.5 KiB
Markdown
|
|
# Frontend Integration: OMS Workbench (统一订单工作台)
|
||
|
|
|
||
|
|
## 🎨 UI Layout Sketch
|
||
|
|
- **Page Path**: `/erp/oms/workbench`
|
||
|
|
- **Component Structure**:
|
||
|
|
- `OrderStats`: Top metrics (Total Orders, Pending Audit, Waiting Shipment, Exceptions).
|
||
|
|
- `OrderFilter`: Multi-dimensional filtering (Platform, Site, Status, Date, Amount, Customer).
|
||
|
|
- `OrderTable`: Detailed list of orders with:
|
||
|
|
- Status badges (e.g., `PENDING_AUDIT` in orange, `WAITING_SHIPMENT` in blue).
|
||
|
|
- Platform/Site icons.
|
||
|
|
- Items summary.
|
||
|
|
- Total Amount & Currency.
|
||
|
|
- Action column: "Audit", "Ship", "Mark Exception", "Reroute".
|
||
|
|
- `BatchActionPanel`: "Batch Audit", "Batch Ship", "Batch Export".
|
||
|
|
- `OrderDetailDrawer`: Full details on click, including Health Check results and Auto-Heal logs.
|
||
|
|
|
||
|
|
## 🔄 Interaction State Machine
|
||
|
|
- `INITIAL`: Fetching multi-platform orders.
|
||
|
|
- `FILTERING`: User applying criteria.
|
||
|
|
- `AUDITING`: `ConsumerOrderService.batchAudit` processing.
|
||
|
|
- `SHIPPING`: `ConsumerOrderService.batchShip` processing.
|
||
|
|
- `EXCEPTION_HANDLING`: User resolving exception reason.
|
||
|
|
|
||
|
|
## 🔗 API Mapping
|
||
|
|
- `GET /api/v1/orders/list`: Fetches `cf_consumer_orders`.
|
||
|
|
- `POST /api/v1/orders/batch-audit`: Triggers `ConsumerOrderService.batchAudit`.
|
||
|
|
- `POST /api/v1/orders/batch-ship`: Triggers `ConsumerOrderService.batchShip`.
|
||
|
|
- `POST /api/v1/orders/reroute`: Triggers `ConsumerOrderService.autoReroute`.
|
||
|
|
|
||
|
|
## 📈 ROI Visualization
|
||
|
|
- "OMS Efficiency": Orders processed per minute compared to manual.
|
||
|
|
- "Error Reduction": Exception rate before and after AI Health Check.
|