Commit 01d1f495 authored by 黄奎's avatar 黄奎

页面修改

parent cf0f80c8
......@@ -22,12 +22,12 @@
</div>
<div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" @keyup.native="checkInteger(OrderMsg,'GuestNum')"
v-model="OrderMsg.GuestNum" @input="changePrice(),countPrice()" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']"
:disable="modityOrderType==2" />
v-model="OrderMsg.GuestNum" @input="changePrice(),countPrice()" class="col-12" label="人数"
:rules="[val => !!val || '请填写人数']" :disable="modityOrderType==2" />
<template v-if="isChaBan==1">
<q-select filled option-value="CourseId" :disable="modityOrderType==2" option-label="CourseName" ref="CourseId" v-model="OrderMsg.CourseId"
:options="CourseList" emit-value map-options class="q-pb-lg" :rules="[val => !!val || '请选择课程']" label="选择课程"
@input="changePrice" />
<q-select filled option-value="CourseId" :disable="modityOrderType==2" option-label="CourseName"
ref="CourseId" v-model="OrderMsg.CourseId" :options="CourseList" emit-value map-options class="q-pb-lg"
:rules="[val => !!val || '请选择课程']" label="选择课程" @input="changePrice" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.StartClassHours" :disable="modityOrderType==2"
@keyup.native="checkInteger(OrderMsg,'StartClassHours')" ref="StartClassHours" @input="countPrice"
class="col-12" label="起始课时" :rules="[val => !!val || '请填起始课时']" />
......@@ -193,7 +193,7 @@
if (this.saveObj && this.saveObj.OrderId > 0) {} else {
this.OrderMsg.StartClassHours = res.Data.finishHours;
}
if(this.OrderMsg&&this.OrderMsg.CourseId){
if (this.OrderMsg && this.OrderMsg.CourseId) {
this.courseObj = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
}
}
......@@ -204,32 +204,32 @@
let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
if (temp) {
this.courseObj = temp;
if(this.OrderMsg.GuestNum==1){
if(temp.CoursePriceList&&temp.CoursePriceList.length>0){
if(temp.CoursePriceList[0].PriceType==0){
let DisCount = (100-temp.CoursePriceList[0].PriceMoney)/100;
this.OrderMsg.Unit_Price = temp.SellPrice*DisCount;
this.UnitPrice = temp.SellPrice*DisCount;
}else{
this.OrderMsg.Unit_Price = temp.SellPrice-item.CoursePriceList[0].PriceMoney;
this.UnitPrice = temp.SellPrice-item.CoursePriceList[0].PriceMoney;
}
}else{
if (this.OrderMsg.GuestNum == 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[0].PriceType == 0) {
let DisCount = (100 - temp.CoursePriceList[0].PriceMoney) / 100;
this.OrderMsg.Unit_Price = temp.SellPrice * DisCount;
this.UnitPrice = temp.SellPrice * DisCount;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[0].PriceMoney;
this.UnitPrice = temp.SellPrice - item.CoursePriceList[0].PriceMoney;
}
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
}
if(this.OrderMsg.GuestNum>1){
if(temp.CoursePriceList&&temp.CoursePriceList.length>0){
if( temp.CoursePriceList[1].PriceType==0){
let DisCount = (100-temp.CoursePriceList[1].PriceMoney)/100;
this.OrderMsg.Unit_Price = temp.SellPrice*DisCount;
this.UnitPrice = temp.SellPrice*DisCount;
}else{
this.OrderMsg.Unit_Price = temp.SellPrice-item.CoursePriceList[1].PriceMoney;
this.UnitPrice = temp.SellPrice-item.CoursePriceList[1].PriceMoney;
if (this.OrderMsg.GuestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) {
let DisCount = (100 - temp.CoursePriceList[1].PriceMoney) / 100;
this.OrderMsg.Unit_Price = temp.SellPrice * DisCount;
this.UnitPrice = temp.SellPrice * DisCount;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[1].PriceMoney;
this.UnitPrice = temp.SellPrice - item.CoursePriceList[1].PriceMoney;
}
}else{
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
......@@ -363,7 +363,7 @@
if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0;
if (this.courseObj && this.courseObj.CourseId && this.courseObj.CourseId > 0) {
newPreferPrice = (this.courseObj.SellPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this
newPreferPrice = (this.UnitPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this
.OrderMsg.StartClassHours) * guestNum
}
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
......@@ -386,7 +386,7 @@
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
var newPreferPrice = (this.courseObj.SellPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours -
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