Commit 0d238253 authored by zhengke's avatar zhengke

修改

parent cba62a46
......@@ -128,7 +128,7 @@
</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">
separator="none" :data="data" :columns="columns" :visible-columns="visibleColumns" row-key="name">
<template v-slot:top>
<div class="col-2 q-table__title">课程报价表</div>
<q-space />
......@@ -304,6 +304,8 @@
getCourseSubject
} from "../../api/course/index";
import quotationForm from '../../components/sale/quotation-form'
import { mapState } from "vuex";
export default {
meta: {
title: "课程预览"
......@@ -333,35 +335,30 @@
},
{
name: "CourseSubjectName",
required: true,
label: "所属科目",
align: "left",
field: (row) => row.CourseSubjectName,
},
{
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)
......@@ -375,14 +372,12 @@
// },
{
name: "PreferentialListSellCommission",
required: true,
label: "销售佣金",
align: "left",
field: row => row.PreferentialList
},
{
name: "PreferentialListB2BCommission",
required: true,
label: "同行佣金",
align: "left",
field: row => row.PreferentialList
......@@ -391,21 +386,18 @@
{
name: "B2CRatio",
required: true,
label: "直客优惠比例",
align: "left",
field: (row) => row.B2CRatio
},
{
name: "B2CReNewRatio",
required: true,
label: "直客优惠续费比例",
align: "left",
field: (row) => row.B2CReNewRatio
},
{
name: "CommissionReType",
required: true,
label: "返佣类型",
align: "left",
field: (row) => row.CommissionReType
......@@ -413,70 +405,60 @@
{
name: "B2BRebateRatio",
required: true,
label: "一般同行返佣比例",
align: "left",
field: (row) => row.B2BRebateRatio
},
{
name: "B2BReNewRatio",
required: true,
label: "一般同行续费返佣比例",
align: "left",
field: (row) => row.B2BReNewRatio
},
{
name: "SchoolRebateRatio",
required: true,
label: "校园同行返佣比例",
align: "left",
field: (row) => row.SchoolRebateRatio
},
{
name: "SchoolReNewRatio",
required: true,
label: "校园同行续费返佣比例",
align: "left",
field: (row) => row.SchoolReNewRatio
},
{
name: "TransIntroductceRatio",
required: true,
label: "转介返佣比例",
align: "left",
field: (row) => row.TransIntroductceRatio
},
{
name: "TransIntroductceReNewRatio",
required: true,
label: "转介续费返佣比例",
align: "left",
field: (row) => row.TransIntroductceReNewRatio
},
{
name: "InnerRecommendRatio",
required: true,
label: "内推返佣比例",
align: "left",
field: (row) => row.InnerRecommendRatio
},
{
name: "InnerRecommendReNewRatio",
required: true,
label: "内推续费返佣比例",
align: "left",
field: (row) => row.InnerRecommendReNewRatio
},
{
name: "B2CRbRatio",
required: true,
label: "直客返佣",
align: "left",
field: (row) => row.B2CRbRatio
},
{
name: "B2CRNRatio",
required: true,
label: "直客续费返佣",
align: "left",
field: (row) => row.B2CRNRatio
......@@ -508,6 +490,8 @@
align: "left"
}
],
//表格可见列
visibleColumns: [],
msg: {
pageIndex: 1,
pageSize: 12,
......@@ -523,6 +507,26 @@
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() {
this.queryCourseSubject()
this.currentUrl = this.$route.path;
......
......@@ -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.EndOrderTime}}</span></div>
</div>
<div class="d4">
<div class="d4" v-if="isHavePriceView">
<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
......@@ -324,6 +324,7 @@
getCourseSubject
} from '../../api/course/index'
import editorderForm from '../../components/sale/editorder-form' //修改订单
import { mapState } from "vuex";
export default {
meta: {
......@@ -389,6 +390,20 @@
var currentDay = year + '-' + month + '-' + day;
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() {
this.getList();
},
......
......@@ -250,84 +250,72 @@
},
{
name: "B2CRatio",
required: true,
label: "直客优惠",
align: "left",
field: (row) => row.B2CRatio
},
{
name: "B2CReNewRatio",
required: true,
label: "直客优惠续费",
align: "left",
field: (row) => row.B2CReNewRatio
},
{
name: "B2BRebateRatio",
required: true,
label: "一般同行返佣",
align: "left",
field: (row) => row.B2BRebateRatio
},
{
name: "B2BReNewRatio",
required: true,
label: "一般同行续费返佣",
align: "left",
field: (row) => row.B2BReNewRatio
},
{
name: "SchoolRebateRatio",
required: true,
label: "校园同行返佣",
align: "left",
field: (row) => row.SchoolRebateRatio
},
{
name: "SchoolReNewRatio",
required: true,
label: "校园同行续费返佣",
align: "left",
field: (row) => row.SchoolReNewRatio
},
{
name: "TransIntroductceRatio",
required: true,
label: "转介返佣",
align: "left",
field: (row) => row.TransIntroductceRatio
},
{
name: "TransIntroductceReNewRatio",
required: true,
label: "转介续费返佣",
align: "left",
field: (row) => row.TransIntroductceReNewRatio
},
{
name: "InnerRecommendRatio",
required: true,
label: "内推返佣",
align: "left",
field: (row) => row.InnerRecommendRatio
},
{
name: "InnerRecommendReNewRatio",
required: true,
label: "内推续费返佣",
align: "left",
field: (row) => row.InnerRecommendReNewRatio
},
{
name: "B2CRbRatio",
required: true,
label: "直客返佣",
align: "left",
field: (row) => row.B2CRbRatio
},
{
name: "B2CRNRatio",
required: true,
label: "直客续费返佣",
align: "left",
field: (row) => row.B2CRNRatio
......@@ -361,12 +349,7 @@
},
],
//表格可见列
visibleColumns: [
'Name', 'ProductTypeName', 'StudyCountryName', 'Type', 'SuggestPrice', 'SellPrice', "PreferentialList",
"PreferentialListSellCommission",
"PreferentialListB2BCommission",
"EducationCommission", 'SaleStateName', 'Id',
], //可见列
visibleColumns: [], //可见列
PageCount: 0,
showForm: false, //是否显示报价单弹窗
isShowOrderForm: false, //是否显示订单弹窗
......@@ -384,6 +367,24 @@
if (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: {
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