|
@@ -301,7 +301,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="hasOnline" label="线上课数">
|
|
|
<el-input
|
|
|
- :disabled='studentLimit>studentRuleNum'
|
|
|
+ :disabled="studentLimit > studentRuleNum"
|
|
|
v-model.trim="centerForm.onlineCourseNum"
|
|
|
@mousewheel.native.prevent
|
|
|
@input="onCourseNumChange('online')"
|
|
@@ -546,7 +546,11 @@
|
|
|
<div class="btnWrap">
|
|
|
<div class="okBtn" @click="submitInfo">{{ id ? "修改" : "确定" }}</div>
|
|
|
|
|
|
- <div class="okBtn" style="background-color: var(--color-primary)" @click="resetFrom">
|
|
|
+ <div
|
|
|
+ class="okBtn"
|
|
|
+ style="background-color: var(--color-primary)"
|
|
|
+ @click="resetFrom"
|
|
|
+ >
|
|
|
重置
|
|
|
</div>
|
|
|
</div>
|
|
@@ -672,6 +676,7 @@ import {
|
|
|
getSubject,
|
|
|
getPracticeApplySubjects,
|
|
|
getOrganRole,
|
|
|
+ getAgreement,
|
|
|
} from "@/api/buildTeam";
|
|
|
import {
|
|
|
vipGroupCategory,
|
|
@@ -682,7 +687,7 @@ import {
|
|
|
getPracticeGroupCostCount,
|
|
|
createPractice,
|
|
|
getPracticeGroupSellPrice,
|
|
|
- getOnlineMun
|
|
|
+ getOnlineMun,
|
|
|
} from "@/api/vipSeting";
|
|
|
import { getTeachSchool, getTeacherBySubject } from "@/api/teacherManager";
|
|
|
import axios from "axios";
|
|
@@ -876,8 +881,9 @@ export default {
|
|
|
isMusicTheory: false,
|
|
|
chioseStudent: [],
|
|
|
classTimeDis: false,
|
|
|
- studentRuleNum:0,
|
|
|
- isFirst:false
|
|
|
+ studentRuleNum: 0,
|
|
|
+ isFirst: false,
|
|
|
+ submitList:[]
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -927,8 +933,8 @@ export default {
|
|
|
this.title = "网管课申请";
|
|
|
this.$route.meta.title = "网管课申请";
|
|
|
this.hasOffline = false;
|
|
|
- }else{
|
|
|
- this.title = "VIP申请";
|
|
|
+ } else {
|
|
|
+ this.title = "VIP申请";
|
|
|
this.$route.meta.title = "VIP申请";
|
|
|
}
|
|
|
|
|
@@ -1026,14 +1032,22 @@ export default {
|
|
|
localStorage.removeItem("newVip");
|
|
|
localStorage.removeItem(`newPractice`);
|
|
|
},
|
|
|
+ async getAgreement() {
|
|
|
+ try {
|
|
|
+ const res = await getAgreement();
|
|
|
+ if (!res.data) {
|
|
|
+ this.submitList.push("agreement");
|
|
|
+ // this.$bus.$emit("showguide", ["agreement"]);
|
|
|
+ }
|
|
|
+ } catch (e) {}
|
|
|
+ },
|
|
|
async init() {
|
|
|
- try{
|
|
|
- const res = await getOnlineMun()
|
|
|
- let tempObj = JSON.parse(res.data.config)
|
|
|
- this.studentRuleNum = tempObj.cloud_room_rule.cloud_room_up_limit -1
|
|
|
-
|
|
|
- }catch(e){
|
|
|
- console.log(e)
|
|
|
+ try {
|
|
|
+ const res = await getOnlineMun();
|
|
|
+ let tempObj = JSON.parse(res.data.config);
|
|
|
+ this.studentRuleNum = tempObj.cloud_room_rule.cloud_room_up_limit - 1;
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
if (this.$route.query.rules) {
|
|
|
this.rules = this.$route.query.rules;
|
|
@@ -1042,11 +1056,17 @@ export default {
|
|
|
this.searchForm = this.$route.query.searchForm;
|
|
|
}
|
|
|
// 获取所有科目的接口
|
|
|
+ this.submitList =[]
|
|
|
await this.$store.dispatch("setBranchs");
|
|
|
+ await this.getAgreement();
|
|
|
if (this.selects.branchs.length <= 0) {
|
|
|
- this.$bus.$emit("showguide", ["organ"]);
|
|
|
+ submitList.push("organ")
|
|
|
+ // this.$bus.$emit("showguide", ["organ"]);
|
|
|
+ }
|
|
|
+ if (this.submitList.length > 0) {
|
|
|
+ this.$bus.$emit("showguide", this.submitList);
|
|
|
+ return;
|
|
|
}
|
|
|
-
|
|
|
if (this.courseType == "PRACTICE") {
|
|
|
getPracticeApplySubjects().then((res) => {
|
|
|
if (res.code == 200) {
|
|
@@ -1068,14 +1088,14 @@ export default {
|
|
|
this.pickerOptions = this.beginDate();
|
|
|
this.pickerOptions1 = this.processDate();
|
|
|
this.courseOption = this.coursesDate();
|
|
|
- this.getInstitutionRules()
|
|
|
+ this.getInstitutionRules();
|
|
|
},
|
|
|
- async getInstitutionRules() {
|
|
|
+ async getInstitutionRules() {
|
|
|
try {
|
|
|
const res = await getSysTenantConfig({ group: "OFFLINE" });
|
|
|
- this.isFirst = Boolean(res.data[0].createOn)
|
|
|
- if(!this.isFirst){
|
|
|
- this.$bus.$emit("showguide", ['offline']);
|
|
|
+ this.isFirst = Boolean(res.data[0].createOn);
|
|
|
+ if (!this.isFirst) {
|
|
|
+ this.$bus.$emit("showguide", ["offline"]);
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
@@ -1156,10 +1176,10 @@ export default {
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.teacherList = res.data;
|
|
|
- if( this.teacherList.length <=0){
|
|
|
- this.$bus.$emit("showguide", ['teacher']);
|
|
|
- return
|
|
|
- }
|
|
|
+ if (this.teacherList.length <= 0) {
|
|
|
+ this.$bus.$emit("showguide", ["teacher"]);
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
// getTeacherBySubject({ subjecId: val }).then(res => {
|
|
@@ -1176,13 +1196,12 @@ export default {
|
|
|
this.leftForm.activeType = "";
|
|
|
this.computationalBtn = false;
|
|
|
this.leftForm.students = []; // 重置所选学生
|
|
|
- this.centerForm.onlineCourseNum = 0 // 重置线上课数
|
|
|
+ this.centerForm.onlineCourseNum = 0; // 重置线上课数
|
|
|
this.changePrice(val);
|
|
|
},
|
|
|
changePrice(val) {
|
|
|
for (let i in this.courseTypeList) {
|
|
|
if (this.courseTypeList[i].id == val) {
|
|
|
-
|
|
|
// 学生人数
|
|
|
this.leftForm.classNum = this.courseTypeList[i].studentNum;
|
|
|
this.studentLimit = this.courseTypeList[i].studentNum;
|
|
@@ -1198,10 +1217,13 @@ export default {
|
|
|
this.rightForm.offlinePrice =
|
|
|
this.courseTypeList[i].offlineClassesUnitPrice;
|
|
|
|
|
|
- if(this.rightForm.onlinePrice<=0 || this.rightForm.offlinePrice<=0){
|
|
|
- this.$bus.$emit("showguide", ['vipPrice']);
|
|
|
- return
|
|
|
- }
|
|
|
+ if (
|
|
|
+ this.rightForm.onlinePrice <= 0 ||
|
|
|
+ this.rightForm.offlinePrice <= 0
|
|
|
+ ) {
|
|
|
+ this.$bus.$emit("showguide", ["vipPrice"]);
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.isMusicTheory = this.courseTypeList[i].musicTheory;
|
|
|
}
|
|
|
}
|
|
@@ -1991,10 +2013,10 @@ export default {
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.scetionList = res.data;
|
|
|
- // if(this.scetionList.length <=0){
|
|
|
- // this.$bus.$emit("showguide", ['teamPayType']);
|
|
|
- // return
|
|
|
- // }
|
|
|
+ // if(this.scetionList.length <=0){
|
|
|
+ // this.$bus.$emit("showguide", ['teamPayType']);
|
|
|
+ // return
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -2078,7 +2100,7 @@ export default {
|
|
|
this.educationList = ruselt?.data?.EDUCATION;
|
|
|
if (!this.educationList || this.educationList.length <= 0) {
|
|
|
this.$bus.$emit("showguide", ["teamManager"]);
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
@@ -2199,7 +2221,7 @@ export default {
|
|
|
method: "get",
|
|
|
headers: {
|
|
|
Authorization: getToken(),
|
|
|
- tenantId: getTenantId()
|
|
|
+ tenantId: getTenantId(),
|
|
|
},
|
|
|
params: {
|
|
|
rows: 9999,
|
|
@@ -2263,7 +2285,7 @@ export default {
|
|
|
categoryId: this.leftForm.courseType,
|
|
|
teacherId: this.leftForm.teacher,
|
|
|
studentIds,
|
|
|
- activityChannel:2
|
|
|
+ activityChannel: 2,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.activeList = res.data;
|
|
@@ -2296,7 +2318,7 @@ export default {
|
|
|
teacherId: this.leftForm.teacher,
|
|
|
studentIds,
|
|
|
courseType: this.courseType,
|
|
|
- activityChannel:2
|
|
|
+ activityChannel: 2,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.activeList = res.data;
|