...
|
...
|
@@ -9,7 +9,8 @@ var $ = require('yoho.jquery'), |
|
|
$receiptInfoSaveBtn = $('.receipt-info .save-receipt'),
|
|
|
$receiptInfoCancelBtn = $('.receipt-info .cancel-receipt'),
|
|
|
$eReceiptBtn = $('.receipt-type .e-receipt'),
|
|
|
$paperReceiptBtn = $('.receipt-type .paper-receipt');
|
|
|
$paperReceiptBtn = $('.receipt-type .paper-receipt'),
|
|
|
$yohoCoinHelp = $('.yoho-coin-help');
|
|
|
|
|
|
|
|
|
var address = require('./address'),
|
...
|
...
|
@@ -272,13 +273,14 @@ var Order = { |
|
|
e.$toPay.html((data.last_order_amount).toFixed(2));
|
|
|
|
|
|
//有货币清零状态更新
|
|
|
$('#biprice').val(accMul(100, data.use_yoho_coin));
|
|
|
if (~~data.use_yoho_coin === 0) {
|
|
|
$('#biprice').val(accMul(100, data.yohoCoinCompute.useYohoCoin));
|
|
|
if (~~data.yohoCoinCompute.useYohoCoin === 0) {
|
|
|
$('.errbitip').text('');
|
|
|
} else {
|
|
|
$('.errbitip').text('抵扣' + data.use_yoho_coin.toFixed(2) + '元');
|
|
|
$('.errbitip').text('抵扣' + data.yohoCoinCompute.useYohoCoin.toFixed(2) + '元');
|
|
|
}
|
|
|
|
|
|
//使用的红包
|
|
|
envelopesVal = e.$useEnvelopesInput.data('all') - data.use_red_envelopes;
|
|
|
|
|
|
if (~~data.use_red_envelopes > 0) {
|
...
|
...
|
@@ -462,9 +464,11 @@ var Order = { |
|
|
|
|
|
e.$loading.show();
|
|
|
|
|
|
|
|
|
options = {
|
|
|
type: 'POST',
|
|
|
url: '/cart/index/orderCompute',
|
|
|
|
|
|
data: d,
|
|
|
success: function(data) {
|
|
|
|
...
|
...
|
@@ -566,20 +570,21 @@ var Order = { |
|
|
|
|
|
c.winShow($pan);
|
|
|
});
|
|
|
//不须要手动输入有货币了。
|
|
|
// e.$bp.keyup(function() {
|
|
|
|
|
|
e.$bp.keyup(function() {
|
|
|
|
|
|
var val = $(this).val();
|
|
|
// var val = $(this).val();
|
|
|
|
|
|
//if (val * 1 < 0 || val.indexOf('.') > 0) {
|
|
|
if (!/^\d+$/.test(val + '')) {
|
|
|
e.$errorTip.html('请输入一个正整数');
|
|
|
} else if (val * 1 > $(this).data('bi') * 1) {
|
|
|
e.$errorTip.html('您的有货币不足');
|
|
|
} else {
|
|
|
e.$errorTip.html('抵扣' + (val / 100).toFixed(2) + '元');
|
|
|
}
|
|
|
});
|
|
|
// //if (val * 1 < 0 || val.indexOf('.') > 0) {
|
|
|
// if (!/^\d+$/.test(val + '')) {
|
|
|
// e.$errorTip.html('请输入一个正整数');
|
|
|
// } else if (val * 1 > $(this).data('bi') * 1) {
|
|
|
// e.$errorTip.html('您的有货币不足');
|
|
|
// } else {
|
|
|
// e.$errorTip.html('抵扣' + (val / 100).toFixed(2) + '元');
|
|
|
// }
|
|
|
// });
|
|
|
|
|
|
// 取消yoho 币
|
|
|
$('.cancel-bi').click(function() {
|
...
|
...
|
@@ -788,6 +793,7 @@ $('.why').click(function() { |
|
|
$('#differentBag').click(function() {
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
$(document).click(function() {
|
|
|
$('#differentBag').hide();
|
|
|
});
|
...
|
...
|
@@ -1049,3 +1055,10 @@ $('#input-mobile').bind('input propertychange', function() { |
|
|
$('.invoice-phone .enpty-input').addClass('hide');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//有货币帮助弹框
|
|
|
$yohoCoinHelp.hover(function() {
|
|
|
$(this).find('.yoho-coin-help-dialog').removeClass('hide');
|
|
|
}, function() {
|
|
|
$(this).find('.yoho-coin-help-dialog').addClass('hide');
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|