Commit 7c039547 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents 8416dc02 bddd2c50
......@@ -301,6 +301,7 @@
this.OrderMsg.OrderNature = tempData.OrderNature;
this.OrderMsg.OldPreferPrice = tempData.OldPreferPrice;
this.OrderMsg.CourseId = tempData.CourseId;
this.OrderMsg.StartClassHours = tempData.StartClassHours;
this.OrderMsg.IsChaBan = tempData.IsChaBan;
this.OrderMsg.EffectTime = tempData.EffectTime;
......@@ -401,6 +402,7 @@
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0;
if (this.courseObj && this.courseObj.CourseId && this.courseObj.CourseId > 0) {
newPreferPrice = (this.UnitPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this
.OrderMsg.StartClassHours) * guestNum
......@@ -425,6 +427,11 @@
//计算应收价格
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 newPreferPrice = (this.UnitPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours -
this.OrderMsg.StartClassHours) * 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