修改套餐导入功能
This commit is contained in:
@@ -316,14 +316,14 @@ export function useDetailCascade(refData) {
|
||||
// Do NOT prefetch /surcharge/byProduct here: applySetData hydrates every detail row
|
||||
// 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).
|
||||
if (row.productCountryId != null && (row.weightMin != null || row.weightMax != null || row.weightLabel)) {
|
||||
// Excel preview / DB bulk already has country + weight: normalize locally.
|
||||
// Do not fire /countries per detail row (import can be hundreds of rows).
|
||||
if (row.productCountryId != null
|
||||
|| ((row.weightMin != null || row.weightMax != null) && (row.countryCode || row.countryName))) {
|
||||
if (row.weightMin != null || row.weightMax != null) {
|
||||
row.weightLabel = formatWeightLabel(row.weightMin, row.weightMax)
|
||||
}
|
||||
row._countryKey = countryKeyOf(row)
|
||||
// Keep package prices in fv*; product base is stamped later from product_country.
|
||||
return row
|
||||
}
|
||||
refData.ensureCountries(row.productCode).then(rows => {
|
||||
|
||||
Reference in New Issue
Block a user