Both list pages had 查看 links with no onClick. Added detail pages showing
header info and line items, with action buttons (确认开始盘点 / 审核通过+驳回).
Also: extended StockCheck/StockAdjust types to include details and extra
fields; added /inventory/checks/:id and /inventory/adjusts/:id routes;
moved columns definitions inside components (module-level columns with
history.push were silently ignored by the browser due to MFSU caching);
switched to Link component for SPA navigation.
Both pages had toolbar buttons with no onClick handler. Added modal forms:
- Checks: date + checker + optional detail rows (product + actual qty)
- Adjusts: date + reason + required detail rows (product + adjust qty, negative to decrease)
Also updated createStockCheck and createStockAdjust API function signatures
from Partial<StockCheck/Adjust> to explicit typed request shapes.
Fixed a go-zero validation bug: non-optional fields (checker, adjustReason)
must be present in the JSON body; antd Form returns undefined for untouched
inputs which JSON.stringify omits, causing 400. Solved by setting default
empty strings in Form initialValues.
- 'renders summary table without crash when product has empty colors and locations':
mocks getProductSummary returning a product with colors/locations='', verifying the
page does not crash and calls the API (reproduces the previously-broken scenario).
- 'closes dialog after successful product creation (reload branch reached)':
verifies that a successful form submission calls createProduct and the ModalForm
closes, confirming onFinish returned true — the same code branch that triggers
summaryRef.reload().