Commit eee0645c authored by 黄奎's avatar 黄奎

页面修改

parent be479f43
......@@ -245,10 +245,18 @@
this.courseObj = temp;
var tempDiscountMoney = 0; //优惠金额
var tempSaleRemark = ""; //备注
//插班课时单价
var classHourPrice = temp.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(classHourPrice * (this.courseObj.ClassHours - this.OrderMsg.StartClassHours))
.toFixed(2);
if (guestNum == 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[0].PriceType == 0) {
tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100;
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney = (chaBanPrice * temp.CoursePriceList[0].PriceMoney) / 100;
} else {
tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100;
}
tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%";
} else {
tempDiscountMoney = item.CoursePriceList[0].PriceMoney;
......@@ -259,22 +267,29 @@
if (guestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) {
let DisCount = (100 - temp.CoursePriceList[1].PriceMoney) / 100;
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%";
tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[1].PriceMoney) / 100;
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney = (chaBanPrice * temp.CoursePriceList[1].PriceMoney) / 100;
} else {
tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[1].PriceMoney) / 100;
}
} else {
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
tempDiscountMoney = item.CoursePriceList[1].PriceMoney;
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
}
}
}
//计算每人优惠和总优惠
var perDiscountMoney = Number(tempDiscountMoney).toFixed(2);
this.OrderMsg.PerDiscountMoney = perDiscountMoney;
this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum;
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
//计算每人优惠和总优惠
if (this.OrderMsg.IsChaBan == 1) {
this.OrderMsg.Unit_Price = chaBanPrice;
this.UnitPrice = chaBanPrice;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
this.OrderMsg.SaleRemark = tempSaleRemark;
} else {
if (this.saveObj.ClassId) {
......@@ -301,12 +316,12 @@
if (this.OrderMsg.Unit_Price && this.OrderMsg.Unit_Price > 0) {
unit_price = Number(this.OrderMsg.Unit_Price);
}
var str = ""
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0;
if (this.courseObj && this.courseObj.CourseId && this.courseObj.CourseId > 0) {
newPreferPrice = (unit_price / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this
.OrderMsg.StartClassHours) * guestNum
newPreferPrice = chaBanPrice * guestNum;
}
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice;
} else {
......@@ -474,8 +489,11 @@
this.courseObj = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
}
}
var newPreferPrice = (this.UnitPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours -
this.OrderMsg.StartClassHours) * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
//插班课时单价
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);
}
}
......
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