自动折扣优化

This commit is contained in:
“wanyongkang”
2021-04-24 15:04:31 +08:00
parent cdb90dd217
commit 91a476850a
4 changed files with 36 additions and 2 deletions

View File

@@ -490,6 +490,12 @@
} else {
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);
@@ -540,6 +546,12 @@
} else {
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);

View File

@@ -260,6 +260,12 @@
} else {
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);

View File

@@ -546,6 +546,11 @@
} else {
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;
//计算折扣价
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix * discount / 100 - this.MoreBuyModel.CouponAmount;
}
//比较价格,走最低价
if(need_cost<total){
total = need_cost;
} else {
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);

View File

@@ -325,6 +325,12 @@
} else {
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);