|
@@ -591,27 +591,27 @@ export default {
|
|
|
// 门槛统计
|
|
|
const isYuan = item.gateRuleUnit == 'YUAN'
|
|
|
const gateUnit = isYuan ? '元' : '个' // 单位
|
|
|
- const gateSelected = isYuan ? Number(item.gateAmount).toFixed(2) : item.gateQty // 已选
|
|
|
- const gateTotal = isYuan ? Number(item.gateBorrowAmount).toFixed(2) : item.gateBorrowQty // 累计
|
|
|
+ const gateSelected = isYuan ? (item.gateAmount ? Number(item.gateAmount).toFixed(2) : undefined) : item.gateQty // 已选
|
|
|
+ const gateTotal = isYuan ? (item.gateBorrowAmount ? Number(item.gateBorrowAmount).toFixed(2) : undefined) : item.gateBorrowQty // 累计
|
|
|
const geteBalance = item.gateShortfallValue // 差额
|
|
|
const quotaUnit = item.quotaRuleUnit == 'YUAN' ? '元' : '个' // 配额单位
|
|
|
- const gateQuota = Number(item.gateQuotaAmount).toFixed(2) // 配额
|
|
|
- const unUseGateQuota = Number(item.unUseAmount).toFixed(2) // 未用配额
|
|
|
+ const gateQuota = item.gateQuotaAmount ? Number(item.gateQuotaAmount).toFixed(2) : undefined // 配额
|
|
|
+ const unUseGateQuota = item.unUseAmount ? Number(item.unUseAmount).toFixed(2) : undefined // 未用配额
|
|
|
// 特价产品
|
|
|
const isYuan2 = item.discountRuleUnit == 'YUAN'
|
|
|
const discountRuleUnit = isYuan2 ? '元' : '个' // 单位
|
|
|
- const specialPriceSelected = isYuan2 ? Number(item.discountAmount).toFixed(2) : item.discountQty || 0 // 已选
|
|
|
- const totalPromoOrigAmount = isYuan2 ? Number(item.totalPromoOrigAmount).toFixed(2) : undefined
|
|
|
- const discountRuleValue = isYuan2 ? Number(item.discountRuleValue).toFixed(2) : item.discountRuleValue // 基础
|
|
|
- const discountRuleNextValue = isYuan2 ? Number(item.discountShortfallValue).toFixed(2) : item.discountShortfallValue // 下阶差
|
|
|
+ const specialPriceSelected = isYuan2 ? (item.discountAmount ? Number(item.discountAmount).toFixed(2) : undefined) : item.discountQty || 0 // 已选
|
|
|
+ const totalPromoOrigAmount = isYuan2 && item.totalPromoOrigAmount ? Number(item.totalPromoOrigAmount).toFixed(2) : undefined
|
|
|
+ const discountRuleValue = isYuan2 ? (item.discountRuleValue ? Number(item.discountRuleValue).toFixed(2) : undefined) : item.discountRuleValue // 基础
|
|
|
+ const discountRuleNextValue = isYuan2 ? (item.discountShortfallValue ? Number(item.discountShortfallValue).toFixed(2) : undefined) : item.discountShortfallValue // 下阶差
|
|
|
// 正价统计
|
|
|
const isYuan1 = item.regularRuleUnit == 'YUAN'
|
|
|
const regularUnit = isYuan1 ? '元' : '个' // 单位
|
|
|
- const regularSelected = isYuan1 ? Number(item.regularAmount).toFixed(2) : item.regularQty // 已选
|
|
|
- const regularTotal = isYuan1 ? Number(item.regularBorrowAmount).toFixed(2) : item.regularBorrowQty // 累计
|
|
|
+ const regularSelected = isYuan1 ? (item.regularAmount ? Number(item.regularAmount).toFixed(2) : undefined) : item.regularQty // 已选
|
|
|
+ const regularTotal = isYuan1 ? (item.regularBorrowAmount ? Number(item.regularBorrowAmount).toFixed(2) : undefined) : item.regularBorrowQty // 累计
|
|
|
const regularPromotionSameFlag = item.promotionRule.promotionRuleType === 'BUY_PROD_GIVE_PROD' && item.promotionRule.regularPromotionSameFlag == 1 // 促销品是否与正品一致
|
|
|
- const baseVal1 = isYuan1 ? Number(item.regularRuleValue).toFixed(2) : item.regularRuleValue
|
|
|
- const nextVal1 = isYuan1 ? Number(item.regularShortfallValue).toFixed(2) : item.regularShortfallValue
|
|
|
+ const baseVal1 = isYuan1 ? (item.regularRuleValue ? Number(item.regularRuleValue).toFixed(2) : undefined) : item.regularRuleValue
|
|
|
+ const nextVal1 = isYuan1 ? (item.regularShortfallValue ? Number(item.regularShortfallValue).toFixed(2) : undefined) : item.regularShortfallValue
|
|
|
const regularBaseVal = regularPromotionSameFlag ? undefined : baseVal1 // 基础差
|
|
|
const regularNextVal = regularPromotionSameFlag ? undefined : nextVal1 // 下级差
|
|
|
// 促销品
|