Commit 32aa7b16 authored by 黄奎's avatar 黄奎

页面修改

parent 2b3d2c85
...@@ -263,6 +263,12 @@ ...@@ -263,6 +263,12 @@
label: '校区', label: '校区',
field: 'SchoolName', field: 'SchoolName',
align: 'left', align: 'left',
},
{
name: "CourseSubjectName",
label: "所属科目",
field: 'CourseSubjectName',
align: "left",
}, },
{ {
name: 'CourseName', name: 'CourseName',
......
...@@ -53,6 +53,10 @@ ...@@ -53,6 +53,10 @@
<span>选择课程</span> <span>选择课程</span>
</div> </div>
<div class="row"> <div class="row">
<div class="col">
<q-select @input="getCourses" standout v-model="msg.CourseSubject" :options="CourseSubjectList"
option-label="Name" option-value="Id" emit-value map-options label="所属科目" clearable />
</div>
<div class="col"> <div class="col">
<q-select dense standout behavior="menu" filled v-model="chosenCourse" :options="courseOptions" <q-select dense standout behavior="menu" filled v-model="chosenCourse" :options="courseOptions"
@filter="filterCourseFn" input-debounce="0" use-input option-label="CourseName" option-value="CourseId" @filter="filterCourseFn" input-debounce="0" use-input option-label="CourseName" option-value="CourseId"
...@@ -123,9 +127,9 @@ ...@@ -123,9 +127,9 @@
<script> <script>
import { import {
queryCourseDropdownList, queryCourseDropdownList,
queryCourseCategoryTree,
saveCourseOffer, saveCourseOffer,
queryCourseOfferInfo queryCourseOfferInfo,
getCourseSubject
} from "../../api/course/index"; } from "../../api/course/index";
import { import {
date date
...@@ -200,30 +204,40 @@ ...@@ -200,30 +204,40 @@
field: row => row.ActualPrice.toFixed(2) field: row => row.ActualPrice.toFixed(2)
} }
], ],
TreeCategoryList: [], //课程系列列表
pageInfo: { pageInfo: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12 rowsPerPage: 12
}, },
msg: {
CourseSubject: "", //所属科目
},
courseList: [], //课程列表 courseList: [], //课程列表
courseOptions: [], courseOptions: [],
chosenCategory: null, //选中的系列 chosenCategory: null, //选中的系列
chosenCourse: null, //选中的课程 chosenCourse: null, //选中的课程
categoryOptions: [], chosenCourses: [],
chosenCourses: [] CourseSubjectList: [], //科目列表
}; };
}, },
computed: { computed: {
}, },
created() { created() {
this.getCategorytree();
this.queryCourseSubject()
}, },
mounted() { mounted() {
this.initObj(); this.initObj();
}, },
methods: { methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
//初始化对象 //初始化对象
initObj() { initObj() {
if (this.obj && this.obj.Id > 0) { if (this.obj && this.obj.Id > 0) {
...@@ -322,37 +336,20 @@ ...@@ -322,37 +336,20 @@
}); });
} }
}, },
//获取课程系列
getCategorytree() {
this.TreeCategoryList = [];
var qMsg = {};
queryCourseCategoryTree(qMsg).then(res => {
this.TreeCategoryList = res.Data;
this.categoryOptions = this.TreeCategoryList;
this.getCourses();
});
},
//获取课程列表 //获取课程列表
getCourses() { getCourses() {
this.courseList = []; this.courseList = [];
var qMsg = { var qMsg = {
CourseName: "", CourseName: "",
CateId: 0, CateId: 0,
IsQPrice: 1 IsQPrice: 1,
CourseSubject: this.msg.CourseSubject,
}; };
queryCourseDropdownList(qMsg).then(res => { queryCourseDropdownList(qMsg).then(res => {
this.courseList = res.Data; this.courseList = res.Data;
this.courseOptions = this.courseList; this.courseOptions = this.courseList;
}); });
}, },
//系列筛选
filterFn(val, update, abort) {
update(() => {
this.categoryOptions = this.TreeCategoryList.filter(
v => v.CateName.indexOf(val) > -1
);
});
},
//课程筛选 //课程筛选
filterCourseFn(val, update, abort) { filterCourseFn(val, update, abort) {
update(() => { update(() => {
...@@ -361,13 +358,6 @@ ...@@ -361,13 +358,6 @@
); );
}); });
}, },
//系列改变
changeCategory() {
this.courseOptions = this.courseList.filter(
v => v.CateId == this.chosenCategory
);
this.$forceUpdate();
},
//添加课程 //添加课程
addCourse() { addCourse() {
this.$refs.JoinNum.validate(); this.$refs.JoinNum.validate();
...@@ -532,5 +522,5 @@ ...@@ -532,5 +522,5 @@
}; };
</script> </script>
<style>
<style></style> </style>
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" /> v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
</div> </div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" v-model="msg.CourseSubject"
:options="CourseSubjectList" option-label="Name" option-value="Id" emit-value map-options label="所属科目"
clearable />
</div>
<div class="col-3"> <div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName" <q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName"
label="带班老师" @clear="getClassList" maxlength="20" /> label="带班老师" @clear="getClassList" maxlength="20" />
...@@ -68,6 +73,9 @@ ...@@ -68,6 +73,9 @@
queryClassPage, queryClassPage,
queryClassStatusList, queryClassStatusList,
} from '../../api/course/class'; } from '../../api/course/class';
import {
getCourseSubject
} from "../../api/course/index";
//获取校区列表 //获取校区列表
import { import {
getSchoolDropdown, getSchoolDropdown,
...@@ -82,78 +90,6 @@ ...@@ -82,78 +90,6 @@
}, },
data() { data() {
return { return {
columns: [{
name: 'ClassName',
label: '班级名称',
field: 'ClassName',
align: 'left'
},
{
name: 'SchoolName',
label: '校区',
field: 'SchoolName',
align: 'left',
},
{
name: 'CourseName',
label: '课程',
field: 'CourseName',
align: 'left'
},
{
name: 'OtherCourseName',
label: '关联其他课程',
field: 'OtherCourseName',
align: 'left'
},
{
name: 'CourseId',
label: '课程大纲',
field: 'CourseId',
align: 'left'
},
{
name: 'TeacherName',
label: '带班老师',
field: 'TeacherName',
align: 'left'
},
{
name: 'ClassPersion',
label: '招生/报名',
field: 'ClassPersion',
align: 'left'
},
{
name: 'OpenTime',
label: '开班时间',
field: 'OpenTime',
align: 'left'
},
{
name: 'FinishTimeStr',
label: '预计结束时间',
field: 'FinishTimeStr',
align: 'left'
},
{
name: 'CompleteProgress',
label: '课程进度',
field: 'CompleteProgress',
align: 'left'
},
{
name: 'ClassStatusStr',
label: '状态',
align: 'left',
field: 'ClassStatusStr'
},
{
name: 'optioned',
label: '操作',
field: 'CourseId'
}
],
data: [], data: [],
loading: false, loading: false,
msg: { msg: {
...@@ -166,6 +102,7 @@ ...@@ -166,6 +102,7 @@
CourseName: '', //学习课程 CourseName: '', //学习课程
School_Id: -1, //关联校区 School_Id: -1, //关联校区
ClassNo: '', //班号 ClassNo: '', //班号
CourseSubject: "", //所属科目
}, },
//班级状态 //班级状态
classStatusList: [], classStatusList: [],
...@@ -184,8 +121,8 @@ ...@@ -184,8 +121,8 @@
isShowStudentMenu: true, //显示未完成学员名单 isShowStudentMenu: true, //显示未完成学员名单
isShowApply: true //显示调课申请 isShowApply: true //显示调课申请
}, },
loading:false loading: false,
CourseSubjectList: [], //所属科目
} }
}, },
created() { created() {
...@@ -194,11 +131,19 @@ ...@@ -194,11 +131,19 @@
} }
this.getClassStatus(); this.getClassStatus();
this.getSchool(); this.getSchool();
this.queryCourseSubject()
}, },
mounted() { mounted() {
this.getClassList(); this.getClassList();
}, },
methods: { methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
//获取校区列表 //获取校区列表
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
...@@ -231,7 +176,7 @@ ...@@ -231,7 +176,7 @@
//获取菜单分页列表 //获取菜单分页列表
getClassList() { getClassList() {
this.loading = true; this.loading = true;
this.data=[]; this.data = [];
queryClassPage(this.msg).then(res => { queryClassPage(this.msg).then(res => {
this.loading = false; this.loading = false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
......
...@@ -3,88 +3,43 @@ ...@@ -3,88 +3,43 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
@input="resetSearch" @clear="resetSearch" maxlength="20" />
clearable
standout="bg-primary text-white"
v-model="msg.CourseName"
label="课程名称"
@clear="resetSearch"
maxlength="20"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<select-tree <select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true"
:treeData="TreeCategoryList" labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree>
:defaultArray="returnString"
nodeKey="CateId"
:multiple="true"
labelKey="CateName"
childrenKey="ChildList"
tipText="课程系列"
@getChild="getChild"
></select-tree>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.CourseSubject"
@input="resetSearch" :options="CourseSubjectList" option-label="Name" option-value="Id" emit-value map-options label="所属科目"
standout="bg-primary text-white" clearable />
v-model="msg.Status"
:options="ShowOpts"
emit-value
map-options
label="状态"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="ShowOpts"
@input="resetSearch" emit-value map-options label="状态" />
standout="bg-primary text-white" </div>
v-model="msg.Saleplat" <div class="col-3">
:options="platOpts" <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Saleplat" :options="platOpts"
option-label="Name" option-label="Name" option-value="Id" emit-value map-options label="上架渠道" />
option-value="Id"
emit-value
map-options
label="上架渠道"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
:pagination="msg" class="sticky-tow-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
:loading="loading" row-key="name">
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table sticky-right-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">课程信息</div> <div class="col-2 q-table__title">课程信息</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增课程" @click="EditCourse(null, 1)" />
color="accent"
size="sm"
class="q-mr-md"
icon="add"
label="新增课程"
@click="EditCourse(null, 1)"
/>
</div> </div>
</template> </template>
<template v-slot:body-cell-CoverImg="props"> <template v-slot:body-cell-CoverImg="props">
<q-td :props="props"> <q-td :props="props">
<q-img <q-img :src="props.value" spinner-color="white" style="height: 54px; max-width: 100px"
:src="props.value" class="rounded-borders">
spinner-color="white"
style="height: 54px; max-width: 100px"
class="rounded-borders"
>
</q-img> </q-img>
</q-td> </q-td>
</template> </template>
...@@ -120,12 +75,8 @@ ...@@ -120,12 +75,8 @@
<template v-slot:body-cell-PreferentialListSellCommission="props"> <template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right: 0px; padding-left: 0px"> <q-td :props="props" style="padding-right: 0px; padding-left: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div <div class="border-bottom" style="padding-left: 16px; padding-right: 16px"
class="border-bottom" :class="{ 'text-red': x.SaleCommissionType == 1 }" v-if="x.PriceDiscountType != 0">
style="padding-left: 16px; padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.SaleCommissionType == 1 ? "¥" : "" {{ x.SaleCommissionType == 1 ? "¥" : ""
}}{{ x.SaleCommissionMoney }}{{ x.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }} }}{{ x.SaleCommissionType == 0 ? "%" : "" }}
...@@ -142,12 +93,8 @@ ...@@ -142,12 +93,8 @@
<template v-slot:body-cell-PreferentialListB2BCommission="props"> <template v-slot:body-cell-PreferentialListB2BCommission="props">
<q-td :props="props" style="padding-left: 0px"> <q-td :props="props" style="padding-left: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div <div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.B2BCommissionType == 1 }"
class="border-bottom" v-if="x.PriceDiscountType != 0">
style="padding-left: 16px"
:class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.B2BCommissionType == 1 ? "¥" : "" {{ x.B2BCommissionType == 1 ? "¥" : ""
}}{{ x.B2BCommissionMoney }}{{ x.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }} }}{{ x.B2BCommissionType == 0 ? "%" : "" }}
...@@ -164,12 +111,8 @@ ...@@ -164,12 +111,8 @@
<template v-slot:body-cell-EducationCommission="props"> <template v-slot:body-cell-EducationCommission="props">
<q-td :props="props" style="padding-left: 0px"> <q-td :props="props" style="padding-left: 0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
<div <div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.EduCommissionType == 1 }"
class="border-bottom" v-if="x.PriceDiscountType != 0">
style="padding-left: 16px"
:class="{ 'text-red': x.EduCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.EduCommissionType == 1 ? "¥" : "" {{ x.EduCommissionType == 1 ? "¥" : ""
}}{{ x.EduCommissionMoney }}{{ x.EduCommissionMoney
}}{{ x.EduCommissionType == 0 ? "%" : "" }} }}{{ x.EduCommissionType == 0 ? "%" : "" }}
...@@ -185,76 +128,32 @@ ...@@ -185,76 +128,32 @@
</template> </template>
<template v-slot:body-cell-plat="props"> <template v-slot:body-cell-plat="props">
<q-td :props="props"> <q-td :props="props">
<q-badge <q-badge color="green" label="小程序" v-if="props.row.Saleplat.includes(4)" />
color="green"
label="小程序"
v-if="props.row.Saleplat.includes(4)"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-badge <q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 0 ? '正常' : '删除'" />
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 0 ? '正常' : '删除'"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
class="full-width justify-end" :input="true" @input="changePage" />
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn <q-btn flat size="xs" icon="edit" color="accent" style="font-weight: 400" label="编辑"
flat @click="EditCourse(props.row, 1)" />
size="xs" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight: 400" label="价格设置"
icon="edit" @click="EditCourse(props.row, 2)" v-if="isHavePriceAction" />
color="accent" <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px">
style="font-weight: 400"
label="编辑"
@click="EditCourse(props.row, 1)"
/>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight: 400"
label="价格设置"
@click="EditCourse(props.row, 2)"
v-if="isHavePriceAction"
/>
<q-btn-dropdown
flat
size="xs"
color="dark"
label="更多"
style="margin-left: 10px"
>
<q-list> <q-list>
<q-item <q-item clickable v-close-popup @click="DeleteCourse(props.row, 1)" v-if="props.row.Status == 0">
clickable
v-close-popup
@click="DeleteCourse(props.row, 1)"
v-if="props.row.Status == 0"
>
<q-item-section> <q-item-section>
<q-item-label>删除</q-item-label> <q-item-label>删除</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item clickable v-close-popup @click="DeleteCourse(props.row, 0)" v-if="props.row.Status == 1">
clickable
v-close-popup
@click="DeleteCourse(props.row, 0)"
v-if="props.row.Status == 1"
>
<q-item-section> <q-item-section>
<q-item-label>恢复</q-item-label> <q-item-label>恢复</q-item-label>
</q-item-section> </q-item-section>
...@@ -269,357 +168,371 @@ ...@@ -269,357 +168,371 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<course-form <course-form v-if="isShowCourseForm" :save-obj="courseObjOption" @close="closeMenuSaveForm"
v-if="isShowCourseForm" @success="refreshPage">
:save-obj="courseObjOption"
@close="closeMenuSaveForm"
@success="refreshPage"
>
</course-form> </course-form>
<courseprice-form <courseprice-form v-if="isShowCoursePriceForm" :save-obj="courseObjOption" @close="closeMenuSaveForm"
v-if="isShowCoursePriceForm" @success="refreshPage">
:save-obj="courseObjOption"
@close="closeMenuSaveForm"
@success="refreshPage"
>
</courseprice-form> </courseprice-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import {
queryCoursePage, queryCoursePage,
queryCourseCategoryTree, queryCourseCategoryTree,
deleteCourseInfo, deleteCourseInfo,
querySaleplatList, querySaleplatList,
} from "../../api/course/index"; getCourseSubject
import courseForm from "../../components/course/course-form"; } from "../../api/course/index";
import coursepriceForm from "../../components/course/courseprice-form"; import courseForm from "../../components/course/course-form";
import selectTree from "../../components/common/select-tree"; import coursepriceForm from "../../components/course/courseprice-form";
import { openURL } from "quasar"; import selectTree from "../../components/common/select-tree";
import { mapState } from "vuex"; import {
export default { openURL
meta: { } from "quasar";
title: "课程管理", import {
}, mapState
components: { } from "vuex";
courseForm, export default {
selectTree, meta: {
coursepriceForm, title: "课程管理",
}, },
data() { components: {
return { courseForm,
currentUrl: "", selectTree,
columns: [ coursepriceForm,
{
name: "CoverImg",
label: "课程封面",
field: "CoverImg",
align: "left",
},
{
name: "CourseName",
required: true,
label: "课程名称",
align: "left",
field: (row) => row.CourseName,
},
{
name: "CateName",
required: true,
label: "系列",
align: "left",
field: (row) => row.CateName,
},
{
name: "OriginalPrice",
required: true,
label: "原价",
align: "left",
field: (row) => row.OriginalPrice.toFixed(2),
},
{
name: "SellPrice",
required: true,
label: "售价",
align: "left",
field: (row) => row.SellPrice.toFixed(2),
},
{
name: "PreferentialList",
required: true,
label: "优惠政策",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "PreferentialListSellCommission",
required: true,
label: "销售佣金",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "PreferentialListB2BCommission",
required: true,
label: "同行佣金",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "EducationCommission",
required: true,
label: "教育同行佣金",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "ClassHours",
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`,
},
{
name: "plat",
label: "上架渠道",
field: "plat",
align: "left",
},
{
name: "CreateByName",
label: "创建人",
field: "CreateByName",
align: "left",
},
{
name: "UpdateTimeStr",
label: "更新时间",
field: "UpdateTimeStr",
align: "left",
},
{
name: "Status",
label: "状态",
align: "left",
field: "Status",
},
{
name: "optioned",
label: "操作",
field: "CourseId",
},
],
data: [],
loading: true,
ShowOpts: [
{
label: "全部",
value: "-1",
},
{
label: "正常",
value: "0",
},
{
label: "删除",
value: "1",
},
],
platOpts: [], //上架渠道
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseName: "",
QCateIds: "",
IsQPrice: 1,
Status: "0",
Saleplat: 0,
},
//课程分类树形列表
TreeCategoryList: [],
returnString: [], //默认值
pageCount: 0,
isShowCourseForm: false, //是否显示课程表单
isShowCoursePriceForm: false, //是否显示课程价格表单
courseObjOption: null, //课程对象
isShowPriceEditBtn: 1, //是否显示价格设置
};
},
computed: mapState({
isHavePriceAction(state) {
if (
state.user.userInfo &&
state.user.userInfo.ActionMenuList &&
state.user.userInfo.ActionMenuList.length > 0
) {
let action = state.user.userInfo.ActionMenuList.find((x) => {
if (x.FunctionCode == "Edit_CoursePrice") {
return x;
}
});
return action && action.FunctionCode;
}
return false;
}, },
}), data() {
mounted() { return {
if (this.$route.query && this.$route.query.Name) { currentUrl: "",
//从订单完成统计跳转过来的带的参数 columns: [{
this.msg.CourseName = decodeURI(this.$route.query.Name); name: "CoverImg",
} label: "课程封面",
this.getSaleplat(); field: "CoverImg",
this.getCategorytree(); align: "left",
this.currentUrl = this.$route.path; },
this.getcourselist(); {
}, name: "CourseName",
methods: { required: true,
//删除课程 label: "课程名称",
DeleteCourse(item, status) { align: "left",
let delMsg = { field: (row) => row.CourseName,
CourseId: item.CourseId, },
Status: status, {
name: "CourseSubjectName",
required: true,
label: "所属科目",
align: "left",
field: (row) => row.CourseSubjectName,
},
{
name: "CateName",
required: true,
label: "系列",
align: "left",
field: (row) => row.CateName,
},
{
name: "OriginalPrice",
required: true,
label: "原价",
align: "left",
field: (row) => row.OriginalPrice.toFixed(2),
},
{
name: "SellPrice",
required: true,
label: "售价",
align: "left",
field: (row) => row.SellPrice.toFixed(2),
},
{
name: "PreferentialList",
required: true,
label: "优惠政策",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "PreferentialListSellCommission",
required: true,
label: "销售佣金",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "PreferentialListB2BCommission",
required: true,
label: "同行佣金",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "EducationCommission",
required: true,
label: "教育同行佣金",
align: "left",
field: (row) => row.PreferentialList,
},
{
name: "ClassHours",
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`,
},
{
name: "plat",
label: "上架渠道",
field: "plat",
align: "left",
},
{
name: "CreateByName",
label: "创建人",
field: "CreateByName",
align: "left",
},
{
name: "UpdateTimeStr",
label: "更新时间",
field: "UpdateTimeStr",
align: "left",
},
{
name: "Status",
label: "状态",
align: "left",
field: "Status",
},
{
name: "optioned",
label: "操作",
field: "CourseId",
},
],
data: [],
loading: true,
ShowOpts: [{
label: "全部",
value: "-1",
},
{
label: "正常",
value: "0",
},
{
label: "删除",
value: "1",
},
],
platOpts: [], //上架渠道
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseName: "",
QCateIds: "",
IsQPrice: 1,
Status: "0",
Saleplat: 0,
CourseSubject: "", //所属科目
},
//课程分类树形列表
TreeCategoryList: [],
returnString: [], //默认值
pageCount: 0,
isShowCourseForm: false, //是否显示课程表单
isShowCoursePriceForm: false, //是否显示课程价格表单
courseObjOption: null, //课程对象
isShowPriceEditBtn: 1, //是否显示价格设置
CourseSubjectList: [], //科目列表
}; };
var message = "是否要删除该课程?"; },
if (status == 0) { computed: mapState({
message = "是否要恢复该课程?"; isHavePriceAction(state) {
} if (
this.$q state.user.userInfo &&
.dialog({ state.user.userInfo.ActionMenuList &&
title: "提示信息", state.user.userInfo.ActionMenuList.length > 0
message: message, ) {
cancel: true, let action = state.user.userInfo.ActionMenuList.find((x) => {
persistent: true, if (x.FunctionCode == "Edit_CoursePrice") {
ok: "确定", return x;
cancel: "取消",
})
.onOk(() => {
deleteCourseInfo(delMsg).then((res) => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "删除成功!",
position: "top",
});
this.getcourselist();
} else {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top",
});
} }
}); });
}) return action && action.FunctionCode;
.onCancel(() => {}); }
}, return false;
gotoSub(obj, routeStr) { },
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId; }),
this.$router.push({ mounted() {
path: tempStr, if (this.$route.query && this.$route.query.Name) {
}); //从订单完成统计跳转过来的带的参数
}, this.msg.CourseName = decodeURI(this.$route.query.Name);
//分类改变
getChild(cateObj) {
var tempStr = "";
if (cateObj && cateObj != "") {
tempStr = cateObj;
} }
this.msg.QCateIds = tempStr; this.queryCourseSubject()
this.msg.pageIndex = 1; this.getSaleplat();
this.getCategorytree();
this.currentUrl = this.$route.path;
this.getcourselist(); this.getcourselist();
}, },
getCategorytree() { methods: {
this.TreeCategoryList = []; queryCourseSubject() {
var qMsg = {}; getCourseSubject({}).then(res => {
queryCourseCategoryTree(qMsg).then((res) => { if (res.Code == 1) {
this.TreeCategoryList = res.Data; this.CourseSubjectList = res.Data;
}); }
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getcourselist();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getcourselist();
},
//获取菜单分页列表
getcourselist() {
this.loading = true;
queryCoursePage(this.msg)
.then((res) => {
this.loading = false;
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}) })
.catch(() => { },
this.loading = false; //删除课程
DeleteCourse(item, status) {
let delMsg = {
CourseId: item.CourseId,
Status: status,
};
var message = "是否要删除该课程?";
if (status == 0) {
message = "是否要恢复该课程?";
}
this.$q
.dialog({
title: "提示信息",
message: message,
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
})
.onOk(() => {
deleteCourseInfo(delMsg).then((res) => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "删除成功!",
position: "top",
});
this.getcourselist();
} else {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top",
});
}
});
})
.onCancel(() => {});
},
gotoSub(obj, routeStr) {
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId;
this.$router.push({
path: tempStr,
}); });
}, },
//刷新页面 //分类改变
refreshPage() { getChild(cateObj) {
this.isShowCourseForm = false; var tempStr = "";
this.isShowCoursePriceForm = false; if (cateObj && cateObj != "") {
this.getcourselist(); tempStr = cateObj;
}, }
//新增修改课程及价格 this.msg.QCateIds = tempStr;
EditCourse(obj, type) { this.msg.pageIndex = 1;
if (obj) { this.getcourselist();
this.courseObjOption = obj; },
} else { getCategorytree() {
this.courseObjOption = null; this.TreeCategoryList = [];
} var qMsg = {};
if (type == 1) { queryCourseCategoryTree(qMsg).then((res) => {
this.isShowCourseForm = true; this.TreeCategoryList = res.Data;
} else { });
this.isShowCoursePriceForm = true; },
} //重新查询
}, resetSearch() {
//关闭弹窗 this.msg.pageIndex = 1;
closeMenuSaveForm() { this.getcourselist();
this.isShowCourseForm = false; },
this.isShowCoursePriceForm = false; //翻页
}, changePage(val) {
//跳转至我的课程 this.msg.pageIndex = val;
goMycourse(obj) { this.getcourselist();
var tempStr = },
window.location.origin + //获取菜单分页列表
"/#/course/courseinfo?CourseId=" + getcourselist() {
obj.CourseId; this.loading = true;
// this.$router.push({ queryCoursePage(this.msg)
// path: tempStr .then((res) => {
// }); this.loading = false;
openURL(tempStr); this.data = res.Data.PageData;
}, this.pageCount = res.Data.PageCount;
//获取销售端口列表 })
getSaleplat() { .catch(() => {
querySaleplatList().then((res) => { this.loading = false;
this.platOpts = res.Data; });
this.platOpts.unshift({ },
Name: "不限", //刷新页面
Id: 0, refreshPage() {
this.isShowCourseForm = false;
this.isShowCoursePriceForm = false;
this.getcourselist();
},
//新增修改课程及价格
EditCourse(obj, type) {
if (obj) {
this.courseObjOption = obj;
} else {
this.courseObjOption = null;
}
if (type == 1) {
this.isShowCourseForm = true;
} else {
this.isShowCoursePriceForm = true;
}
},
//关闭弹窗
closeMenuSaveForm() {
this.isShowCourseForm = false;
this.isShowCoursePriceForm = false;
},
//跳转至我的课程
goMycourse(obj) {
var tempStr =
window.location.origin +
"/#/course/courseinfo?CourseId=" +
obj.CourseId;
// this.$router.push({
// path: tempStr
// });
openURL(tempStr);
},
//获取销售端口列表
getSaleplat() {
querySaleplatList().then((res) => {
this.platOpts = res.Data;
this.platOpts.unshift({
Name: "不限",
Id: 0,
});
}); });
}); },
}, },
}, };
};
</script> </script>
<style scoped> <style scoped>
.border-bottom { .border-bottom {
border-bottom: 1px dashed #eee; border-bottom: 1px dashed #eee;
padding-bottom: 5px; padding-bottom: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
</style> </style>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
...@@ -115,6 +115,11 @@ ...@@ -115,6 +115,11 @@
<div class="page-body courseList"> <div class="page-body courseList">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.CourseSubject"
:options="CourseSubjectList" option-label="Name" option-value="Id" emit-value map-options label="所属科目"
clearable />
</div>
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称" <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
@clear="resetSearch" maxlength="20" /> @clear="resetSearch" maxlength="20" />
...@@ -260,7 +265,8 @@ ...@@ -260,7 +265,8 @@
</template> </template>
<script> <script>
import { import {
queryCoursePage queryCoursePage,
getCourseSubject
} from "../../api/course/index"; } from "../../api/course/index";
import quotationForm from '../../components/sale/quotation-form' import quotationForm from '../../components/sale/quotation-form'
export default { export default {
...@@ -290,6 +296,13 @@ ...@@ -290,6 +296,13 @@
field: "CoverImg", field: "CoverImg",
align: "left" align: "left"
}, },
{
name: "CourseSubjectName",
required: true,
label: "所属科目",
align: "left",
field: (row) => row.CourseSubjectName,
},
{ {
name: "CourseName", name: "CourseName",
required: true, required: true,
...@@ -373,16 +386,26 @@ ...@@ -373,16 +386,26 @@
QCateIds: "", QCateIds: "",
Status: "0", Status: "0",
IsQPrice: 1, //是否查询优惠价格设置 IsQPrice: 1, //是否查询优惠价格设置
IsQTeacher: 1 //是否查询课程讲师 IsQTeacher: 1, //是否查询课程讲师
CourseSubject: "", //所属科目
}, },
pageCount: 0 pageCount: 0,
CourseSubjectList: [], //科目列表
}; };
}, },
mounted() { mounted() {
this.queryCourseSubject()
this.currentUrl = this.$route.path; this.currentUrl = this.$route.path;
this.getcourselist(); this.getcourselist();
}, },
methods: { methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
createQuotation() { createQuotation() {
this.showForm = true; this.showForm = true;
}, },
......
...@@ -50,6 +50,11 @@ ...@@ -50,6 +50,11 @@
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.ClassNo" label="班号" <q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.ClassNo" label="班号"
@clear="getClassList" maxlength="20" /> @clear="getClassList" maxlength="20" />
</div> </div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" v-model="msg.CourseSubject"
:options="CourseSubjectList" option-label="Name" option-value="Id" emit-value map-options label="所属科目"
clearable />
</div>
<div class="col-3"> <div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" /> v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
...@@ -85,6 +90,9 @@ ...@@ -85,6 +90,9 @@
getSchoolDropdown, getSchoolDropdown,
getTeacherDropDownList getTeacherDropDownList
} from '../../api/school/index'; } from '../../api/school/index';
import {
getCourseSubject
} from "../../api/course/index";
import classlist from '../../components/course/classlist'; import classlist from '../../components/course/classlist';
export default { export default {
meta: { meta: {
...@@ -95,7 +103,6 @@ ...@@ -95,7 +103,6 @@
}, },
data() { data() {
return { return {
data: [], data: [],
loading: false, loading: false,
msg: { msg: {
...@@ -108,6 +115,7 @@ ...@@ -108,6 +115,7 @@
CourseName: '', //学习课程 CourseName: '', //学习课程
School_Id: -1, //关联校区 School_Id: -1, //关联校区
ClassNo: '', //班号 ClassNo: '', //班号
CourseSubject: "", //所属科目
}, },
classStatusList: [], //班级状态列表 classStatusList: [], //班级状态列表
schoolList: [], //校区列表 schoolList: [], //校区列表
...@@ -121,8 +129,9 @@ ...@@ -121,8 +129,9 @@
isShowLessonCost: true, //显示月度课耗 isShowLessonCost: true, //显示月度课耗
isShowStatusChange: true, //显示状态变更 isShowStatusChange: true, //显示状态变更
isShowStudentMenu: true, //显示未完成学员名单 isShowStudentMenu: true, //显示未完成学员名单
isShowApply:true //显示调课申请 isShowApply: true //显示调课申请
} },
CourseSubjectList: [], //所属科目
} }
}, },
created() { created() {
...@@ -132,11 +141,19 @@ ...@@ -132,11 +141,19 @@
this.getClassStatus(); this.getClassStatus();
this.getSchool(); this.getSchool();
this.GetTeacherList(); this.GetTeacherList();
this.queryCourseSubject()
}, },
mounted() { mounted() {
this.getClassList(); this.getClassList();
}, },
methods: { methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
//获取校区列表 //获取校区列表
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
...@@ -169,7 +186,7 @@ ...@@ -169,7 +186,7 @@
//获取菜单分页列表 //获取菜单分页列表
getClassList() { getClassList() {
this.loading = true; this.loading = true;
this.data=[]; this.data = [];
queryClassPage(this.msg).then(res => { queryClassPage(this.msg).then(res => {
this.loading = false; this.loading = false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
......
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" /> v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
</div> </div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" v-model="msg.CourseSubject"
:options="CourseSubjectList" option-label="Name" option-value="Id" emit-value map-options label="所属科目"
clearable />
</div>
<div class="col-3"> <div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.CourseName" <q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.CourseName"
label="学习课程" @clear="getClassList" maxlength="20" /> label="学习课程" @clear="getClassList" maxlength="20" />
...@@ -52,7 +57,6 @@ ...@@ -52,7 +57,6 @@
<classlist :data="data" :authObj="authObj" :loading="loading" @success="refreshPage"></classlist> <classlist :data="data" :authObj="authObj" :loading="loading" @success="refreshPage"></classlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
</div> </div>
</div> </div>
</template> </template>
...@@ -63,6 +67,9 @@ ...@@ -63,6 +67,9 @@
import { import {
GetClassPageList GetClassPageList
} from '../../api/teacher/index'; } from '../../api/teacher/index';
import {
getCourseSubject
} from "../../api/course/index";
//获取校区列表 //获取校区列表
import { import {
getSchoolDropdown, getSchoolDropdown,
...@@ -88,6 +95,7 @@ ...@@ -88,6 +95,7 @@
Teacher_Id: 0, Teacher_Id: 0,
CourseName: '', //学习课程 CourseName: '', //学习课程
School_Id: -1, //关联校区 School_Id: -1, //关联校区
CourseSubject: "", //所属科目
}, },
//班级状态 //班级状态
classStatusList: [], classStatusList: [],
...@@ -98,7 +106,8 @@ ...@@ -98,7 +106,8 @@
authObj: { authObj: {
isShowLessonCost: true, //显示月度课耗 isShowLessonCost: true, //显示月度课耗
}, },
loading:false loading: false,
CourseSubjectList: [], //所属科目
} }
}, },
created() { created() {
...@@ -109,11 +118,19 @@ ...@@ -109,11 +118,19 @@
this.msg.Teacher_Id = userInfo.AccountId; this.msg.Teacher_Id = userInfo.AccountId;
this.getClassStatus(); this.getClassStatus();
this.getSchool(); this.getSchool();
this.queryCourseSubject()
}, },
mounted() { mounted() {
this.getClassList(); this.getClassList();
}, },
methods: { methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
//获取校区列表 //获取校区列表
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
...@@ -146,7 +163,7 @@ ...@@ -146,7 +163,7 @@
//获取菜单分页列表 //获取菜单分页列表
getClassList() { getClassList() {
this.loading = true; this.loading = true;
this.data=[]; this.data = [];
GetClassPageList(this.msg).then(res => { GetClassPageList(this.msg).then(res => {
this.loading = false; this.loading = false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
......
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