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