|
@@ -44,7 +44,7 @@
|
|
|
</div>
|
|
|
<el-divider></el-divider>
|
|
|
<chioseMusic
|
|
|
- :activeSoundList="activeSoundList"
|
|
|
+ :activeSoundList="activeSoundList"
|
|
|
:item="item"
|
|
|
@lookMusic="lookMusic"
|
|
|
:basdisabled="basdisabled"
|
|
@@ -190,7 +190,6 @@ export default {
|
|
|
this.chioseActiveSound = activeSound;
|
|
|
this.changeActiveSound(activeSound.join(","));
|
|
|
// 格式化商品和教辅
|
|
|
-
|
|
|
res.data.musicGroupSubjectGoodsGroups.forEach((shop) => {
|
|
|
let index = findIndex(this.activeSoundList, (o) => {
|
|
|
return o.id == shop.subjectId;
|
|
@@ -213,11 +212,15 @@ export default {
|
|
|
type: typeJson,
|
|
|
groupPrice: shop.price,
|
|
|
borrowPrice: shop.depositFee,
|
|
|
+ groupRemissionCourseFee: Boolean(
|
|
|
+ shop.groupRemissionCourseFee
|
|
|
+ ),
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ console.log(this.activeSoundList);
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -268,7 +271,13 @@ export default {
|
|
|
sound: item.name,
|
|
|
expectedStudentNum: item.expectedStudentNum,
|
|
|
chioseMusic: [
|
|
|
- { musical: "", type: ["GROUP"], groupPrice: 0, borrowPrice: 1500 },
|
|
|
+ {
|
|
|
+ musical: "",
|
|
|
+ type: ["GROUP"],
|
|
|
+ groupPrice: 0,
|
|
|
+ borrowPrice: 1500,
|
|
|
+ groupRemissionCourseFee: Boolean(item.groupRemissionCourseFee),
|
|
|
+ },
|
|
|
],
|
|
|
markChioseList: [],
|
|
|
goodsList: [],
|
|
@@ -355,10 +364,19 @@ export default {
|
|
|
};
|
|
|
obj.musicGroupSubjectPlans.push(item);
|
|
|
// 格式化商品数据 chioseMusic: [{ musical: '', type: ["GROUP"], groupPrice: 0, borrowPrice: 1500 }],
|
|
|
+
|
|
|
active.chioseMusic.forEach((music) => {
|
|
|
+ console.log(music);
|
|
|
let goodsItem = null;
|
|
|
let depositFee = music.borrowPrice;
|
|
|
let price = music.groupPrice;
|
|
|
+ let groupRemissionCourseFee;
|
|
|
+ if (music.type.indexOf("GROUP") != -1) {
|
|
|
+ groupRemissionCourseFee = music.groupRemissionCourseFee * 1;
|
|
|
+ } else {
|
|
|
+ groupRemissionCourseFee = 0;
|
|
|
+ }
|
|
|
+
|
|
|
let index = findIndex(active.goodsList, (o) => {
|
|
|
return o.id == music.musical;
|
|
|
});
|
|
@@ -366,9 +384,9 @@ export default {
|
|
|
goodsItem = active.goodsList[index];
|
|
|
}
|
|
|
let kitGroupPurchaseTypeJson = {};
|
|
|
- music.type.forEach((type) => {
|
|
|
- kitGroupPurchaseTypeJson[type] = 0;
|
|
|
- });
|
|
|
+ music.type.forEach((type) => {
|
|
|
+ kitGroupPurchaseTypeJson[type] = 0;
|
|
|
+ });
|
|
|
// if (Array.isArray(music.type)) {
|
|
|
// music.type.forEach((type) => {
|
|
|
// kitGroupPurchaseTypeJson[type] = 0;
|
|
@@ -377,7 +395,7 @@ export default {
|
|
|
// // 字符串
|
|
|
// let arr = [ music.type]
|
|
|
// arr.forEach((type) => {
|
|
|
- // kitGroupPurchaseTypeJson[type] = 0;
|
|
|
+ // kitGroupPurchaseTypeJson[type] = 0;
|
|
|
// });
|
|
|
// }
|
|
|
kitGroupPurchaseTypeJson = JSON.stringify(kitGroupPurchaseTypeJson);
|
|
@@ -390,6 +408,7 @@ export default {
|
|
|
kitGroupPurchaseTypeJson,
|
|
|
depositFee,
|
|
|
price,
|
|
|
+ groupRemissionCourseFee,
|
|
|
};
|
|
|
obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
}
|
|
@@ -559,7 +578,7 @@ export default {
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
.title {
|
|
|
- width: 100px;
|
|
|
+ width: 140px;
|
|
|
text-align: right;
|
|
|
}
|
|
|
}
|