Merge branch 'feature/yohoCoin' into release/5.2
Showing
2 changed files
with
31 additions
and
12 deletions
@@ -241,6 +241,7 @@ var Order = { | @@ -241,6 +241,7 @@ var Order = { | ||
241 | isExpress = ''; | 241 | isExpress = ''; |
242 | 242 | ||
243 | var tipsStr; | 243 | var tipsStr; |
244 | + var isJuan = false; | ||
244 | 245 | ||
245 | var envelopesVal; | 246 | var envelopesVal; |
246 | 247 | ||
@@ -253,6 +254,7 @@ var Order = { | @@ -253,6 +254,7 @@ var Order = { | ||
253 | for (i = 0; i < dArr.length; i++) { | 254 | for (i = 0; i < dArr.length; i++) { |
254 | 255 | ||
255 | if (dArr[i].promotion === '优惠券:') { | 256 | if (dArr[i].promotion === '优惠券:') { |
257 | + isJuan = true; | ||
256 | dArr[i].promotion = (tipsStr ? tipsStr : '优惠券') + '<span class="juan-modify">[修改]</span>:'; | 258 | dArr[i].promotion = (tipsStr ? tipsStr : '优惠券') + '<span class="juan-modify">[修改]</span>:'; |
257 | } | 259 | } |
258 | 260 | ||
@@ -275,16 +277,23 @@ var Order = { | @@ -275,16 +277,23 @@ var Order = { | ||
275 | e.$payTotal.html(str); | 277 | e.$payTotal.html(str); |
276 | e.$toPay.html((data.last_order_amount).toFixed(2)); | 278 | e.$toPay.html((data.last_order_amount).toFixed(2)); |
277 | 279 | ||
278 | - //有货币清零状态更新 | 280 | + //有货币清零状态更新 start |
279 | $('dl.play-bi-pan').find('dt').removeClass('not-btn'); | 281 | $('dl.play-bi-pan').find('dt').removeClass('not-btn'); |
280 | $('.not-btn-tip').addClass('hide'); | 282 | $('.not-btn-tip').addClass('hide'); |
281 | $('.yohoCoinTip').removeClass('coin-gray'); | 283 | $('.yohoCoinTip').removeClass('coin-gray'); |
284 | + if (data.yohoCoinCompute.yohoCoinNum > 0) { | ||
285 | + $('.errbitip').html(''); | ||
286 | + } | ||
282 | if (!data.yohoCoinCompute.yohoCoinClick) { | 287 | if (!data.yohoCoinCompute.yohoCoinClick) { |
283 | - //不可以使用状态 | ||
284 | - $('dl.play-bi-pan').find('dt').addClass('not-btn'); | ||
285 | - $('.not-btn-tip').removeClass('hide'); | ||
286 | - //如果有货币按钮为打开状态,则关闭 | ||
287 | - Order.Common.winHide($('.play-bi-pan')); | 288 | + if (isJuan) { |
289 | + //不可以使用状态 | ||
290 | + $('dl.play-bi-pan').find('dt').addClass('not-btn'); | ||
291 | + $('.not-btn-tip').removeClass('hide'); | ||
292 | + //如果有货币按钮为打开状态,则关闭 | ||
293 | + Order.Common.winHide($('.play-bi-pan')); | ||
294 | + } | ||
295 | + $('.yohoCoinTip').addClass('coin-gray'); | ||
296 | + $('.errbitip').html(data.yohoCoinCompute.yohoCoinMsg); | ||
288 | } | 297 | } |
289 | $('#biprice').data({ | 298 | $('#biprice').data({ |
290 | 'yoho-coin-num': data.yohoCoinCompute.yohoCoinNum, | 299 | 'yoho-coin-num': data.yohoCoinCompute.yohoCoinNum, |
@@ -294,6 +303,7 @@ var Order = { | @@ -294,6 +303,7 @@ var Order = { | ||
294 | $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum); | 303 | $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum); |
295 | $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum); | 304 | $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum); |
296 | $('#biprice').find('.yohoCoin').html(data.yohoCoinCompute.yohoCoin); | 305 | $('#biprice').find('.yohoCoin').html(data.yohoCoinCompute.yohoCoin); |
306 | + //有货币清零状态更新 end | ||
297 | 307 | ||
298 | //使用的红包 | 308 | //使用的红包 |
299 | envelopesVal = e.$useEnvelopesInput.data('all') - data.use_red_envelopes; | 309 | envelopesVal = e.$useEnvelopesInput.data('all') - data.use_red_envelopes; |
@@ -298,6 +298,7 @@ var TicketCat = { | @@ -298,6 +298,7 @@ var TicketCat = { | ||
298 | i, | 298 | i, |
299 | dArr = data.shopping_cart_data.promotion_formula_list, | 299 | dArr = data.shopping_cart_data.promotion_formula_list, |
300 | str = '', | 300 | str = '', |
301 | + isJuan = false, | ||
301 | isExpress = ''; | 302 | isExpress = ''; |
302 | 303 | ||
303 | for (i = 0; i < dArr.length; i++) { | 304 | for (i = 0; i < dArr.length; i++) { |
@@ -321,16 +322,23 @@ var TicketCat = { | @@ -321,16 +322,23 @@ var TicketCat = { | ||
321 | e.$payTotal.html(str); | 322 | e.$payTotal.html(str); |
322 | e.$toPay.html((data.shopping_cart_data.last_order_amount).toFixed(2)); | 323 | e.$toPay.html((data.shopping_cart_data.last_order_amount).toFixed(2)); |
323 | 324 | ||
324 | - //有货币清零状态更新 | 325 | + //有货币清零状态更新 start |
325 | $('dl.play-bi-pan').find('dt').removeClass('not-btn'); | 326 | $('dl.play-bi-pan').find('dt').removeClass('not-btn'); |
326 | $('.not-btn-tip').addClass('hide'); | 327 | $('.not-btn-tip').addClass('hide'); |
327 | $('.yohoCoinTip').removeClass('coin-gray'); | 328 | $('.yohoCoinTip').removeClass('coin-gray'); |
329 | + if (data.yohoCoinCompute.yohoCoinNum > 0) { | ||
330 | + $('.errbitip').html(''); | ||
331 | + } | ||
328 | if (!data.yohoCoinCompute.yohoCoinClick) { | 332 | if (!data.yohoCoinCompute.yohoCoinClick) { |
329 | - //不可以使用状态 | ||
330 | - $('dl.play-bi-pan').find('dt').addClass('not-btn'); | ||
331 | - $('.not-btn-tip').removeClass('hide'); | ||
332 | - //如果有货币按钮为打开状态,则关闭 | ||
333 | - _this.Common.winHide($('.play-bi-pan')); | 333 | + if (isJuan) { |
334 | + //不可以使用状态 | ||
335 | + $('dl.play-bi-pan').find('dt').addClass('not-btn'); | ||
336 | + $('.not-btn-tip').removeClass('hide'); | ||
337 | + //如果有货币按钮为打开状态,则关闭 | ||
338 | + _this.Common.winHide($('.play-bi-pan')); | ||
339 | + } | ||
340 | + $('.yohoCoinTip').addClass('coin-gray'); | ||
341 | + $('.errbitip').html(data.yohoCoinCompute.yohoCoinMsg); | ||
334 | } | 342 | } |
335 | $('#biprice').data({ | 343 | $('#biprice').data({ |
336 | 'yoho-coin-num': data.yohoCoinCompute.yohoCoinNum, | 344 | 'yoho-coin-num': data.yohoCoinCompute.yohoCoinNum, |
@@ -340,6 +348,7 @@ var TicketCat = { | @@ -340,6 +348,7 @@ var TicketCat = { | ||
340 | $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum); | 348 | $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum); |
341 | $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum); | 349 | $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum); |
342 | $('#biprice').find('.yohoCoin').html(data.yohoCoinCompute.yohoCoin); | 350 | $('#biprice').find('.yohoCoin').html(data.yohoCoinCompute.yohoCoin); |
351 | + //有货币清零状态更新 end | ||
343 | }, | 352 | }, |
344 | getSelectData: function() { | 353 | getSelectData: function() { |
345 | var expressVal = $('.express-list input[name="carriagegroup"]:checked').val(); | 354 | var expressVal = $('.express-list input[name="carriagegroup"]:checked').val(); |
-
Please register or login to post a comment