Commit 6dc4cc0d authored by 罗超's avatar 罗超

1

parent 450fc143
......@@ -381,7 +381,6 @@
}).then(res => {
if (res.Code == 1) {
var tempData = res.Data.OrderInfo;
console.log('tagtempData', tempData)
this.OrderMsg.ClassId = tempData.ClassId;
this.OrderMsg.GuestNum = tempData.GuestNum;
this.OrderMsg.Unit_Price = tempData.Unit_Price;
......@@ -468,7 +467,7 @@
if(this.saveObj.B2CReNewRatio){
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio
}
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj.B2CRatio }%`; //备注
this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj.B2CRatio }%`; //备注
}
this.OrderMsg.DiscountMoney=this.OrderMsg.Class_Price*this.OrderMsg.GuestNum*(this.OrderMsg.B2CRatio>1?this.OrderMsg.B2CRatio/100:this.OrderMsg.B2CRatio)
this.IsShowEditOrder = true;
......@@ -554,27 +553,27 @@
}
//插班报名计算应收
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 == 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;
}
}
// 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;
// }
// }
setClassOrder(this.OrderMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
......
......@@ -12,7 +12,7 @@
</div>
<div class="col-2">
<q-toggle
v-model="OrderMsg.isChaBan"
v-model="OrderMsg.IsChaBan"
:true-value="1"
:false-value="0"
label="插班报入"
......@@ -414,7 +414,6 @@ export default {
StuIds: "",
// NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额
isChaBan: 0,
},
Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价
......@@ -430,8 +429,6 @@ export default {
};
},
created() {
//HK2021-08-06新增
if (this.saveObj && this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId;
}
......@@ -439,7 +436,7 @@ export default {
this.getEmployee();
this.initConfig();
this.getSelectClass();
this.getCustomerList();
// this.getCustomerList();
},
mounted() {
this.initData();
......@@ -654,10 +651,10 @@ export default {
this.calcPrice();
if (this.stuData.RenewNum > 0) {
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj
.B2CRatio ?? 0}%;直客续费优惠比例${this.saveObj.B2CReNewRatio ?? 0}%`; //备注
this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj
.B2CRatio ?? 0}%;续费优惠比例${this.saveObj.B2CReNewRatio ?? 0}%`; //备注
} else {
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj
this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj
.B2CRatio ?? 0}%`; //备注
}
},
......@@ -724,7 +721,8 @@ export default {
//修改订单
saveOrderInfo() {
//插班验证课程和生效时间
if (this.OrderMsg.isChaBan == 1) {
console.log(783,this.OrderMsg)
if (this.OrderMsg.IsChaBan == 1) {
this.$refs.CourseId.validate();
this.$refs.EffectTime.validate();
if (this.$refs.CourseId.hasError) {
......
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