|
@@ -112,7 +112,7 @@ export default {
|
|
// 积分减免
|
|
// 积分减免
|
|
pointsMath( {commit,dispatch,state},{type,callback} ) {
|
|
pointsMath( {commit,dispatch,state},{type,callback} ) {
|
|
const {parkInfo,parkingRule,parkingRecord, discountInfo = {}} = state.orderDetail
|
|
const {parkInfo,parkingRule,parkingRecord, discountInfo = {}} = state.orderDetail
|
|
- const {maxOneTimeDiscountTime,oneTimeLimitation,oneDayLimitation,hourPrice,remainConsumeTime, maxOneDayDiscountFee} = parkingRule
|
|
|
|
|
|
+ const {maxOneTimeDiscountTime,oneTimeLimitation,oneDayLimitation,hourPrice,remainConsumeTime, maxOneDayDiscountFee, availableDiscountFee = -1 } = parkingRule
|
|
const {parkMallCode} = parkInfo
|
|
const {parkMallCode} = parkInfo
|
|
const [points] = discountInfo?.points || [{}]
|
|
const [points] = discountInfo?.points || [{}]
|
|
console.log(376,maxOneTimeDiscountTime,state.availableDiscountFee)
|
|
console.log(376,maxOneTimeDiscountTime,state.availableDiscountFee)
|
|
@@ -172,7 +172,8 @@ export default {
|
|
// 北京积分使用限制
|
|
// 北京积分使用限制
|
|
if(!msg && type === 'add' && parkMallCode === 3) {
|
|
if(!msg && type === 'add' && parkMallCode === 3) {
|
|
const{ maxDiscountFee = 0, unitAmount =0 } = points
|
|
const{ maxDiscountFee = 0, unitAmount =0 } = points
|
|
- if ( maxDiscountFee && state.pointsTime >= maxDiscountFee/unitAmount) {
|
|
|
|
|
|
+ const userMaxDiscountFee = availableDiscountFee > maxDiscountFee ? maxDiscountFee : availableDiscountFee
|
|
|
|
+ if ( maxDiscountFee && state.pointsTime >= userMaxDiscountFee/unitAmount) {
|
|
msg = `超出抵扣上限,每次最高可抵扣${ maxDiscountFee/unitAmount }小时`
|
|
msg = `超出抵扣上限,每次最高可抵扣${ maxDiscountFee/unitAmount }小时`
|
|
}
|
|
}
|
|
}
|
|
}
|