极客西瓜月卡自动优惠券

This commit is contained in:
“wanyongkang”
2021-04-13 16:13:46 +08:00
parent 9c92fe06e7
commit 9398e54ab0
8 changed files with 57 additions and 22 deletions

View File

@@ -267,7 +267,12 @@
<p>@package.Profile</p>
</div>
<div class="item">
<p>¥<span>@package.Price</span></p>
@if((package.Id == 64||package.Id == 1004)&&package.Price<60){
<p>¥<span>60.00</span></p>
} else {
<p>¥<span>@package.Price</span></p>
}
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>

View File

@@ -125,7 +125,12 @@
<p>@package.Profile</p>
</div>
<div class="item">
<p>¥<span>@package.Price</span></p>
@if((package.Id == 64||package.Id == 1004)&&package.Price<60){
<p>¥<span>60.00</span></p>
} else {
<p>¥<span>@package.Price</span></p>
}
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>

View File

@@ -94,7 +94,11 @@
<p class="grayText">@Model.Package.Profile</p>
</div>
<div class="item">
¥ <span class="price">@Model.Package.Price</span>
@if(Model.Package.Price < 60 && (Model.Package.Id == 64||Model.Package.Id == 1004)){
<span class="price">60.00</span>
} else {
<span class="price">@Model.Package.Price</span>
}
</div>
</div>
</div>
@@ -426,6 +430,10 @@
computed: {
OneTotalAmount: function () {
var total= this.OneBuyModel.Price * this.OneBuyModel.ConnectCount
//西瓜极客优惠券
if((@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004) && @(Model.Package.Price)<60){
total = this.OneBuyModel.ConnectCount * 60.00
}
return total.toFixed(2);
},
OnePayAmount: function () {
@@ -436,6 +444,10 @@
},
MoreTotalAmount: function () {
var total= this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix;
//西瓜极客优惠券
if((@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004) && @(Model.Package.Price)<60){
total = this.MoreBuyModel.ConnectCount * 60.00 * this.MoreBuyModel.MaxPostfix
}
return total.toFixed(2);
},
MorePayAmount: function () {

View File

@@ -800,7 +800,11 @@
<div class="item packageitem packageitem4" id="@("pkg"+package.Id)" a-pkg-id="@package.Id">
<p><span class="price">@package.Price</span>元</p>
@if((package.Id == 64||package.Id == 1004)&&package.Price<60){
<p><span class="price">60.00</span>元</p>
} else {
<p><span class="price">@package.Price</span>元</p>
}
<p class="yuanjia" style="color: #FF9900;">原价:<span>@package.LinePrice</span>元</p>
<p>@(Math.Round(package.Price/package.DayCount,2))元/天</p>
<div class="pkgNameCard" style="background-color:#f64e3d">

View File

@@ -459,7 +459,11 @@
<div class="item packageitem packageitem4" id="@("pkg"+package.Id)" a-pkg-id="@package.Id">
<p><span class="price">@package.Price</span>元</p>
@if((package.Id == 64||package.Id == 1004)&&package.Price<60){
<p><span class="price">60.00</span>元</p>
} else {
<p><span class="price">@package.Price</span>元</p>
}
<p class="yuanjia" style="color: #FF9900;">原价:<span>@package.LinePrice</span>元</p>
<p>@(Math.Round(package.Price/package.DayCount,2))元/天</p>
<div class="pkgNameCard" style="background-color:#f64e3d">

View File

@@ -100,7 +100,11 @@
</div>
<div class="item">
<p class="zongjia"><span>@Model.Package.Price</span>元</p>
@if(Model.Package.Price < 60 && (Model.Package.Id == 64||Model.Package.Id == 1004)){
<p class="zongjia"><span>60.00</span>元</p>
} else {
<p class="zongjia"><span>@Model.Package.Price</span>元</p>
}
</div>
</div>
<p class="tishi tishika" style="text-align:center">*请务必选好所需商品,换货会产生费用</p>
@@ -494,6 +498,10 @@
computed: {
OneTotalAmount: function () {
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount
//西瓜极客优惠券
if((@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004) && @(Model.Package.Price)<60){
total = this.OneBuyModel.ConnectCount * 60.00
}
return total.toFixed(2);
},
OnePayAmount: function () {
@@ -501,14 +509,14 @@
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount ;
total = total < 0 ? 0 : total;
//西瓜极客优惠券
if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
total -= this.OneBuyModel.ConnectCount * (this.OneBuyModel.Price - 52.8)
}
return total.toFixed(2);
},
MoreTotalAmount: function () {
var total = this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix;
//西瓜极客优惠券
if((@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004) && @(Model.Package.Price)<60){
total = this.MoreBuyModel.ConnectCount * 60.00 * this.MoreBuyModel.MaxPostfix
}
return total.toFixed(2);
},
MorePayAmount: function () {
@@ -516,10 +524,6 @@
var total = this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.MoreBuyModel.CouponAmount ;
total = total < 0 ? 0 : total;
//西瓜极客优惠券
if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
total -= this.MoreBuyModel.ConnectCount * (this.MoreBuyModel.Price - 52.8) * this.MoreBuyModel.MaxPostfix
}
return total.toFixed(2);
}
},

View File

@@ -81,7 +81,11 @@
</div>
<div class="item">
<p class="zongjia"><span>@Model.Package.Price</span>元</p>
@if(Model.Package.Price < 60 && (Model.Package.Id == 64||Model.Package.Id == 1004)){
<p class="zongjia"><span>60.00</span>元</p>
} else {
<p class="zongjia"><span>@Model.Package.Price</span>元</p>
}
</div>
</div>
<p class="tishi tishika" style="text-align:center">*请务必选好所需商品,换货会产生费用</p>
@@ -273,6 +277,10 @@
TotalAmount: function () {
var count = this.OneBuyModel.Account.split(',').length;
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count;
//西瓜极客优惠券
if((@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004) && @(Model.Package.Price)<60){
total = this.OneBuyModel.ConnectCount * 60.00 * count
}
return total.toFixed(2);
},
PayAmount: function () {
@@ -280,10 +288,6 @@
var restAmout = this.OneBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount ;
total= total < 0 ? 0 : total;
//西瓜极客优惠券
if(@(Model.Package.Id) == 64||@(Model.Package.Id) == 1004){
total -= this.OneBuyModel.ConnectCount * (this.OneBuyModel.Price - 52.8)
}
return total.toFixed(2);
}
},

View File

@@ -258,9 +258,6 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var is_user_price = true;
var price = packageEntity.Price;
if(packageEntity.Id == 64||packageEntity.Id==1004){
price = 52.8M;
}
var userPrice = await this.m_ProductUserPriceService.Query(true).FirstOrDefaultAsync(m => m.UserId == userId && m.PackageId == packageEntity.Id && m.Status == 1);
if (userPrice != null && userPrice.UserPrice > 0)
{