Commit 48896a1f authored by 黄奎's avatar 黄奎

页面修改

parent 36a7b8ca
......@@ -83,13 +83,13 @@
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label :disable="!isHaveCourseHoursEdit"
@keyup.native="checkPrice(objOption, 'ClassHours')" reverse-fill-mask v-model="objOption.ClassHours"
ref="ClassHours" class="col-6 q-pr-lg q-pb-lg" label="课时数量" :rules="[val => !!val || '请填写课时信息']" />
@keyup.native="checkPrice(objOption, 'ChineseHours')" reverse-fill-mask v-model="objOption.ChineseHours"
ref="ChineseHours" class="col-6 q-pr-lg q-pb-lg" label="中教课时" />
</div>
<div class="col-6">
<q-select filled stack-label @input="changeCourseSubject(objOption.CateId)" option-value="CateId"
option-label="CateName" v-model="objOption.CateId" ref="CateId" :options="TreeCategoryList" label="所属系列"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options :rules="[val => !!val || '请选择课程所属系列']" />
<q-input filled stack-label :disable="!isHaveCourseHoursEdit"
@keyup.native="checkPrice(objOption, 'ForeignHours')" reverse-fill-mask v-model="objOption.ForeignHours"
ref="ForeignHours" class="col-6 q-pr-lg q-pb-lg" label="外教课时" />
</div>
</div>
<div class="row wrap">
......@@ -99,13 +99,18 @@
class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
</div>
<div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.CourseRate"
ref="CourseRate" :options="courseLevelList" label="课程等级" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
<q-select filled stack-label @input="changeCourseSubject(objOption.CateId)" option-value="CateId"
option-label="CateName" v-model="objOption.CateId" ref="CateId" :options="TreeCategoryList" label="所属系列"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options :rules="[val => !!val || '请选择课程所属系列']" />
</div>
</div>
<div class="row">
<div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.CourseRate"
ref="CourseRate" :options="courseLevelList" label="课程等级" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</div>
<q-field label="是否支持约课报名" stack-label filled class="col-6 q-pr-lg q-pb-lg">
<template v-slot:control>
<div class="row col-12">
......@@ -114,10 +119,20 @@
</div>
</template>
</q-field>
</div>
<div class="row">
<div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.CourseTimeId"
ref="CourseTime" :options="CourseTimeList" label="关联上课时段" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</div>
<div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.OpenBankLevelList"
multiple use-chips ref="LevelData" :options="LevelData" label="课程关联题库" class="col-6 q-pr-lg q-pb-lg"
emit-value map-options />
</div>
</div>
<div class="row" v-if="objOption.IsScrollClass==1">
<q-input filled stack-label v-model="objOption.ScrollMinNum" ref="ScrollMinNum" class="col-6 q-pr-lg q-pb-lg"
label="最小上课人数" :rules="[val => !!val || '请填写最小上课人数']" />
......@@ -125,10 +140,10 @@
label="最大上课人数" :rules="[val => !!val || '请填写最大上课人数']" />
</div>
<div class="row">
<q-input filled stack-label v-model="objOption.FreeCoffeeNum" ref="FreeCoffeeNum" class="col-6 q-pr-lg q-pb-lg"
label="赠送咖啡杯数" :rules="[val => val >=0 || '请填写赠送咖啡杯数']" />
<q-input filled stack-label v-model="objOption.AddHoursMoney" ref="AddHoursMoney" class="col-6 q-pr-lg q-pb-lg"
label="课程增加课时费" :rules="[val => val >=0 || '请填写课程增加课时费']" />
<q-input filled stack-label v-model="objOption.FreeCoffeeNum" ref="FreeCoffeeNum"
class="col-6 q-pr-lg q-pb-lg" label="赠送咖啡杯数" :rules="[val => val >=0 || '请填写赠送咖啡杯数']" />
<q-input filled stack-label v-model="objOption.AddHoursMoney" ref="AddHoursMoney"
class="col-6 q-pr-lg q-pb-lg" label="课程增加课时费" :rules="[val => val >=0 || '请填写课程增加课时费']" />
</div>
<div class="row wrap">
<div class="col-6">
......@@ -153,13 +168,7 @@
style="display:none" />
</div>
</div>
<div class="row wrap">
<div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.OpenBankLevelList" multiple
use-chips ref="LevelData" :options="LevelData" label="课程关联题库" class="col-6 q-pr-lg q-pb-lg"
emit-value map-options />
</div>
</div>
<div class="row wrap">
<div class="col-12 q-pr-lg q-pb-lg">
<q-input v-model="objOption.ContractInfo" filled type="textarea" placeholder="合同补充协议" />
......@@ -267,8 +276,10 @@
FreeCoffeeNum: 0, // 赠送咖啡
AddHoursMoney: 0, // 课程增加课时费
CourseTimeId: 0, // 关联上课时段
ContractInfo: "",//合同补充协议
OpenBankLevelList: []
ContractInfo: "", //合同补充协议
OpenBankLevelList: [], //开放题库
ChineseHours: "", //中教课时
ForeignHours: "", //外教课时
},
CourseTimeList: [], //上课时段列表
CourseEmphasis: [], //数据临时存放
......@@ -288,7 +299,7 @@
courseLevelList: [], //课程等级列表
courseSubjectList: [], //课程科目列表
keynoteList: [], //重点枚举列表
LevelData:[]
LevelData: []
};
},
created() {
......@@ -327,9 +338,9 @@
},
methods: {
//获取关联考试等级
getLevel(){
getLevel() {
GetBankTypeList({}).then(res => {
if(res.Code==1){
if (res.Code == 1) {
this.LevelData = res.Data;
}
})
......@@ -510,6 +521,8 @@
this.objOption.AddHoursMoney = res.Data.AddHoursMoney;
this.objOption.CourseTimeId = res.Data.CourseTimeId;
this.objOption.OpenBankLevelList = res.Data.OpenBankLevelList;
this.objOption.ChineseHours = res.Data.ChineseHours;
this.objOption.ForeignHours = res.Data.ForeignHours;
this.CourseEmphasis = [];
setTimeout(() => {
//Todo 暂时不知道什么原因 偶尔会出现2个 所以加了一个延迟
......@@ -570,6 +583,8 @@
this.objOption.AddHoursMoney = 0;
this.objOption.CourseTimeId = 0;
this.objOption.OpenBankLevelList = [];
this.objOption.ChineseHours = "";
this.objOption.ForeignHours = "";
}
},
//关闭弹窗
......@@ -580,13 +595,13 @@
//保存菜单
saveCourse() {
this.$refs.CourseName.validate();
this.$refs.ClassHours.validate();
//this.$refs.ClassHours.validate();
this.$refs.CateId.validate();
this.$refs.FreeCoffeeNum.validate();
this.$refs.AddHoursMoney.validate();
//!this.$refs.ClassHours.hasError &&
if (
!this.$refs.CourseName.hasError &&
!this.$refs.ClassHours.hasError &&
!this.$refs.CateId.hasError &&
!this.$refs.FreeCoffeeNum.hasError &&
!this.$refs.AddHoursMoney.hasError
......
......@@ -1640,7 +1640,6 @@
item.tab = tab;
this.myorderObjOption = item;
this.isShowmyorderForm = true;
console.log(this.myorderObjOption,'====')
},
//关闭订单详情
closeMOSaveForm() {
......
......@@ -3,109 +3,50 @@
<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
<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">
style="height: calc(100vh - 250px) !important;" separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top>
<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>
<template v-slot:body-cell-OpenBankLevelNameList="props">
<q-td :props="props">
<span style="margin-right:10px;" v-for="x in props.row.OpenBankLevelNameList">{{x}}</span>
<span style="margin-right:10px;" v-for="(x,xIndex) in props.row.OpenBankLevelNameList"
:key="xIndex">{{x}}</span>
</q-td>
</template>
<template v-slot:body-cell-CourseIntro="props">
......@@ -113,7 +54,6 @@
<span v-html="props.value"></span>
</q-td>
</template>
<template v-slot:body-cell-B2CRatio="props">
<q-td :props="props">
<span>{{ props.row.B2CRatio }}%</span>
......@@ -126,88 +66,68 @@
</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">
<div v-for="(x,cIndex) in props.value" :key="cIndex">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }}
</div>
......@@ -231,13 +151,9 @@
</template>
<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 v-for="(x,dIndex) in props.value" :key="dIndex">
<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 ? "%" : "" }}
......@@ -253,13 +169,9 @@
</template>
<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 v-for="(x,fIndex) in props.value" :key="fIndex">
<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 ? "%" : "" }}
......@@ -275,13 +187,9 @@
</template>
<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 v-for="(x,gIndex) in props.value" :key="gIndex">
<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 ? "%" : "" }}
......@@ -297,19 +205,12 @@
</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">
......@@ -317,61 +218,31 @@
<span>{{ props.row.IsScrollClass == 0 ? "否" : "是" }}</span>
</q-td>
</template>
<template v-slot:body-cell-ClassHours="props">
<q-td :props="props">
<span>&nbsp;&nbsp;&nbsp;&nbsp;时:{{ props.row.ClassHours }}</span><br />
<span>中教课时:{{ props.row.ChineseHours }}</span><br />
<span>外教课时:{{ props.row.ForeignHours }}</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>
......@@ -381,20 +252,12 @@
<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>
......@@ -404,37 +267,33 @@
</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: "课程管理"
},
......@@ -446,8 +305,7 @@ export default {
data() {
return {
currentUrl: "",
columns: [
{
columns: [{
name: "CoverImg",
label: "课程封面",
field: "CoverImg",
......@@ -621,7 +479,7 @@ export default {
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`
},
{
name: "plat",
......@@ -673,8 +531,7 @@ export default {
],
data: [],
loading: true,
ShowOpts: [
{
ShowOpts: [{
label: "全部",
value: "-1"
},
......@@ -896,15 +753,15 @@ export default {
}
}
}
};
};
</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>
\ No newline at end of file
......@@ -95,6 +95,13 @@
</div>
</q-td>
</template>
<template v-slot:body-cell-ClassHours="props">
<q-td :props="props">
<span>&nbsp;&nbsp;&nbsp;&nbsp;时:{{ props.row.ClassHours }}</span><br />
<span>中教课时:{{ props.row.ChineseHours }}</span><br />
<span>外教课时:{{ props.row.ForeignHours }}</span>
</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 ? '正常' : '删除'" />
......@@ -170,7 +177,6 @@
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`
},
{
name: "UpdateTimeStr",
......
......@@ -109,7 +109,6 @@
line-height: 25px;
background-color: #004d40;
}
</style>
<template>
<div class="page-body courseList">
......@@ -117,8 +116,8 @@
<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="SubjectName" option-value="Id" emit-value map-options label="所属科目"
clearable />
:options="CourseSubjectList" option-label="SubjectName" option-value="Id" emit-value map-options
label="所属科目" clearable />
</div>
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
......@@ -136,11 +135,6 @@
<!-- <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="创建报价单" @click="createQuotation" /> -->
</div>
</template>
<!-- <template v-slot:body-cell-OpenBankLevelNameList="props">
<q-td auto-width :props="props">
<span v-for="item in props.row.OpenBankLevelNameList">{{item}}</span>
</q-td>
</template> -->
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width>
......@@ -154,7 +148,7 @@
</q-img>
</q-td>
<q-td v-else-if="col.name=='OpenBankLevelNameList'" :key="col.name">
<span style="margin-right:10px;" v-for="x in col.value">{{x}}</span>
<span style="margin-right:10px;" v-for="(x,index) in col.value" :key="index">{{x}}</span>
</q-td>
<q-td v-else-if="col.name == 'PreferentialList'" style="padding-right:0px" :key="col.name">
<div v-for="(x,index) in col.value" :key="index">
......@@ -193,7 +187,8 @@
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
<q-td v-else-if="col.name == 'PreferentialListSellCommission'" style="padding-right:0px;padding-left:0px" :key="col.name">
<q-td v-else-if="col.name == 'PreferentialListSellCommission'" style="padding-right:0px;padding-left:0px"
:key="col.name">
<div v-for="(x,index) in col.value" :key="index">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"
:class="{'text-red':x.SaleCommissionType==1}" v-if="x.PriceDiscountType!=0">
......@@ -211,7 +206,6 @@
<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?'%':''}}</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
......@@ -265,6 +259,12 @@
</q-chip>
</div>
</q-td>
<q-td v-else-if="col.name=='ClassHours'" :key="col.name">
<span>&nbsp;&nbsp;&nbsp;&nbsp;时:{{ props.row.ClassHours }}</span><br />
<span>中教课时:{{ props.row.ChineseHours }}</span><br />
<span>外教课时:{{ props.row.ForeignHours }}</span>
</q-td>
<q-td v-else-if="col.name=='CourseIntro'" :key="col.name">
<q-btn flat color="primary" label="查看详情" @click="showContentDialog(col.value)" />
</q-td>
......@@ -311,7 +311,9 @@
getCourseSubject
} from "../../api/course/index";
import quotationForm from '../../components/sale/quotation-form'
import { mapState } from "vuex";
import {
mapState
} from "vuex";
export default {
meta: {
title: "课程报价表"
......@@ -518,10 +520,10 @@
CourseSubjectList: [], //科目列表
};
},
created(){
created() {
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList;
var isShowPrice=false;
var isShowPrice = false;
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach((x) => {
if (x.FunctionCode == "IsShow_CoursePrice") {
......@@ -529,13 +531,19 @@
}
});
}
if(isShowPrice){
this.visibleColumns = ['CourseFeature', 'CoverImg', 'CourseSubjectName', 'CourseName', 'OpenBankLevelNameList' , 'CateName', 'OriginalPrice', 'SellPrice', 'PreferentialListSellCommission',
'PreferentialListB2BCommission', 'B2CRatio', 'B2CReNewRatio' , 'CommissionReType' , 'B2BRebateRatio' , 'B2BReNewRatio' ,'SchoolRebateRatio',
'SchoolReNewRatio','TransIntroductceRatio','TransIntroductceReNewRatio','InnerRecommendRatio','InnerRecommendReNewRatio','B2CRbRatio',
'B2CRNRatio','TeacherList','ClassHours','CourseIntro','UpdateTimeStr']
}else{
this.visibleColumns = ['CourseFeature', 'CoverImg', 'CourseSubjectName', 'CourseName', 'OpenBankLevelNameList', 'CateName','TeacherList','ClassHours','CourseIntro','UpdateTimeStr']
if (isShowPrice) {
this.visibleColumns = ['CourseFeature', 'CoverImg', 'CourseSubjectName', 'CourseName', 'OpenBankLevelNameList',
'CateName', 'OriginalPrice', 'SellPrice', 'PreferentialListSellCommission',
'PreferentialListB2BCommission', 'B2CRatio', 'B2CReNewRatio', 'CommissionReType', 'B2BRebateRatio',
'B2BReNewRatio', 'SchoolRebateRatio',
'SchoolReNewRatio', 'TransIntroductceRatio', 'TransIntroductceReNewRatio', 'InnerRecommendRatio',
'InnerRecommendReNewRatio', 'B2CRbRatio',
'B2CRNRatio', 'TeacherList', 'ClassHours', 'CourseIntro', 'UpdateTimeStr'
]
} else {
this.visibleColumns = ['CourseFeature', 'CoverImg', 'CourseSubjectName', 'CourseName', 'OpenBankLevelNameList',
'CateName', 'TeacherList', 'ClassHours', 'CourseIntro', 'UpdateTimeStr'
]
}
},
mounted() {
......@@ -590,7 +598,6 @@
}
}
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
......
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