|
@@ -5,6 +5,7 @@
|
|
|
<course-model
|
|
|
:courseViewType="courseViewType"
|
|
|
:courseShowInfo="courseShowInfo"
|
|
|
+ :remissionCourseFeeStatus="remissionCourseFeeStatus"
|
|
|
:courseInfo="courseInfo"
|
|
|
:trainSmallBg="trainSmallBg"
|
|
|
:serviceValidDate="serviceValidDate"
|
|
@@ -171,6 +172,7 @@ export default {
|
|
|
memberCoursePrice: [], // 云教练,显示赠送的课程
|
|
|
memberCourseShowFlag: false, // 是否显示赠送课程
|
|
|
buyCloudTeacher: false, // 是否购买云教练
|
|
|
+ remissionCourseFeeStatus: false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -314,6 +316,7 @@ export default {
|
|
|
id: tempItem.id,
|
|
|
price: tempItem.price,
|
|
|
kitType: single,
|
|
|
+ groupRemissionCourseFee: tempItem.groupRemissionCourseFee
|
|
|
};
|
|
|
}
|
|
|
} else if (single == "LEASE") {
|
|
@@ -330,6 +333,7 @@ export default {
|
|
|
id: tempItem.id,
|
|
|
price: tempItem.price,
|
|
|
kitType: single,
|
|
|
+ groupRemissionCourseFee: tempItem.groupRemissionCourseFee
|
|
|
};
|
|
|
}
|
|
|
} else if (single == "FREE") {
|
|
@@ -346,6 +350,7 @@ export default {
|
|
|
id: tempItem.id,
|
|
|
price: tempItem.price,
|
|
|
kitType: single,
|
|
|
+ groupRemissionCourseFee: tempItem.groupRemissionCourseFee
|
|
|
};
|
|
|
}
|
|
|
}
|
|
@@ -355,6 +360,7 @@ export default {
|
|
|
id: tempItem.id,
|
|
|
price: tempItem.price,
|
|
|
kitType: single,
|
|
|
+ groupRemissionCourseFee: tempItem.groupRemissionCourseFee
|
|
|
};
|
|
|
}
|
|
|
let childGoodsNameList = [];
|
|
@@ -385,6 +391,8 @@ export default {
|
|
|
});
|
|
|
this.instrumentResultList = sorted;
|
|
|
|
|
|
+ // 设置是否有减免金额
|
|
|
+ this.instrumentGetStatus()
|
|
|
this.setLeBaoStatus()
|
|
|
}
|
|
|
|
|
@@ -426,7 +434,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onCheckItem(item,type) {
|
|
|
- console.log(item)
|
|
|
// 默认选中不可改
|
|
|
if(item.optionalFlag) return
|
|
|
// 判断乐保是否可选
|
|
@@ -435,18 +442,31 @@ export default {
|
|
|
if(type == 'INSTRUMENT') {
|
|
|
this.instrumentResultList.forEach(group => {
|
|
|
group.forEach(child => {
|
|
|
- if(child.id != item.id) {
|
|
|
+ if(child.id != item.id || (child.id == item.id && child.kitType != item.kitType)) {
|
|
|
child.isStatus = false
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
item.isStatus = !item.isStatus;
|
|
|
+ // 设置是否有减免金额
|
|
|
+ this.instrumentGetStatus()
|
|
|
// 重新设置乐保状态
|
|
|
this.setLeBaoStatus()
|
|
|
// 重新计算金额
|
|
|
this.calcPrice();
|
|
|
},
|
|
|
+ instrumentGetStatus() {
|
|
|
+ let childItem = {}
|
|
|
+ this.instrumentResultList.forEach(group => {
|
|
|
+ group.forEach(child => {
|
|
|
+ if(child.isStatus) {
|
|
|
+ childItem = child
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.remissionCourseFeeStatus = childItem.kitType == 'GROUP' && childItem.groupRemissionCourseFee == 1 ? true : false
|
|
|
+ },
|
|
|
setLeBaoStatus() { // 设置乐保状态
|
|
|
let status = false // 是否有选中乐器
|
|
|
this.instrumentResultList.forEach(group => {
|