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