|
@@ -263,7 +263,8 @@ export default {
|
|
|
}, 10000)
|
|
|
const { parkingRecord, discountInfo = {}, parkingRule = {}, parkInfo = {}} = this.orderDetail;
|
|
|
const { coupons = [], points = [], memberGrade = [], paperCoupons = [], consume = [], newMemberPoints= {} } = discountInfo
|
|
|
- const { hourPrice } = parkingRule
|
|
|
+ const { hourPrice } = parkingRule;
|
|
|
+ const isAmount = [5, 8, 10].indexOf(this.parkMallCode) > -1; // 积分兑换规则是否以 兑换值(元)为主;
|
|
|
/* 校验 */
|
|
|
let usingTotalDiscount = 0;
|
|
|
let parkDiscount = 0;
|
|
@@ -335,10 +336,11 @@ export default {
|
|
|
if (points?.length && points[0].discountFee > 0) {
|
|
|
// 15 兑换 5元
|
|
|
const { pointsPerUnit, unitAmount, discountFee, available } = points[0]
|
|
|
+
|
|
|
params.discountInfo.points = {
|
|
|
- "discountTime": discountFee / hourPrice * 60,
|
|
|
+ "discountTime": discountFee / (isAmount ? unitAmount : hourPrice) * 60,
|
|
|
"discountFee": discountFee,
|
|
|
- "discountPoints": discountFee / hourPrice * pointsPerUnit
|
|
|
+ "discountPoints": discountFee / (isAmount ? unitAmount : hourPrice) * pointsPerUnit
|
|
|
}
|
|
|
usingTotalDiscount = usingTotalDiscount + discountFee
|
|
|
}
|