|
@@ -90,7 +90,7 @@ export default {
|
|
|
this.remainPrice = this.remainPrice - this.orderDetail.discountInfo.points[0].discountFee
|
|
|
}
|
|
|
// 前海积分不参与当前电子券优惠上限
|
|
|
- if ([5, 10].indexOf(parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
|
|
|
+ if ( [ 5, 8, 10 ].indexOf(parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
|
|
|
this.remainPrice = this.remainPrice - this.orderDetail?.discountInfo?.points[0]?.discountFee
|
|
|
}
|
|
|
this.newAvailableDiscountFee = this.availableDiscountFee
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
// 验证剩余优惠券是否可勾选(无需验证:后端已计算可勾选的优惠券)
|
|
|
this.newGroupedCouponData()
|
|
|
this.setAllDisabled()
|
|
|
- if (this.parkMallCode === 4 || this.parkMallCode === 6 || this.parkMallCode === 5) {
|
|
|
+ if (this.parkMallCode === 4 || this.parkMallCode === 6 || this.parkMallCode === 5 || this.parkMallCode === 8) {
|
|
|
this.isDisabledByRule(this.couponList[0], 0, 'showMsg');
|
|
|
}
|
|
|
})
|
|
@@ -171,7 +171,7 @@ export default {
|
|
|
// 获取还需支付金额
|
|
|
getAmountToBePaid() {
|
|
|
let amountToBePaid = this.totalFee - this.paperDiscountFee - this.remainPrice;
|
|
|
- if ([5, 10].indexOf(this.parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
|
|
|
+ if([ 5, 8, 10 ].indexOf(this.parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
|
|
|
amountToBePaid = amountToBePaid - this.orderDetail.discountInfo?.points?.[0]?.discountFee
|
|
|
}
|
|
|
if ([4, 6].indexOf(this.parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
|
|
@@ -181,13 +181,13 @@ export default {
|
|
|
},
|
|
|
// 针对达到优惠的上限制
|
|
|
setAllDisabled() {
|
|
|
- const {parkInfo, parkingRule} = this.orderDetail
|
|
|
- const {parkMallCode} = parkInfo;
|
|
|
- const {maxOneTimeDiscountTime, oneTimeLimitation, oneDayLimitation, hourPrice, remainConsumeTime} = parkingRule
|
|
|
- // 设置深圳的达到优惠金额的上限,置灰剩下未选择的金额
|
|
|
- if ([5, 10].indexOf(parkMallCode) > -1 && this.remainPrice >= this.newAvailableDiscountFee) {
|
|
|
- this.couponList = this.couponList.map((elm, iemi) => {
|
|
|
- if (!elm.disabled && this.checkedCouponList.indexOf(`coupon${iemi}`) < 0) {
|
|
|
+ const {parkInfo,parkingRule} = this.orderDetail
|
|
|
+ const { parkMallCode } = parkInfo;
|
|
|
+ const {maxOneTimeDiscountTime,oneTimeLimitation,oneDayLimitation,hourPrice,remainConsumeTime} = parkingRule
|
|
|
+ // 设置深圳、福州的达到优惠金额的上限,置灰剩下未选择的金额
|
|
|
+ if ( [5, 8, 10].indexOf(parkMallCode) > -1 && this.remainPrice >= this.newAvailableDiscountFee) {
|
|
|
+ this.couponList = this.couponList.map((elm,iemi) => {
|
|
|
+ if ( !elm.disabled && this.checkedCouponList.indexOf(`coupon${iemi}`) < 0) {
|
|
|
elm.disabled = true
|
|
|
}
|
|
|
return elm
|
|
@@ -195,7 +195,7 @@ export default {
|
|
|
return true
|
|
|
}
|
|
|
// 单日上限限制
|
|
|
- if (oneDayLimitation && [5, 10].indexOf(parkMallCode) < 0) {
|
|
|
+ if ( oneDayLimitation && [5, 8, 10].indexOf(parkMallCode) < 0) {
|
|
|
const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice
|
|
|
const remainConsumeTimeFee = remainConsumeTime * hourPrice
|
|
|
|
|
@@ -212,7 +212,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 单次上限限制
|
|
|
- if (oneTimeLimitation && [5, 10].indexOf(parkMallCode) < 0) {
|
|
|
+ if ( oneTimeLimitation && [5, 8, 10].indexOf(parkMallCode) < 0 ) {
|
|
|
const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice
|
|
|
// const remainConsumeTimeFee = remainConsumeTime * hourPrice
|
|
|
// 计算单日剩余 remainConsumeTime
|
|
@@ -228,9 +228,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 杭州、福州、深圳前海 电子券选择上限判断
|
|
|
- if ((parkMallCode === 2 || parkMallCode === 8 || parkMallCode === 7 || parkMallCode === 9 || parkMallCode === 5) && this.checkedCouponList.length >= this.remainCoupons) {
|
|
|
- this.couponList = this.couponList.map((elm, iemi) => {
|
|
|
- if (!elm.disabled && this.checkedCouponList.indexOf(`coupon${iemi}`) < 0) {
|
|
|
+ if ( (parkMallCode === 2 || parkMallCode === 8 || parkMallCode === 7 || parkMallCode === 9 || parkMallCode === 5 || parkMallCode === 8) && this.checkedCouponList.length >= this.remainCoupons ) {
|
|
|
+ this.couponList = this.couponList.map(( elm,iemi ) => {
|
|
|
+ if ( !elm.disabled && this.checkedCouponList.indexOf(`coupon${ iemi }`) < 0 ) {
|
|
|
elm.disabled = true
|
|
|
}
|
|
|
return elm
|
|
@@ -303,8 +303,8 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
// 电子券上限判断(杭州、福州)
|
|
|
- if (this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8 || this.parkMallCode === 7 || this.parkMallCode === 9 || this.parkMallCode === 5)) {
|
|
|
- if (showMsg) return true
|
|
|
+ if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8 || this.parkMallCode === 7 || this.parkMallCode === 9 || this.parkMallCode === 5 || this.parkMallCode === 8) ) {
|
|
|
+ if ( showMsg ) return true
|
|
|
return Toast({
|
|
|
message: `电子券每天最多可使用${this.maxOneDayCoupons}张`,
|
|
|
className: "white-space",
|
|
@@ -313,7 +313,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 浦东每次缴费超限控制、沈阳每日超限控制
|
|
|
- if ([1, 4, 5, 999, 6, 10].indexOf(parkMallCode) > -1 && this.crossMessage(showMsg)) {
|
|
|
+ if ([1,4,5,999, 8, 6,10].indexOf(parkMallCode) > -1 && this.crossMessage(showMsg)) {
|
|
|
this.couponList = this.couponList.map((e, i) => {
|
|
|
if (this.checkedCouponList.findIndex((c) => c === `coupon${i}`) === -1) {
|
|
|
e.disabled = true;
|
|
@@ -346,14 +346,14 @@ export default {
|
|
|
} = this.orderDetail.parkingRecord;
|
|
|
// 剩余可使用的优惠金额,支持动态计算; 优惠时长,不可能全部使用,不能超过车费减去优惠的金额;不能超过单次的应付金额
|
|
|
let remainPrice = remainConsumeTime * hourPrice;
|
|
|
- if (parkMallCode === 5 || parkMallCode === 10) {
|
|
|
+ if (parkMallCode === 5 || parkMallCode === 8 || parkMallCode === 10) {
|
|
|
if (remainPrice - this.paperDiscountFee > actualPayFee) {
|
|
|
remainPrice = actualPayFee;
|
|
|
}
|
|
|
}
|
|
|
// 深圳超限处理
|
|
|
- if ([5, 10].indexOf(parkMallCode) > -1 && this.remainPrice >= this.availableDiscountFee) {
|
|
|
- if (showMsg) return true
|
|
|
+ if ([5, 8, 10].indexOf(parkMallCode) > -1 && this.remainPrice >= this.availableDiscountFee) {
|
|
|
+ if ( showMsg ) return true
|
|
|
return Toast({
|
|
|
message: `优惠券已达当日使用上限,不可再用`,
|
|
|
className: "white-space",
|
|
@@ -365,15 +365,15 @@ export default {
|
|
|
if (oneDayLimitation && this.remainPrice >= this.availableDiscountFee) {
|
|
|
if (showMsg) return true
|
|
|
return Toast({
|
|
|
- message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
|
|
|
+ message: [5, 8, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
|
|
|
className: "white-space",
|
|
|
icon: 'none',
|
|
|
});
|
|
|
}
|
|
|
const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice
|
|
|
// 单次上限限制
|
|
|
- if (oneTimeLimitation && [5, 10].indexOf(parkMallCode) < 0 && this.remainPrice >= maxOneTimeDiscountFee) {
|
|
|
- if (showMsg) return true
|
|
|
+ if ( oneTimeLimitation && [5, 8, 10].indexOf(parkMallCode) < 0 && this.remainPrice >= maxOneTimeDiscountFee) {
|
|
|
+ if ( showMsg ) return true
|
|
|
return Toast({
|
|
|
message: `超出抵扣上限,每次最高可抵扣${maxOneTimeDiscountTime}小时`,
|
|
|
className: "white-space",
|