Commit 0d238253 authored by zhengke's avatar zhengke

修改

parent cba62a46
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" :visible-columns="visibleColumns" row-key="name">
<template v-slot:top> <template v-slot:top>
<div class="col-2 q-table__title">课程报价表</div> <div class="col-2 q-table__title">课程报价表</div>
<q-space /> <q-space />
...@@ -304,6 +304,8 @@ ...@@ -304,6 +304,8 @@
getCourseSubject getCourseSubject
} from "../../api/course/index"; } from "../../api/course/index";
import quotationForm from '../../components/sale/quotation-form' import quotationForm from '../../components/sale/quotation-form'
import { mapState } from "vuex";
export default { export default {
meta: { meta: {
title: "课程预览" title: "课程预览"
...@@ -333,35 +335,30 @@ ...@@ -333,35 +335,30 @@
}, },
{ {
name: "CourseSubjectName", name: "CourseSubjectName",
required: true,
label: "所属科目", label: "所属科目",
align: "left", align: "left",
field: (row) => row.CourseSubjectName, field: (row) => row.CourseSubjectName,
}, },
{ {
name: "CourseName", name: "CourseName",
required: true,
label: "课程名称", label: "课程名称",
align: "left", align: "left",
field: row => row.CourseName field: row => row.CourseName
}, },
{ {
name: "CateName", name: "CateName",
required: true,
label: "系列", label: "系列",
align: "left", align: "left",
field: row => row.CateName field: row => row.CateName
}, },
{ {
name: "OriginalPrice", name: "OriginalPrice",
required: true,
label: "原价", label: "原价",
align: "left", align: "left",
field: row => row.OriginalPrice.toFixed(2) field: row => row.OriginalPrice.toFixed(2)
}, },
{ {
name: "SellPrice", name: "SellPrice",
required: true,
label: "售价", label: "售价",
align: "left", align: "left",
field: row => row.SellPrice.toFixed(2) field: row => row.SellPrice.toFixed(2)
...@@ -375,14 +372,12 @@ ...@@ -375,14 +372,12 @@
// }, // },
{ {
name: "PreferentialListSellCommission", name: "PreferentialListSellCommission",
required: true,
label: "销售佣金", label: "销售佣金",
align: "left", align: "left",
field: row => row.PreferentialList field: row => row.PreferentialList
}, },
{ {
name: "PreferentialListB2BCommission", name: "PreferentialListB2BCommission",
required: true,
label: "同行佣金", label: "同行佣金",
align: "left", align: "left",
field: row => row.PreferentialList field: row => row.PreferentialList
...@@ -391,21 +386,18 @@ ...@@ -391,21 +386,18 @@
{ {
name: "B2CRatio", name: "B2CRatio",
required: true,
label: "直客优惠比例", label: "直客优惠比例",
align: "left", align: "left",
field: (row) => row.B2CRatio field: (row) => row.B2CRatio
}, },
{ {
name: "B2CReNewRatio", name: "B2CReNewRatio",
required: true,
label: "直客优惠续费比例", label: "直客优惠续费比例",
align: "left", align: "left",
field: (row) => row.B2CReNewRatio field: (row) => row.B2CReNewRatio
}, },
{ {
name: "CommissionReType", name: "CommissionReType",
required: true,
label: "返佣类型", label: "返佣类型",
align: "left", align: "left",
field: (row) => row.CommissionReType field: (row) => row.CommissionReType
...@@ -413,70 +405,60 @@ ...@@ -413,70 +405,60 @@
{ {
name: "B2BRebateRatio", name: "B2BRebateRatio",
required: true,
label: "一般同行返佣比例", label: "一般同行返佣比例",
align: "left", align: "left",
field: (row) => row.B2BRebateRatio field: (row) => row.B2BRebateRatio
}, },
{ {
name: "B2BReNewRatio", name: "B2BReNewRatio",
required: true,
label: "一般同行续费返佣比例", label: "一般同行续费返佣比例",
align: "left", align: "left",
field: (row) => row.B2BReNewRatio field: (row) => row.B2BReNewRatio
}, },
{ {
name: "SchoolRebateRatio", name: "SchoolRebateRatio",
required: true,
label: "校园同行返佣比例", label: "校园同行返佣比例",
align: "left", align: "left",
field: (row) => row.SchoolRebateRatio field: (row) => row.SchoolRebateRatio
}, },
{ {
name: "SchoolReNewRatio", name: "SchoolReNewRatio",
required: true,
label: "校园同行续费返佣比例", label: "校园同行续费返佣比例",
align: "left", align: "left",
field: (row) => row.SchoolReNewRatio field: (row) => row.SchoolReNewRatio
}, },
{ {
name: "TransIntroductceRatio", name: "TransIntroductceRatio",
required: true,
label: "转介返佣比例", label: "转介返佣比例",
align: "left", align: "left",
field: (row) => row.TransIntroductceRatio field: (row) => row.TransIntroductceRatio
}, },
{ {
name: "TransIntroductceReNewRatio", name: "TransIntroductceReNewRatio",
required: true,
label: "转介续费返佣比例", label: "转介续费返佣比例",
align: "left", align: "left",
field: (row) => row.TransIntroductceReNewRatio field: (row) => row.TransIntroductceReNewRatio
}, },
{ {
name: "InnerRecommendRatio", name: "InnerRecommendRatio",
required: true,
label: "内推返佣比例", label: "内推返佣比例",
align: "left", align: "left",
field: (row) => row.InnerRecommendRatio field: (row) => row.InnerRecommendRatio
}, },
{ {
name: "InnerRecommendReNewRatio", name: "InnerRecommendReNewRatio",
required: true,
label: "内推续费返佣比例", label: "内推续费返佣比例",
align: "left", align: "left",
field: (row) => row.InnerRecommendReNewRatio field: (row) => row.InnerRecommendReNewRatio
}, },
{ {
name: "B2CRbRatio", name: "B2CRbRatio",
required: true,
label: "直客返佣", label: "直客返佣",
align: "left", align: "left",
field: (row) => row.B2CRbRatio field: (row) => row.B2CRbRatio
}, },
{ {
name: "B2CRNRatio", name: "B2CRNRatio",
required: true,
label: "直客续费返佣", label: "直客续费返佣",
align: "left", align: "left",
field: (row) => row.B2CRNRatio field: (row) => row.B2CRNRatio
...@@ -508,6 +490,8 @@ ...@@ -508,6 +490,8 @@
align: "left" align: "left"
} }
], ],
//表格可见列
visibleColumns: [],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
...@@ -523,6 +507,26 @@ ...@@ -523,6 +507,26 @@
CourseSubjectList: [], //科目列表 CourseSubjectList: [], //科目列表
}; };
}, },
created(){
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList;
var isShowPrice=false;
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach((x) => {
if (x.FunctionCode == "IsShow_CoursePrice") {
isShowPrice = true;
}
});
}
if(isShowPrice){
this.visibleColumns = ['CourseFeature', 'CoverImg', 'CourseSubjectName', 'CourseName', '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', 'CateName','TeacherList','ClassHours','CourseIntro','UpdateTimeStr']
}
},
mounted() { mounted() {
this.queryCourseSubject() this.queryCourseSubject()
this.currentUrl = this.$route.path; this.currentUrl = this.$route.path;
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
<div><span class="d2-n">开始上课时间</span><span class="d3-s">{{item.OpenTime}}</span></div> <div><span class="d2-n">开始上课时间</span><span class="d3-s">{{item.OpenTime}}</span></div>
<div><span class="d2-n">截止报名时间</span><span class="d3-s">{{item.EndOrderTime}}</span></div> <div><span class="d2-n">截止报名时间</span><span class="d3-s">{{item.EndOrderTime}}</span></div>
</div> </div>
<div class="d4"> <div class="d4" v-if="isHavePriceView">
<div style="margin: 0">价格信息</div> <div style="margin: 0">价格信息</div>
<div><span class="d2-n">原价</span><span>{{item.OriginalPrice.toFixed(2)}}</span></div> <div><span class="d2-n">原价</span><span>{{item.OriginalPrice.toFixed(2)}}</span></div>
<div><span class="d2-n">售价</span><span <div><span class="d2-n">售价</span><span
...@@ -324,6 +324,7 @@ ...@@ -324,6 +324,7 @@
getCourseSubject getCourseSubject
} from '../../api/course/index' } from '../../api/course/index'
import editorderForm from '../../components/sale/editorder-form' //修改订单 import editorderForm from '../../components/sale/editorder-form' //修改订单
import { mapState } from "vuex";
export default { export default {
meta: { meta: {
...@@ -389,6 +390,20 @@ ...@@ -389,6 +390,20 @@
var currentDay = year + '-' + month + '-' + day; var currentDay = year + '-' + month + '-' + day;
this.msg.StartTime = currentDay this.msg.StartTime = currentDay
}, },
computed: mapState({
isHavePriceView(state) {
if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length >
0) {
let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "IsShow_Price") {
return x;
}
});
return action && action.FunctionCode;
}
return false;
}
}),
mounted() { mounted() {
this.getList(); this.getList();
}, },
......
...@@ -250,84 +250,72 @@ ...@@ -250,84 +250,72 @@
}, },
{ {
name: "B2CRatio", name: "B2CRatio",
required: true,
label: "直客优惠", label: "直客优惠",
align: "left", align: "left",
field: (row) => row.B2CRatio field: (row) => row.B2CRatio
}, },
{ {
name: "B2CReNewRatio", name: "B2CReNewRatio",
required: true,
label: "直客优惠续费", label: "直客优惠续费",
align: "left", align: "left",
field: (row) => row.B2CReNewRatio field: (row) => row.B2CReNewRatio
}, },
{ {
name: "B2BRebateRatio", name: "B2BRebateRatio",
required: true,
label: "一般同行返佣", label: "一般同行返佣",
align: "left", align: "left",
field: (row) => row.B2BRebateRatio field: (row) => row.B2BRebateRatio
}, },
{ {
name: "B2BReNewRatio", name: "B2BReNewRatio",
required: true,
label: "一般同行续费返佣", label: "一般同行续费返佣",
align: "left", align: "left",
field: (row) => row.B2BReNewRatio field: (row) => row.B2BReNewRatio
}, },
{ {
name: "SchoolRebateRatio", name: "SchoolRebateRatio",
required: true,
label: "校园同行返佣", label: "校园同行返佣",
align: "left", align: "left",
field: (row) => row.SchoolRebateRatio field: (row) => row.SchoolRebateRatio
}, },
{ {
name: "SchoolReNewRatio", name: "SchoolReNewRatio",
required: true,
label: "校园同行续费返佣", label: "校园同行续费返佣",
align: "left", align: "left",
field: (row) => row.SchoolReNewRatio field: (row) => row.SchoolReNewRatio
}, },
{ {
name: "TransIntroductceRatio", name: "TransIntroductceRatio",
required: true,
label: "转介返佣", label: "转介返佣",
align: "left", align: "left",
field: (row) => row.TransIntroductceRatio field: (row) => row.TransIntroductceRatio
}, },
{ {
name: "TransIntroductceReNewRatio", name: "TransIntroductceReNewRatio",
required: true,
label: "转介续费返佣", label: "转介续费返佣",
align: "left", align: "left",
field: (row) => row.TransIntroductceReNewRatio field: (row) => row.TransIntroductceReNewRatio
}, },
{ {
name: "InnerRecommendRatio", name: "InnerRecommendRatio",
required: true,
label: "内推返佣", label: "内推返佣",
align: "left", align: "left",
field: (row) => row.InnerRecommendRatio field: (row) => row.InnerRecommendRatio
}, },
{ {
name: "InnerRecommendReNewRatio", name: "InnerRecommendReNewRatio",
required: true,
label: "内推续费返佣", label: "内推续费返佣",
align: "left", align: "left",
field: (row) => row.InnerRecommendReNewRatio field: (row) => row.InnerRecommendReNewRatio
}, },
{ {
name: "B2CRbRatio", name: "B2CRbRatio",
required: true,
label: "直客返佣", label: "直客返佣",
align: "left", align: "left",
field: (row) => row.B2CRbRatio field: (row) => row.B2CRbRatio
}, },
{ {
name: "B2CRNRatio", name: "B2CRNRatio",
required: true,
label: "直客续费返佣", label: "直客续费返佣",
align: "left", align: "left",
field: (row) => row.B2CRNRatio field: (row) => row.B2CRNRatio
...@@ -361,12 +349,7 @@ ...@@ -361,12 +349,7 @@
}, },
], ],
//表格可见列 //表格可见列
visibleColumns: [ visibleColumns: [], //可见列
'Name', 'ProductTypeName', 'StudyCountryName', 'Type', 'SuggestPrice', 'SellPrice', "PreferentialList",
"PreferentialListSellCommission",
"PreferentialListB2BCommission",
"EducationCommission", 'SaleStateName', 'Id',
], //可见列
PageCount: 0, PageCount: 0,
showForm: false, //是否显示报价单弹窗 showForm: false, //是否显示报价单弹窗
isShowOrderForm: false, //是否显示订单弹窗 isShowOrderForm: false, //是否显示订单弹窗
...@@ -384,6 +367,24 @@ ...@@ -384,6 +367,24 @@
if (this.$route.query.Name) { if (this.$route.query.Name) {
this.msg.Name = this.$route.query.Name; this.msg.Name = this.$route.query.Name;
} }
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList;
var isShowPrice=false;
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach((x) => {
if (x.FunctionCode == "IsShow_AbroadPrice") {
isShowPrice = true;
}
});
}
if(isShowPrice){
this.visibleColumns = ['Name', 'ProductTypeName', 'StudyCountryName', 'Type', 'SellPrice', 'B2CRatio', 'B2CReNewRatio',
'B2BRebateRatio', 'B2BReNewRatio', 'SchoolRebateRatio', 'SchoolReNewRatio', 'TransIntroductceRatio', 'TransIntroductceReNewRatio',
'InnerRecommendRatio', 'InnerRecommendReNewRatio', "B2CRbRatio","B2CRNRatio","SaleStateName"]
}else{
this.visibleColumns = ['Name', 'ProductTypeName', 'StudyCountryName', 'Type', 'SaleStateName']
}
console.log(isShowPrice,'isShowPrice');
}, },
methods: { methods: {
cloStudyform() { cloStudyform() {
......
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