Forráskód Böngészése

fix(SCRM-5420): 调整静安自动计算最大使用消费减免上限的逻辑,保持与浦东一致

john 1 éve
szülő
commit
1322ba0f49

+ 2 - 2
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -777,10 +777,10 @@ export default {
     },
     // 
     setDescription() {
-      if ( this?.orderDetail?.parkInfo?.ruleDescription.length > 0 ) {
+      if ( this?.orderDetail?.parkInfo?.ruleDescription?.length > 0 ) {
         return this?.orderDetail?.parkInfo?.ruleDescription;
       }
-      if ( this?.orderDetail?.parkInfo?.description.length > 0 ) {
+      if ( this?.orderDetail?.parkInfo?.description?.length > 0 ) {
         let reg = /[;;]/g;
         return this.orderDetail.parkInfo.description.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');  
       } 

+ 6 - 6
src/pages/parkingFeeV2/Discounts/index.js

@@ -297,7 +297,7 @@ export default {
       
       const remainingLimitToIncrease = Math.abs(this.remainPrice - this.availableDiscountFee || 0) / hourPrice;
       // 如果是浦东的话, 重新计算优惠
-      if (this.parkMallCode === 1) {
+      if (this.parkMallCode === 1 || this.parkMallCode === 0) {
         /*
         * 消费减免真实可用优惠的计算逻辑
         * 消费减免可能选择的情况: X
@@ -419,7 +419,7 @@ export default {
       const { maxConsumeTime, remainConsumeTime, availableDiscountFee, hourPrice } = this.orderDetail.parkingRule;
       if (this.checkedList.indexOf('member') > -1) {
         /* 浦东 */
-        if(this.parkMallCode === 1) {
+        if(this.parkMallCode === 1 || this.parkMallCode === 0) {
           const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
           if (!isCrossMessage) {
             this.remainPrice = this.memberGrade.discountFee + this.remainPrice;
@@ -438,7 +438,7 @@ export default {
         }
       } else if (!this.isMember) {
         // 浦东单独处理
-        if(this.parkMallCode === 1) {
+        if(this.parkMallCode === 1 && this.parkMallCode === 0) {
           this.remainPrice = this.remainPrice - this.memberGrade.discountFee;
           this.maxReduceDiscountInit();
           return
@@ -471,13 +471,13 @@ export default {
         return;
       }
       // 浦东
-      if(this.parkMallCode === 1 && (this.isReduces || !this.maxReduceDiscount) ) {
+      if((this.parkMallCode === 1 || this.parkMallCode === 0) && (this.isReduces || !this.maxReduceDiscount) ) {
         return;
       }
       const { maxOneTimeDiscountTime, hourPrice, oneTimeLimitation, maxConsumeTime, remainConsumeTime, oneDayLimitation, maxOneDayDiscountFee, availableDiscountFee } = this.orderDetail.parkingRule;
       const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
       if (this.checkedList.indexOf('reduces') > -1) {
-        if(this.parkMallCode === 1) {
+        if(this.parkMallCode === 1 || this.parkMallCode === 0) {
           const [isCrossMessage = false, maxReduceDiscount = this.maxReduceDiscount] = this.crossMessage();
           if(isCrossMessage) {
             this.checkedList = this.checkedList.filter((elm) => elm !== 'reduces');
@@ -556,7 +556,7 @@ export default {
       // const {parkInfo,parkingRule,discountInfo} = this.orderDetail
       const { maxOneTimeDiscountTime, maxOneDayDiscountFee, oneTimeLimitation, oneDayLimitation, hourPrice, remainConsumeTime } = this.orderDetail.parkingRule;
       // 浦东
-      if (this.parkMallCode === 1) {
+      if (this.parkMallCode === 1 || this.parkMallCode === 0) {
         const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice;
         const remainConsumeTimeFee = remainConsumeTime * hourPrice;
 

+ 2 - 2
src/pages/parkingFeeV2/mixins/parkingFeeDetail.js

@@ -884,10 +884,10 @@ export default {
     },
     // 
     setDescription() {
-      if ( this?.orderDetail?.parkInfo?.ruleDescription.length > 0 ) {
+      if ( this?.orderDetail?.parkInfo?.ruleDescription?.length > 0 ) {
         return this?.orderDetail?.parkInfo?.ruleDescription;
       }
-      if ( this?.orderDetail?.parkInfo?.description.length > 0 ) {
+      if ( this?.orderDetail?.parkInfo?.description?.length > 0 ) {
         let reg = /[;;]/g;
         return this.orderDetail.parkInfo.description.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');  
       }