瀏覽代碼

Merge pull request #453 from John-Hong/release-3.3.0

fix(SCRM-5792): 积分减免的 当前无需追加优惠 逻辑调整
John-Hong 1 年之前
父節點
當前提交
a916f73933
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/store/order/points.js

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

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