|
@@ -29,17 +29,21 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="searchForm.search" placeholder="课程名称"></el-input>
|
|
|
+ <el-input v-model="searchForm.search"
|
|
|
+ placeholder="课程名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="getList" type="danger">搜索</el-button>
|
|
|
- <el-button @click="onReSet" type="primary">重置</el-button>
|
|
|
+ <el-button @click="getList"
|
|
|
+ type="danger">搜索</el-button>
|
|
|
+ <el-button @click="onReSet"
|
|
|
+ type="primary">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 查询列表 -->
|
|
|
<!-- tab -->
|
|
|
<div class="tableWrap">
|
|
|
- <el-table style="width: 100%" :header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
|
+ <el-table style="width: 100%"
|
|
|
+ :header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
|
:data='tableData'>
|
|
|
<el-table-column align='center'
|
|
|
prop="id"
|
|
@@ -75,7 +79,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center' prop="vipGroupActivityName"
|
|
|
+ <el-table-column align='center'
|
|
|
+ prop="vipGroupActivityName"
|
|
|
label="活动方案">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
@@ -127,9 +132,27 @@
|
|
|
@click="gotoVipDetail(scope.row.id)">查看</el-button>
|
|
|
<!--
|
|
|
<el-button type="text">启动</el-button> -->
|
|
|
- <el-button type="text"
|
|
|
+ <!-- <el-button type="text"
|
|
|
v-if="scope.row.status <3"
|
|
|
- @click='closeVip(scope.row.id)'>关闭</el-button>
|
|
|
+ @click='closeVip(scope.row.id)'>关闭</el-button> -->
|
|
|
+ <el-popover placement="top"
|
|
|
+ width="160"
|
|
|
+ v-if="scope.row.status <3"
|
|
|
+ :ref="scope.$index">
|
|
|
+ <p style='margin-bottom:10px;'>确定删除该vip课?</p>
|
|
|
+ <el-input v-model="scope.row.stopReason"
|
|
|
+ placeholder="请输入关闭原因"></el-input>
|
|
|
+ <div style="text-align: right; margin-top: 20px">
|
|
|
+ <el-button size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="closeVip(scope)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button type="text"
|
|
|
+ slot="reference">删除</el-button>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -189,7 +212,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- onReSet() {
|
|
|
+ onReSet () {
|
|
|
this.searchForm = {
|
|
|
teacherId: null,
|
|
|
activityId: null,
|
|
@@ -212,10 +235,12 @@ export default {
|
|
|
gotoVipDetail (id) {
|
|
|
this.$router.push({ path: '/business/vipDetail', query: { id } })
|
|
|
},
|
|
|
- closeVip (id) {
|
|
|
- closeVip({ vipGroupId: id }).then(res => {
|
|
|
+ closeVip (scope) {
|
|
|
+ let id = scope.row.id;
|
|
|
+ closeVip({ vipGroupId: id, stopReason: scope.row.stopReason }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('停止课程成功')
|
|
|
+ scope._self.$refs[scope.$index].doClose()
|
|
|
this.getList();
|
|
|
}
|
|
|
})
|