|
@@ -8,24 +8,24 @@
|
|
|
fill="#14928A"
|
|
|
text-color='#474747'>
|
|
|
|
|
|
- <el-checkbox label="一月"></el-checkbox>
|
|
|
- <el-checkbox label="二月"></el-checkbox>
|
|
|
- <el-checkbox label="三月"></el-checkbox>
|
|
|
- <el-checkbox label="四月"></el-checkbox>
|
|
|
- <el-checkbox label="五月"></el-checkbox>
|
|
|
- <el-checkbox label="六月"></el-checkbox>
|
|
|
- <el-checkbox label="七月"></el-checkbox>
|
|
|
- <el-checkbox label="八月"></el-checkbox>
|
|
|
- <el-checkbox label="九月"></el-checkbox>
|
|
|
- <el-checkbox label="十月"></el-checkbox>
|
|
|
- <el-checkbox label="十一月"></el-checkbox>
|
|
|
- <el-checkbox label="十二月"></el-checkbox>
|
|
|
+ <el-checkbox label="1">一月</el-checkbox>
|
|
|
+ <el-checkbox label="2">二月</el-checkbox>
|
|
|
+ <el-checkbox label="3">三月</el-checkbox>
|
|
|
+ <el-checkbox label="4">四月</el-checkbox>
|
|
|
+ <el-checkbox label="5">五月</el-checkbox>
|
|
|
+ <el-checkbox label="6">六月</el-checkbox>
|
|
|
+ <el-checkbox label="7">七月</el-checkbox>
|
|
|
+ <el-checkbox label="8">八月</el-checkbox>
|
|
|
+ <el-checkbox label="9">九月</el-checkbox>
|
|
|
+ <el-checkbox label="10">十月</el-checkbox>
|
|
|
+ <el-checkbox label="11">十一月</el-checkbox>
|
|
|
+ <el-checkbox label="12">十二月</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
|
|
|
<div class="topMsg">
|
|
|
- <p>当前选择声部数(个):20</p>
|
|
|
- <p style='margin-left:30px;'>计划招生人数(个):80</p>
|
|
|
+ <p>当前选择声部数(个):{{chioseSoundNum}}</p>
|
|
|
+ <p style='margin-left:30px;'>计划招生人数(个):{{PlannedCount}}</p>
|
|
|
</div>
|
|
|
<div class="listWrap">
|
|
|
<el-table :data='activeSoundList'
|
|
@@ -281,25 +281,30 @@
|
|
|
@click="generates">确定</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <div class="btnWrap">
|
|
|
+ <div class="PrevBtn"
|
|
|
+ @click="goback">上一步</div>
|
|
|
+ <div class="submitBtn"
|
|
|
+ @click="submitInfo">提交</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import store from '@/store'
|
|
|
-import { getSubject, getDefaultSubject, getGoods } from '@/api/buildTeam'
|
|
|
+import { getSubject, getDefaultSubject, getGoods, createTeam } from '@/api/buildTeam'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- markList: [], // 测试
|
|
|
- dialogTableVisible: true,
|
|
|
+ dialogTableVisible: false,
|
|
|
soundList: [],
|
|
|
soundLists: [], // 存储选中项的声部id 记录变量
|
|
|
activeSoundList: [], // 记录存储后的所选中的声部列表
|
|
|
- checkList: [],
|
|
|
+ checkList: [1],
|
|
|
multipleSelection: [], // 列表选择的集合
|
|
|
isLoop: '', // 是否显示周期循环
|
|
|
- tableRowData: {
|
|
|
-
|
|
|
- } // 添加一行数据的模板
|
|
|
+ payfor: {},
|
|
|
+ topfor: {},
|
|
|
+ checkfor: {}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -401,6 +406,95 @@ export default {
|
|
|
// 点击保存或编辑
|
|
|
savecolumn (row) {
|
|
|
row.type == 1 ? row.type = 2 : row.type = 1
|
|
|
+ },
|
|
|
+ // 返回上一步
|
|
|
+ goback () {
|
|
|
+ this.$emit('chiosetab', 0);
|
|
|
+ },
|
|
|
+ submitInfo () {
|
|
|
+ // 整理数据提交
|
|
|
+ let obj = {};
|
|
|
+ this.payfor.student.chiose == 'loop' ? obj.months = this.checkList : obj.months = [];
|
|
|
+ console.log(JSON.stringify(this.checkfor));
|
|
|
+ obj.musicGroup = {
|
|
|
+ applyExpireDate: this.topfor.time + ' 00:00:01',
|
|
|
+ chargeTypeId: this.topfor.type,
|
|
|
+ cooperationOrganId: this.topfor.school,
|
|
|
+ teamTeacherId: this.topfor.boss,
|
|
|
+ educationalTeacherId: this.topfor.teacher,
|
|
|
+ enrollClasses: this.topfor.startClass.join(','),
|
|
|
+ name: this.topfor.name,
|
|
|
+ organId: this.topfor.section,
|
|
|
+ // paymentMonths:obj.months 有待确认
|
|
|
+ schoolId: this.topfor.address,
|
|
|
+ courseForm: JSON.stringify(this.checkfor)
|
|
|
+ }
|
|
|
+ obj.musicGroupPaymentEntities = []
|
|
|
+ // 添加学校主体付费方式
|
|
|
+ console.log(this.payfor.company.ischeck)
|
|
|
+ if (this.payfor.school.ischeck) {
|
|
|
+
|
|
|
+ obj.musicGroupPaymentEntities.push({
|
|
|
+ 'amount': this.payfor.school.price,
|
|
|
+ 'memo': this.payfor.school.value,
|
|
|
+ 'paymentMethod': this.payfor.school.chiose,
|
|
|
+ 'name': '学校'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 添加公司主体付费方式
|
|
|
+ if (this.payfor.company.ischeck) {
|
|
|
+ obj.musicGroupPaymentEntities.push({
|
|
|
+ 'amount': this.payfor.company.price,
|
|
|
+ 'memo': this.payfor.company.value,
|
|
|
+ 'paymentMethod': this.payfor.company.chiose,
|
|
|
+ 'name': '公司'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 添加商品以及教辅
|
|
|
+ obj.musicGroupSubjectGoodsGroups = [];
|
|
|
+ console.log(this.activeSoundList);
|
|
|
+ for (let i in this.activeSoundList) {
|
|
|
+ // 遍历声部里的乐器
|
|
|
+ let some = {};
|
|
|
+ some.subjectId = this.activeSoundList[i].id;
|
|
|
+ some.type = 'INSTRUMENT';
|
|
|
+ some.goodsIdList = this.activeSoundList[i].zhonglei.join(',');
|
|
|
+ obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
+ }
|
|
|
+ // 遍历声部里的教辅
|
|
|
+ for (let i in this.activeSoundList) {
|
|
|
+ // 遍历声部里的乐器
|
|
|
+ for (let j in this.activeSoundList[i].markList) {
|
|
|
+ let some = {};
|
|
|
+ some.subjectId = this.activeSoundList[i].id;
|
|
|
+ some.type = 'ACCESSORIES';
|
|
|
+ some.goodsIdList = this.activeSoundList[i].markList[j].goods.join(',');
|
|
|
+ some.name = this.activeSoundList[i].markList[j].name;
|
|
|
+ some.price = this.activeSoundList[i].markList[j].price;
|
|
|
+ obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ // 添加声部
|
|
|
+ obj.MusicGroupSubjectPlan = [];
|
|
|
+ for (let i in this.activeSoundList) {
|
|
|
+ let item = {};
|
|
|
+ item.applyStudentNum = this.activeSoundList[i].jihua;
|
|
|
+ item.expectedStudentNum = this.activeSoundList[i].yuji;
|
|
|
+ item.kitGroupPurchaseType = this.activeSoundList[i].fangshi;
|
|
|
+ item.subName = this.activeSoundList[i].sound;
|
|
|
+ item.subjectId = this.activeSoundList[i].id;
|
|
|
+ obj.MusicGroupSubjectPlan.push(item);
|
|
|
+ }
|
|
|
+ console.log(obj);
|
|
|
+ createTeam(obj).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ // 成功 跳转到乐团报名详情
|
|
|
+ let id = 'ca2becc9-c39a-4c0b-b9e1-c3a744c10888';
|
|
|
+
|
|
|
+ this.$router.push({ path: '/teamBuild/teamSeting', query: { id } })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -455,12 +549,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
// 拿到刚才的存储的信息
|
|
|
- let payfor = this.$store.getters.payList;
|
|
|
- let topfor = this.$store.getters.topinfo;
|
|
|
- let checkfor = this.$store.getters.checkinfo;
|
|
|
- let type = topfor.type;
|
|
|
- console.log(topfor);
|
|
|
- this.isLoop = payfor.student.chiose;
|
|
|
+ this.payfor = this.$store.getters.payList;
|
|
|
+ this.topfor = this.$store.getters.topinfo;
|
|
|
+ this.checkfor = this.$store.getters.checkinfo;
|
|
|
+ let type = this.topfor.type;
|
|
|
+
|
|
|
+ console.log(this.topfor);
|
|
|
+ console.log(this.checkfor);
|
|
|
+ console.log(this.payfor);
|
|
|
+ this.isLoop = this.payfor.student.chiose;
|
|
|
// 获取存储的type值获取默认值
|
|
|
getDefaultSubject({ musicGroupId: type }).then(res => {
|
|
|
// console.log(res);
|
|
@@ -480,6 +577,14 @@ export default {
|
|
|
}
|
|
|
return num;
|
|
|
},
|
|
|
+ // 计划招生人数
|
|
|
+ PlannedCount () {
|
|
|
+ let Count = 0;
|
|
|
+ for (let item in this.activeSoundList) {
|
|
|
+ Count += parseInt(this.activeSoundList[item].jihua)
|
|
|
+ }
|
|
|
+ return Count
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -642,4 +747,13 @@ export default {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
+.btnWrap {
|
|
|
+ margin-top: 40px;
|
|
|
+ .PrevBtn {
|
|
|
+ background-color: #444444;
|
|
|
+ }
|
|
|
+ .submitBtn {
|
|
|
+ background-color: #f85043;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|