|
|
@@ -33,6 +33,7 @@
|
|
|
<el-button @click="confirmBegin" type="primary" :disabled="BeginState" :loading="BeginState"
|
|
|
v-if="FinishClass == 3">确认上课
|
|
|
</el-button>
|
|
|
+ <el-button @click="confirmClose" type="danger" :disabled="!BeginState" >关闭课程</el-button>
|
|
|
<el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
|
|
|
<el-button @click="addFinishMember">添加上课会员</el-button>
|
|
|
<el-button @click="addTempMember" type="warning">添加临时会员</el-button>
|
|
|
@@ -356,24 +357,24 @@
|
|
|
|
|
|
import Global from '../Global.js'
|
|
|
import {
|
|
|
- ClassDetailQuery,
|
|
|
- ClassOverDetailListQuery,
|
|
|
- VipUserSimpleQuery,
|
|
|
- ClassOverDetailAdd,
|
|
|
- ClassDetailAndSnAdd,
|
|
|
- ClassOverDetailStatusEdit,
|
|
|
- ClassOverDetailDel,
|
|
|
- SelectHrSensors,
|
|
|
- BindHrSensorsToUser,
|
|
|
- UnBindHrSensorsToUser,
|
|
|
- ClassStartConfirm,
|
|
|
- ShopManagerListQuery,
|
|
|
- ClassOverConfirm,
|
|
|
- TmpUserQuery,
|
|
|
- ClassOverTmpDetailAdd,
|
|
|
- ClassTmpUserOverDetailDel,
|
|
|
- BindHrSensorsToTempUser,
|
|
|
- AcrossUserSimpleQuery,
|
|
|
+ ClassDetailQuery,
|
|
|
+ ClassOverDetailListQuery,
|
|
|
+ VipUserSimpleQuery,
|
|
|
+ ClassOverDetailAdd,
|
|
|
+ ClassDetailAndSnAdd,
|
|
|
+ ClassOverDetailStatusEdit,
|
|
|
+ ClassOverDetailDel,
|
|
|
+ SelectHrSensors,
|
|
|
+ BindHrSensorsToUser,
|
|
|
+ UnBindHrSensorsToUser,
|
|
|
+ ClassStartConfirm,
|
|
|
+ ShopManagerListQuery,
|
|
|
+ ClassOverConfirm,
|
|
|
+ TmpUserQuery,
|
|
|
+ ClassOverTmpDetailAdd,
|
|
|
+ ClassTmpUserOverDetailDel,
|
|
|
+ BindHrSensorsToTempUser,
|
|
|
+ AcrossUserSimpleQuery, ClassGiveUpConfirm,
|
|
|
} from "../api/getApiRes";
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -823,6 +824,53 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //关闭课程
|
|
|
+ confirmClose(){
|
|
|
+ this.$confirm('您确认要关闭课程?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.getConfirmClassClose()
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //确认执行关闭课程
|
|
|
+ getConfirmClassClose(){
|
|
|
+ let that = this;
|
|
|
+ let param = {
|
|
|
+ token: localStorage.token,
|
|
|
+ stdId: this.$route.query.StdId,
|
|
|
+ };
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
+ ClassGiveUpConfirm(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
+ if (json.Code == 0) {
|
|
|
+ that.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '课程关闭成功!',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ // 返回课程管理
|
|
|
+ that.$router.push({
|
|
|
+ path: '/courses', query: {}
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '课程关闭失败',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
// 添加下课会员
|
|
|
addFinishMember() {
|
|
|
let that = this;
|