Commit a57310df authored by 黄奎's avatar 黄奎

新增约课配置

parent 5eba4cc0
...@@ -201,3 +201,37 @@ export function SetScrollTeacher(data) { ...@@ -201,3 +201,37 @@ export function SetScrollTeacher(data) {
data data
}) })
} }
/**
* 学员排课配置查询
*/
export function queryStuPlanShowPage(data) {
return request({
url: '/ScheduleCourse/GetStuPlanShowPage',
method: 'post',
data
})
}
/**
* 删除学员排课设置
*/
export function deleteScrollPlanShow(data) {
return request({
url: '/ScheduleCourse/RemoveScrollPlanShow',
method: 'post',
data
})
}
/**
* 保存学员排课设置
*/
export function saveScrollPlanShow(data) {
return request({
url: '/ScheduleCourse/SetScrollPlanShow',
method: 'post',
data
})
}
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
label="编辑" v-if="!props.row.isEdit" /> label="编辑" v-if="!props.row.isEdit" />
<q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" @click="delItem(props.row.Id)" <q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" @click="delItem(props.row.Id)"
label="删除" /> label="删除" />
</q-btn>
</q-td> </q-td>
</q-tr> </q-tr>
</template> </template>
......
<template>
<div>
<q-dialog v-model="show" persistent transition-show="scale" transition-hide="scale" @input="changeDig">
<q-card style="width: 600px;max-width:900px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">学员排课配置</div>
<q-space />
<q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row col q-mr-lg q-col-gutter-md changeCourse">
<div class="row col-12">
<q-input filled stack-label v-model="qMsg.StuName" label="学员姓名" class="col-10" hint="提示:需输入学员姓名查询学员列表"
@keyup.enter.native="resetQuery" />
<div class="col-2 q-pt-md">
<q-btn size="sm" color="accent" label="查询" @click="resetQuery" class="q-ml-md" />
</div>
</div>
<div class="row col-12">
<q-table :pagination="qMsg" :loading="loading" no-data-label="暂无相关数据" flat :data="stuList"
:columns="columns" class="sticky-column-table sticky-right-column-table " separator="none"
row-key="name">
<template v-slot:body-cell-ShowRetes="props">
<q-td auto-width :props="props">
<q-btn dense text-color="primary" flat unelevated
:label="props.row.ShowRetes==''?'设置':props.row.ShowRateName" @click="isShowColEdit=true" />
<q-popup-proxy>
<q-banner v-if="isShowColEdit">
<div style="width:180px;">
<div class="row col-12">
<q-select filled dense v-model="props.row.ShowReteList" option-value="RateId"
option-label="RateName" :options="props.row.AllReteList" emit-value map-options
label="排课设置" class="col-10" multiple />
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" size="sm" flat color="grey-10" @click="isShowColEdit=false"
style="font-weight:400 !important" />
<q-btn label="确认" size="sm" @click="saveMsg(props.row)" color="accent q-px-md"
style="font-weight:400 !important" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td auto-width :props="props">
<template v-if="props.row.PlanShowId>0">
<q-btn dense text-color="primary" flat unelevated label="删除"
@click="deleteStuPlanShow(props.row)" />
</template>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="qMsg.PageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="changeDig(false)" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
queryStuPlanShowPage,
deleteScrollPlanShow,
saveScrollPlanShow
} from "../../../api/studyabroad/subscribe.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
show: {
type: Boolean,
default: false
}
},
watch: {
show(val) {
}
},
data() {
return {
qMsg: {
PageIndex: 1,
PageSize: 8,
StuName: "",
rowsPerPage: 8,
},
stuList: [], //学员列表
loading: false,
pageCount: 0,
columns: [{
name: 'StuName',
label: '学员名称',
field: 'StuName',
align: 'left'
},
{
name: 'CourseName',
label: '报名课程',
field: 'CourseName',
align: 'left'
},
{
name: 'ShowRetes',
label: '排课设置等级',
field: 'ShowRetes',
align: 'left'
},
{
name: 'optioned',
label: '操作',
field: 'GuestId'
}
],
isShowColEdit: false,
};
},
mounted() {
this.getStuPlanShowPage();
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("success", val);
},
resetQuery() {
this.qMsg.PageIndex = 1;
this.getStuPlanShowPage();
},
changePage(val) {
this.qMsg.PageIndex = val;
this.getStuPlanShowPage();
},
getStuPlanShowPage() {
this.loading = true;
queryStuPlanShowPage(this.qMsg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.stuList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
});
},
//保存排课设置
saveMsg(item) {
saveScrollPlanShow(item).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.isShowColEdit = false;
this.getStuPlanShowPage();
}
})
},
//删除学员排课配置
deleteStuPlanShow(item) {
var message = "是否要删除【" + item.StuName + "】排课配置?";
var delMsg = {
Id: item.PlanShowId
};
this.$q
.dialog({
title: "提示信息",
message: message,
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消"
})
.onOk(() => {
deleteScrollPlanShow(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "删除成功!",
position: "top"
});
this.getStuPlanShowPage();
} else {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top"
});
}
});
})
.onCancel(() => {});
}
}
};
</script>
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-2">
<q-btn color="primary" label="排课配置" @click="isShowStuConfig=true" />
</div>
</div> </div>
<div class="row justify-center items-center q-mt-sm"> <div class="row justify-center items-center q-mt-sm">
<q-badge style="background:#eb3b5a;color:black;">待确认</q-badge>&nbsp; <q-badge style="background:#eb3b5a;color:black;">待确认</q-badge>&nbsp;
...@@ -108,6 +111,7 @@ ...@@ -108,6 +111,7 @@
</div> </div>
<SubscribeForm v-model="showForm" :editType="editType" :dateObj="dateObj" :saveObj="saveObj" :auth="auth" <SubscribeForm v-model="showForm" :editType="editType" :dateObj="dateObj" :saveObj="saveObj" :auth="auth"
:teacherList="TeacherList2" @success="successHandle" /> :teacherList="TeacherList2" @success="successHandle" />
<StuplanForm v-model="isShowStuConfig" @success="closeStuConfig"></StuplanForm>
</div> </div>
</template> </template>
...@@ -129,6 +133,7 @@ ...@@ -129,6 +133,7 @@
queryGetTimeList queryGetTimeList
} from "../../api/stuMan/index"; } from "../../api/stuMan/index";
import SubscribeForm from "../../components/stuMan/subscribe/subscribeForm"; import SubscribeForm from "../../components/stuMan/subscribe/subscribeForm";
import StuplanForm from "../../components/stuMan/subscribe/stuplanForm";
export default { export default {
meta: { meta: {
title: "新约课中心", title: "新约课中心",
...@@ -193,10 +198,12 @@ ...@@ -193,10 +198,12 @@
saveLoading: false, saveLoading: false,
dataList: [], dataList: [],
TimeList: [], //时段 TimeList: [], //时段
isShowStuConfig: false,
}; };
}, },
components: { components: {
SubscribeForm SubscribeForm,
StuplanForm,
}, },
created() { created() {
this.getAppointmentConfig(); this.getAppointmentConfig();
...@@ -230,6 +237,11 @@ ...@@ -230,6 +237,11 @@
} }
}, },
methods: { methods: {
//关闭配置弹窗
closeStuConfig()
{
this.isShowStuConfig=false;
},
//获取可约时间段 //获取可约时间段
getTimeList() { getTimeList() {
this.TimeList = []; this.TimeList = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment