Răsfoiți Sursa

Merge pull request #516 from tron/lock/release-3.6.0/SCRM-5892

feat(SCRM-5892): [DE][C端]临时停车,BKC,新会员积分,当用户使用优惠券抵扣金额为0的时候,点击新会员积分,依然可…
Tron 1 an în urmă
părinte
comite
062a6f495e
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      src/components/newMemberPoints/index.vue

+ 5 - 1
src/components/newMemberPoints/index.vue

@@ -112,6 +112,10 @@ export default {
         return
       }
       // 可能还有隐藏上限,就是普通的points的使用,单次不能超过上限
+      if (this.orderDetail.parkingRecord.actualPayFee === 0) {
+        Toast('当前无需追加优惠')
+        return 
+      } 
       if(type === 'add' && this.isAdd()) {
         this.pointsTime = this.pointsTime + 1
         this.newMemberPointsAvailable = this.newMemberPointsAvailable - this.newMemberPoints.pointsPerUnit
@@ -122,7 +126,7 @@ export default {
       // 调整points的积分available
     },
     isAdd() {
-      if (this.orderDetail.parkingRecord.actualPayFee === 0) return Toast('当前无需追加优惠')
+      
       const {usedDiscountHours, maxDiscountHours, totalAvailable, pointsPerUnit} = this.newMemberPoints
       // const { hourPrice = 0 } = this.orderDetail?.parkingRule
       const availableDiscountHours = maxDiscountHours - usedDiscountHours