|
@@ -197,13 +197,15 @@ export default {
|
|
|
this.$message.error("请填写开始时间或结束时间");
|
|
|
return;
|
|
|
}
|
|
|
- let diff = dayjs(maskForm.date+' '+maskForm.startTime).diff(new Date,'second')
|
|
|
- if(diff<=0){
|
|
|
+ let diff = dayjs(maskForm.date + " " + maskForm.startTime).diff(
|
|
|
+ new Date(),
|
|
|
+ "second"
|
|
|
+ );
|
|
|
+ if (diff <= 0) {
|
|
|
this.$message.error("课程开始时间必须大于当前时间");
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
this.$confirm("是否确定?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -217,7 +219,7 @@ export default {
|
|
|
let obj = {
|
|
|
actualTeacherId: maskForm.teacher,
|
|
|
startClassTimeStr: maskForm.startTime,
|
|
|
- endClassTimeStr: maskForm.endTime,
|
|
|
+ endClassTimeStr:maskForm.groupType=='MUSIC'? maskForm.endTime:null,
|
|
|
id: maskForm.id,
|
|
|
teachingTeacherIdList,
|
|
|
classDate: maskForm.date,
|
|
@@ -234,21 +236,21 @@ export default {
|
|
|
// this.getList();
|
|
|
// this.courseVisible = false;
|
|
|
}
|
|
|
- if(res.code== 206){
|
|
|
+ if (res.code == 206) {
|
|
|
this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(res=>{
|
|
|
- obj.allowZeroSalary = true;
|
|
|
- resetCourse(cleanDeep(obj)).then(res=>{
|
|
|
- if(res.code == 200){
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.$emit("getList");
|
|
|
- this.$emit("closeReset");
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then((res) => {
|
|
|
+ obj.allowZeroSalary = true;
|
|
|
+ resetCourse(cleanDeep(obj)).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.$emit("getList");
|
|
|
+ this.$emit("closeReset");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
})
|
|
@@ -320,18 +322,20 @@ export default {
|
|
|
);
|
|
|
this.organId = res.data.organId;
|
|
|
let type = res.data.type;
|
|
|
- console.log(type)
|
|
|
- try {
|
|
|
- const res = await getOrganCourseDurationSettings({
|
|
|
- organId: this.organId,
|
|
|
- });
|
|
|
- this.courseTimeList = res.data;
|
|
|
- for (let key in this.courseTimeList) {
|
|
|
- if (key == type) {
|
|
|
- this.typeTimeList = this.courseTimeList[key].split(",");
|
|
|
+ // console.log(res.data);
|
|
|
+ if (res.data.groupType == "MUSIC") {
|
|
|
+ try {
|
|
|
+ const res = await getOrganCourseDurationSettings({
|
|
|
+ organId: this.organId,
|
|
|
+ });
|
|
|
+ this.courseTimeList = res.data;
|
|
|
+ for (let key in this.courseTimeList) {
|
|
|
+ if (key == type) {
|
|
|
+ this.typeTimeList = this.courseTimeList[key].split(",");
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- } catch (e) {}
|
|
|
+ } catch (e) {}
|
|
|
+ }
|
|
|
|
|
|
this.maskForm.timer = time;
|
|
|
if (this.maskForm.teacher && this.maskForm.type == "VIP") {
|