|
@@ -145,7 +145,7 @@
|
|
|
<el-input v-model="allCourseCount"
|
|
|
disabled />
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="hotType=='GIVE_CLASS'"
|
|
|
+ <el-form-item v-if="hotType=='GIVE_CLASS'&&isGiveClass"
|
|
|
label="赠课课程类型">
|
|
|
<el-radio v-model="centerForm.radio"
|
|
|
label="ONLINE">
|
|
@@ -423,6 +423,7 @@ export default {
|
|
|
giveNum: '',
|
|
|
weekDay: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
|
|
|
scetionList: [],
|
|
|
+ isGiveClass: false,
|
|
|
courseOption: {
|
|
|
disabledDate: time => {
|
|
|
let startTime = this.leftForm.courseStart;
|
|
@@ -473,7 +474,12 @@ export default {
|
|
|
// this.attribute1 从多少节开始送
|
|
|
// this.attribute2 送多少节
|
|
|
giveNum = parseInt((parseInt(offline) + parseInt(online)) - this.attribute1 >= 0 ? giveNum = this.attribute2 : giveNum = 0);
|
|
|
+ if (giveNum) {
|
|
|
+ // 有赠送课时
|
|
|
+ this.isGiveClass = true
|
|
|
+ }
|
|
|
this.giveNum = giveNum || 0;
|
|
|
+
|
|
|
return (parseInt(offline) + parseInt(online) + '+' + giveNum) || '';
|
|
|
}
|
|
|
return parseInt(offline) + parseInt(online) || ''
|
|
@@ -551,11 +557,16 @@ export default {
|
|
|
},
|
|
|
// 选择活动方案
|
|
|
chioseActive (val) {
|
|
|
- this.attribute1 = ''
|
|
|
+ this.lookList = []
|
|
|
+ this.timeTable = []
|
|
|
+ this.attribute1 = '';
|
|
|
this.attribute2 = '';
|
|
|
+ this.giveNum = 0;
|
|
|
+ this.isGiveClass = false;
|
|
|
// 根须活动id获取 相应的值
|
|
|
for (let i in this.activeList) {
|
|
|
if (this.activeList[i].id == val) {
|
|
|
+ // 如果是买赠就必须选择赠课类型
|
|
|
// 报名开始 报名结束 课程开始 课程结束 // 判断是否有线上,线下课 并同步状态
|
|
|
// this.leftForm.signUpStart = this.activeList[i].startTime;
|
|
|
// this.leftForm.signUpEnd = this.activeList[i].endTime;
|
|
@@ -729,8 +740,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
setTimeTable () {
|
|
|
-
|
|
|
-
|
|
|
// 拿到线上课数与线下课数 以及
|
|
|
this.timeTable = [];
|
|
|
let online = parseInt(this.centerForm.onlineCourseNum) || 0;
|
|
@@ -744,6 +753,7 @@ export default {
|
|
|
} else if (giveClassType == 'OFFLINE') {
|
|
|
offline += giveNum;
|
|
|
}
|
|
|
+ console.log(`线上课数${online}-线下课数${offline}-赠课数${giveNum}`)
|
|
|
// 这里判断是否选择了排课开始时间
|
|
|
if (online && !this.maskForm.courseStartOnline) {
|
|
|
// console.log(this.maskForm.courseStartOnline)
|
|
@@ -809,7 +819,7 @@ export default {
|
|
|
date.setDate(date.getDate() + 7);
|
|
|
}
|
|
|
|
|
|
- console.log(date1)
|
|
|
+ // console.log(date1)
|
|
|
while (offline && offline > 0) {
|
|
|
// 排线下课
|
|
|
for (let i in offlineList) {
|
|
@@ -962,6 +972,11 @@ export default {
|
|
|
this.$router.push('/business/vipList')
|
|
|
},
|
|
|
setCourse () {
|
|
|
+ //
|
|
|
+ if (this.hotType == 'GIVE_CLASS' && this.isGiveClass && !this.centerForm.radio) {
|
|
|
+ this.$message.error('您还未选择赠课类型')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs['leftForm'].validate(vali => {
|
|
|
if (vali) {
|
|
|
this.dialogFormVisible = true
|
|
@@ -970,7 +985,6 @@ export default {
|
|
|
|
|
|
},
|
|
|
setVipInfo (data) {
|
|
|
- console.log(data);
|
|
|
this.leftForm.name = data.name;
|
|
|
this.leftForm.subject = parseInt(data.subjectIdList)
|
|
|
// 激活声部下的所有老师
|
|
@@ -1010,7 +1024,6 @@ export default {
|
|
|
this.rightForm.offlineCourse = data.offlineTeacherSalary
|
|
|
this.rightForm.offlinePrice = data.offlineClassesUnitPrice;
|
|
|
this.rightForm.allPrice = data.totalPrice;
|
|
|
- console.log(this.leftForm.activeType)
|
|
|
|
|
|
//subjectIdList
|
|
|
}
|