Commit 875de38a authored by Mac's avatar Mac

修改留学

parent d794d30e
......@@ -150,6 +150,17 @@ export function saveBatchStudyAbroad(data) {
data
})
}
/**
* 批量更新留学就业优惠信息
*/
export function setStudyAbroadPrice(data) {
return request({
url: '/StudyAbroad/SetStudyAbroadPrice',
method: 'post',
data
})
}
/**
......
<style>
.coursePrice_table th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.coursePrice_table tr {
height: 45px;
}
.course_Line {
width: 3px;
height: 10px;
display: inline-block;
background-color: #3FC4FF;
margin-right: 5px;
}
</style>
<template>
<q-dialog v-model="persistent" persistent content-class="bg-grey-1" transition-show="scale" transition-hide="scale">
<q-card style="width: 900px;max-width:900px;">
<q-card-section>
<div class="text-h6">设置{{Type==1?'留学':'就业'}}价格</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="text-caption q-mb-lg text-grey-6">
<span class="course_Line"></span>
基础价格设置
</div>
<div>
<table style="margin-left:10px;">
<tr>
<td style="width:70px;text-align:right;">
卖价
</td>
<td colspan="2">
<q-input filled stack-label maxlength="8" style="padding-bottom:0;width:390px;margin-left:10px;" dense
v-model="priceObj.courseObj.SellPrice" ref="SellPrice" label="卖价"
@keyup.native="checkPrice(priceObj.courseObj, 'SellPrice')" :rules="[val => !!val || '请填写卖价']" />
</td>
</tr>
</table>
</div>
<div class="text-caption q-mb-lg q-mt-lg text-grey-6">
<span class="course_Line"></span>
优惠
</div>
<table style="border-collapse: collapse;width:100%;" class="coursePrice_table">
<tr style="height:40px;">
<th>
优惠
</th>
<th>
首次报名优惠
</th>
<th>首次优惠价</th>
<th>
续费报名优惠
</th>
<th>续费优惠价</th>
</tr>
<tr>
<td style="width:70px;">
直客优惠
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2CRatio" ref="B2CRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2CRatio'),getPrePrice(1)" suffix="%" />
</td>
<td style="width:150px;text-align:center;">
{{getPrePrice(1)}}
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2CReNewRatio" ref="B2CReNewRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2CReNewRatio'),getPrePrice(2)" suffix="%" />
</td>
<td style="width:150px;text-align:center;">
{{getPrePrice(2)}}
</td>
</tr>
</table>
<div class="text-caption q-mb-lg q-mt-lg text-grey-6 row wrap" style="align-items:center;">
<div>
<span class="course_Line"></span>
返佣
</div>
<q-select style="width:200px;margin-left:35px;" filled dense v-model="priceObj.courseObj.CommissionReType"
:options="CommissionList" emit-value map-options option-value="Id" option-label="Name" label="返佣类型" />
</div>
<table style="border-collapse: collapse;" class="coursePrice_table">
<tr style="height:40px;">
<th>同行
</th>
<th>
首报名返佣比例
</th>
<th v-if="priceObj.courseObj.CommissionReType==1">
首报返佣值
</th>
<th>
返佣设置
</th>
<th>
续费报名返佣比例
</th>
<th v-if="priceObj.courseObj.CommissionReType==1">
续费返佣值
</th>
<th>
返佣设置
</th>
</tr>
<tr>
<td style="width:70px;">
同行返佣
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2BRebateRatio" ref="B2BRebateRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2BRebateRatio'),getShouBAO(3)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center;width:100px;" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(3)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.B2BRebateRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.B2BRebateRatioType==3"
style="width:75px;margin-left:5px;" filled stack-label dense
v-model="priceObj.courseObj.B2BRebateRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'B2BRebateRatioValue')" />
</div>
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2BReNewRatio" ref="B2BReNewRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2BReNewRatio'),getShouBAO(4)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center;width:100px;" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(4)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.B2BReNewRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.B2BReNewRatioType==3"
style="width:75px;margin-left:5px;" filled stack-label dense
v-model="priceObj.courseObj.B2BReNewRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'B2BReNewRatioValue')" />
</div>
</td>
</tr>
<tr>
<td>
校代返佣
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.SchoolRebateRatio" ref="SchoolRebateRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'SchoolRebateRatio'),getShouBAO(5)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center;" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(5)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.SchoolRebateRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.SchoolRebateRatioType==3"
style="width:75px;margin-left:5px;" filled stack-label dense
v-model="priceObj.courseObj.SchoolRebateRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'SchoolRebateRatioValue')" />
</div>
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.SchoolReNewRatio" ref="SchoolReNewRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'SchoolReNewRatio'),getShouBAO(6)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center;" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(6)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.SchoolReNewRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.SchoolReNewRatioType==3" filled stack-label
style="width:75px;margin-left:5px;" dense
@keyup.native="checkPrice(priceObj.courseObj, 'SchoolReNewRatioValue')"
v-model="priceObj.courseObj.SchoolReNewRatioValue" />
</div>
</td>
</tr>
<tr>
<td>
学员转介返佣
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.TransIntroductceRatio"
ref="TransIntroductceRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'TransIntroductceRatio'),getShouBAO(7)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(7)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.TransIntroductceRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.TransIntroductceRatioType==3" filled stack-label dense
style="width:75px;margin-left:5px;"
@keyup.native="checkPrice(priceObj.courseObj, 'TransIntroductceRatioValue')"
v-model="priceObj.courseObj.TransIntroductceRatioValue" />
</div>
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.TransIntroductceReNewRatio"
ref="TransIntroductceReNewRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'TransIntroductceReNewRatio'),getShouBAO(8)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(8)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.TransIntroductceReNewRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.TransIntroductceReNewRatioType==3" filled stack-label
dense style="width:75px;margin-left:5px;"
@keyup.native="checkPrice(priceObj.courseObj, 'TransIntroductceReNewRatioValue')"
v-model="priceObj.courseObj.TransIntroductceReNewRatioValue" />
</div>
</td>
</tr>
<tr>
<td>
内推返佣
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.InnerRecommendRatio"
ref="InnerRecommendRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'InnerRecommendRatio'),getShouBAO(9)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(9)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.InnerRecommendRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-6" v-if="priceObj.courseObj.InnerRecommendRatioType==3" filled stack-label dense
v-model="priceObj.courseObj.InnerRecommendRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'InnerRecommendRatioValue')"
style="width:75px;margin-left:5px;" />
</div>
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.InnerRecommendReNewRatio"
ref="InnerRecommendReNewRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'InnerRecommendReNewRatio'),getShouBAO(10)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(10)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.InnerRecommendReNewRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.InnerRecommendReNewRatioType==3" filled stack-label
dense v-model="priceObj.courseObj.InnerRecommendReNewRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'InnerRecommendReNewRatioValue')"
style="width:75px;margin-left:5px;" />
</div>
</td>
</tr>
<tr>
<td>
直客返佣
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2CRbRatio" ref="B2CRbRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2CRbRatio'),getShouBAO(11)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(11)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.B2CRbRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-6" v-if="priceObj.courseObj.B2CRbRatioType==3" filled stack-label dense
v-model="priceObj.courseObj.B2CRbRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'B2CRbRatioValue')"
style="width:75px;margin-left:5px;" />
</div>
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2CRNRatio" ref="B2CRNRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2CRNRatio'),getShouBAO(12)" :suffix="priceObj.courseObj.CommissionReType==1?'%':''" />
</td>
<td style="text-align:center" v-if="priceObj.courseObj.CommissionReType==1">
{{getShouBAO(12)}}
</td>
<td style="width:200px;">
<div class="row wrap">
<q-select class="col-7" filled dense v-model="priceObj.courseObj.B2CRNRatioType"
:options="CourseRebateList" emit-value map-options option-value="Id" option-label="Name"
label="返佣设置" />
<q-input class="col-5" v-if="priceObj.courseObj.B2CRNRatioType==3" filled stack-label dense
v-model="priceObj.courseObj.B2CRNRatioValue"
@keyup.native="checkPrice(priceObj.courseObj, 'B2CRNRatioValue')"
style="width:75px;margin-left:5px;" />
</div>
</td>
</tr>
</table>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
@click="saveCourse" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
queryCoursePreferentialType,
GetCourseRebateSetList
} from "../../api/course/index";
import {
queryStudyAbroadInfo,
setStudyAbroadPrice,
} from "../../api/studyabroad/index";
export default {
components: {},
props: {
saveObj: {
type: Object,
default: null
},
Type: {
type: Number,
default: null
}
},
data() {
return {
persistent: true,
optionTitle: "",
saveCourseLoading: false,
//价格对象
priceObj: {
courseObj: {
Id: 0, //课程编号
SuggestPrice: 0, //原价
SellPrice: 0, //售价
CommissionReType: 1, //返佣类型(1比例返佣,2-固定金额返佣)
B2CRatio: 0, //直客首次报名优惠比例
B2CReNewRatio: 0, //直客续费优惠比例
B2BRebateRatio: 0, //一般同行首次报名返佣比例
B2BRebateRatioType: 1,
B2BRebateRatioValue: '',
B2BReNewRatio: 0, //一般同行续费返佣比例
B2BReNewRatioType: 1,
B2BReNewRatioValue: '',
SchoolRebateRatio: 0, //校代同行首次返佣比例
SchoolRebateRatioType: 1,
SchoolRebateRatioValue: '',
SchoolReNewRatio: 0, //校代同行续费返佣比例
SchoolReNewRatioType: 1,
SchoolReNewRatioValue: '',
TransIntroductceRatio: 0, //转介首次报名返佣比例
TransIntroductceRatioType: 1,
TransIntroductceRatioValue: '',
TransIntroductceReNewRatio: 0, //转介续费返佣比例
TransIntroductceReNewRatioType: 1,
TransIntroductceReNewRatioValue: '',
InnerRecommendRatio: 0, //內推首次报名返佣比例
InnerRecommendRatioType: 1,
InnerRecommendRatioValue: '',
InnerRecommendReNewRatio: 0, //內推续费返佣比例
InnerRecommendReNewRatioType: 1,
InnerRecommendReNewRatioValue: '',
B2CRbRatio: 0, //直客首次报名返佣比例
B2CRbRatioType: 1, //直客首次报名返佣类型
B2CRbRatioValue: "", // 直客首次报名返佣类型值
B2CRNRatio: 0, //直客续费返佣比例
B2CRNRatioType: 1, //直客续费返佣类型
B2CRNRatioValue: "", //直客续费返佣类型值
},
},
CourseRebateList: [],
priceTypeList: [], //优惠类型列表
CommissionList: [{
Id: 1,
Name: '比例返佣'
}, {
Id: 2,
Name: '固定金额返佣'
}]
};
},
created() {
this.getTypeList();
this.getFanyong();
},
mounted() {
this.initObj();
},
methods: {
//获取返佣设置下拉
getFanyong() {
GetCourseRebateSetList().then(res => {
if (res.Code == 1) {
this.CourseRebateList = res.Data;
}
});
},
//获取优惠类型列表
getTypeList() {
queryCoursePreferentialType().then(res => {
this.priceTypeList = res.Data;
});
},
//新增价格
addPrice() {
var currentObj = {
Id: 0, //主键编号
CourseId: 0, //课程编号
PreferentialTerms: "", //优惠条件
SaleCommissionType: 0, //销售返佣类型(0-百分比,1-固定金额)
SaleCommissionMoney: 0, //销售返佣
B2BCommissionType: 0, //同行返佣类型(0-百分比,1-固定金额)
B2BCommissionMoney: 0, //同行返佣
EduCommissionType: 0, //教育返佣类型
EduCommissionMoney: 0, //教育同行佣金
PriceDiscountType: 0, //课程价格优惠类型(见枚举)
BuyNum: 0, //购买人数
SendNum: 0, //赠送人数
PriceType: 0, //优惠价格类型(0-百分比,1-固定金额)
PriceMoney: 0 //优惠金额
};
},
//删除价格
//初始化表单
initObj() {
console.log(this.saveObj)
if (this.saveObj && this.saveObj.Id > 0) {
queryStudyAbroadInfo({
Id: this.saveObj.Id,
IsGetPrice: 1
}).then(res => {
this.priceObj.courseObj.Id = res.Data.Id;
this.priceObj.courseObj.SuggestPrice = res.Data.SuggestPrice;
this.priceObj.courseObj.SellPrice = res.Data.SellPrice;
this.priceObj.courseObj.CommissionReType = res.Data.CommissionReType;
this.priceObj.courseObj.B2CRatio = res.Data.B2CRatio;
this.priceObj.courseObj.B2CRatioType = res.Data.B2CRatioType;
this.priceObj.courseObj.B2CRatioValue = res.Data.B2CRatioValue;
this.priceObj.courseObj.B2CReNewRatio = res.Data.B2CReNewRatio;
this.priceObj.courseObj.B2CReNewRatioType = res.Data.B2CReNewRatioType;
this.priceObj.courseObj.B2CReNewRatioValue = res.Data.B2CReNewRatioValue;
this.priceObj.courseObj.B2BRebateRatio = res.Data.B2BRebateRatio;
this.priceObj.courseObj.B2BRebateRatioType = res.Data.B2BRebateRatioType;
this.priceObj.courseObj.B2BRebateRatioValue = res.Data.B2BRebateRatioValue;
this.priceObj.courseObj.B2BReNewRatio = res.Data.B2BReNewRatio;
this.priceObj.courseObj.B2BReNewRatioType = res.Data.B2BReNewRatioType;
this.priceObj.courseObj.B2BReNewRatioValue = res.Data.B2BReNewRatioValue;
this.priceObj.courseObj.SchoolRebateRatio = res.Data.SchoolRebateRatio;
this.priceObj.courseObj.SchoolRebateRatioType = res.Data.SchoolRebateRatioType;
this.priceObj.courseObj.SchoolRebateRatioValue = res.Data.SchoolRebateRatioValue;
this.priceObj.courseObj.SchoolReNewRatio = res.Data.SchoolReNewRatio;
this.priceObj.courseObj.SchoolReNewRatioType = res.Data.SchoolReNewRatioType;
this.priceObj.courseObj.SchoolReNewRatioValue = res.Data.SchoolReNewRatioValue;
this.priceObj.courseObj.TransIntroductceRatio = res.Data.TransIntroductceRatio;
this.priceObj.courseObj.TransIntroductceRatioType = res.Data.TransIntroductceRatioType;
this.priceObj.courseObj.TransIntroductceRatioValue = res.Data.TransIntroductceRatioValue;
this.priceObj.courseObj.TransIntroductceReNewRatio = res.Data.TransIntroductceReNewRatio;
this.priceObj.courseObj.TransIntroductceReNewRatioType = res.Data.TransIntroductceReNewRatioType;
this.priceObj.courseObj.TransIntroductceReNewRatioValue = res.Data.TransIntroductceReNewRatioValue;
this.priceObj.courseObj.InnerRecommendRatio = res.Data.InnerRecommendRatio;
this.priceObj.courseObj.InnerRecommendRatioType = res.Data.InnerRecommendRatioType;
this.priceObj.courseObj.InnerRecommendRatioValue = res.Data.InnerRecommendRatioValue;
this.priceObj.courseObj.InnerRecommendReNewRatio = res.Data.InnerRecommendReNewRatio;
this.priceObj.courseObj.InnerRecommendReNewRatioType = res.Data.InnerRecommendReNewRatioType;
this.priceObj.courseObj.InnerRecommendReNewRatioValue = res.Data.InnerRecommendReNewRatioValue;
this.priceObj.courseObj.B2CRbRatio = res.Data.B2CRbRatio;
this.priceObj.courseObj.B2CRbRatioType = res.Data.B2CRbRatioType;
this.priceObj.courseObj.B2CRbRatioValue = res.Data.B2CRbRatioValue;
this.priceObj.courseObj.B2CRNRatio = res.Data.B2CRNRatio;
this.priceObj.courseObj.B2CRNRatioType = res.Data.B2CRNRatioType;
this.priceObj.courseObj.B2CRNRatioValue = res.Data.B2CRNRatioValue;
});
} else {
this.optionTitle = "新增课程优惠信息";
this.priceObj.courseObj.Id = 0;
this.priceObj.courseObj.SuggestPrice = 0;
this.priceObj.courseObj.SellPrice = 0;
}
},
//关闭弹窗
closeCourseForm() {
this.$emit("close");
this.persistent = false;
},
//保存菜单
saveCourse() {
this.$refs.SellPrice.validate();
if (!this.$refs.SellPrice.hasError) {
this.saveCourseLoading = true;
let msg = this.priceObj.courseObj
setStudyAbroadPrice(msg)
.then(res => {
this.saveCourseLoading = false;
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("success");
this.closeSaveForm();
})
.catch(() => {
this.saveCourseLoading = false;
});
}
},
//获取首次报名优惠
getPrePrice(type) {
//首次优惠
var Count = ''
if (type == 1) {
if (this.priceObj.courseObj.B2CRatio) {
let num = Number(100 - this.priceObj.courseObj.B2CRatio) / 100;
Count = (num * this.priceObj.courseObj.SellPrice).toFixed(2);
}
}
if (type == 2) {
if (this.priceObj.courseObj.B2CReNewRatio) {
let num = Number(100 - this.priceObj.courseObj.B2CReNewRatio) / 100;
Count = (num * this.priceObj.courseObj.SellPrice).toFixed(2);
}
}
return Count;
},
//获取首报返佣比例
getShouBAO(type) {
//首次优惠
var Count = ''
var currentPrice = Number(100 - this.priceObj.courseObj.B2CRatio) * this.priceObj.courseObj.SellPrice / 100;
var currrntXufei = Number(100 - this.priceObj.courseObj.B2CReNewRatio) * this.priceObj.courseObj.SellPrice / 100;
if (type == 3) {
if (this.priceObj.courseObj.B2BRebateRatio) {
let num = currentPrice * Number(this.priceObj.courseObj.B2BRebateRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 4) {
if (this.priceObj.courseObj.B2BReNewRatio) {
let num = currrntXufei * Number(this.priceObj.courseObj.B2BReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 5) {
if (this.priceObj.courseObj.SchoolRebateRatio) {
let num = currentPrice * Number(this.priceObj.courseObj.SchoolRebateRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 6) {
if (this.priceObj.courseObj.SchoolReNewRatio) {
let num = currrntXufei * Number(this.priceObj.courseObj.SchoolReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 7) {
if (this.priceObj.courseObj.TransIntroductceRatio) {
let num = currentPrice * Number(this.priceObj.courseObj.TransIntroductceRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 8) {
if (this.priceObj.courseObj.TransIntroductceReNewRatio) {
let num = currrntXufei * Number(this.priceObj.courseObj.TransIntroductceReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 9) {
if (this.priceObj.courseObj.InnerRecommendRatio) {
let num = currentPrice * Number(this.priceObj.courseObj.InnerRecommendRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 10) {
if (this.priceObj.courseObj.InnerRecommendReNewRatio) {
let num = currrntXufei * Number(this.priceObj.courseObj.InnerRecommendReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 11) {
if (this.priceObj.courseObj.B2CRbRatio) {
let num = currentPrice * Number(this.priceObj.courseObj.B2CRbRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if (type == 12) {
if (this.priceObj.courseObj.B2CRNRatio) {
let num = currrntXufei * Number(this.priceObj.courseObj.B2CRNRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
}
}
};
</script>
......@@ -58,7 +58,45 @@
<q-td key="SellPrice" :props="props">
{{props.row.SellPrice}}
</q-td>
<q-td key="PreferentialList" style="padding-right:0px">
<q-td key="B2CRatio" :props="props">
{{props.row.B2CRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="B2CReNewRatio" :props="props">
{{props.row.B2CReNewRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="B2BRebateRatio" :props="props">
{{props.row.B2BRebateRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="B2BReNewRatio" :props="props">
{{props.row.B2BReNewRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="SchoolRebateRatio" :props="props">
{{props.row.SchoolRebateRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="SchoolReNewRatio" :props="props">
{{props.row.SchoolReNewRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="TransIntroductceRatio" :props="props">
{{props.row.TransIntroductceRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="TransIntroductceReNewRatio" :props="props">
{{props.row.TransIntroductceReNewRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="InnerRecommendRatio" :props="props">
{{props.row.InnerRecommendRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="InnerRecommendReNewRatio" :props="props">
{{props.row.InnerRecommendReNewRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="B2CRbRatio" :props="props">
{{props.row.B2CRbRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<q-td key="B2CRNRatio" :props="props">
{{props.row.B2CRNRatio}}{{props.row.CommissionReType==1?'%':''}}
</q-td>
<!-- <q-td key="PreferentialList" style="padding-right:0px">
<div v-for="(x,index) in props.row.PreferentialList" :key="index">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }}
......@@ -95,8 +133,8 @@
<div v-if="! props.row.PreferentialList || props.row.PreferentialList.length == 0">
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
<q-td key="PreferentialListSellCommission" style="padding-right:0px;padding-left:0px">
</q-td> -->
<!-- <q-td key="PreferentialListSellCommission" style="padding-right:0px;padding-left:0px">
<div v-for="(x,index) in props.row.PreferentialListSellCommission" :key="index">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }" v-if="x.PriceDiscountType != 0">
......@@ -112,8 +150,8 @@
v-if="!props.row.PreferentialListSellCommission || props.row.PreferentialListSellCommission.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
<q-td key="PreferentialListB2BCommission" style="padding-left:0px">
</q-td> -->
<!-- <q-td key="PreferentialListB2BCommission" style="padding-left:0px">
<div v-for="(x,index) in props.row.PreferentialListB2BCommission" :key="index">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
......@@ -129,8 +167,8 @@
v-if="!props.row.PreferentialListB2BCommission || props.row.PreferentialListB2BCommission.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
<q-td key="EducationCommission" style="padding-left:0px">
</q-td> -->
<!-- <q-td key="EducationCommission" style="padding-left:0px">
<div v-for="(x,index) in props.row.EducationCommission" :key="index">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.EduCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
......@@ -145,7 +183,7 @@
<div v-if="!props.row.EducationCommission || props.row.EducationCommission.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</q-td> -->
<q-td key="SaleStateName">
<template v-if="props.row.SaleState==1">
{{props.row.SaleStateName}}
......@@ -158,13 +196,15 @@
<q-td key="Id" style="width:200px;">
<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-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup @click="EditStudyPrice(props.row)">
<!-- <q-item clickable v-close-popup @click="EditStudyPrice(props.row)">
<q-item-section>
<q-item-label>价格设置</q-item-label>
</q-item-section>
</q-item>
</q-item> -->
<q-item clickable v-close-popup
v-if="props.row.SaleState==1||props.row.SaleState==4||props.row.SaleState==5"
@click="applyApply(props.row,2)">
......@@ -220,7 +260,7 @@
@success="refreshPage">
</studyAbroad-form>
<studyAbroadprice-form v-if="isShowStudyPrice" :save-obj="studyObj" :Type="1" @close="closeStudyForm"
@success="refreshPage">
@success="refreshPage(),isShowStudyPrice=false">
</studyAbroadprice-form>
<studyproauditinfo-form v-if="isShowInfo" :Id="studyObj.Id" @close="closeStudyForm"></studyproauditinfo-form>
</div>
......@@ -235,7 +275,8 @@
deleteStudyAbroad
} from '../../api/studyabroad/index'
import studyAbroadForm from '../../components/studyAbroad/studyAbroad-form'
import studyAbroadpriceForm from '../../components/studyAbroad/studyAbroadprice-form'
// import studyAbroadpriceForm from '../../components/studyAbroad/studyAbroadprice-form'
import studyAbroadpriceForm from '../../components/studyAbroad/newstudyAbroadprice-form'
import studyproauditinfoForm from '../../components/studyAbroad/studyproauditinfo-form'
import {
mapState
......@@ -299,48 +340,132 @@
field: 'SchoolName',
align: 'left'
},
{
name: 'SuggestPrice',
label: '建议卖价',
field: 'SuggestPrice',
align: 'left',
field: row => row.SuggestPrice.toFixed(2)
},
// {
// name: 'SuggestPrice',
// label: '建议卖价',
// field: 'SuggestPrice',
// align: 'left',
// field: row => row.SuggestPrice.toFixed(2)
// },
{
name: 'SellPrice',
label: '实际卖价',
field: 'SellPrice',
align: 'left',
field: row => row.SellPrice.toFixed(2)
},
{
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: "PreferentialList",
name: "InnerRecommendRatio",
required: true,
label: "优惠政策",
label: "内推返佣",
align: "left",
field: row => row.PreferentialList
field: (row) => row.InnerRecommendRatio
},
{
name: "PreferentialListSellCommission",
name: "InnerRecommendReNewRatio",
required: true,
label: "销售佣金",
label: "内推续费返佣",
align: "left",
field: row => row.PreferentialList
field: (row) => row.InnerRecommendReNewRatio
},
{
name: "PreferentialListB2BCommission",
name: "B2CRbRatio",
required: true,
label: "同行佣金",
label: "直客返佣",
align: "left",
field: row => row.PreferentialList
field: (row) => row.B2CRbRatio
},
{
name: "EducationCommission",
name: "B2CRNRatio",
required: true,
label: "教育同行佣金",
label: "直客续费返佣",
align: "left",
field: row => row.PreferentialList
field: (row) => row.B2CRNRatio
},
// {
// 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: "EducationCommission",
// required: true,
// label: "教育同行佣金",
// align: "left",
// field: row => row.PreferentialList
// },
{
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