Commit 024155b8 authored by 罗超's avatar 罗超

2

parent 1d48a559
......@@ -20,7 +20,7 @@ export default {
</script>
<style>
@import url("//at.alicdn.com/t/font_2077629_qyots58c4km.css");
@import url("//at.alicdn.com/t/font_2077629_bgk17xi4zj.css");
@font-face{
font-family: 'din';
src: url('./assets/font/DIN-Bold.otf') format('opentype');
......
......@@ -66,7 +66,16 @@
<span @click="goOrderdetails(item, 1)" class="order_OfferId">{{
item.OrderId
}}</span>
<!-- <q-chip color="blue" text-color="white" size="sm" v-if="item.ClassScrollType==1">跟班</q-chip>
<q-chip color="green" text-color="white" size="sm" v-if="item.ClassScrollType==2">约课</q-chip> -->
<q-badge v-if="item.JoinType == 3" color="red" label="续费订单" style="margin-left:5px;" class="q-mr-xs" />
<!-- <q-badge
v-if="item.JoinType !== 3"
color="green"
label="新订单"
style="margin-left:5px;"
class="q-mr-xs"
/> -->
<q-badge v-if="item.OrderType == 2 && item.LXConfirmState == 1" color="primary" label="已确认"
style="margin-left:5px;" class="q-mr-xs" />
......
......@@ -3,43 +3,103 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
@clear="resetSearch" maxlength="20" />
<q-input
@input="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.CourseName"
label="课程名称"
@clear="resetSearch"
maxlength="20"
/>
</div>
<div class="col-3">
<select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true"
labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree>
<select-tree
:treeData="TreeCategoryList"
:defaultArray="returnString"
nodeKey="CateId"
:multiple="true"
labelKey="CateName"
childrenKey="ChildList"
tipText="课程系列"
@getChild="getChild"
></select-tree>
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.CourseSubject"
:options="CourseSubjectList" option-label="SubjectName" option-value="Id" emit-value map-options label="所属科目"
clearable />
<q-select
@input="resetSearch"
standout="bg-primary text-white"
v-model="msg.CourseSubject"
:options="CourseSubjectList"
option-label="SubjectName"
option-value="Id"
emit-value
map-options
label="所属科目"
clearable
/>
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="ShowOpts"
emit-value map-options label="状态" />
<q-select
@input="resetSearch"
standout="bg-primary text-white"
v-model="msg.Status"
:options="ShowOpts"
emit-value
map-options
label="状态"
/>
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Saleplat" :options="platOpts"
option-label="Name" option-value="Id" emit-value map-options label="上架渠道" />
<q-select
@input="resetSearch"
standout="bg-primary text-white"
v-model="msg.Saleplat"
:options="platOpts"
option-label="Name"
option-value="Id"
emit-value
map-options
label="上架渠道"
/>
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-two-header-table sticky-tow-column-table sticky-right-column-table" style="height: calc(100vh - 250px) !important;" separator="none" :data="data" :columns="columns"
row-key="name">
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-two-header-table sticky-tow-column-table sticky-right-column-table"
style="height: calc(100vh - 250px) !important;"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<template v-slot:top="props">
<div class="col-2 q-table__title">课程信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增课程" @click="EditCourse(null, 1)" />
<q-btn
color="accent"
size="sm"
class="q-mr-md"
icon="add"
label="新增课程"
@click="EditCourse(null, 1)"
/>
</div>
</template>
<template v-slot:body-cell-CoverImg="props">
<q-td :props="props">
<q-img :src="props.value" spinner-color="white" style="height: 54px; max-width: 100px"
class="rounded-borders">
<q-img
:src="props.value"
spinner-color="white"
style="height: 54px; max-width: 100px"
class="rounded-borders"
>
</q-img>
</q-td>
</template>
......@@ -49,70 +109,97 @@
</q-td>
</template>
<template v-slot:body-cell-B2CRatio="props">
<q-td :props="props">
<span>{{props.row.B2CRatio}}%</span>
<span>{{ props.row.B2CRatio }}%</span>
</q-td>
</template>
<template v-slot:body-cell-B2CReNewRatio="props">
<q-td :props="props">
<span>{{props.row.B2CReNewRatio}}%</span>
<span>{{ props.row.B2CReNewRatio }}%</span>
</q-td>
</template>
<template v-slot:body-cell-B2BRebateRatio="props">
<q-td :props="props">
<span>{{props.row.B2BRebateRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.B2BRebateRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-B2BReNewRatio="props">
<q-td :props="props">
<span>{{props.row.B2BReNewRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.B2BReNewRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-SchoolRebateRatio="props">
<q-td :props="props">
<span>{{props.row.SchoolRebateRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.SchoolRebateRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-SchoolReNewRatio="props">
<q-td :props="props">
<span>{{props.row.SchoolReNewRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.SchoolReNewRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-TransIntroductceRatio="props">
<q-td :props="props">
<span>{{props.row.TransIntroductceRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.TransIntroductceRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-TransIntroductceReNewRatio="props">
<q-td :props="props">
<span>{{props.row.TransIntroductceReNewRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.TransIntroductceReNewRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-InnerRecommendRatio="props">
<q-td :props="props">
<span>{{props.row.InnerRecommendRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.InnerRecommendRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-InnerRecommendReNewRatio="props">
<q-td :props="props">
<span>{{props.row.InnerRecommendReNewRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.InnerRecommendReNewRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-B2CRbRatio="props">
<q-td :props="props">
<span>{{props.row.B2CRbRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.B2CRbRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-B2CRNRatio="props">
<q-td :props="props">
<span>{{props.row.B2CRNRatio}}{{props.row.CommissionReType==1?'%':''}}</span>
<span
>{{ props.row.B2CRNRatio
}}{{ props.row.CommissionReType == 1 ? "%" : "" }}</span
>
</q-td>
</template>
<template v-slot:body-cell-PreferentialList="props">
<q-td :props="props" style="padding-right: 0px">
<div v-for="x in props.value">
......@@ -140,8 +227,12 @@
<template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right: 0px; padding-left: 0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px; padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }" v-if="x.PriceDiscountType != 0">
<div
class="border-bottom"
style="padding-left: 16px; padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.SaleCommissionType == 1 ? "¥" : ""
}}{{ x.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }}
......@@ -158,8 +249,12 @@
<template v-slot:body-cell-PreferentialListB2BCommission="props">
<q-td :props="props" style="padding-left: 0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
<div
class="border-bottom"
style="padding-left: 16px"
:class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.B2BCommissionType == 1 ? "¥" : ""
}}{{ x.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }}
......@@ -176,8 +271,12 @@
<template v-slot:body-cell-EducationCommission="props">
<q-td :props="props" style="padding-left: 0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.EduCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
<div
class="border-bottom"
style="padding-left: 16px"
:class="{ 'text-red': x.EduCommissionType == 1 }"
v-if="x.PriceDiscountType != 0"
>
{{ x.EduCommissionType == 1 ? "¥" : ""
}}{{ x.EduCommissionMoney
}}{{ x.EduCommissionType == 0 ? "%" : "" }}
......@@ -193,32 +292,81 @@
</template>
<template v-slot:body-cell-plat="props">
<q-td :props="props">
<q-badge color="green" label="小程序" v-if="props.row.Saleplat.includes(4)" />
<q-badge
color="green"
label="小程序"
v-if="props.row.Saleplat.includes(4)"
/>
</q-td>
</template>
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 0 ? '正常' : '删除'" />
<q-badge
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 0 ? '正常' : '删除'"
/>
</q-td>
</template>
<template v-slot:body-cell-IsScrollClass="props">
<q-td :props="props">
<span>{{ props.row.IsScrollClass == 0 ? "否" : "是" }}</span>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
<q-pagination
class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" 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-btn
flat
size="xs"
icon="edit"
color="accent"
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-item clickable v-close-popup @click="DeleteCourse(props.row, 1)" v-if="props.row.Status == 0">
<q-item
clickable
v-close-popup
@click="DeleteCourse(props.row, 1)"
v-if="props.row.Status == 0"
>
<q-item-section>
<q-item-label>删除</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="DeleteCourse(props.row, 0)" v-if="props.row.Status == 1">
<q-item
clickable
v-close-popup
@click="DeleteCourse(props.row, 0)"
v-if="props.row.Status == 1"
>
<q-item-section>
<q-item-label>恢复</q-item-label>
</q-item-section>
......@@ -228,190 +376,205 @@
<q-item-label>课程详情</q-item-label>
</q-item-section>
</q-item>
<!-- <q-item clickable v-close-popup @click="goMyroster(props.row,1)">
<q-item
clickable
v-close-popup
@click="goMyroster(props.row, 1)"
>
<q-item-section>
<q-item-label>学员名单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="goMyroster(props.row,2)">
<q-item
clickable
v-close-popup
@click="goMyroster(props.row, 2)"
>
<q-item-section>
<q-item-label>学员订单</q-item-label>
</q-item-section>
</q-item> -->
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</template>
</q-table>
<course-form v-if="isShowCourseForm" :save-obj="courseObjOption" @close="closeMenuSaveForm"
@success="refreshPage">
<course-form
v-if="isShowCourseForm"
:save-obj="courseObjOption"
@close="closeMenuSaveForm"
@success="refreshPage"
>
</course-form>
<courseprice-form v-if="isShowCoursePriceForm" :save-obj="courseObjOption" @close="closeMenuSaveForm"
@success="refreshPage">
<courseprice-form
v-if="isShowCoursePriceForm"
:save-obj="courseObjOption"
@close="closeMenuSaveForm"
@success="refreshPage"
>
</courseprice-form>
</div>
</div>
</template>
<script>
import {
import {
queryCoursePage,
queryCourseCategoryTree,
deleteCourseInfo,
querySaleplatList,
getCourseSubject
} from "../../api/course/index";
import courseForm from "../../components/course/course-form";
import coursepriceForm from "../../components/course/courseprice-form";
import selectTree from "../../components/common/select-tree";
import {
openURL
} from "quasar";
import {
mapState
} from "vuex";
export default {
} from "../../api/course/index";
import courseForm from "../../components/course/course-form";
import coursepriceForm from "../../components/course/courseprice-form";
import selectTree from "../../components/common/select-tree";
import { openURL } from "quasar";
import { mapState } from "vuex";
export default {
meta: {
title: "课程管理",
title: "课程管理"
},
components: {
courseForm,
selectTree,
coursepriceForm,
coursepriceForm
},
data() {
return {
currentUrl: "",
columns: [{
columns: [
{
name: "CoverImg",
label: "课程封面",
field: "CoverImg",
align: "left",
align: "left"
},
{
name: "CourseName",
required: true,
label: "课程名称",
align: "left",
field: (row) => row.CourseName,
field: row => row.CourseName
},
{
name: "CourseSubjectName",
required: true,
label: "所属科目",
align: "left",
field: (row) => row.CourseSubjectName,
field: row => row.CourseSubjectName
},
{
name: "CateName",
required: true,
label: "系列",
align: "left",
field: (row) => row.CateName,
field: row => row.CateName
},
{
name: "GuestNum",
label: "学员数量",
align: "left",
field: "GuestNum",
sortable: true,
sort: (a, b, rowA, rowB) => parseInt(a, 10) - parseInt(b, 10)
},
{
name: "OrderNum",
label: "订单数量",
align: "left",
field: "OrderNum",
sortable: true,
sort: (a, b, rowA, rowB) => parseInt(a, 10) - parseInt(b, 10)
},
// {
// name: "SellPrice",
// required: true,
// label: "学员数量",
// align: "left",
// field: (row) => row.SellPrice.toFixed(2),
// },
// {
// name: "SellPrice",
// required: true,
// label: "订单数量",
// align: "left",
// field: (row) => row.SellPrice.toFixed(2),
// },
{
name: "SellPrice",
required: true,
label: "直客价",
align: "left",
field: (row) => row.SellPrice.toFixed(2),
field: row => row.SellPrice.toFixed(2)
},
{
name: "B2CRatio",
required: true,
label: "直客优惠比例",
align: "left",
field: (row) => row.B2CRatio
field: row => row.B2CRatio
},
{
name: "B2CReNewRatio",
required: true,
label: "直客优惠续费比例",
align: "left",
field: (row) => row.B2CReNewRatio
field: row => row.B2CReNewRatio
},
{
name: "B2BRebateRatio",
required: true,
label: "一般同行返佣",
align: "left",
field: (row) => row.B2BRebateRatio
field: row => row.B2BRebateRatio
},
{
name: "B2BReNewRatio",
required: true,
label: "一般同行续费返佣",
align: "left",
field: (row) => row.B2BReNewRatio
field: row => row.B2BReNewRatio
},
{
name: "SchoolRebateRatio",
required: true,
label: "校园同行返佣",
align: "left",
field: (row) => row.SchoolRebateRatio
field: row => row.SchoolRebateRatio
},
{
name: "SchoolReNewRatio",
required: true,
label: "校园同行续费返佣",
align: "left",
field: (row) => row.SchoolReNewRatio
field: row => row.SchoolReNewRatio
},
{
name: "TransIntroductceRatio",
required: true,
label: "转介返佣",
align: "left",
field: (row) => row.TransIntroductceRatio
field: row => row.TransIntroductceRatio
},
{
name: "TransIntroductceReNewRatio",
required: true,
label: "转介续费返佣",
align: "left",
field: (row) => row.TransIntroductceReNewRatio
field: row => row.TransIntroductceReNewRatio
},
{
name: "InnerRecommendRatio",
required: true,
label: "内推返佣",
align: "left",
field: (row) => row.InnerRecommendRatio
field: row => row.InnerRecommendRatio
},
{
name: "InnerRecommendReNewRatio",
required: true,
label: "内推续费返佣",
align: "left",
field: (row) => row.InnerRecommendReNewRatio
field: row => row.InnerRecommendReNewRatio
},
{
name: "B2CRbRatio",
required: true,
label: "直客返佣",
align: "left",
field: (row) => row.B2CRbRatio
field: row => row.B2CRbRatio
},
{
name: "B2CRNRatio",
required: true,
label: "直客续费返佣",
align: "left",
field: (row) => row.B2CRNRatio
field: row => row.B2CRNRatio
},
// {
......@@ -447,52 +610,71 @@
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`,
format: (val, row) => `${val}课时`
},
{
name: "plat",
label: "上架渠道",
field: "plat",
align: "left",
align: "left"
},
{
name: "CreateByName",
label: "创建人",
field: "CreateByName",
align: "left",
align: "left"
},
{
name: "UpdateTimeStr",
label: "更新时间",
field: "UpdateTimeStr",
align: "left",
align: "left"
},
{
name: "Status",
label: "状态",
align: "left",
field: "Status",
field: "Status"
},
{
name: "IsScrollClass",
label: "是否开启滚动开班",
align: "left",
field: "IsScrollClass"
},
{
name: "ScrollMinNum",
label: "最小上课人数",
align: "left",
field: "ScrollMinNum"
},
{
name: "ScrollMaxNum",
label: "最大上课人数",
align: "left",
field: "ScrollMaxNum"
},
{
name: "optioned",
label: "操作",
field: "CourseId",
},
field: "CourseId"
}
],
data: [],
loading: true,
ShowOpts: [{
ShowOpts: [
{
label: "全部",
value: "-1",
value: "-1"
},
{
label: "正常",
value: "0",
value: "0"
},
{
label: "删除",
value: "1",
},
value: "1"
}
],
platOpts: [], //上架渠道
msg: {
......@@ -504,7 +686,7 @@
IsQPrice: 1,
Status: "0",
Saleplat: 0,
CourseSubject: "", //所属科目
CourseSubject: "" //所属科目
},
//课程分类树形列表
TreeCategoryList: [],
......@@ -514,7 +696,7 @@
isShowCoursePriceForm: false, //是否显示课程价格表单
courseObjOption: null, //课程对象
isShowPriceEditBtn: 1, //是否显示价格设置
CourseSubjectList: [], //科目列表
CourseSubjectList: [] //科目列表
};
},
computed: mapState({
......@@ -524,7 +706,7 @@
state.user.userInfo.ActionMenuList &&
state.user.userInfo.ActionMenuList.length > 0
) {
let action = state.user.userInfo.ActionMenuList.find((x) => {
let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "Edit_CoursePrice") {
return x;
}
......@@ -532,14 +714,14 @@
return action && action.FunctionCode;
}
return false;
},
}
}),
mounted() {
if (this.$route.query && this.$route.query.Name) {
//从订单完成统计跳转过来的带的参数
this.msg.CourseName = decodeURI(this.$route.query.Name);
}
this.queryCourseSubject()
this.queryCourseSubject();
this.getSaleplat();
this.getCategorytree();
this.currentUrl = this.$route.path;
......@@ -551,13 +733,13 @@
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
});
},
//删除课程
DeleteCourse(item, status) {
let delMsg = {
CourseId: item.CourseId,
Status: status,
Status: status
};
var message = "是否要删除该课程?";
if (status == 0) {
......@@ -570,17 +752,17 @@
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
cancel: "取消"
})
.onOk(() => {
deleteCourseInfo(delMsg).then((res) => {
deleteCourseInfo(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "删除成功!",
position: "top",
position: "top"
});
this.getcourselist();
} else {
......@@ -589,7 +771,7 @@
color: "accent",
timeout: 2000,
message: res.Message,
position: "top",
position: "top"
});
}
});
......@@ -599,7 +781,7 @@
gotoSub(obj, routeStr) {
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId;
this.$router.push({
path: tempStr,
path: tempStr
});
},
//分类改变
......@@ -615,7 +797,7 @@
getCategorytree() {
this.TreeCategoryList = [];
var qMsg = {};
queryCourseCategoryTree(qMsg).then((res) => {
queryCourseCategoryTree(qMsg).then(res => {
this.TreeCategoryList = res.Data;
});
},
......@@ -633,7 +815,7 @@
getcourselist() {
this.loading = true;
queryCoursePage(this.msg)
.then((res) => {
.then(res => {
this.loading = false;
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
......@@ -676,29 +858,42 @@
},
//获取销售端口列表
getSaleplat() {
querySaleplatList().then((res) => {
querySaleplatList().then(res => {
this.platOpts = res.Data;
this.platOpts.unshift({
Name: "不限",
Id: 0,
Id: 0
});
});
},
goMyroster(row,type){//type 1 是学员名单 2 学员订单
}
},
goMyroster(row, type) {
//type 1 是学员名单 2 学员订单
if (type == 1) {
const obj = {
CourseId: row.CourseId,
CourseName: encodeURIComponent(row.CourseName),
source: 1
};
this.OpenNewUrl("/stuMan/stuList", obj);
} else if (type == 2) {
const obj = {
CourseId: row.CourseId,
CourseName: encodeURIComponent(row.CourseName),
source: 1
};
this.OpenNewUrl("/sale/orderStatistics", obj);
}
}
}
};
</script>
<style scoped>
.border-bottom {
.border-bottom {
border-bottom: 1px dashed #eee;
padding-bottom: 5px;
margin-bottom: 5px;
}
}
</style>
<style lang="sass">
@import url('~assets/css/table.sass')
@import url('~assets/css/table.sass')
</style>
......@@ -155,23 +155,25 @@
padding: 5px 10px;
align-items: center;
}
</style>
<template>
<div class="page-body stuList">
<div class="row q-mb-md">
<div class="row q-mb-md" v-if="source!=1">
<q-space></q-space>
<div style="position: relative">
<q-btn color="accent" label="高级查询" @click="IsShowQuery = true"></q-btn>
<q-badge floating rounded color="red">{{ queryNum }}</q-badge>
</div>
</div>
<div v-else class="q-mb-sm" style="font-size:20px">{{courseName}}</div>
<div class="page-search row items-center flex">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select @input="changeSchool" standout="bg-primary text-white" v-model="msg.School_Id" class="col-6"
option-label="SName" option-value="SId" :options="SchoolList" emit-value map-options label="校区" />
</div>
<div class="col-3">
<div class="col-3" v-if="source!=1">
<q-select @input="changeCourse" standout="bg-primary text-white" v-model="msg.CourseId" class="col-6"
option-label="CourseName" option-value="CourseId" use-input :options="CourseList" @filter="filterCourse"
emit-value map-options label="课程" clearable>
......@@ -193,7 +195,7 @@
itemEvents,
opt,
selected,
toggleOption,
toggleOption
}">
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
......@@ -231,22 +233,14 @@
</q-select>
</div>
<div class="col-3">
<q-select
@input="msg.StuSourceId='',msg.StuChannelId='',resetSearch()"
:dense="false"
clearable
filled
option-value="Id"
option-label="Name"
v-model="msg.CreateType"
:options="customFromList"
emit-value
map-options
label="客户来源"
/>
<q-select @input="
(msg.StuSourceId = ''), (msg.StuChannelId = ''), resetSearch()
" :dense="false" clearable filled option-value="Id" option-label="Name" v-model="msg.CreateType"
:options="customFromList" emit-value map-options label="客户来源" />
</div>
<div class="col-3" v-if="msg.CreateType==1">
<q-select filled v-model="msg.StuChannelId" @input="resetSearch" label="收客渠道" :dense="false" :options="StuChannelList" option-label="Name" option-value="Id" emit-value map-options use-input clearable
<div class="col-3" v-if="msg.CreateType == 1">
<q-select filled v-model="msg.StuChannelId" @input="resetSearch" label="收客渠道" :dense="false"
:options="StuChannelList" option-label="Name" option-value="Id" emit-value map-options use-input clearable
@filter="filterStuChannel">
<template v-slot:no-option>
<q-item>
......@@ -257,10 +251,10 @@
</template>
</q-select>
</div>
<div class="col-3" v-if="msg.CreateType==2">
<div class="col-3" v-if="msg.CreateType == 2">
<q-select filled v-model="msg.StuSourceId" :dense="false" :options="customList" use-input label="关联同行"
@filter="filterFn" option-label="CustomerName" @input="resetSearch" clearable
option-value="CustomerId" emit-value map-options>
@filter="filterFn" option-label="CustomerName" @input="resetSearch" clearable option-value="CustomerId"
emit-value map-options>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
......@@ -270,17 +264,16 @@
</template>
</q-select>
</div>
<div class="col-3" v-if="msg.CreateType==3">
<q-select filled v-model="msg.StuSourceId" :dense="false" @filter="filterEmployee" label="介绍人"
use-input :options="myEmployeeList" option-label="EmployeeName" @input="resetSearch" clearable
option-value="Id" emit-value map-options />
<div class="col-3" v-if="msg.CreateType == 3">
<q-select filled v-model="msg.StuSourceId" :dense="false" @filter="filterEmployee" label="介绍人" use-input
:options="myEmployeeList" option-label="EmployeeName" @input="resetSearch" clearable option-value="Id"
emit-value map-options />
</div>
<div class="col-3" v-if="msg.CreateType==4">
<div class="col-3" v-if="msg.CreateType == 4">
<q-select filled v-model="msg.StuSourceId" :dense="false" use-input @filter="filterStudent" label="转介人"
:options="MyTransListData" option-label="StuName" @input="resetSearch" clearable
option-value="StuId" emit-value map-options />
:options="MyTransListData" option-label="StuName" @input="resetSearch" clearable option-value="StuId"
emit-value map-options />
</div>
</div>
</div>
<div class="page-content">
......@@ -308,7 +301,7 @@
<template v-slot:body-cell-StuSourceIdName="props">
<q-td :props="props">
<div>
<span v-if="props.row.CreateType == 2 && props.row.EnterpriseName">{{props.row.EnterpriseName}}:</span>
<span v-if="props.row.CreateType == 2 && props.row.EnterpriseName">{{ props.row.EnterpriseName }}:</span>
{{ props.row.StuSourceIdName }}
</div>
</q-td>
......@@ -426,15 +419,8 @@
<list v-if="isShowList" :type="showType" :set-obj="eventObj" @close="closeHandle" />
<!-- 事件记录 -->
<eventLog v-if="isShowEventLog" :set-obj="eventObj" @modify="modifyEvent" @close="closeHandle" />
<studentRight-form
v-if="isShowStuRight"
:isJudgeTrans="isJudgeTrans"
:BelongType="BelongType"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
@reload="refreshStuList"
>
<studentRight-form v-if="isShowStuRight" :isJudgeTrans="isJudgeTrans" :BelongType="BelongType" :save-obj="stuOption"
@close="closeStuForm" @success="refreshStuList" @reload="refreshStuList">
</studentRight-form>
</div>
</template>
......@@ -450,11 +436,10 @@
import {
getStuList,
getEarlyWarningEnum,
getTypeEnum,
getTypeEnum
} from "../../api/stuMan/index.js";
import {
queryGuestStateList,
CreateTypeList,
GetStuChannelList,
GetCustomerList
......@@ -473,7 +458,7 @@
} from "../../api/users/user";
export default {
meta: {
title: "学员名单",
title: "学员名单"
},
components: {
MoreQuery,
......@@ -496,7 +481,7 @@
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
School_Id: '', //校区
School_Id: "", //校区
CourseId: 0, //课程
ClassId: 0, //班级
GuestName: "", //学生姓名
......@@ -509,9 +494,9 @@
OrderTime: "", //下单时间
EndOrderTime: "", //下单结束时间
GuestState: "", //学员状态
CreateType:'', //客户来源
StuChannelId: "" ,//收客渠道
StuSourceId:'',
CreateType: "", //客户来源
StuChannelId: "", //收客渠道
StuSourceId: ""
},
pageCount: 0,
columns: [{
......@@ -519,7 +504,7 @@
label: "编号",
field: "Id",
align: "left",
required: true,
required: true
},
{
......@@ -527,7 +512,7 @@
label: "姓名",
align: "left",
field: "GuestName",
required: true,
required: true
},
{
name: "CurseManager",
......@@ -543,17 +528,19 @@
name: "CreateTypeName",
label: "客户来源",
field: "CreateTypeName",
align: "left",
},{
align: "left"
},
{
name: "StuSourceIdName",
label: "来源关联人",
field: "StuSourceIdName",
align: "left",
},{
align: "left"
},
{
name: "StuChannelName",
label: "收客渠道",
field: "StuChannelName",
align: "left",
align: "left"
},
{
name: "StuCreateByName",
......@@ -565,148 +552,148 @@
name: "Mobile",
label: "电话",
align: "left",
field: "Mobile",
field: "Mobile"
},
{
name: "ContractNo",
label: "合同编号",
align: "left",
field: "ContractNo",
field: "ContractNo"
},
{
name: "ClassName",
label: "班级",
align: "left",
field: "ClassName",
field: "ClassName"
},
{
name: "CourseName",
label: "课程",
align: "left",
field: "CourseName",
field: "CourseName"
},
{
name: "TeacherName",
label: "老师",
align: "left",
field: "TeacherName",
field: "TeacherName"
},
{
name: "OrderId",
label: "订单号",
align: "left",
field: "OrderId",
field: "OrderId"
},
{
name: "OrderTime",
label: "报名时间",
align: "left",
field: "OrderTime",
field: "OrderTime"
},
{
name: "EnterName",
label: "业务员",
field: "EnterName",
align: "left",
align: "left"
},
{
name: "PreferPrice",
label: "应收金额",
field: "PreferPrice",
align: "left",
align: "left"
},
{
name: "Income",
label: "实收金额",
field: "Income",
align: "left",
align: "left"
},
{
name: "Refund",
label: "退款金额",
field: "Refund",
align: "left",
align: "left"
},
{
name: "TotalHours",
label: "课程总课时",
field: "TotalHours",
align: "left",
align: "left"
},
{
name: "ValidClassHours",
label: "有效课时",
field: "ValidClassHours",
align: "left",
align: "left"
},
{
name: "CompleteHours",
label: "消耗课时",
field: "CompleteHours",
align: "left",
align: "left"
},
{
name: "SurplusHours",
label: "剩余课时",
field: "SurplusHours",
align: "left",
align: "left"
},
{
name: "MakeUpHours",
label: "可补课课时",
field: "MakeUpHours",
align: "left",
align: "left"
},
{
name: "AbsenceNum",
label: "缺勤次数",
field: "AbsenceNum",
align: "left",
align: "left"
},
{
name: "LeaveNum",
label: "请假次数",
field: "LeaveNum",
align: "left",
align: "left"
},
{
name: "EventlogNum",
label: "事件记录",
field: "EventlogNum",
align: "left",
align: "left"
},
{
name: "GuestStateStr",
label: "状态",
field: "GuestStateStr",
align: "left",
align: "left"
},
{
name: "GraduationTime",
label: "毕业时间",
field: "GraduationTime",
align: "left",
align: "left"
},
{
name: "CourseRateName",
label: "毕业课程等级",
field: "CourseRateName",
align: "left",
align: "left"
},
{
name: "JoinTypeStr",
label: "类型",
field: "JoinTypeStr",
align: "left",
align: "left"
},
{
name: "optioned",
label: "操作",
required: true,
align: "left",
},
align: "left"
}
],
SchoolList: [],
CourseList: [],
......@@ -716,10 +703,10 @@
queryClass: {
CourseId: 0,
IsAddDefault: 1,
SchoolId: '',
SchoolId: "",
Teacher_Id: 0,
MoreStatus: "1,2,3",
IsQuerySurplusPlan: 0,
IsQuerySurplusPlan: 0
},
typeEnum: [],
warnEnum: [],
......@@ -738,9 +725,9 @@
isShowEventLog: false, //是否显示事件记录
GuestStateList: [], //学员状态列表
stuOption: null,
BelongType:1,
isShowStuRight:false,
isJudgeTrans:1,
BelongType: 1,
isShowStuRight: false,
isJudgeTrans: 1,
customFromList: [], //客户来源
StuChannelList: [], //收客渠道
......@@ -754,11 +741,21 @@
TransListData: [], //转介人数据
MyTransListData: [],
source: 0, //1:从课程列表进入
courseName: ""
};
},
created() {
this.getGuestStateList();
if (this.$route.query.source) {
this.source = this.$route.query.source;
}
if (this.$route.query.CourseId) {
this.msg.CourseId = parseInt(this.$route.query.CourseId);
}
if (this.$route.query.CourseName) {
this.courseName = decodeURIComponent(this.$route.query.CourseName);
}
},
mounted() {
this.getSchool();
......@@ -771,8 +768,8 @@
this.getCustomFrom();
this.GetStuChannelList();
this.GetCustomerList();
this.getEmployeeList()
this.getStudentDorpDown()
this.getEmployeeList();
this.getStudentDorpDown();
},
methods: {
//获取收客渠道
......@@ -867,17 +864,15 @@
});
},
//获取学员状态列表
getGuestStateList() {
queryGuestStateList({}).then(res => {
this.GuestStateList = res.Data;
})
});
},
//获取校区下拉
getSchool() {
getSchoolDropdown({}).then((res) => {
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
this.SchoolList = res.Data;
}
......@@ -885,7 +880,7 @@
},
//获取课程
getCourseList() {
queryCourseDropdownList({}).then((res) => {
queryCourseDropdownList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
......@@ -893,7 +888,7 @@
}
tempArray.unshift({
CourseId: 0,
CourseName: "不限",
CourseName: "不限"
});
this.CourseList = tempArray;
this.AllCourseList = tempArray;
......@@ -908,14 +903,14 @@
} else {
const needle = val.toLowerCase();
this.CourseList = this.AllCourseList.filter(
(v) => v.CourseName.toLowerCase().indexOf(needle) > -1
v => v.CourseName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取班级
getClass() {
getClassDropDownList(this.queryClass).then((res) => {
getClassDropDownList(this.queryClass).then(res => {
this.classList = [];
this.msg.ClassId = 0;
if (res.Code == 1) {
......@@ -923,7 +918,7 @@
this.AllClassList = res.Data;
var obj = {
ClassName: "不限",
ClassId: 0,
ClassId: 0
};
this.classList.unshift(obj);
}
......@@ -937,7 +932,7 @@
} else {
const needle = val.toLowerCase();
this.classList = this.AllClassList.filter(
(v) => v.ClassName.toLowerCase().indexOf(needle) > -1
v => v.ClassName.toLowerCase().indexOf(needle) > -1
);
}
});
......@@ -955,14 +950,14 @@
getList() {
this.loading = true;
getStuList(this.msg)
.then((res) => {
.then(res => {
this.loading = false;
if (res.Code === 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
.catch((err) => {
.catch(err => {
this.loading = false;
});
},
......@@ -1018,15 +1013,15 @@
this.$router.push({
path: url,
query: {
Id: item.Id,
},
Id: item.Id
}
});
} else {
this.$router.push({
path: url,
query: {
Id: 0,
},
Id: 0
}
});
}
},
......@@ -1035,23 +1030,23 @@
path: url,
query: {
Id: item.Id,
name: item.ActivityName,
},
name: item.ActivityName
}
});
},
getTypeEnum() {
getTypeEnum({}).then((res) => {
getTypeEnum({}).then(res => {
if (res.Code === 1) {
res.Data.unshift({
Name: "不限",
Id: 0,
Id: 0
});
this.typeEnum = res.Data;
}
});
},
getEarlyWarningEnum() {
getEarlyWarningEnum({}).then((res) => {
getEarlyWarningEnum({}).then(res => {
if (res.Code === 1) {
this.warnEnum = res.Data;
}
......@@ -1083,7 +1078,7 @@
let obj = {
StudentId: item.Id,
TeacherId: item.Teacher_Id,
ClassId: item.ClassId,
ClassId: item.ClassId
};
this.OpenNewUrl("/teacher/studentsClassSee", obj);
},
......@@ -1137,7 +1132,10 @@
},
getStuRight(obj) {
if (obj) {
this.stuOption = {StuId:obj.Student_Id,noEdit:true}
this.stuOption = {
StuId: obj.Student_Id,
noEdit: true
};
this.BelongType = obj.BelongType;
}
this.isShowStuRight = true;
......@@ -1145,12 +1143,14 @@
closeStuForm() {
this.isShowStuRight = false;
},
refreshStuList(){
this.getList()
refreshStuList() {
this.getList();
}
}
},
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
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