fix: 统一计划产品计量单位并兼容历史吨单位,避免保存时关联校验失败。
This commit is contained in:
1 parent
75d7da3d3d
commit
6f4d4d2c59
10 files changed
+16078
-36329
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
initLineBrandMetaFromProduct,
|
||||
type BrandOption
|
||||
} from '@/utils/crm-product-brand'
|
||||
import { normalizeProductUnitValue } from '@/utils/crm-product-display'
|
||||
|
||||
export interface PlanFormProductRow {
|
||||
id?: string
|
||||
@@ -87,7 +88,7 @@ export function mapContractProductToPlanRow(item: ContractProductForm, index: nu
|
||||
brandName: item.brandName || undefined,
|
||||
model: item.model || item.productModel,
|
||||
categoryName: item.categoryName,
|
||||
unit: item.unit || '吨',
|
||||
unit: normalizeProductUnitValue(item.unit),
|
||||
quantity: Number(item.quantity || 0),
|
||||
actualQty: 0,
|
||||
packageSpec: packageSpecs.length === 1 ? packageSpecs[0] : undefined,
|
||||
|
||||
Reference in new issue
Block a user