Commit 60f85845 authored by 黄奎's avatar 黄奎

页面修改

parent a7cf751b
<style>
li {
list-style-type: none;
}
li {
list-style-type: none;
}
.courseList ul {
padding: 0px;
}
.courseList ul {
padding: 0px;
}
.courseList li {
background: rgba(221, 222, 224, 0.2);
border-radius: 4px;
margin-top: 15px;
}
.courseList li {
background: rgba(221, 222, 224, 0.2);
border-radius: 4px;
margin-top: 15px;
}
.courseList li .dline {
display: table;
width: 100%;
display: flex;
flex-direction: row;
}
.courseList li .dline {
display: table;
width: 100%;
display: flex;
flex-direction: row;
}
.courseList li .d1,
.courseList li .d2,
.courseList li .d3,
.courseList li .d4,
.courseList li .d5 {
width: 18%;
padding: 20px 20px 10px;
}
.courseList li .d1,
.courseList li .d2,
.courseList li .d3,
.courseList li .d4,
.courseList li .d5 {
width: 18%;
padding: 20px 20px 10px;
}
.courseList li .d7 {
flex: 1;
width: 1px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.courseList li .d7 {
flex: 1;
width: 1px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.courseList li .d1 .di-title {
font-size: 16px;
color: #111111;
}
.courseList li .d1 .di-title {
font-size: 16px;
color: #111111;
}
.courseList li .d1 .di-c {
font-size: 14px;
display: flex;
line-height: 28px;
color: #111111;
}
.courseList li .d1 .di-c {
font-size: 14px;
display: flex;
line-height: 28px;
color: #111111;
}
.courseList li .d6 {
padding: 10px 20px;
width: 100%;
height: inherit;
position: relative;
border-top: 1px solid #dddee0;
}
.courseList li .d6 {
padding: 10px 20px;
width: 100%;
height: inherit;
position: relative;
border-top: 1px solid #dddee0;
}
.courseList li .d6 .progress {
width: 100%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
}
.courseList li .d6 .progress {
width: 100%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
}
.courseList li .d2 div {
margin: 2px 0;
font-size: 14px;
color: #111111;
}
.courseList li .d2 div {
margin: 2px 0;
font-size: 14px;
color: #111111;
}
.courseList li .d2-n {
font-size: 12px;
color: #999999;
margin-right: 20px;
}
.courseList li .d2-n {
font-size: 12px;
color: #999999;
margin-right: 20px;
}
.courseList li .d3 .d3-s {
color: var(--q-color-negative);
font-weight: bold;
}
.courseList li .d3 .d3-s {
color: var(--q-color-negative);
font-weight: bold;
}
.courseList li .d3 div {
margin: 2px 0;
font-size: 14px;
}
.courseList li .d3 div {
margin: 2px 0;
font-size: 14px;
}
.courseList li .d4 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.courseList li .d4 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.courseList li .d5 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.courseList li .d5 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.courseList .myCourseNName {
width: 25px;
height: 25px;
border-radius: 50%;
color: #fff !important;
text-align: center;
line-height: 25px;
background-color: #004d40;
}
.courseList .myCourseNName {
width: 25px;
height: 25px;
border-radius: 50%;
color: #fff !important;
text-align: center;
line-height: 25px;
background-color: #004d40;
}
</style>
<template>
<div class="page-body courseList">
<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>
</div>
<div class="page-content">
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
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="createQuotation"
/>
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="创建报价单" @click="createQuotation" />
</div>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width>
<q-btn
size="sm"
color="accent"
round
dense
@click="props.row.expand = !props.row.expand"
:icon="props.row.expand ? 'remove' : 'add'"
/>
<q-btn size="sm" color="accent" round dense @click="props.row.expand = !props.row.expand"
:icon="props.row.expand ? 'remove' : 'add'" />
</q-td>
<template v-for="col in props.cols">
<q-td v-if="col.name == 'CoverImg'">
<q-img
:src="col.value"
spinner-color="white"
style="height: 54px; max-width: 100px"
class="rounded-borders"
>
<q-img :src="col.value" spinner-color="white" style="height: 54px; max-width: 100px"
class="rounded-borders">
</q-img>
</q-td>
<q-td
v-else-if="col.name == 'PreferentialList'"
style="padding-right:0px"
>
<q-td v-else-if="col.name == 'PreferentialList'" style="padding-right:0px">
<div v-for="x in col.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }}
......@@ -200,30 +165,28 @@ li {
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
<q-td
v-else-if="col.name == 'PreferentialListSellCommission'"
style="padding-right:0px;padding-left:0px"
>
<q-td v-else-if="col.name == 'PreferentialListSellCommission'" style="padding-right:0px;padding-left:0px">
<div v-for="x in col.value">
<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?'%':''}}</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
<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?'%':''}}</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!col.value || col.value.length==0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
<q-td
v-else-if="col.name == 'PreferentialListB2BCommission'"
style="padding-left:0px"
>
<q-td v-else-if="col.name == 'PreferentialListB2BCommission'" style="padding-left:0px">
<div v-for="x in col.value">
<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>
<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>
</div>
<div v-if="!col.value || col.value.length==0">
<div class="remark-font">暂无佣金信息</div>
......@@ -243,11 +206,7 @@ li {
<q-td v-else-if="col.name=='CourseIntro'">
<q-btn flat color="primary" label="查看详情" @click="showContentDialog(col.value)" />
</q-td>
<q-td
v-else-if="col.name != 'CourseFeature'"
:key="col.name"
:props="props"
>
<q-td v-else-if="col.name != 'CourseFeature'" :key="col.name" :props="props">
{{ col.value }}
</q-td>
</template>
......@@ -258,23 +217,14 @@ li {
<q-badge color="negative" class="q-mr-md">
课程特色
</q-badge>
<div
v-html="props.row.CourseFeature"
class="text-left col text-negative"
></div>
<div v-html="props.row.CourseFeature" class="text-left col text-negative"></div>
</div>
</q-td>
</q-tr>
</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>
</q-table>
</div>
......@@ -294,169 +244,172 @@ li {
</div>
</template>
<script>
import { queryCoursePage } from "../../api/course/index";
import quotationForm from '../../components/sale/quotation-form'
export default {
meta: {
title: "课程预览"
},
components: {
quotationForm
},
data() {
return {
currentUrl: "",
data: [],
loading: true,
carousel:false,
showContent:'',
showForm:false,
columns: [
{
name: "CourseFeature",
label: "课程特色",
field: "CourseFeature",
align: "left"
},
{
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: "TeacherList",
label: "教师团队",
field: row => row.TeacherList,
align: "left"
},
{
name: "ClassHours",
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`
},
{
import {
queryCoursePage
} from "../../api/course/index";
import quotationForm from '../../components/sale/quotation-form'
export default {
meta: {
title: "课程预览"
},
components: {
quotationForm
},
data() {
return {
currentUrl: "",
data: [],
loading: true,
carousel: false,
showContent: '',
showForm: false,
columns: [{
name: "CourseFeature",
label: "课程特色",
field: "CourseFeature",
align: "left"
},
{
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: "TeacherList",
label: "教师团队",
field: row => row.TeacherList,
align: "left"
},
{
name: "ClassHours",
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`
},
{
name: "CourseIntro",
label: "课程详情",
field: "CourseIntro",
align: "left"
},
{
name: "UpdateTimeStr",
label: "更新时间",
field: "UpdateTimeStr",
align: "left"
}
],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseName: "",
QCateIds: "",
Status: "0",
IsQPrice: 1, //是否查询优惠价格设置
IsQTeacher: 1 //是否查询课程讲师
},
pageCount: 0
};
},
mounted() {
this.currentUrl = this.$route.path;
this.getcourselist();
},
methods: {
createQuotation(){
this.showForm=true;
},
showContentDialog(content){
this.showContent=content;
this.carousel=true
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getcourselist();
{
name: "UpdateTimeStr",
label: "更新时间",
field: "UpdateTimeStr",
align: "left"
}
],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseName: "",
QCateIds: "",
Status: "0",
IsQPrice: 1, //是否查询优惠价格设置
IsQTeacher: 1 //是否查询课程讲师
},
pageCount: 0
};
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
mounted() {
this.currentUrl = this.$route.path;
this.getcourselist();
},
//获取菜单分页列表
getcourselist() {
this.loading = true;
queryCoursePage(this.msg)
.then(res => {
this.loading = false;
res.Data.PageData.forEach(x => {
x.expand = false;
x.CourseFeature = x.CourseFeature.replace(
new RegExp("\n", "gm"),
"<br/>"
);
methods: {
createQuotation() {
this.showForm = true;
},
showContentDialog(content) {
this.showContent = content;
this.carousel = true
},
//重新查询
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;
res.Data.PageData.forEach(x => {
x.expand = false;
x.CourseFeature = x.CourseFeature.replace(
new RegExp("\n", "gm"),
"<br/>"
);
});
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
}
}
}
};
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
@import url('~assets/css/table.sass')
</style>
......@@ -25,98 +25,97 @@
</div>
</template>
<template v-slot:body="props">
<q-tr>
<q-td>
<div>{{props.row.SupplierName}}</div>
<div>
<a :href="props.row.SupplierContract" style="color:#2961FE;text-decoration:none;"
v-if="props.row.SupplierContract" target="_blank">
查看合同
</a>
</div>
</q-td>
<template v-slot:body-cell-PreferentialList="props">
<q-td :props="props" style="padding-right:0px">
<div v-for="x in props.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }}
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 2">
单人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名享{{ 100 - x.PriceMoney }}折优惠
<q-tr :props="props">
<template v-for="col in props.cols">
<q-td v-if="col.name == 'Name'">
{{col.value}}
</q-td>
<q-td v-else-if="col.name == 'SupplierName'">
<div>{{col.value}}</div>
<div>
<a :href="props.row.SupplierContract" style="color:#2961FE;text-decoration:none;"
v-if="props.row.SupplierContract" target="_blank">
查看合同
</a>
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享{{ 100 - x.PriceMoney }}折优惠
</q-td>
<q-td v-if="col.name == 'PreferentialList'" style="padding-right:0px">
<div v-for="x in col.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }}
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 2">
单人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策
</div>
</div>
<div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无优惠政策</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
</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">
{{ x.SaleCommissionType == 1 ? "¥" : ""
</q-td>
<q-td v-else-if="col.name == 'PreferentialListSellCommission'" 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">
{{ x.SaleCommissionType == 1 ? "¥" : ""
}}{{ x.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="x.PriceDiscountType == 0">
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</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">
{{ x.B2BCommissionType == 1 ? "¥" : ""
</q-td>
<q-td v-else-if="col.name == 'PreferentialListB2BCommission'" 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">
{{ x.B2BCommissionType == 1 ? "¥" : ""
}}{{ x.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="x.PriceDiscountType == 0">
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
<q-td v-else-if="col.name == 'Id'">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditStudy(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="价格设置"
@click="EditStudyPrice(props.row)" />
<q-btn v-if="props.row.SaleState==1||props.row.SaleState==4" flat size="xs" icon="edit" color="accent"
style="font-weight:400" label="申请审核" @click="applyApply(props.row)" />
</q-td>
</template>
</q-tr>
<q-tr :props="props">
<q-td colspan="100%" class="bg-grey-2">
<div class="flex row items-start">
<q-badge color="negative" class="q-mr-md">
备注:
</q-badge>
<div>{{props.row.Remark}}}</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-Id="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditStudy(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="价格设置"
@click="EditStudyPrice(props.row)" />
<q-btn v-if="props.row.SaleState==1||props.row.SaleState==4" flat size="xs" icon="edit" color="accent"
style="font-weight:400" label="申请审核" @click="applyApply(props.row)" />
</q-td>
</template>
</q-tr>
<q-tr :props="props">
<q-td colspan="100%" class="bg-grey-2">
<div class="flex row items-start">
<q-badge color="negative" class="q-mr-md">
备注:
</q-badge>
<div>{{props.row.Remark}}}</div>
</div>
</q-td>
</q-tr>
</q-tr>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount"
......@@ -210,12 +209,7 @@
align: "left",
field: row => row.PreferentialList
},
{
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
{
name: 'SaleStateName',
label: '销售状态',
......
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