修改计算公式
This commit is contained in:
parent
850509ba04
commit
276b42ea8b
|
|
@ -169,7 +169,7 @@ export default {
|
|||
|
||||
confirm() {
|
||||
console.log(this.form.discount / 100)
|
||||
this.$emit("confirm", (this.form.discount / 100));
|
||||
this.$emit("confirm", {discount:this.form.discount / 100,currentPrice:((this.form.discount*this.form.money)/100).toFixed(2)} );
|
||||
this.close();
|
||||
},
|
||||
open(data) {
|
||||
|
|
|
|||
|
|
@ -1861,10 +1861,13 @@ export default {
|
|||
}
|
||||
},
|
||||
gaijia() {
|
||||
if(!this.createOrder.data.amount ){
|
||||
return 0
|
||||
}
|
||||
const disCountOriginPrice =
|
||||
this.createOrder.data.amount - this.coupdiscount;
|
||||
const disocunt = (1 - this.createOrder.discount) * disCountOriginPrice;
|
||||
return disocunt.toFixed(2);
|
||||
this.createOrder.data.amount - this.productCouponDiscountAmount;
|
||||
const discountPrice= ((1-this.createOrder.discount)*disCountOriginPrice).toFixed(2)
|
||||
return discountPrice;
|
||||
},
|
||||
pointsCanDicountMoney() {
|
||||
return (this.yinFuJinE - this.points.toMoney).toFixed(2);
|
||||
|
|
@ -1881,11 +1884,24 @@ export default {
|
|||
}, 0);
|
||||
return n;
|
||||
},
|
||||
productCouponDiscountAmount(){
|
||||
const n = this.quansSelArr.filter(v=>v.type==2).reduce((prve, cur) => {
|
||||
return prve + cur.discountAmount * 1;
|
||||
}, 0);
|
||||
return n;
|
||||
},
|
||||
fullCouponDiscountAmount(){
|
||||
const n = this.quansSelArr.filter(v=>v.type==1).reduce((prve, cur) => {
|
||||
return prve + cur.discountAmount * 1;
|
||||
}, 0);
|
||||
return n;
|
||||
},
|
||||
currentPayMoney() {
|
||||
const amount = this.createOrder.data.amount || 0;
|
||||
const discount = this.createOrder.discount || 1;
|
||||
// const total=((amount - this.coupdiscount) * this.createOrder.discount - this.points.toMoney)
|
||||
const total = amount - this.gaijia - this.coupdiscount;
|
||||
// const total = amount - this.gaijia - this.coupdiscount;
|
||||
const total = amount - this.productCouponDiscountAmount-this.gaijia -this.fullCouponDiscountAmount;
|
||||
return total <= 0 ? 0 : total;
|
||||
},
|
||||
yinFuJinE() {
|
||||
|
|
@ -2917,7 +2933,8 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
ChangeDiscount(discount) {
|
||||
ChangeDiscount(e) {
|
||||
const {discount,currentPrice}=e;
|
||||
const fullCoupIndex = this.quansSelArr.findIndex((v) => v.type == 1);
|
||||
const fullCoup = this.quansSelArr[fullCoupIndex];
|
||||
this.createOrder.discount = discount;
|
||||
|
|
@ -2949,7 +2966,7 @@ export default {
|
|||
if (!canDiscount) {
|
||||
return;
|
||||
}
|
||||
const amount = (this.createOrder.data.amount - this.coupdiscount).toFixed(
|
||||
const amount = (this.createOrder.data.amount -this.productCouponDiscountAmount).toFixed(
|
||||
2
|
||||
);
|
||||
console.log(amount);
|
||||
|
|
|
|||
Loading…
Reference in New Issue