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

1

parent dcf8f37d
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div style="padding:20px 15px;"> <div style="padding:20px 15px;">
<q-input filled stack-label maxlength="3" :dense="false" @keyup.native="checkInteger(OrderMsg,'GuestNum')" <q-input filled stack-label maxlength="3" :dense="false" @keyup.native="checkInteger(OrderMsg,'GuestNum')"
v-model="OrderMsg.GuestNum" @input="calcPrice()" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" v-model="OrderMsg.GuestNum" @input="calcPrice()" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']"
:disable="modityOrderType==2" /> :disable="modityOrderType==2||OrderMsg.OrderIdentify==2" />
<template v-if="isChaBan==1"> <template v-if="isChaBan==1">
<q-select filled option-value="CourseId" :disable="modityOrderType==2" option-label="CourseName" <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" ref="CourseId" v-model="OrderMsg.CourseId" :options="CourseList" emit-value map-options class="q-pb-lg"
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true" <!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-12 q-pb-lg" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> --> class="col-12 q-pb-lg" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<q-input filled stack-label :dense="false" :value="OrderMsg.Class_Price*OrderMsg.GuestNum*OrderMsg.B2CRatio" :disable="true" <q-input filled stack-label :dense="false" v-model="OrderMsg.DiscountMoney" disable
class="col-12 q-pb-lg" label="优惠金额" /> class="col-12 q-pb-lg" label="优惠金额" />
<template v-if="modityOrderType==3"> <template v-if="modityOrderType==3">
...@@ -278,6 +278,7 @@ ...@@ -278,6 +278,7 @@
guestNum = Number(this.OrderMsg.GuestNum); guestNum = Number(this.OrderMsg.GuestNum);
} }
let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId); let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
console.log('temp', temp)
if (temp) { if (temp) {
this.courseObj = temp; this.courseObj = temp;
var tempDiscountMoney = 0; //优惠金额 var tempDiscountMoney = 0; //优惠金额
...@@ -377,6 +378,7 @@ ...@@ -377,6 +378,7 @@
}).then(res => { }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
var tempData = res.Data.OrderInfo; var tempData = res.Data.OrderInfo;
console.log('tagtempData', tempData)
this.OrderMsg.ClassId = tempData.ClassId; this.OrderMsg.ClassId = tempData.ClassId;
this.OrderMsg.GuestNum = tempData.GuestNum; this.OrderMsg.GuestNum = tempData.GuestNum;
this.OrderMsg.Unit_Price = tempData.Unit_Price; this.OrderMsg.Unit_Price = tempData.Unit_Price;
...@@ -408,6 +410,7 @@ ...@@ -408,6 +410,7 @@
this.OrderMsg.CustomerId=tempData.CustomerId this.OrderMsg.CustomerId=tempData.CustomerId
this.OrderMsg.CourseConsultantId=tempData.CourseConsultantId this.OrderMsg.CourseConsultantId=tempData.CourseConsultantId
this.UnitPrice = this.OrderMsg.Unit_Price; this.UnitPrice = this.OrderMsg.Unit_Price;
this.OrderMsg.OrderIdentify = tempData.OrderIdentify;
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
} }
}) })
...@@ -434,6 +437,7 @@ ...@@ -434,6 +437,7 @@
this.OrderMsg.B2CReNewRatio = 0; this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.CustomerId=0; this.OrderMsg.CustomerId=0;
this.OrderMsg.CourseConsultantId=0; this.OrderMsg.CourseConsultantId=0;
this.OrderMsg.OrderIdentify =1;
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1; this.OrderMsg.OrderNature = 1;
} }
......
...@@ -26,19 +26,19 @@ ...@@ -26,19 +26,19 @@
</div> </div>
<div style="row items-center"> <div style="row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<q-input <q-input
filled filled
stack-label stack-label
maxlength="3" maxlength="3"
:dense="false" :dense="false"
@keyup.native="checkInteger(OrderMsg, 'GuestNum')" @keyup.native="checkInteger(OrderMsg, 'GuestNum')"
v-model="OrderMsg.GuestNum" v-model="OrderMsg.GuestNum"
@input="calcPrice()" @input="calcPrice()"
label="人数" label="人数"
:rules="[val => !!val || '请填写人数']" :rules="[val => !!val || '请填写人数']"
disable disable
class="col-6 q-py-sm" class="col-6 q-py-sm"
/> />
<template v-if="OrderMsg.isChaBan == 1"> <template v-if="OrderMsg.isChaBan == 1">
<q-select <q-select
filled filled
...@@ -485,7 +485,6 @@ export default { ...@@ -485,7 +485,6 @@ export default {
let temp = this.CourseList.find( let temp = this.CourseList.find(
x => x.CourseId == this.OrderMsg.CourseId x => x.CourseId == this.OrderMsg.CourseId
); );
console.log('tagtemp', this.CourseList)
if (temp) { if (temp) {
this.courseObj = temp; this.courseObj = temp;
var tempDiscountMoney = 0; //优惠金额 var tempDiscountMoney = 0; //优惠金额
...@@ -559,7 +558,6 @@ export default { ...@@ -559,7 +558,6 @@ export default {
this.OrderMsg.SourceId = this.saveObj.SourceId; this.OrderMsg.SourceId = this.saveObj.SourceId;
} }
this.courseObj = {}; this.courseObj = {};
} }
/**计算少价---开始*/ /**计算少价---开始*/
...@@ -608,119 +606,69 @@ export default { ...@@ -608,119 +606,69 @@ export default {
}); });
}, },
initData() { initData() {
console.log("init", this.saveObj); this.OrderMsg.HelpEnterId = 0;
if (this.saveObj && this.saveObj.OrderId > 0) { this.OrderMsg.GeneralOccupation = "";
getClassOrderInfo({ this.OrderMsg.EduOccupation = "";
OrderId: this.saveObj.OrderId this.OrderMsg.IsLessPrice = 0;
}).then(res => { this.OrderMsg.LessPrice = 0;
if (res.Code == 1) { this.OrderMsg.PerLessMoney = 0;
var tempData = res.Data.OrderInfo; this.OrderMsg.OrderNature = 0;
this.OrderMsg.ClassId = tempData.ClassId; this.OrderMsg.OldPreferPrice = 0;
// this.OrderMsg.GuestNum = tempData.GuestNum; this.OrderMsg.StartClassHours = 0;
this.OrderMsg.Unit_Price = tempData.Unit_Price; this.OrderMsg.IsChaBan = this.isChaBan;
this.OrderMsg.PreferPrice = tempData.PreferPrice; this.OrderMsg.EffectTime = "";
this.OrderMsg.OrderSource = tempData.OrderSource; this.OrderMsg.UpOrderId = 0;
this.OrderMsg.SaleRemark = tempData.SaleRemark; this.OrderMsg.JoinType = 1;
this.OrderMsg.Class_Price = tempData.Class_Price; this.OrderMsg.DiscountMoney = 0;
this.OrderMsg.OrderId = tempData.OrderId; this.OrderMsg.PerDiscountMoney = 0;
this.OrderMsg.OrderType = tempData.OrderType; this.OrderMsg.OrderType = this.orderType;
this.OrderMsg.SourceId = tempData.SourceId; this.OrderMsg.B2CRatio = 0;
this.OrderMsg.HelpEnterId = tempData.HelpEnterId; this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.GeneralOccupation = tempData.GeneralOccupation; this.OrderMsg.CustomerId = 0;
this.OrderMsg.EduOccupation = tempData.EduOccupation; this.OrderMsg.CourseConsultantId = 0;
this.OrderMsg.IsLessPrice = tempData.IsLessPrice; if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.LessPrice = tempData.LessPrice; this.OrderMsg.OrderNature = 1;
this.OrderMsg.PerLessMoney = tempData.PerLessMoney; }
this.OrderMsg.OrderNature = tempData.OrderNature; if (this.saveObj) {
this.OrderMsg.OldPreferPrice = tempData.OldPreferPrice; if (this.saveObj.ClassId) {
this.OrderMsg.CourseId = tempData.CourseId; this.OrderMsg.ClassId = this.saveObj.ClassId;
this.OrderMsg.JoinType = tempData.JoinType; }
this.OrderMsg.StartClassHours = tempData.StartClassHours; if (this.saveObj.Unit_Price) {
this.OrderMsg.IsChaBan = tempData.IsChaBan; this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.OrderMsg.EffectTime = tempData.EffectTime; this.OrderMsg.Class_Price = this.saveObj.Unit_Price;
this.OrderMsg.UpOrderId = tempData.UpOrderId; this.UnitPrice = this.saveObj.Unit_Price;
this.OrderMsg.DiscountMoney = tempData.DiscountMoney; }
this.OrderMsg.PerDiscountMoney = tempData.PerDiscountMoney; if (this.saveObj.SourceId) {
this.OrderMsg.B2CRatio = this.OrderMsg.SourceId = this.saveObj.SourceId;
tempData.B2CRatio > 1
? tempData.B2CRatio / 100
: tempData.B2CRatio;
this.OrderMsg.B2CReNewRatio =
tempData.B2CReNewRatio > 1
? tempData.B2CReNewRatio / 100
: tempData.B2CReNewRatio;
this.OrderMsg.CustomerId = tempData.CustomerId;
this.OrderMsg.CourseConsultantId = tempData.CourseConsultantId;
this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true;
}
});
} else {
this.OrderMsg.HelpEnterId = 0;
this.OrderMsg.GeneralOccupation = "";
this.OrderMsg.EduOccupation = "";
this.OrderMsg.IsLessPrice = 0;
this.OrderMsg.LessPrice = 0;
this.OrderMsg.PerLessMoney = 0;
this.OrderMsg.OrderNature = 0;
this.OrderMsg.OldPreferPrice = 0;
// this.OrderMsg.GuestNum = 1;
this.OrderMsg.StartClassHours = 0;
this.OrderMsg.IsChaBan = this.isChaBan;
this.OrderMsg.EffectTime = "";
this.OrderMsg.UpOrderId = 0;
this.OrderMsg.JoinType = 1;
this.OrderMsg.DiscountMoney = 0;
this.OrderMsg.PerDiscountMoney = 0;
this.OrderMsg.OrderType = this.orderType;
this.OrderMsg.B2CRatio = 0;
this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.CustomerId = 0;
this.OrderMsg.CourseConsultantId = 0;
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1;
} }
if (this.saveObj) {
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.OrderMsg.Class_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
if (this.saveObj.CourseId) { if (this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId; this.OrderMsg.CourseId = this.saveObj.CourseId;
} else { } else {
this.OrderMsg.CourseId = ""; this.OrderMsg.CourseId = "";
} }
if (this.saveObj.B2CRatio) { if (this.saveObj.B2CRatio) {
this.OrderMsg.B2CRatio = this.OrderMsg.B2CRatio =
this.saveObj.B2CRatio > 1 this.saveObj.B2CRatio > 1
? this.saveObj.B2CRatio / 100 ? this.saveObj.B2CRatio / 100
: this.saveObj.B2CRatio; : this.saveObj.B2CRatio;
}
if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio =
this.saveObj.B2CReNewRatio > 1
? this.saveObj.B2CReNewRatio / 100
: this.saveObj.B2CReNewRatio;
}
} }
this.IsShowEditOrder = true; if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio =
this.calcPrice(); this.saveObj.B2CReNewRatio > 1
if(this.stuData.RenewNum>0){ ? this.saveObj.B2CReNewRatio / 100
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj.B2CRatio ?? 0}%;直客续费优惠比例${this.saveObj.B2CReNewRatio ?? 0}%`; //备注 : this.saveObj.B2CReNewRatio;
}else{
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj.B2CRatio ?? 0}%`; //备注
} }
}
this.IsShowEditOrder = true;
this.calcPrice();
if (this.stuData.RenewNum > 0) {
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj
.B2CRatio ?? 0}%;直客续费优惠比例${this.saveObj.B2CReNewRatio ?? 0}%`; //备注
} else {
this.OrderMsg.SaleRemark = `直客首次报名优惠比例${this.saveObj
.B2CRatio ?? 0}%`; //备注
} }
}, },
//筛选员工 //筛选员工
......
...@@ -171,7 +171,6 @@ export default { ...@@ -171,7 +171,6 @@ export default {
x.EditorStatus = false; x.EditorStatus = false;
}); });
this.dictList = r.Data; this.dictList = r.Data;
console.log("tag140", this.dictList);
}); });
}, },
//获取业务员 //获取业务员
......
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