Browse Source

fix(SCRM-5792): 积分减免的 当前无需追加优惠 逻辑调整

john 1 năm trước cách đây
mục cha
commit
2a4c8c51bc
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      src/store/order/points.js

+ 5 - 2
src/store/order/points.js

@@ -194,7 +194,8 @@ export default {
     //   return
     // }
     if ( type === 'add' ) {
-      if(!state.actualPayFee) {
+      // this.totalFeeInYuan - this.remainPrice <= 0
+      if(state.orderDetail.parkingRecord.totalFeeInYuan - state.usingTotalDiscount <= 0) {
         Toast('当前无需追加优惠')
         return;
       }
@@ -248,7 +249,6 @@ export default {
   async savePointsMath( {commit,dispatch,state},callback ) {
     try {
       let orderDetail = {...state.orderDetail};
-
       const {parkInfo,parkingRule} = state.orderDetail
       const {maxOneTimeDiscountTime,oneTimeLimitation,oneDayLimitation,hourPrice,remainConsumeTime} = parkingRule
       const {parkMallCode} = parkInfo
@@ -289,7 +289,10 @@ export default {
     callback
   }) {
     const orderDetail = lodash.cloneDeep(state.orderDetail)
+    console.log(293, orderDetail);
+    return
     orderDetail.discountInfo.newMemberPoints = newMemberPoints;
+
     setSelected(['memberGrade','consume','paperCoupons','coupons','points'],orderDetail)
     // 新会员积分
     const res = await calculateDiscount({