|
@@ -589,30 +589,30 @@ export default {
|
|
|
const gateSelected = isYuan ? item.gateTotalAmount : item.gateQty // 已选
|
|
|
const gateTotal = isYuan ? item.gateBorrowAmount : item.gateBorrowQty // 累计
|
|
|
const gateQuota = isYuan ? item.gateQuotaAmount : item.gateQuotaQty // 配额
|
|
|
- const unUseGateQuota = isYuan ? item.unUseAmount : item.unUseQty // 未用配额(正价产品)=配额 - 已选 - 累计;未用配额(特价产品)= 配额 - 已选
|
|
|
- const geteBalance = item.gateShortfallValue // 差额 = 配额 - 已选 - 累计
|
|
|
+ const unUseGateQuota = isYuan ? item.unUseAmount : item.unUseQty // 未用配额
|
|
|
+ const geteBalance = item.gateShortfallValue // 差额
|
|
|
// 特价产品
|
|
|
const isYuan2 = item.gateRuleUnit == 'YUAN'
|
|
|
- const specialPriceUnit = isYuan2 ? '元' : '个' // 单位
|
|
|
+ const specialPriceUnit = isYuan2 ? '元' : '个' // 已选单位
|
|
|
const discountRuleUnit = item.discountRuleUnit == 'YUAN' ? '元' : '个' // 单位
|
|
|
const specialPriceSelected = isYuan2 ? item.discountAmount : item.discountQty || 0 // 已选
|
|
|
- const specialPriceQuota = item.promotionRule.promotionRuleType === 'PROMO_PROD' ? item.gateQuotaAmount : 0 // 配额
|
|
|
- const specialPriceBalance = !specialPriceQuota ? 0 : isYuan ? item.discountCeAmount : item.discountCeQty// 差额 = 配额 - 已选
|
|
|
- const discountRuleValue = item.discountRuleUnit == 'YUAN' ? Number(item.discountRuleValue).toFixed(2) : item.discountRuleValue
|
|
|
- const discountRuleNextValue = item.discountRuleUnit == 'YUAN' ? Number(item.discountRuleNextValue).toFixed(2) : item.discountRuleNextValue
|
|
|
+ const discountRuleValue = item.discountRuleUnit == 'YUAN' ? Number(item.discountRuleValue).toFixed(2) : item.discountRuleValue // 基础
|
|
|
+ const discountRuleNextValue = item.discountRuleUnit == 'YUAN' ? Number(item.discountShortfallValue).toFixed(2) : item.discountShortfallValue // 下阶差
|
|
|
// 正价统计
|
|
|
const isYuan1 = item.regularRuleUnit == 'YUAN'
|
|
|
const regularUnit = isYuan1 ? '元' : '个' // 单位
|
|
|
- const regularQuota = item.promotionRule.promotionRuleType != 'PROMO_PROD' ? item.gateQuotaAmount : 0// 配额 // 额度item.regularRuleValue
|
|
|
const regularSelected = isYuan1 ? item.regularTotalAmount : item.regularTotalQty // 已选
|
|
|
const regularTotal = isYuan1 ? item.regularBorrowAmount : item.regularBorrowQty // 累计
|
|
|
- const regularBaseVal = (item.promotionRule.promotionRuleType === 'BUY_PROD_GIVE_PROD' && item.promotionRule.regularPromotionSameFlag == 1) ? undefined : (isYuan1 ? item.baseAmount : item.baseQty) * 1 <= 0 ? 0 : (isYuan1 ? item.baseAmount : item.baseQty) // 基础差
|
|
|
- const regularNextVal = (item.promotionRule.promotionRuleType === 'BUY_PROD_GIVE_PROD' && item.promotionRule.regularPromotionSameFlag == 1) ? undefined : (isYuan1 ? item.nextAmount : item.nextQty) * 1 <= 0 ? 0 : (isYuan1 ? item.nextAmount : item.nextQty) // 下级差
|
|
|
+ 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 regularBaseVal = regularPromotionSameFlag ? undefined : baseVal1 * 1 <= 0 ? 0 : baseVal1 // 基础差
|
|
|
+ const regularNextVal = regularPromotionSameFlag ? undefined : nextVal1 * 1 <= 0 ? 0 : nextVal1 // 下级差
|
|
|
// 促销品
|
|
|
const promoUnit = '个'
|
|
|
const promoSelected = item.giftQty || 0 // 已选
|
|
|
const promoBalance = item.giftShortfallQty // 差额
|
|
|
- const promoLimit = item.giftCeQty // 额度 = 差额 + 已选
|
|
|
+ const promoLimit = item.giftCeQty // 额度
|
|
|
// 采购额
|
|
|
const purchaseUnit = '元'
|
|
|
const purchaseLimit = item.totalPromoGiftsAmount // 额度
|
|
@@ -632,18 +632,15 @@ export default {
|
|
|
unUseGateQuota, // 未用配额
|
|
|
gateSelected, // 已选
|
|
|
gateTotal, // 累计
|
|
|
- geteBalance, // 差额 = 配额 - 已选 - 累计
|
|
|
+ geteBalance, // 差额
|
|
|
// 特价产品
|
|
|
specialPriceUnit, // 单位
|
|
|
discountRuleUnit,
|
|
|
- specialPriceQuota, // 配额
|
|
|
specialPriceSelected, // 已选
|
|
|
- specialPriceBalance, // 差额
|
|
|
- discountRuleValue,
|
|
|
- discountRuleNextValue,
|
|
|
+ discountRuleValue, // 基础
|
|
|
+ discountRuleNextValue, // 下阶差
|
|
|
// 正价
|
|
|
regularUnit, // 单位
|
|
|
- regularQuota, // 配额
|
|
|
regularSelected, // 已选
|
|
|
regularTotal, // 累计
|
|
|
regularBaseVal, // 基础差
|
|
@@ -652,7 +649,7 @@ export default {
|
|
|
promoUnit, // 单位
|
|
|
promoLimit, // 额度
|
|
|
promoSelected, // 已选
|
|
|
- promoBalance, // 差额 = 额度 - 已选
|
|
|
+ promoBalance, // 差额
|
|
|
// 采购额
|
|
|
purchaseUnit,
|
|
|
purchaseLimit, // 额度
|