Commit a720f723 authored by 罗超's avatar 罗超

修改教育页面

parent 17fc05c2
......@@ -48,7 +48,7 @@ module.exports = function (ctx) {
build: {
vueRouterMode: 'hash', // available values: 'hash', 'history'
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'
},
......
......@@ -17,8 +17,8 @@
map-options multiple />
</div>
<div class="row wrap">
<div class="col-6 q-pb-lg">
<q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" flat hide-upload-btn max-files="1"
<div class="col-6 q-pb-lg q-pr-lg">
<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>
</q-uploader>
</div>
......@@ -81,6 +81,14 @@
:rules="[val => !!val || '请填写续费售价']" />
</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>
<ext-editor :defaultMsg="objOption.CourseIntro" classStr="col-12" @getEditValue="getEditValue"></ext-editor>
......@@ -153,6 +161,7 @@
RenewSlPrice: 0, //续费售价
Saleplat: "", //销售平台
IsKCourse: 0, //是否是K12课程(1-是)
ClassHours:0
},
optionTitle: "",
defaultArray: [],
......@@ -248,6 +257,7 @@
this.objOption.CourseFeature = res.Data.CourseFeature;
this.objOption.OriginalPrice = res.Data.OriginalPrice;
this.objOption.SellPrice = res.Data.SellPrice;
this.objOption.ClassHours=res.Data.ClassHours;
this.objOption.IsOpenStepPrice = res.Data.IsOpenStepPrice;
this.objOption.IsRenew = res.Data.IsRenew;
this.objOption.RenewOgPrice = res.Data.RenewOgPrice;
......@@ -278,6 +288,7 @@
this.objOption.CourseFeature = "";
this.objOption.OriginalPrice = 0;
this.objOption.SellPrice = 0;
this.objOption.ClassHours=0
this.objOption.IsOpenStepPrice = 0;
this.objOption.IsRenew = 0;
this.objOption.RenewOgPrice = 0;
......@@ -294,7 +305,8 @@
//保存菜单
saveCourse() {
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;
var Teacher_Ids = "";
if (this.chooseTeacher && this.chooseTeacher.length > 0) {
......
......@@ -28,9 +28,13 @@
</template>
<template v-slot:body-cell-CoverImg="props">
<q-td :props="props">
<q-avatar square size="100px">
<img v-if="props.value" :src="props.value" />
</q-avatar>
<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-CourseIntro="props">
......@@ -38,6 +42,30 @@
<span v-html="props.value"></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 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">
<q-td :props="props">
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
......@@ -87,12 +115,19 @@
data() {
return {
currentUrl: "",
columns: [{
name: 'CourseId',
label: '课程编号',
field: 'CourseId',
columns: [
{
name: 'CoverImg',
label: '课程封面',
field: 'CoverImg',
align: 'left'
},
// {
// name: 'CourseId',
// label: '课程编号',
// field: 'CourseId',
// align: 'left'
// },
{
name: 'CourseName',
required: true,
......@@ -101,12 +136,40 @@
field: row => row.CourseName
},
{
name: 'CoverImg',
label: '课程封面',
field: 'CoverImg',
align: 'left'
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: 'CreateByName',
label: '创建人',
......@@ -152,6 +215,7 @@
rowsPerPage: 12,
CourseName: "",
QCateIds: "",
  IsQPrice: 1,
Status: "-1",
},
//课程分类树形列表
......@@ -251,5 +315,8 @@
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
.border-bottom
border-bottom: 1px dashed #EEE
padding-bottom: 5px
margin-bottom: 5px
</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