1.代课下单修改监听用户改变事件
减少重复请求 2.当会员优惠未0时不展示会员优惠
This commit is contained in:
@@ -399,7 +399,10 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<div class="u-flex color-000 u-font-14 u-row-between">
|
<div
|
||||||
|
class="u-flex color-000 u-font-14 u-row-between"
|
||||||
|
v-if="vipDiscountPrice > 0"
|
||||||
|
>
|
||||||
<span class="font-bold">会员优惠 </span>
|
<span class="font-bold">会员优惠 </span>
|
||||||
<span class="">{{ vipDiscountPrice }} </span>
|
<span class="">{{ vipDiscountPrice }} </span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1683,7 +1686,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"||v.status === "return")
|
.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 +1718,13 @@ export default {
|
|||||||
return total;
|
return total;
|
||||||
},
|
},
|
||||||
giftLen() {
|
giftLen() {
|
||||||
const nowlen = this.order.list.filter((v) => v.isGift === "true"||v.status === "return").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"||v.status === "return");
|
const arr = cur.info.filter(
|
||||||
|
(v) => v.isGift === "true" || v.status === "return"
|
||||||
|
);
|
||||||
prve.push(...arr);
|
prve.push(...arr);
|
||||||
return prve;
|
return prve;
|
||||||
}, []).length;
|
}, []).length;
|
||||||
@@ -1787,7 +1794,8 @@ export default {
|
|||||||
const bTotal = b.info
|
const bTotal = b.info
|
||||||
.filter(
|
.filter(
|
||||||
(v) =>
|
(v) =>
|
||||||
v.isGift !== "true" && v.status !== "return"&&
|
v.isGift !== "true" &&
|
||||||
|
v.status !== "return" &&
|
||||||
v.memberPrice &&
|
v.memberPrice &&
|
||||||
v.memberPrice != v.salePrice
|
v.memberPrice != v.salePrice
|
||||||
)
|
)
|
||||||
@@ -1799,7 +1807,10 @@ export default {
|
|||||||
const nowMemberprice = this.order.list
|
const nowMemberprice = this.order.list
|
||||||
.filter(
|
.filter(
|
||||||
(v) =>
|
(v) =>
|
||||||
v.isGift !== "true" && v.status !== "return" && 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);
|
||||||
@@ -1932,12 +1943,11 @@ export default {
|
|||||||
orderId: this.createOrder.data.id || "",
|
orderId: this.createOrder.data.id || "",
|
||||||
type: val === "" ? 1 : 0,
|
type: val === "" ? 1 : 0,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if(this.isCreateOrder){
|
if (this.isCreateOrder) {
|
||||||
this.getOrderData();
|
|
||||||
this.createOrder.data.memberId = val.id;
|
this.createOrder.data.memberId = val.id;
|
||||||
this.getCalcUsablePoints().then((res) => {
|
this.getOrderData().then(()=>{
|
||||||
this.pointsValueChange(this.points.value);
|
this.pointsValueChange(this.points.value);
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -3737,8 +3747,8 @@ export default {
|
|||||||
totalAmount: res.seatAmount || 0,
|
totalAmount: res.seatAmount || 0,
|
||||||
status: "",
|
status: "",
|
||||||
};
|
};
|
||||||
console.log(' this.order.seatFee')
|
console.log(" this.order.seatFee");
|
||||||
console.log( this.order.seatFee)
|
console.log(this.order.seatFee);
|
||||||
this.order.old.list = Object.entries(goodsMap).map(([key, value]) => ({
|
this.order.old.list = Object.entries(goodsMap).map(([key, value]) => ({
|
||||||
info: value.map((v) => {
|
info: value.map((v) => {
|
||||||
return {
|
return {
|
||||||
@@ -3799,7 +3809,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
.selQuan {
|
.selQuan {
|
||||||
border: 1px solid #d9d9d9;
|
border: 1px solid #d9d9d9;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|||||||
Reference in New Issue
Block a user