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