Refactor surcharge management by replacing PrcPriceSetVersionSurcharge with PrcSurchargeRel, introducing price type handling (PRODUCT, SALES, REDLINE) and updating related services, mappers, and front-end components. Enhance validation and error messaging for price type and detail ID requirements. Update database schema to support new relationships and constraints.

This commit is contained in:
wuweihua
2026-10-09 17:20:10 +08:00
parent 70e9c18182
commit 380577f691
19 changed files with 647 additions and 530 deletions
@@ -314,7 +314,7 @@ export function useDetailCascade(refData) {
const row = toEditableDetailRow(d)
if (!row.productCode) return row
// Do NOT prefetch /surcharge/byProduct here: applySetData hydrates every detail row
// on step-1 load; use version snapshot row.surcharges instead. Fetch on demand in picker.
// on step-1 load; use SALES rels on row.surcharges instead. Fetch on demand in picker.
if (setType !== 'FIXED') return row
// Bulk load from DB already has productCountryId + weight bounds: normalize locally,
// do not fire /countries per detail row (was stampeding thousands of identical requests).