diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index 05c187a..d519fcd 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -1407,7 +1407,7 @@ export default { minDeductionPoints: 0, maxUsablePoints: 0, usable: false, - points: 0, + value: 0, toMoney: 0, }, //选中可用优惠券 @@ -1857,7 +1857,7 @@ export default { this.createOrder.discount = 1; } }, - "vipUser.id": async function (val) { + "vipUser.id": function (val) { // if (!this.table.tableId) { // return; // } @@ -1875,6 +1875,9 @@ export default { type: val === "" ? 1 : 0, }).then((res) => { this.createOrder.data.memberId = val.id; + this.getCalcUsablePoints().then((res) => { + this.pointsValueChange(this.points.value); + }); }); }, "prveOrder.list.length": function (val) { @@ -1993,8 +1996,12 @@ export default { }, methods: { async getCalcUsablePoints() { + const memberId= this.createOrder.data.memberId || this.vipUser.id + if(!memberId){ + return + } const pointsRes = await $calcUsablePoints({ - memberId: this.createOrder.data.memberId || this.vipUser.id, + memberId:memberId, orderAmount: this.currentPayMoney.toFixed(2), }); this.points.res = pointsRes;