Commit 1d2ddb2e authored by zhengke's avatar zhengke

1

parent 2a8b649e
...@@ -175,6 +175,12 @@ ...@@ -175,6 +175,12 @@
mounted() { mounted() {
this.initData() this.initData()
}, },
watch:{
CourseList: function (val, oldval) {
console.log(val,'val');
this.courseObj = val.find(x => x.CourseId == this.OrderMsg.CourseId);
}
},
methods: { methods: {
//获取插班报入配置信息 //获取插班报入配置信息
initConfig() { initConfig() {
...@@ -236,8 +242,6 @@ ...@@ -236,8 +242,6 @@
this.OrderMsg.IsChaBan = tempData.IsChaBan; this.OrderMsg.IsChaBan = tempData.IsChaBan;
this.UnitPrice = this.OrderMsg.Unit_Price; this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
} }
}) })
} else { } else {
...@@ -333,7 +337,7 @@ ...@@ -333,7 +337,7 @@
console.log(this.courseObj,'this.courseObj'); console.log(this.courseObj,'this.courseObj');
if (this.courseObj) { if (this.courseObj) {
newPreferPrice = (this.courseObj.SellPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this newPreferPrice = (this.courseObj.SellPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this
.OrderMsg.StartClassHours) .OrderMsg.StartClassHours) * guestNum
} }
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2); this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
} else { } else {
...@@ -348,8 +352,8 @@ ...@@ -348,8 +352,8 @@
//计算应收价格 //计算应收价格
if (this.OrderMsg.IsChaBan == 1) { if (this.OrderMsg.IsChaBan == 1) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) { if (this.modityOrderType == 1 || this.modityOrderType == 2) {
var newPreferPrice = this.courseObj.SellPrice / this.courseObj.ClassHours * (this.courseObj.ClassHours - var newPreferPrice = (this.courseObj.SellPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours -
this.courseObj.StartClassHours) - this.OrderMsg.LessPrice; this.OrderMsg.StartClassHours) * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2); this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
} }
} else { } else {
......
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