修改价格计算公式
This commit is contained in:
@@ -1683,7 +1683,7 @@ export default {
|
|||||||
|
|
||||||
const oldPrice = this.order.old.list.reduce((a, b) => {
|
const oldPrice = this.order.old.list.reduce((a, b) => {
|
||||||
const total = b.info
|
const total = b.info
|
||||||
.filter((v) => v.isGift === "true")
|
.filter((v) => v.isGift === "true"||v.status === "return")
|
||||||
.reduce((prve, cur) => {
|
.reduce((prve, cur) => {
|
||||||
return prve + cur.number * cur.salePrice;
|
return prve + cur.number * cur.salePrice;
|
||||||
}, 0);
|
}, 0);
|
||||||
@@ -1715,9 +1715,9 @@ export default {
|
|||||||
return total;
|
return total;
|
||||||
},
|
},
|
||||||
giftLen() {
|
giftLen() {
|
||||||
const nowlen = this.order.list.filter((v) => v.isGift === "true").length;
|
const nowlen = this.order.list.filter((v) => v.isGift === "true"||v.status === "return").length;
|
||||||
const oldlen = this.order.old.list.reduce((prve, cur) => {
|
const oldlen = this.order.old.list.reduce((prve, cur) => {
|
||||||
const arr = cur.info.filter((v) => v.isGift === "true");
|
const arr = cur.info.filter((v) => v.isGift === "true"||v.status === "return");
|
||||||
prve.push(...arr);
|
prve.push(...arr);
|
||||||
return prve;
|
return prve;
|
||||||
}, []).length;
|
}, []).length;
|
||||||
@@ -1755,14 +1755,14 @@ export default {
|
|||||||
allPrice() {
|
allPrice() {
|
||||||
const oldPrice = this.order.old.list.reduce((a, b) => {
|
const oldPrice = this.order.old.list.reduce((a, b) => {
|
||||||
const bTotal = b.info
|
const bTotal = b.info
|
||||||
.filter((v) => v.status !== "return")
|
.filter((v) => v)
|
||||||
.reduce((prve, cur) => {
|
.reduce((prve, cur) => {
|
||||||
return prve + cur.number * cur.salePrice;
|
return prve + cur.number * cur.salePrice;
|
||||||
}, 0);
|
}, 0);
|
||||||
return a + bTotal;
|
return a + bTotal;
|
||||||
}, 0);
|
}, 0);
|
||||||
const price = this.order.list
|
const price = this.order.list
|
||||||
.filter((v) => v.isGift !== "return")
|
.filter((v) => v)
|
||||||
.reduce((a, b) => {
|
.reduce((a, b) => {
|
||||||
return a + b.number * b.salePrice;
|
return a + b.number * b.salePrice;
|
||||||
}, 0);
|
}, 0);
|
||||||
@@ -1787,7 +1787,7 @@ export default {
|
|||||||
const bTotal = b.info
|
const bTotal = b.info
|
||||||
.filter(
|
.filter(
|
||||||
(v) =>
|
(v) =>
|
||||||
v.isGift !== "true" &&
|
v.isGift !== "true" && v.status !== "return"&&
|
||||||
v.memberPrice &&
|
v.memberPrice &&
|
||||||
v.memberPrice != v.salePrice
|
v.memberPrice != v.salePrice
|
||||||
)
|
)
|
||||||
@@ -1799,7 +1799,7 @@ export default {
|
|||||||
const nowMemberprice = this.order.list
|
const nowMemberprice = this.order.list
|
||||||
.filter(
|
.filter(
|
||||||
(v) =>
|
(v) =>
|
||||||
v.isGift !== "true" && v.memberPrice && v.memberPrice != v.salePrice
|
v.isGift !== "true" && v.status !== "return" && v.memberPrice && v.memberPrice != v.salePrice
|
||||||
)
|
)
|
||||||
.reduce((a, b) => {
|
.reduce((a, b) => {
|
||||||
return a + b.number * (b.salePrice - b.memberPrice);
|
return a + b.number * (b.salePrice - b.memberPrice);
|
||||||
|
|||||||
Reference in New Issue
Block a user