Commit a720f723 authored by 罗超's avatar 罗超

修改教育页面

parent 17fc05c2
...@@ -48,7 +48,7 @@ module.exports = function (ctx) { ...@@ -48,7 +48,7 @@ module.exports = function (ctx) {
build: { build: {
vueRouterMode: 'hash', // available values: 'hash', 'history' vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? { env: ctx.dev ? {
API: 'http://192.168.1.13:8085/api' API: 'http://192.168.1.27:8300/api'
} : { } : {
API: 'http://eduapi.oytour.com/api' API: 'http://eduapi.oytour.com/api'
}, },
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
map-options multiple /> map-options multiple />
</div> </div>
<div class="row wrap"> <div class="row wrap">
<div class="col-6 q-pb-lg"> <div class="col-6 q-pb-lg q-pr-lg">
<q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" flat hide-upload-btn max-files="1" <q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" style="width:auto;height:139px" flat hide-upload-btn max-files="1"
label="课程封面" accept=".jpg, image/*" :factory="uploadFile" auto-upload> label="课程封面" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader> </q-uploader>
</div> </div>
...@@ -81,6 +81,14 @@ ...@@ -81,6 +81,14 @@
:rules="[val => !!val || '请填写续费售价']" /> :rules="[val => !!val || '请填写续费售价']" />
</div> </div>
</div> </div>
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label maxlength="8" :dense="false" mask="#" fill-mask="0"
reverse-fill-mask v-model="objOption.ClassHours" ref="ClassHours"
class="col-6 q-pr-lg q-pb-lg" label="课时数量"
:rules="[val => !!val || '请填写课时信息']" />
</div>
</div>
<div class="text-caption q-my-md q-px-xs text-grey-6">课程介绍 <div class="text-caption q-my-md q-px-xs text-grey-6">课程介绍
</div> </div>
<ext-editor :defaultMsg="objOption.CourseIntro" classStr="col-12" @getEditValue="getEditValue"></ext-editor> <ext-editor :defaultMsg="objOption.CourseIntro" classStr="col-12" @getEditValue="getEditValue"></ext-editor>
...@@ -153,6 +161,7 @@ ...@@ -153,6 +161,7 @@
RenewSlPrice: 0, //续费售价 RenewSlPrice: 0, //续费售价
Saleplat: "", //销售平台 Saleplat: "", //销售平台
IsKCourse: 0, //是否是K12课程(1-是) IsKCourse: 0, //是否是K12课程(1-是)
ClassHours:0
}, },
optionTitle: "", optionTitle: "",
defaultArray: [], defaultArray: [],
...@@ -248,6 +257,7 @@ ...@@ -248,6 +257,7 @@
this.objOption.CourseFeature = res.Data.CourseFeature; this.objOption.CourseFeature = res.Data.CourseFeature;
this.objOption.OriginalPrice = res.Data.OriginalPrice; this.objOption.OriginalPrice = res.Data.OriginalPrice;
this.objOption.SellPrice = res.Data.SellPrice; this.objOption.SellPrice = res.Data.SellPrice;
this.objOption.ClassHours=res.Data.ClassHours;
this.objOption.IsOpenStepPrice = res.Data.IsOpenStepPrice; this.objOption.IsOpenStepPrice = res.Data.IsOpenStepPrice;
this.objOption.IsRenew = res.Data.IsRenew; this.objOption.IsRenew = res.Data.IsRenew;
this.objOption.RenewOgPrice = res.Data.RenewOgPrice; this.objOption.RenewOgPrice = res.Data.RenewOgPrice;
...@@ -278,6 +288,7 @@ ...@@ -278,6 +288,7 @@
this.objOption.CourseFeature = ""; this.objOption.CourseFeature = "";
this.objOption.OriginalPrice = 0; this.objOption.OriginalPrice = 0;
this.objOption.SellPrice = 0; this.objOption.SellPrice = 0;
this.objOption.ClassHours=0
this.objOption.IsOpenStepPrice = 0; this.objOption.IsOpenStepPrice = 0;
this.objOption.IsRenew = 0; this.objOption.IsRenew = 0;
this.objOption.RenewOgPrice = 0; this.objOption.RenewOgPrice = 0;
...@@ -294,7 +305,8 @@ ...@@ -294,7 +305,8 @@
//保存菜单 //保存菜单
saveCourse() { saveCourse() {
this.$refs.CourseName.validate(); this.$refs.CourseName.validate();
if (!this.$refs.CourseName.hasError) { this.$refs.ClassHours.validate();
if (!this.$refs.CourseName.hasError&&!this.$refs.ClassHours.hasError) {
this.saveCourseLoading = true; this.saveCourseLoading = true;
var Teacher_Ids = ""; var Teacher_Ids = "";
if (this.chooseTeacher && this.chooseTeacher.length > 0) { if (this.chooseTeacher && this.chooseTeacher.length > 0) {
......
...@@ -28,9 +28,13 @@ ...@@ -28,9 +28,13 @@
</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-avatar square size="100px"> <q-img
<img v-if="props.value" :src="props.value" /> :src="props.value"
</q-avatar> spinner-color="white"
style="height: 54px; max-width: 100px"
class="rounded-borders"
>
</q-img>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-CourseIntro="props"> <template v-slot:body-cell-CourseIntro="props">
...@@ -38,6 +42,30 @@ ...@@ -38,6 +42,30 @@
<span v-html="props.value"></span> <span v-html="props.value"></span>
</q-td> </q-td>
</template> </template>
<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}}折优惠</div>
<div class="border-bottom" v-if="x.PriceDiscountType==4">续费享{{100-x.PriceMoney}}折优惠</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">{{x.SaleCommissionMoney}}%</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">{{x.B2BCommissionMoney}}%</div>
</div>
</q-td>
</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 :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" /> <q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
...@@ -87,12 +115,19 @@ ...@@ -87,12 +115,19 @@
data() { data() {
return { return {
currentUrl: "", currentUrl: "",
columns: [{ columns: [
name: 'CourseId', {
label: '课程编号', name: 'CoverImg',
field: 'CourseId', label: '课程封面',
field: 'CoverImg',
align: 'left' align: 'left'
}, },
// {
// name: 'CourseId',
// label: '课程编号',
// field: 'CourseId',
// align: 'left'
// },
{ {
name: 'CourseName', name: 'CourseName',
required: true, required: true,
...@@ -101,12 +136,40 @@ ...@@ -101,12 +136,40 @@
field: row => row.CourseName field: row => row.CourseName
}, },
{ {
name: 'CoverImg', name: 'OriginalPrice',
label: '课程封面', required: true,
field: 'CoverImg', label: '原价',
align: 'left' 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: 'CreateByName', name: 'CreateByName',
label: '创建人', label: '创建人',
...@@ -152,6 +215,7 @@ ...@@ -152,6 +215,7 @@
rowsPerPage: 12, rowsPerPage: 12,
CourseName: "", CourseName: "",
QCateIds: "", QCateIds: "",
  IsQPrice: 1,
Status: "-1", Status: "-1",
}, },
//课程分类树形列表 //课程分类树形列表
...@@ -251,5 +315,8 @@ ...@@ -251,5 +315,8 @@
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
.border-bottom
border-bottom: 1px dashed #EEE
padding-bottom: 5px
margin-bottom: 5px
</style> </style>
This diff is collapsed.
This diff is collapsed.
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