Commit 9d7077c8dd55411e6a11f1c7d57efda1cc0a3587
Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa
Showing
2 changed files
with
18 additions
and
7 deletions
packageE/pages/cart/cart2/cart2.js
@@ -3252,15 +3252,25 @@ Page({ | @@ -3252,15 +3252,25 @@ Page({ | ||
3252 | //-- 如果是零售价的时候 --- | 3252 | //-- 如果是零售价的时候 --- |
3253 | if(th.data.using_quan[pickid].FactPriceType){ | 3253 | if(th.data.using_quan[pickid].FactPriceType){ |
3254 | let scj_arr=c_arr[i].scj_arr; | 3254 | let scj_arr=c_arr[i].scj_arr; |
3255 | - let scj_check_quan_price_list=''; | ||
3256 | - let scj_check_quan_ware_list=''; | 3255 | + let scj_check_quan_price_list=[]; |
3256 | + let scj_check_quan_ware_list=[]; | ||
3257 | for (let jh = 0; jh <scj_arr.length ; jh++) { | 3257 | for (let jh = 0; jh <scj_arr.length ; jh++) { |
3258 | - scj_check_quan_price_list+=(scj_arr[jh].sum_price+",") | ||
3259 | - scj_check_quan_ware_list+=(scj_arr[jh].erpwareid+",") | 3258 | + |
3259 | + //如果商品有重复的过滤,一般是组合购和阶梯购的情况下 | ||
3260 | + var idxx = scj_check_quan_ware_list.findIndex(function (ele) { | ||
3261 | + return ele == encodeURIComponent(scj_arr[jh].erpwareid); | ||
3262 | + }) | ||
3263 | + | ||
3264 | + if (idxx > -1) { | ||
3265 | + scj_check_quan_price_list[idxx] += scj_arr[jh].sum_price; | ||
3266 | + } else { | ||
3267 | + scj_check_quan_price_list.push(scj_arr[jh].sum_price); | ||
3268 | + scj_check_quan_ware_list.push(encodeURIComponent(scj_arr[jh].erpwareid)); | ||
3269 | + } | ||
3260 | } | 3270 | } |
3261 | 3271 | ||
3262 | - get_c_price_data.WaresSum= ut.sub_last(scj_check_quan_price_list); | ||
3263 | - get_c_price_data.WareIds= ut.sub_last(scj_check_quan_ware_list); | 3272 | + get_c_price_data.WaresSum= scj_check_quan_price_list.join(); |
3273 | + get_c_price_data.WareIds= scj_check_quan_ware_list.join(); | ||
3264 | is_quan_scj=1; | 3274 | is_quan_scj=1; |
3265 | } | 3275 | } |
3266 | 3276 | ||
@@ -7187,6 +7197,7 @@ Page({ | @@ -7187,6 +7197,7 @@ Page({ | ||
7187 | } | 7197 | } |
7188 | }, 500); | 7198 | }, 500); |
7189 | }, | 7199 | }, |
7200 | + | ||
7190 | //-----获取购物车进来的劵------- | 7201 | //-----获取购物车进来的劵------- |
7191 | get_cart_quan: async function (order_prom_list_cart) { | 7202 | get_cart_quan: async function (order_prom_list_cart) { |
7192 | var th = this; | 7203 | var th = this; |
packageE/pages/cart/cart2/remark_part_qj.wxml
@@ -5,6 +5,6 @@ | @@ -5,6 +5,6 @@ | ||
5 | <block wx:if="{{item.UseObjectName}}">仅{{item.UseObjectName}}使用</block> | 5 | <block wx:if="{{item.UseObjectName}}">仅{{item.UseObjectName}}使用</block> |
6 | <block wx:else>全场通用</block> | 6 | <block wx:else>全场通用</block> |
7 | </text> | 7 | </text> |
8 | - <text class="five-level-word explain-coupon">取价规则:<block wx:if="{{item.FactPriceType>0}}">零售价</block><block wx:wx:else="{{item.FactPriceType>0}}">实收价</block></text> | 8 | + <text class="five-level-word explain-coupon">取价规则:<block wx:if="{{item.FactPriceType>0}}">零售价</block><block wx:else="{{item.FactPriceType>0}}">实收价</block></text> |
9 | </view> | 9 | </view> |
10 | </view> | 10 | </view> |
11 | \ No newline at end of file | 11 | \ No newline at end of file |