mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-22 18:36:52 +08:00
Discount updated
This commit is contained in:
@@ -167,7 +167,7 @@
|
||||
¥
|
||||
</i>
|
||||
<span>
|
||||
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||
{{ item.couponAmount?item.couponAmount:(parseInt((1-item.discount)*10)+'折') }}
|
||||
</span>
|
||||
</div>
|
||||
<strong>{{ item.couponName }}</strong>
|
||||
@@ -176,7 +176,7 @@
|
||||
<i :style='usercolor'>
|
||||
{{ item.couponName }}
|
||||
</i>
|
||||
<div class="rc-userfont">
|
||||
<div class="rc-userfont" :style="(item.validTo?'visibility:visible':'visibility:hidden')">
|
||||
<strong>有效期</strong>
|
||||
<span>{{item.validFrom}}至</span>
|
||||
<em>{{item.validTo}}</em>
|
||||
@@ -291,8 +291,8 @@ export default {
|
||||
this.discountAmount = this.curCoupon.couponAmount;
|
||||
return this.sumPrice - this.curCoupon.couponAmount;
|
||||
} else if(this.curCoupon.discount && this.curCoupon.discount>0) {
|
||||
this.discountAmount = this.sumPrice*this.curCoupon.discount;
|
||||
return this.sumPrice * (1-this.curCoupon.discount);
|
||||
this.discountAmount = this.sumPrice*(1-this.curCoupon.discount);
|
||||
return this.sumPrice * this.curCoupon.discount;
|
||||
}
|
||||
} else {
|
||||
return this.sumPrice;
|
||||
@@ -330,8 +330,8 @@ export default {
|
||||
break;
|
||||
case 3: //Limited product % discount
|
||||
case 4: //% discount
|
||||
total = total + (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
||||
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * ( 1 - this.curCoupon.discount);
|
||||
total = total + (itemInCart.productPrice * itemInCart.buyCount) * (1-this.curCoupon.discount);
|
||||
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
||||
this.discountedProductCode = itemInCart.productCode;
|
||||
couponUsed=true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user