|
@@ -196,6 +196,12 @@
|
|
icon="el-icon-setting"
|
|
icon="el-icon-setting"
|
|
@click="handlePeriodSettings(scope.row)"
|
|
@click="handlePeriodSettings(scope.row)"
|
|
>营期相关设置</el-button>
|
|
>营期相关设置</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-circle-close"
|
|
|
|
+ @click="handleClosePeriod(scope.row)"
|
|
|
|
+ >结束营期</el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -253,6 +259,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="开营日期" prop="periodStartingTime">
|
|
<el-form-item label="开营日期" prop="periodStartingTime">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
|
+ :disabled = "isDisabledDateRange"
|
|
:style="{display: form.periodType == 1 ? '' : 'none !important'}"
|
|
:style="{display: form.periodType == 1 ? '' : 'none !important'}"
|
|
v-model="form.dateRange"
|
|
v-model="form.dateRange"
|
|
@change="timeChange(1)"
|
|
@change="timeChange(1)"
|
|
@@ -547,7 +554,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {addPeriod, delPeriod, exportPeriod, getPeriod, pagePeriod, updatePeriod, getDays, addCourse, updateCourseTime, updateCourseDate, updateListCourseData, periodCourseMove} from "@/api/course/userCoursePeriod";
|
|
|
|
|
|
+import {addPeriod, delPeriod, exportPeriod, getPeriod, pagePeriod, updatePeriod, getDays, addCourse, updateCourseTime, updateCourseDate, updateListCourseData, periodCourseMove, closePeriod} from "@/api/course/userCoursePeriod";
|
|
import {getCompanyList} from "@/api/company/company";
|
|
import {getCompanyList} from "@/api/company/company";
|
|
import { listCamp, addCamp, editCamp, delCamp, copyCamp } from "@/api/course/userCourseCamp";
|
|
import { listCamp, addCamp, editCamp, delCamp, copyCamp } from "@/api/course/userCourseCamp";
|
|
import { courseList,videoList } from '@/api/course/courseRedPacketLog'
|
|
import { courseList,videoList } from '@/api/course/courseRedPacketLog'
|
|
@@ -588,6 +595,7 @@ export default {
|
|
videoList: [],
|
|
videoList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
|
|
+ isDisabledDateRange: false, //是否禁用开营日期
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
@@ -770,6 +778,7 @@ export default {
|
|
this.reset();
|
|
this.reset();
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加会员营期";
|
|
this.title = "添加会员营期";
|
|
|
|
+ this.isDisabledDateRange = false;
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
@@ -792,6 +801,7 @@ export default {
|
|
}
|
|
}
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改会员营期";
|
|
this.title = "修改会员营期";
|
|
|
|
+ this.isDisabledDateRange = true;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
@@ -1335,6 +1345,23 @@ export default {
|
|
// 根据当前激活的tab加载对应数据
|
|
// 根据当前激活的tab加载对应数据
|
|
this.handleTabClick({ name: this.activeTab });
|
|
this.handleTabClick({ name: this.activeTab });
|
|
},
|
|
},
|
|
|
|
+ // 结束营期
|
|
|
|
+ handleClosePeriod(row) {
|
|
|
|
+ const msg = `注: 1.确认结束营期,该营期的开营结束时间改为当天24点。2.当天正在播放中的课程不变。3.第二天如有未开始的课程,统一改为已结束。是否确认结束 ${row.periodName} 营期吗?`
|
|
|
|
+ this.$confirm(msg, "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(() => {
|
|
|
|
+ closePeriod({id: row.periodId}).then(response => {
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
+ this.getList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(response.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => {})
|
|
|
|
+ },
|
|
handleBatchRedPacketSuccess() {
|
|
handleBatchRedPacketSuccess() {
|
|
this.batchRedPacketVisible = false;
|
|
this.batchRedPacketVisible = false;
|
|
this.getCourseList();
|
|
this.getCourseList();
|