自动折扣优化
This commit is contained in:
@@ -490,6 +490,12 @@
|
|||||||
} else {
|
} else {
|
||||||
this.auto_discount_text = '';
|
this.auto_discount_text = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//最低价
|
||||||
|
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount;
|
||||||
|
if(total<min_cost){
|
||||||
|
total = min_cost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
@@ -540,6 +546,12 @@
|
|||||||
} else {
|
} else {
|
||||||
this.auto_discount_text = '';
|
this.auto_discount_text = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//最低价
|
||||||
|
var min_cost = @(Model.Package.MinPrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.OneBuyModel.CouponAmount;
|
||||||
|
if(total<min_cost){
|
||||||
|
total = min_cost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
|
|||||||
@@ -260,6 +260,12 @@
|
|||||||
} else {
|
} else {
|
||||||
this.auto_discount_text = '';
|
this.auto_discount_text = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//最低价
|
||||||
|
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount;
|
||||||
|
if(total<min_cost){
|
||||||
|
total = min_cost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
|
|||||||
@@ -546,6 +546,11 @@
|
|||||||
} else {
|
} else {
|
||||||
this.auto_discount_text = '';
|
this.auto_discount_text = '';
|
||||||
}
|
}
|
||||||
|
//最低价
|
||||||
|
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount;
|
||||||
|
if(total<min_cost){
|
||||||
|
total = min_cost;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -587,16 +592,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var need_cost = 100000000;
|
var need_cost = 100000000;
|
||||||
|
//计算折扣价
|
||||||
if(discount != 100){
|
if(discount != 100){
|
||||||
need_cost = @(Model.Package.LinePrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix * discount / 100 - this.MoreBuyModel.CouponAmount;
|
need_cost = @(Model.Package.LinePrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix * discount / 100 - this.MoreBuyModel.CouponAmount;
|
||||||
}
|
}
|
||||||
|
//比较价格,走最低价
|
||||||
if(need_cost<total){
|
if(need_cost<total){
|
||||||
total = need_cost;
|
total = need_cost;
|
||||||
} else {
|
} else {
|
||||||
this.auto_discount_text = '';
|
this.auto_discount_text = '';
|
||||||
}
|
}
|
||||||
|
//最低价
|
||||||
|
var min_cost = @(Model.Package.MinPrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.OneBuyModel.CouponAmount;
|
||||||
|
if(total<min_cost){
|
||||||
|
total = min_cost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
|
|||||||
@@ -325,6 +325,12 @@
|
|||||||
} else {
|
} else {
|
||||||
this.auto_discount_text = '';
|
this.auto_discount_text = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//最低价
|
||||||
|
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount;
|
||||||
|
if(total<min_cost){
|
||||||
|
total = min_cost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user