|
@@ -458,7 +458,13 @@ export default {
|
|
|
mainItemCategoryName: item.goodsTypeName || '',
|
|
|
mainItemCategoryId: item.goodsTypeId,
|
|
|
mainItemCategoryCode: '',
|
|
|
- unitPrice: '0',
|
|
|
+ // 使用 rebatePrice 作为单价来源,保证导入时价格带入
|
|
|
+ unitPrice: (() => {
|
|
|
+ const raw = (typeof item.rebatePrice === 'number') ? String(item.rebatePrice) : (item.rebatePrice || '0')
|
|
|
+ const sanitized = String(raw).replace(/[^\d.-]/g, '')
|
|
|
+ const parsed = parseFloat(sanitized)
|
|
|
+ return isNaN(parsed) ? 0 : parsed
|
|
|
+ })(),
|
|
|
description: item.productDescription || '',
|
|
|
warehouseId: item.storageId,
|
|
|
warehouseCode: '',
|