Tayl0r 7 years ago
commit e7c5ed66c4

@ -93,11 +93,13 @@ $(function () {
$('#audVal').html(dataCache.price); $('#audVal').html(dataCache.price);
var realPrice = dataCache.price; var realPrice = dataCache.price;
$('#audValReal').html(realPrice); $('#audValReal').html(realPrice);
var poundage = updatePoundage(realPrice); var surchargeData = calculateSurcharge(realPrice);
var price = poundage || realPrice; var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price; var priceBeforeDiscount = price;
dataCache.discounts = []; dataCache.discounts = [];
dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
$(window.coupons).each(function () { $(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons); price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
}); });
@ -199,8 +201,11 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog); var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥'; var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd); $('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (dataCache.poundageValue > 0) { if (parseFloat(dataCache.surcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.poundageValue).appendTo(bd); $('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):'+currencySymbol+dataCache.tax).appendTo(bd);
} }
$(dataCache.discounts).each(function () { $(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd); $('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);

@ -82,9 +82,11 @@ $(function () {
$('#audVal').html(dataCache.price); $('#audVal').html(dataCache.price);
var realPrice = dataCache.price; var realPrice = dataCache.price;
$('#audValReal').html(realPrice); $('#audValReal').html(realPrice);
var poundage = updatePoundage(realPrice); var surchargeData = calculateSurcharge(realPrice);
var price = poundage || realPrice; dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price; var priceBeforeDiscount = price;
dataCache.discounts = []; dataCache.discounts = [];
$(window.coupons).each(function () { $(window.coupons).each(function () {
@ -188,8 +190,11 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog); var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥'; var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd); $('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (dataCache.poundageValue > 0) { if (parseFloat(dataCache.surcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.poundageValue).appendTo(bd); $('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):'+currencySymbol+dataCache.tax).appendTo(bd);
} }
$(dataCache.discounts).each(function () { $(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd); $('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);

@ -86,11 +86,13 @@ $(function () {
$('#audVal').html(dataCache.price); $('#audVal').html(dataCache.price);
var realPrice = dataCache.price; var realPrice = dataCache.price;
$('#audValReal').html(realPrice); $('#audValReal').html(realPrice);
var poundage = updatePoundage(realPrice); var surchargeData = calculateSurcharge(realPrice);
var price = poundage || realPrice; var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price; var priceBeforeDiscount = price;
dataCache.discounts = []; dataCache.discounts = [];
dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
$(window.coupons).each(function () { $(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons); price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
}); });
@ -192,8 +194,11 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog); var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'CNY' ? '¥' : '$'; var currencySymbol = window.currency == 'CNY' ? '¥' : '$';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd); $('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (dataCache.poundageValue > 0) { if (parseFloat(dataCache.surcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.poundageValue).appendTo(bd); $('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):'+currencySymbol+dataCache.tax).appendTo(bd);
} }
$(dataCache.discounts).each(function () { $(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd); $('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);
@ -305,6 +310,7 @@ $(function () {
} }
}) })
} }
checkOrderStd(); checkOrderStd();
} }

Loading…
Cancel
Save