Commit 71a64ded authored by zhengke's avatar zhengke
parents c60b6eac 4da93ae0
<style>
.coursePrice_table th{
.coursePrice_table th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.coursePrice_table tr{
height:45px;
.coursePrice_table tr {
height: 45px;
}
.course_Line{
.course_Line {
width: 3px;
height: 10px;
display: inline-block;
......@@ -32,8 +34,8 @@
卖价
</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="卖价"
<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>
......@@ -78,7 +80,7 @@
</tr>
</table>
<div class="text-caption q-mb-lg q-mt-lg text-grey-6">
<span class="course_Line"></span>
<span class="course_Line"></span>
返佣
</div>
<table style="border-collapse: collapse;" class="coursePrice_table">
......@@ -103,8 +105,8 @@
一般同行
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.B2BRebateRatio"
ref="B2BRebateRatio" @keyup.native="checkPrice(priceObj.courseObj, 'B2BRebateRatio'),getShouBAO(3)" suffix="%" />
<q-input filled stack-label dense v-model="priceObj.courseObj.B2BRebateRatio" ref="B2BRebateRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'B2BRebateRatio'),getShouBAO(3)" suffix="%" />
</td>
<td style="text-align:center;width:100px;">
{{getShouBAO(3)}}
......@@ -122,16 +124,15 @@
校代
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.SchoolRebateRatio"
ref="SchoolRebateRatio" @keyup.native="checkPrice(priceObj.courseObj, 'SchoolRebateRatio'),getShouBAO(5)"
suffix="%" />
<q-input filled stack-label dense v-model="priceObj.courseObj.SchoolRebateRatio" ref="SchoolRebateRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'SchoolRebateRatio'),getShouBAO(5)" suffix="%" />
</td>
<td style="text-align:center;">
{{getShouBAO(5)}}
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.SchoolReNewRatio"
ref="SchoolReNewRatio" @keyup.native="checkPrice(priceObj.courseObj, 'SchoolReNewRatio'),getShouBAO(6)" suffix="%" />
<q-input filled stack-label dense v-model="priceObj.courseObj.SchoolReNewRatio" ref="SchoolReNewRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'SchoolReNewRatio'),getShouBAO(6)" suffix="%" />
</td>
<td style="text-align:center;">
{{getShouBAO(6)}}
......@@ -143,8 +144,8 @@
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.TransIntroductceRatio"
ref="TransIntroductceRatio" @keyup.native="checkPrice(priceObj.courseObj, 'TransIntroductceRatio'),getShouBAO(7)"
suffix="%" />
ref="TransIntroductceRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'TransIntroductceRatio'),getShouBAO(7)" suffix="%" />
</td>
<td style="text-align:center">
{{getShouBAO(7)}}
......@@ -164,8 +165,8 @@
</td>
<td>
<q-input filled stack-label dense v-model="priceObj.courseObj.InnerRecommendRatio"
ref="InnerRecommendRatio" @keyup.native="checkPrice(priceObj.courseObj, 'InnerRecommendRatio'),getShouBAO(9)"
suffix="%" />
ref="InnerRecommendRatio"
@keyup.native="checkPrice(priceObj.courseObj, 'InnerRecommendRatio'),getShouBAO(9)" suffix="%" />
</td>
<td style="text-align:center">
{{getShouBAO(9)}}
......@@ -359,85 +360,85 @@
}
},
//获取首次报名优惠
getPrePrice(type){
getPrePrice(type) {
//首次优惠
var Count = ''
if(type==1){
if(this.priceObj.courseObj.B2CRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
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 = parseInt(100-this.priceObj.courseObj.B2CReNewRatio)/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){
getShouBAO(type) {
//首次优惠
var Count = ''
if(type==3){
if(this.priceObj.courseObj.B2BRebateRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CRatio-this.priceObj.courseObj.B2BRebateRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
var currentPrice = Number(100 - this.priceObj.courseObj.B2CRatio) * this.priceObj.courseObj.SellPrice/100;
if (type == 3) {
if (this.priceObj.courseObj.B2BRebateRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.B2BRebateRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==4){
if(this.priceObj.courseObj.B2BReNewRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CReNewRatio-this.priceObj.courseObj.B2BReNewRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 4) {
if (this.priceObj.courseObj.B2BReNewRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.B2BReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==5){
if(this.priceObj.courseObj.SchoolRebateRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CRatio-this.priceObj.courseObj.SchoolRebateRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 5) {
if (this.priceObj.courseObj.SchoolRebateRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.SchoolRebateRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==6){
if(this.priceObj.courseObj.SchoolReNewRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CReNewRatio-this.priceObj.courseObj.SchoolReNewRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 6) {
if (this.priceObj.courseObj.SchoolReNewRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.SchoolReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==7){
if(this.priceObj.courseObj.TransIntroductceRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CRatio-this.priceObj.courseObj.TransIntroductceRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 7) {
if (this.priceObj.courseObj.TransIntroductceRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.TransIntroductceRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==8){
if(this.priceObj.courseObj.TransIntroductceReNewRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CReNewRatio-this.priceObj.courseObj.TransIntroductceReNewRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 8) {
if (this.priceObj.courseObj.TransIntroductceReNewRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.TransIntroductceReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==9){
if(this.priceObj.courseObj.InnerRecommendRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CRatio-this.priceObj.courseObj.InnerRecommendRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 9) {
if (this.priceObj.courseObj.InnerRecommendRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.InnerRecommendRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
if(type==10){
if(this.priceObj.courseObj.InnerRecommendReNewRatio){
let num = parseInt(100-this.priceObj.courseObj.B2CReNewRatio-this.priceObj.courseObj.InnerRecommendReNewRatio)/100;
Count = (num*this.priceObj.courseObj.SellPrice).toFixed(2);
if (type == 10) {
if (this.priceObj.courseObj.InnerRecommendReNewRatio) {
let num = currentPrice * Number(100 - this.priceObj.courseObj.InnerRecommendReNewRatio) / 100;
Count = num.toFixed(2);
return Count;
}
}
}
}
};
</script>
</script>
\ No newline at end of file
......@@ -83,7 +83,7 @@
label="应收" />
<q-select :disable="modityOrderType==2" standout="bg-primary text-white" option-value="Id" option-label="Name"
<q-select :disable="modityOrderType==2" filled option-value="Id" option-label="Name"
v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg"
label="客人来源" />
<q-select :disable="(modityOrderType==2)||(OrderMsg.JoinType==3)" v-model="OrderMsg.HelpEnterId"
......@@ -281,6 +281,7 @@
guestNum = Number(this.OrderMsg.GuestNum);
}
let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
//插班
if (temp) {
this.courseObj = temp;
var tempDiscountMoney = 0; //优惠金额
......@@ -334,6 +335,7 @@
}
// this.OrderMsg.SaleRemark = tempSaleRemark;
} else {
//未插班
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
......@@ -369,6 +371,7 @@
} else {
this.OrderMsg.PreferPrice = Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice;
}
//留学就业订单
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
......
......@@ -180,7 +180,7 @@
{{ item.ClassName }}
</div>
<div v-if="item.CustomerId > 0">
同行信息:{{ item.CustomerName }}{{ item.CustomerNumber }}
同行信息:{{ item.CustomerName }} <span v-if="item.CustomerNumber">-{{ item.CustomerNumber }}</span>
</div>
<div v-if="item.HelpEnterName">
协助人员:{{ item.HelpEnterName }}
......
......@@ -244,8 +244,18 @@
};
},
watch:{
dataList:{
handler(val){
console.log(201,val)
this.selection=[];
},
deep:true
}
},
created() {
this.initAuth();
},
mounted() {},
methods: {
......
......@@ -255,29 +255,6 @@
</q-item>
</template>
</q-select>
<!-- <q-select
:disable="modityOrderType == 2 || OrderMsg.JoinType == 3"
v-model="OrderMsg.CustomerId"
:options="myCustomerList"
filled
use-input
label="同行"
option-label="CustomerName"
option-value="CustomerId"
ref="CustomerName"
class="col-6 q-py-sm"
emit-value
map-options
@filter="cusfilterFn"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select> -->
<q-input
:disable="modityOrderType == 2"
v-if="OrderMsg.OrderSource == 3"
......@@ -344,7 +321,6 @@ import {
setClassOrder, //修改订单
queryChaClassInfo,
GetSelectClassOrderList, //获取前置下拉
getMyCustomerList //同行下拉
} from "../../../../api/sale/sale";
import { queryEmployee } from "../../../../api/users/user"; //获取员工
import { mapState } from "vuex";
......@@ -365,10 +341,6 @@ export default {
type: Number,
default: 0 //1-销售修改,2-OP修改,3-总经理修改
},
isChaBan: {
type: Number,
default: 0 //1-是插班报入
},
stuData: {
//学生是否续费
type: Object,
......@@ -424,8 +396,6 @@ export default {
CourseList: [], //课程列表
courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据
myCustomerList: [], //同行列表
allCustomerList: [] //所有同行列表
};
},
created() {
......@@ -436,7 +406,6 @@ export default {
this.getEmployee();
this.initConfig();
this.getSelectClass();
// this.getCustomerList();
},
mounted() {
this.initData();
......@@ -671,21 +640,6 @@ export default {
}
});
},
//筛选同行
cusfilterFn(val, update) {
update(() => {
if (val === "") {
this.myCustomerList = JSON.parse(
JSON.stringify(this.allCustomerList)
);
} else {
const needle = val.toLowerCase();
this.myCustomerList = this.allCustomerList.filter(
v => v.CustomerName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取业务员
getEmployee() {
var qMsg = {
......@@ -742,40 +696,6 @@ export default {
return;
}
}
//插班报名计算应收
// if (this.OrderMsg.IsChaBan == 1) {
// if (this.modityOrderType == 1 || this.modityOrderType == 2) {
// if (
// !this.courseObj ||
// (this.courseObj && !this.courseObj.ClassHours)
// ) {
// if (this.OrderMsg && this.OrderMsg.CourseId) {
// this.courseObj = this.CourseList.find(
// x => x.CourseId == this.OrderMsg.CourseId
// );
// }
// }
// //插班课时单价
// var classHourPrice =
// this.courseObj.SellPrice / this.courseObj.ClassHours;
// var chaBanPrice = Number(
// classHourPrice *
// (this.courseObj.ClassHours - this.OrderMsg.StartClassHours)
// ).toFixed(2);
// var newPreferPrice =
// chaBanPrice * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
// this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
// }
// }
//正常报名计算应收
// if (this.OrderMsg.IsChaBan == 0) {
// if (this.modityOrderType == 1 || this.modityOrderType == 2) {
// this.OrderMsg.PreferPrice =
// this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price -
// this.OrderMsg.LessPrice;
// }
// }
this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
this.OrderMsg.CustomerId = this.stuData.CustomerId;
setClassOrder(this.OrderMsg).then(res => {
......@@ -823,16 +743,6 @@ export default {
}
return str;
},
getCustomerList() {
getMyCustomerList({}).then(res => {
this.myCustomerList = res.Data;
this.allCustomerList = res.Data;
this.myCustomerList.unshift({
CustomerId: 0,
CustomerName: "不限"
});
});
}
}
};
</script>
......@@ -34,7 +34,7 @@
</q-select>
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name"
<q-select @input="resetSearch" filled option-value="Id" option-label="Name"
v-model="msg.BelongType" :options="BelongTypeList" emit-value map-options label="归属类型" />
</div>
</div>
......
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