Authored by 郝肖肖

有货币使用结算金额发生变化,使用有货币重置

@@ -432,7 +432,8 @@ var Order = { @@ -432,7 +432,8 @@ var Order = {
432 e.$selectExpress.click(function() { 432 e.$selectExpress.click(function() {
433 433
434 var expressId = $(this).val(); 434 var expressId = $(this).val();
435 - 435 + //订单金额发生变化,使用有货币重置
  436 + $('#biprice').removeClass('is-select');
436 e.$loading.show(); 437 e.$loading.show();
437 438
438 getSelectData(function(d) { 439 getSelectData(function(d) {
@@ -455,6 +456,7 @@ var Order = { @@ -455,6 +456,7 @@ var Order = {
455 } else if (expressId === '2') { 456 } else if (expressId === '2') {
456 $('.express-list.sf').removeClass('hide'); 457 $('.express-list.sf').removeClass('hide');
457 } 458 }
  459 +
458 } else { 460 } else {
459 new dialog.Alert(data.message).show(); 461 new dialog.Alert(data.message).show();
460 } 462 }
@@ -473,7 +475,8 @@ var Order = { @@ -473,7 +475,8 @@ var Order = {
473 var juanText = ''; 475 var juanText = '';
474 476
475 $('.play-juan').addClass('is-select'); 477 $('.play-juan').addClass('is-select');
476 - 478 + //订单金额发生变化,使用有货币重置
  479 + $('#biprice').removeClass('is-select');
477 getSelectData(function(d) { 480 getSelectData(function(d) {
478 481
479 var code = d.couponCode; 482 var code = d.couponCode;
@@ -484,10 +487,9 @@ var Order = { @@ -484,10 +487,9 @@ var Order = {
484 $('.play-juan').removeClass('is-select'); 487 $('.play-juan').removeClass('is-select');
485 488
486 } else { 489 } else {
487 - 490 +
488 e.$loading.show(); 491 e.$loading.show();
489 492
490 -  
491 options = { 493 options = {
492 type: 'POST', 494 type: 'POST',
493 url: '/cart/index/orderCompute', 495 url: '/cart/index/orderCompute',
@@ -634,7 +636,8 @@ var Order = { @@ -634,7 +636,8 @@ var Order = {
634 var $pan = $('.play-juan-pan'); 636 var $pan = $('.play-juan-pan');
635 637
636 if ($('.play-juan').hasClass('is-select')) { 638 if ($('.play-juan').hasClass('is-select')) {
637 - 639 + //订单金额发生变化,使用有货币重置
  640 + $('#biprice').removeClass('is-select');
638 e.$loading.show(); 641 e.$loading.show();
639 642
640 getSelectData(function(d) { 643 getSelectData(function(d) {
@@ -660,7 +663,6 @@ var Order = { @@ -660,7 +663,6 @@ var Order = {
660 663
661 // $('.use-envelopes input').attr('checked', 'checked'); 664 // $('.use-envelopes input').attr('checked', 'checked');
662 // $('.red-envelopes').addClass('active'); 665 // $('.red-envelopes').addClass('active');
663 -  
664 } else { 666 } else {
665 e.$juantip.html(data.message); 667 e.$juantip.html(data.message);
666 } 668 }
@@ -683,6 +685,8 @@ var Order = { @@ -683,6 +685,8 @@ var Order = {
683 var $this = $(this), 685 var $this = $(this),
684 juanText; 686 juanText;
685 687
  688 + //订单金额发生变化,使用有货币重置
  689 + $('#biprice').removeClass('is-select');
686 e.$loading.show(); 690 e.$loading.show();
687 691
688 $this.attr('disabled', 'disabled'); 692 $this.attr('disabled', 'disabled');
@@ -700,7 +704,6 @@ var Order = { @@ -700,7 +704,6 @@ var Order = {
700 } 704 }
701 705
702 juanText = $('.play-juan input[value="' + d.couponCode + '"]').next().text(); 706 juanText = $('.play-juan input[value="' + d.couponCode + '"]').next().text();
703 -  
704 options = { 707 options = {
705 type: 'POST', 708 type: 'POST',
706 url: '/cart/index/orderCompute', 709 url: '/cart/index/orderCompute',
@@ -202,19 +202,6 @@ var TicketCat = { @@ -202,19 +202,6 @@ var TicketCat = {
202 c.winShow($pan); 202 c.winShow($pan);
203 }); 203 });
204 204
205 - //键盘事件,计算有币货抵多少钱  
206 - $('#biprice').keyup(function() {  
207 - var val = $(this).val();  
208 -  
209 - if (!/^\d+$/.test(val + '')) {  
210 - el.$errorTip.html('请输入一个正整数');  
211 - } else if (val * 1 > $(this).data('bi') * 1) {  
212 - el.$errorTip.html('您的有货币不足');  
213 - } else {  
214 - el.$errorTip.html('抵扣' + (val / 100).toFixed(2) + '元');  
215 - }  
216 - });  
217 -  
218 // 取消yoho 币 205 // 取消yoho 币
219 $('.cancel-bi').click(function() { 206 $('.cancel-bi').click(function() {
220 var $pan = $('.play-bi-pan'), 207 var $pan = $('.play-bi-pan'),
@@ -402,13 +402,13 @@ @@ -402,13 +402,13 @@
402 border: 1px solid #000; 402 border: 1px solid #000;
403 margin-top: 10px; 403 margin-top: 10px;
404 width: 240px; 404 width: 240px;
405 - padding: 15px 20px; 405 + padding: 5px 10px;
406 text-align: left; 406 text-align: left;
407 font-size: 12px; 407 font-size: 12px;
408 cursor: auto; 408 cursor: auto;
409 409
410 li { 410 li {
411 - margin-top: 10px; 411 + margin-top: 5px;
412 } 412 }
413 } 413 }
414 414