Fix Bug #556: 根因+修复方案摘要
This commit is contained in:
@@ -1185,9 +1185,9 @@ const loadCategoryItems = async (categoryKey, loadMore = false) => {
|
|||||||
|
|
||||||
// 映射数据格式(从检验项目维护页面的数据结构映射)
|
// 映射数据格式(从检验项目维护页面的数据结构映射)
|
||||||
const mappedItems = records.map(item => {
|
const mappedItems = records.map(item => {
|
||||||
// 套餐项目处理:套餐项目使用套餐金额,普通项目使用零售价
|
// 套餐项目处理:需同时满足 feePackageId 有效且 packageName 非空
|
||||||
// BugFix#404: 增加对空字符串的判断,避免空字符串被误认为有效套餐ID
|
// BugFix#556: 增加 packageName 联合判断,避免普通项目因 feePackageId 有值被误标为套餐
|
||||||
const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null'
|
const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName
|
||||||
const itemPrice = isPackage
|
const itemPrice = isPackage
|
||||||
? (parseFloat(item.packageAmount || 0) || parseFloat(item.retailPrice || 0) || parseFloat(item.price || 0))
|
? (parseFloat(item.packageAmount || 0) || parseFloat(item.retailPrice || 0) || parseFloat(item.price || 0))
|
||||||
: (parseFloat(item.retailPrice || 0) || parseFloat(item.price || 0))
|
: (parseFloat(item.retailPrice || 0) || parseFloat(item.price || 0))
|
||||||
|
|||||||
Reference in New Issue
Block a user