Commit 8c5bc7f6 by 杨树贤

活动价都展示

parent 5700d6e2
Showing with 19 additions and 19 deletions
...@@ -315,17 +315,17 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku { ...@@ -315,17 +315,17 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//联营或者专卖 同时 存在活动价格 //联营或者专卖 同时 存在活动价格
if (sku.GoodsType == 1 || sku.GoodsType == 2 || sku.GoodsType == 6) && sku.AcType > 1 && sku.Ratio > 0 { if (sku.GoodsType == 1 || sku.GoodsType == 2 || sku.GoodsType == 6) && sku.AcType > 1 && sku.Ratio > 0 {
if sku.Ratio == 100 { if sku.Ratio == 100 {
sku.AcType = 0 //sku.AcType = 0
continue //continue
} }
tempAcPrice := c.MyRound(c.MulFloat(price.PriceCn, sku.Ratio/100), 4) tempAcPrice := c.MyRound(c.MulFloat(price.PriceCn, sku.Ratio/100), 4)
//价格与原价一样 //价格与原价一样
if data[key].PriceCn == tempAcPrice && key < 2 { if data[key].PriceCn == tempAcPrice && key < 2 {
flag++ //flag++
if flag >= 2 || (len(ladderPrice) < 2) { //if flag >= 2 || (len(ladderPrice) < 2) {
sku.AcType = 0 // sku.AcType = 0
continue // continue
} //}
} }
data[key].PriceAc = tempAcPrice data[key].PriceAc = tempAcPrice
priceAcUs := c.MyRound(c.MulFloat(price.PriceUs, sku.RatioUs/100), 4) priceAcUs := c.MyRound(c.MulFloat(price.PriceUs, sku.RatioUs/100), 4)
...@@ -478,8 +478,8 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku { ...@@ -478,8 +478,8 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
if (sku.GoodsType == 1 || sku.GoodsType == 2 || sku.GoodsType == 6) && sku.AcType > 1 && sku.Ratio > 0 { if (sku.GoodsType == 1 || sku.GoodsType == 2 || sku.GoodsType == 6) && sku.AcType > 1 && sku.Ratio > 0 {
if sku.Ratio == 100 { if sku.Ratio == 100 {
sku.AcType = 0 //sku.AcType = 0
continue //continue
} }
priceAc := c.MyRound(c.MulFloat(data[key].PriceCn, (sku.Ratio/100)), 4) priceAc := c.MyRound(c.MulFloat(data[key].PriceCn, (sku.Ratio/100)), 4)
...@@ -488,16 +488,16 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku { ...@@ -488,16 +488,16 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//活动价都是有样式的和平时不一样,如果价格一样,但是样子是活动价,客户会迷惑,所以不输出即可,保持原来的样式 //活动价都是有样式的和平时不一样,如果价格一样,但是样子是活动价,客户会迷惑,所以不输出即可,保持原来的样式
if data[key].PriceCn == priceAc && key < 2 { if data[key].PriceCn == priceAc && key < 2 {
flag++ flag++
if flag >= 2 { //if flag >= 2 {
sku.AcType = 0 // sku.AcType = 0
continue // continue
} //}
if len(data) > 1 { //if len(data) > 1 {
if data[1].PriceCn == 0 { // if data[1].PriceCn == 0 {
sku.AcType = 0 // sku.AcType = 0
continue // continue
} // }
} //}
} }
data[key].PriceAc = priceAc data[key].PriceAc = priceAc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment