Commit e53db1cd0b8b428fe6ae53082831aeb0006fb5d3

Authored by yvan.ni
1 parent e029a990

组合购和阶梯购 订单优惠的叠加的优化

packageE/pages/cart/cart2/cart2.js
@@ -2231,6 +2231,13 @@ Page({ @@ -2231,6 +2231,13 @@ Page({
2231 if (kitem.act.is_orderyh) 2231 if (kitem.act.is_orderyh)
2232 o_price_no_zh -= kitem.cut_price; 2232 o_price_no_zh -= kitem.cut_price;
2233 } 2233 }
  2234 + }else{
  2235 + //找到那些可以订单优惠叠加的
  2236 + for (let ij in zh_prom_goods) {
  2237 + let kitem_z = zh_prom_goods[ij];
  2238 + if (!kitem_z.act.is_orderyh)
  2239 + no_order_yh+=kitem_z.actual_price;
  2240 + }
2234 } 2241 }
2235 } 2242 }
2236 2243
@@ -2244,6 +2251,13 @@ Page({ @@ -2244,6 +2251,13 @@ Page({
2244 if (th.data.ladder_map[ij].is_useorderyh) 2251 if (th.data.ladder_map[ij].is_useorderyh)
2245 o_price_no_zh -= kitem.cut_price; 2252 o_price_no_zh -= kitem.cut_price;
2246 } 2253 }
  2254 + }else{
  2255 + //找到那些可以订单优惠叠加的不参与的要减掉
  2256 + for (let ij in ladder_prom_goods) {
  2257 + let kitem_l = ladder_prom_goods[ij];
  2258 + if (!th.data.ladder_map[ij].is_useorderyh)
  2259 + no_order_yh+=kitem_l.actual_price;
  2260 + }
2247 } 2261 }
2248 } 2262 }
2249 2263
@@ -2270,8 +2284,10 @@ Page({ @@ -2270,8 +2284,10 @@ Page({
2270 2284
2271 2285
2272 var ord_prom_condition=0; 2286 var ord_prom_condition=0;
  2287 +
  2288 + //如果有组合购
2273 if(o_price_no_zh){ 2289 if(o_price_no_zh){
2274 - ord_prom_condition=o_price_no_zh-whsle_goods_price-no_zh_all_quan_num; 2290 + ord_prom_condition=o_price_no_zh-whsle_goods_price-no_zh_all_quan_num- no_order_yh;
2275 }else{ 2291 }else{
2276 ord_prom_condition=o_price - quan_price - whsle_goods_price - no_order_yh; 2292 ord_prom_condition=o_price - quan_price - whsle_goods_price - no_order_yh;
2277 } 2293 }