|
@@ -316,6 +316,7 @@ export default {
|
|
|
methods: {
|
|
|
// 改变checkbox
|
|
|
changeList (e) {
|
|
|
+ // console.log(e)
|
|
|
},
|
|
|
handleSelectionChange (e) {
|
|
|
// 点击改变勾选
|
|
@@ -346,7 +347,6 @@ export default {
|
|
|
// 遍历循环所有的group 删除所选id
|
|
|
for (let key in this.soundLists) {
|
|
|
if (this.soundLists[key].indexOf(this.multipleSelection[j].id) != -1) {
|
|
|
-
|
|
|
this.soundLists[key].splice(this.soundLists[key].indexOf(this.multipleSelection[j].id), 1)
|
|
|
}
|
|
|
}
|
|
@@ -359,6 +359,7 @@ export default {
|
|
|
},
|
|
|
// 勾选选中框处理数据,存储勾选过的checkbox值
|
|
|
checkinlist (obj) {
|
|
|
+ // console.log(this.activeSoundList)
|
|
|
let flag = false;
|
|
|
this.activeSoundList.map(item => {
|
|
|
if (item.id == obj.id) {
|
|
@@ -737,10 +738,21 @@ export default {
|
|
|
getDefaultSubject({ chargeTypeId: type, organId: this.topfor.section, number: 1 }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.activeSoundList = res.data.map(item => {
|
|
|
- this.soundLists[0].push(item.id)
|
|
|
- let obj = { 'id': item.id, 'sound': item.name, 'jihua': 0, 'yuji': item.fee, 'zhonglei': [], 'fangshi': '', 'fangshiprice': 1500, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [], 'markChioseList': [] }
|
|
|
+ // this.soundLists[0].push(item.subjectId)
|
|
|
+ let obj = { 'id': item.subjectId, 'sound': item.name, 'jihua': item.expectedStudentNum, 'yuji': item.fee, 'zhonglei': [], 'fangshi': item.kitGroupPurchaseType, 'fangshiprice': item.depositFee, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [], 'markChioseList': [] }
|
|
|
+ // this.checkinlist(obj);
|
|
|
return obj;
|
|
|
})
|
|
|
+ // = arr;
|
|
|
+ this.soundList.forEach((item, i) => {
|
|
|
+ item.subjects.forEach((some, j) => {
|
|
|
+ res.data.forEach((sub, x) => {
|
|
|
+ if (sub.id == some.id) {
|
|
|
+ this.soundLists[i].push(some.id)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
// 并且把所有soundLists 里面
|
|
|
}
|
|
|
});
|
|
@@ -751,11 +763,27 @@ export default {
|
|
|
this.teamid = this.$route.query.id;
|
|
|
findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
+
|
|
|
this.activeSoundList = res.data.musicGroupSubjectPlans.map(item => {
|
|
|
- this.soundLists[0].push(item.subjectId)
|
|
|
+ // this.soundLists[0].push(item.subjectId)
|
|
|
let obj = { 'id': item.subjectId, 'sound': item.subName, 'jihua': item.expectedStudentNum, 'yuji': item.fee, 'zhonglei': [], 'fangshi': item.kitGroupPurchaseType, 'fangshiprice': item.depositFee, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [], 'markChioseList': [] }
|
|
|
+ this.checkinlist(obj)
|
|
|
return obj;
|
|
|
})
|
|
|
+ // this.activeSoundList = arr;
|
|
|
+ // 这里.....
|
|
|
+ this.soundList.forEach((item, i) => {
|
|
|
+ item.subjects.forEach((some, j) => {
|
|
|
+ this.activeSoundList.forEach((sub, x) => {
|
|
|
+ if (sub.id == some.id) {
|
|
|
+ this.soundLists[i].push(some.id)
|
|
|
+ // this.checkinlist(some)
|
|
|
+ // this.activeSoundList.push(some)
|
|
|
+ // 这里点击勾选
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
// 循环列表里的声部 拿取商品
|
|
|
for (let i in this.activeSoundList) {
|
|
|
for (let j in res.data.musicGroupSubjectGoodsGroups) {
|