|
@@ -110,7 +110,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="groupStatus" label="课程组状态">
|
|
|
+ <el-table-column align="center" prop="groupStatus" label="课程组状态">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<p>{{scope.row.groupStatus | courseGroup}}</p>
|
|
@@ -123,7 +123,12 @@
|
|
|
<div>
|
|
|
<!-- v-permission="'courseSchedule/classStartDateAdjust'" v-if="!scope.row.isSettlement" -->
|
|
|
<el-button type="text" @click="lookCrouse(scope.row)">查看</el-button>
|
|
|
- <el-button type="text" v-if="scope.row.groupStatus == 'NORMAL'" @click="closeCrouse(scope.row)" v-permission="'practiceGroupManage/cancelGroup'">关闭</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="scope.row.groupStatus == 'NORMAL'"
|
|
|
+ @click="closeCrouse(scope.row)"
|
|
|
+ v-permission="'practiceGroupManage/cancelGroup'"
|
|
|
+ >关闭</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -137,12 +142,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog
|
|
|
- title="关闭课程组"
|
|
|
- width="400px"
|
|
|
- :before-close="courseVisibleClose"
|
|
|
- :visible.sync="closeVisible"
|
|
|
- >
|
|
|
+ <el-dialog title="关闭课程组" width="400px" :visible.sync="closeVisible">
|
|
|
<el-form
|
|
|
:model="closeForm"
|
|
|
ref="closeForm"
|
|
@@ -155,7 +155,7 @@
|
|
|
<el-radio v-model="closeForm.isBack" :label="false">否</el-radio>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="退费金额" v-if="closeForm.isBack" prop="money">
|
|
|
- <el-input type="number" @mousewheel.native.prevent v-model.trim="closeForm.money"></el-input>
|
|
|
+ <el-input type="number" @mousewheel.native.prevent v-model.trim="closeForm.money"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -184,8 +184,8 @@ export default {
|
|
|
organIdList: null
|
|
|
},
|
|
|
closeForm: {
|
|
|
- isBack:false,
|
|
|
- money:null
|
|
|
+ isBack: false,
|
|
|
+ money: null
|
|
|
},
|
|
|
closeVisible: false,
|
|
|
activeRow: null,
|
|
@@ -276,27 +276,43 @@ export default {
|
|
|
},
|
|
|
courseVisibleClose() {
|
|
|
// 关闭弹窗前
|
|
|
- this.activeRow = null;
|
|
|
- this.$refs.closeForm.resetFields()
|
|
|
- this.closeVisible = false;
|
|
|
},
|
|
|
submieCloseCrouse() {
|
|
|
// 提交关闭课程组
|
|
|
- if(this.closeForm.isBack){
|
|
|
- if(!this.closeForm.money){
|
|
|
- this.$message.error('请输入退费金额')
|
|
|
- return
|
|
|
+ if (this.closeForm.isBack) {
|
|
|
+ if (!this.closeForm.money) {
|
|
|
+ this.$message.error("请输入退费金额");
|
|
|
+ return;
|
|
|
}
|
|
|
+ }else {
|
|
|
+ this.closeForm.money = null;
|
|
|
}
|
|
|
// 请求数据
|
|
|
- cancelGroup({groupId:this.activeRow.id,groupType:'PRACTICE',refundAmount:this.closeForm.money}).then(res=>{
|
|
|
- if(res.code == 200){
|
|
|
- this.$message.success('关闭成功')
|
|
|
- this.getList()
|
|
|
- this.closeVisible = false;
|
|
|
+ cancelGroup({
|
|
|
+ groupId: this.activeRow.id,
|
|
|
+ groupType: "PRACTICE",
|
|
|
+ refundAmount: this.closeForm.money
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("关闭成功");
|
|
|
+ this.getList();
|
|
|
+ this.closeVisible = false;
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ closeVisible(val) {
|
|
|
+ if (!val) {
|
|
|
+ console.log(val)
|
|
|
+ this.activeRow = null;
|
|
|
+ (this.closeForm = {
|
|
|
+ isBack: false,
|
|
|
+ money: null
|
|
|
+ }),
|
|
|
+ this.$refs.closeForm.resetFields();
|
|
|
+ this.closeVisible = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|