|
@@ -189,9 +189,11 @@ export default {
|
|
|
if(!msg && type === 'add' && parkMallCode === 3) {
|
|
|
const{ maxDiscountFee = 0, unitAmount =0 } = points
|
|
|
const userMaxDiscountFee = availableDiscountFee > maxDiscountFee ? maxDiscountFee : availableDiscountFee
|
|
|
- const isMax = (newMemberPoints.totalAvailable - newMemberPoints.available) + (points.totalAvailable - points.available) >= points.totalAvailable && points.totalAvailable && (points.totalAvailable || points.available)
|
|
|
+ const newMemberPointsAvailable = (newMemberPoints?.discountFee || 0) / hourPrice * newMemberPoints.pointsPerUnit
|
|
|
+ const pointsAvailable = (points?.discountFee || 0) / hourPrice * points.pointsPerUnit
|
|
|
+ const isMax = newMemberPointsAvailable + pointsAvailable >= points.totalAvailable && points.totalAvailable && (points.totalAvailable || points.available)
|
|
|
if ( maxDiscountFee && state.pointsTime >= userMaxDiscountFee/unitAmount || isMax) {
|
|
|
- msg = `超出抵扣上限,每日最高可抵扣${ maxDiscountFee/unitAmount }小时`
|
|
|
+ msg = `超出抵扣上限,每日最高可抵扣${ maxDiscountFee / unitAmount }小时`
|
|
|
}
|
|
|
}
|
|
|
if ( msg ) {
|