|
@@ -257,7 +257,8 @@ export default {
|
|
|
courseViewType: 0, // 收费模式,0 课程显示,1 AMR系统
|
|
|
leBaoStatus: false,
|
|
|
buyMaintenance: false, // 是否开启乐保
|
|
|
- isClickStatus: false
|
|
|
+ isClickStatus: false,
|
|
|
+ accessStatus: false, // 是否有辅件乐保
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -434,9 +435,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+ // 判断辅件是否有乐器维护(编号固定76)
|
|
|
+ let accessStatus = false // 是否有乐保
|
|
|
+ this.accessOries.forEach(item => {
|
|
|
+ // 判断子商品是否有乐保
|
|
|
+ if(item.childGoodsList && item.childGoodsList.length > 0) {
|
|
|
+ item.childGoodsList.forEach(child => {
|
|
|
+ if(child.id == 76) {
|
|
|
+ accessStatus = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(item.goodsIdList == 76) {
|
|
|
+ accessStatus = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.accessStatus = accessStatus
|
|
|
+
|
|
|
// 乐保服务初始化
|
|
|
this.instrumentResult.forEach(item => {
|
|
|
- if(item.checked && item.kitType == "GROUP") {
|
|
|
+ if(item.checked && item.kitType == "GROUP" && !accessStatus) {
|
|
|
this.leBaoStatus = true
|
|
|
this.buyMaintenance = true
|
|
|
}
|
|
@@ -510,13 +528,16 @@ export default {
|
|
|
item.checked = false
|
|
|
})
|
|
|
item.checked = true
|
|
|
- if(item.kitType == "GROUP") {
|
|
|
- this.leBaoStatus = true
|
|
|
- this.buyMaintenance = true
|
|
|
- } else {
|
|
|
- this.leBaoStatus = false
|
|
|
- this.buyMaintenance = false
|
|
|
+ if(!this.accessStatus) {
|
|
|
+ if(item.kitType != "owned") {
|
|
|
+ this.leBaoStatus = true
|
|
|
+ this.buyMaintenance = true
|
|
|
+ } else {
|
|
|
+ this.leBaoStatus = false
|
|
|
+ this.buyMaintenance = false
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
// 重新计算金额
|
|
|
this.calcPrice()
|
|
|
},
|
|
@@ -571,6 +592,7 @@ export default {
|
|
|
tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
|
|
|
}
|
|
|
});
|
|
|
+ marketPrice += parseFloat(m)
|
|
|
buyList.unshift({
|
|
|
name: this.chargeTypeName,
|
|
|
type: paymentPatternType[this.paymentPattern],
|
|
@@ -581,13 +603,15 @@ export default {
|
|
|
csi.forEach(item => {
|
|
|
if (item.isStatus) {
|
|
|
musicClassFee += parseFloat(item.courseCurrentPrice)
|
|
|
- marketPrice += parseFloat(item.courseOriginalPrice)
|
|
|
+ // marketPrice += parseFloat(item.courseOriginalPrice)
|
|
|
if (item.id > 0) {
|
|
|
courseKeys.push(item.id)
|
|
|
}
|
|
|
// 不可选的课程才会减免课程费用
|
|
|
if (!item.isStudentOptional) {
|
|
|
tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
|
|
|
+ } else {
|
|
|
+ marketPrice += parseFloat(item.courseOriginalPrice)
|
|
|
}
|
|
|
}
|
|
|
})
|