Commit cb09cb6c authored by 吴春's avatar 吴春

1

parent 20050dcc
...@@ -79,6 +79,16 @@ ...@@ -79,6 +79,16 @@
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12"
label="成交单价" :rules="[val => !!val || '请填成交单价']" /> label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template> </template>
<template v-if="OrderMsg.Unit_PriceType==2">
<q-input filled stack-label :dense="false" v-model="OrderMsg.TotalClassHours" @input="calcPrice()" class="col-12"
label="总课时数" type="number" :min="0" :rules="[val => !!val || '请填总课时数']" />
</template>
<q-input filled stack-label :dense="false" v-model="OrderMsg.TextbookFee" @input="calcPrice()" class="col-12"
label="教材费" type="number" :min="0" :rules="[val => !!val || '请填教材费']" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.CoursewareFee" @input="calcPrice()" class="col-12"
label="课件费" type="number" :min="0" :rules="[val => !!val || '请填课件费']" />
<q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10" <q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg" @keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg"
label="应收" /> label="应收" />
...@@ -218,6 +228,10 @@ ...@@ -218,6 +228,10 @@
CourseConsultantId:0,//课程顾问 CourseConsultantId:0,//课程顾问
CustomerId:0,//同行 CustomerId:0,//同行
OrderIdentify:1,//标识参数, 1产品下单 2客户转订单 OrderIdentify:1,//标识参数, 1产品下单 2客户转订单
Unit_PriceType:1,//价格类型:1-总课时费,2-课时单价 2024-08-26 add by:W
TotalClassHours:0,//总课时数 2024-08-26 add by:W
CoursewareFee:0,//教材费
TextbookFee:0,//课件费
}, },
Unit_PriceRemark: "", //单价规则 Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价 IsShowUpPrice: false, //是否显示高于定价
...@@ -325,7 +339,6 @@ ...@@ -325,7 +339,6 @@
this.OrderMsg.PerDiscountMoney = perDiscountMoney; this.OrderMsg.PerDiscountMoney = perDiscountMoney;
// this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum; // this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum;
//计算每人优惠和总优惠 //计算每人优惠和总优惠
if (this.OrderMsg.IsChaBan == 1) { if (this.OrderMsg.IsChaBan == 1) {
this.OrderMsg.Unit_Price = chaBanPrice; this.OrderMsg.Unit_Price = chaBanPrice;
...@@ -366,15 +379,25 @@ ...@@ -366,15 +379,25 @@
if (this.OrderMsg.IsChaBan == 1) { if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0; var newPreferPrice = 0;
if (this.courseObj && this.courseObj.CourseId && this.courseObj.CourseId > 0) { if (this.courseObj && this.courseObj.CourseId && this.courseObj.CourseId > 0) {
newPreferPrice = chaBanPrice * guestNum; if(this.OrderMsg.Unit_PriceType==2){
newPreferPrice = chaBanPrice * guestNum * Number( this.OrderMsg.TotalClassHours)+Number(this.OrderMsg.CoursewareFee)+Number(this.OrderMsg.TextbookFee);
} else{
newPreferPrice = chaBanPrice * guestNum;
}
} }
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice; this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice;
} else { } else {
this.OrderMsg.PreferPrice = Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice; if(this.OrderMsg.Unit_PriceType==2){
this.OrderMsg.PreferPrice = (Number(guestNum * unit_price * this.OrderMsg.TotalClassHours)+Number(this.OrderMsg.CoursewareFee)+Number(this.OrderMsg.TextbookFee)).toFixed(2)- this.OrderMsg.LessPrice;
} else{
this.OrderMsg.PreferPrice = Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice;
}
} }
//留学就业订单 //留学就业订单
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
console.log("我进来了2");
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2); this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
} }
}, },
...@@ -385,6 +408,7 @@ ...@@ -385,6 +408,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("tempData",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;
...@@ -417,6 +441,10 @@ ...@@ -417,6 +441,10 @@
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.OrderMsg.OrderIdentify = tempData.OrderIdentify;
this.OrderMsg.Unit_PriceType = tempData.Unit_PriceType;
this.OrderMsg.TotalClassHours = tempData.TotalClassHours;
this.OrderMsg.CoursewareFee = tempData.CoursewareFee;
this.OrderMsg.TextbookFee = tempData.TextbookFee;
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
} }
}) })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<div class="classorder"> <div class="classorder">
<div class="table-head"> <div class="table-head">
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0"> <!-- <table class="enrollTotalSearchTable" border="1" cellspacing="0" cellpadding="0">
<colgroup> <colgroup>
<col width="12%" /> <col width="12%" />
<col width="6%" /> <col width="6%" />
...@@ -14,10 +14,15 @@ ...@@ -14,10 +14,15 @@
<col width="6%" /> <col width="6%" />
<col width="6%" /> <col width="6%" />
<col width="6%" /> <col width="6%" />
<col width="6%" />
<col width="6%" />
<col width="6%" />
<col width="6%" />
<col width="6%" />
<template v-if="AuthorityObj.isShowStudyRebate"> <template v-if="AuthorityObj.isShowStudyRebate">
<col width="6%" /> <col width="6%" />
</template> </template>
<col width="6%" />
<col width="6%" /> <col width="6%" />
<col /> <col />
</colgroup> </colgroup>
...@@ -26,6 +31,9 @@ ...@@ -26,6 +31,9 @@
<th width="12%">单号</th> <th width="12%">单号</th>
<th width="6%">人数</th> <th width="6%">人数</th>
<th width="6%">单价</th> <th width="6%">单价</th>
<th width="6%">教材费</th>
<th width="6%">课件费</th>
<th width="6%">总课时</th>
<th width="6%">成交</th> <th width="6%">成交</th>
<th width="6%">应收总额</th> <th width="6%">应收总额</th>
<th width="6%">实收</th> <th width="6%">实收</th>
...@@ -41,11 +49,11 @@ ...@@ -41,11 +49,11 @@
<th v-if="viewType == 0">操作</th> <th v-if="viewType == 0">操作</th>
</tr> </tr>
</thead> </thead>
</table> </table> -->
</div> </div>
<div class="table-body" v-loading="loading"> <div class="table-body" v-loading="loading">
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0"> <table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0">
<colgroup> <!-- <colgroup>
<col width="12%" /> <col width="12%" />
<col width="6%" /> <col width="6%" />
<col width="6%" /> <col width="6%" />
...@@ -56,19 +64,43 @@ ...@@ -56,19 +64,43 @@
<col width="6%" /> <col width="6%" />
<col width="6%" /> <col width="6%" />
<col width="6%" /> <col width="6%" />
<col width="6%" />
<col width="6%" />
<col width="6%" />
<col width="6%" />
<template v-if="AuthorityObj.isShowStudyRebate"> <template v-if="AuthorityObj.isShowStudyRebate">
<col width="6%" /> <col width="6%" />
</template> </template>
<col width="6%" /> <col width="6%" />
<col width="6%" v-if="viewType == 0" /> <col v-if="viewType == 0" />
<col /> </colgroup> -->
</colgroup> <tr class="fix_th">
<th width="12%">单号</th>
<th width="6%">人数</th>
<th width="6%">单价</th>
<th width="6%">教材费</th>
<th width="6%">课件费</th>
<th width="6%">总课时</th>
<th width="6%">成交</th>
<th width="6%">应收总额</th>
<th width="6%">实收</th>
<th width="6%">优惠</th>
<th width="6%">少价金额</th>
<th width="6%">退款</th>
<th width="6%">平台税金</th>
<th width="6%">待收金额</th>
<template v-if="AuthorityObj.isShowStudyRebate">
<th width="6%">留学订单回佣</th>
</template>
<th width="6%">状态</th>
<th v-if="viewType == 0">操作</th>
<tr> <tr>
<td v-show="dataList && dataList.length == 0" :colspan="13" align="center"> <td v-show="dataList && dataList.length == 0" :colspan="17" align="center">
暂无数据 暂无数据
</td> </td>
</tr> </tr>
<tbody v-for="(item, index) in dataList" :key="index"> <template v-for="(item, index) in dataList">
<tr> <tr>
<td :rowspan="3" style="text-align: left"> <td :rowspan="3" style="text-align: left">
<div> <div>
...@@ -223,8 +255,26 @@ ...@@ -223,8 +255,26 @@
<td style="border:none;">{{ item.GuestNum }}人</td> <td style="border:none;">{{ item.GuestNum }}人</td>
<td style="border:none;"> <td style="border:none;">
<template v-if="item.Class_Price >= 0"> <template v-if="item.Class_Price >= 0">
{{ item.Class_Price.toFixed(2) }} <el-tooltip class="item" effect="dark" :content="item.SellPriceType==2?'课时单价':'课时总价'" placement="top">
<span> {{ item.Class_Price.toFixed(2) }}</span>
</el-tooltip>
</template> </template>
</td>
<td style="border:none;">
<template v-if="item.TextbookFee >= 0">
{{ item.TextbookFee.toFixed(2) }}
</template>
</td>
<td style="border:none;">
<template v-if="item.CoursewareFee >= 0">
{{ item.CoursewareFee.toFixed(2) }}
</template>
</td>
<td style="border:none;">
{{ item.TotalClassHours }}
</td> </td>
<td :style="{ <td :style="{
color: color:
...@@ -465,7 +515,7 @@ ...@@ -465,7 +515,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td :colspan="13" style="text-align: left"> <td :colspan="17" style="text-align: left">
<div class="row" v-if="item.GuestList && item.GuestList.length > 0"> <div class="row" v-if="item.GuestList && item.GuestList.length > 0">
学生名单: 学生名单:
<template v-for="(x, j) in item.GuestList" :index="j"> <template v-for="(x, j) in item.GuestList" :index="j">
...@@ -537,7 +587,7 @@ ...@@ -537,7 +587,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td :colspan="13" style="height: 168px;text-align: left"> <td :colspan="17" style="height: 168px;text-align: left">
<div class="col row remarks q-gutter-x-md"> <div class="col row remarks q-gutter-x-md">
<div class="col"> <div class="col">
<div>销售备注:</div> <div>销售备注:</div>
...@@ -893,10 +943,10 @@ ...@@ -893,10 +943,10 @@
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </template>
<tbody v-if="cancelList && cancelList.length > 0"> <tbody v-if="cancelList && cancelList.length > 0">
<tr> <tr>
<td :colspan="13"> <td :colspan="17">
<span style="color:red;cursor:pointer;font-weight:bold;" @click="isShowCancel = !isShowCancel">取消订单</span> <span style="color:red;cursor:pointer;font-weight:bold;" @click="isShowCancel = !isShowCancel">取消订单</span>
</td> </td>
</tr> </tr>
...@@ -922,7 +972,21 @@ ...@@ -922,7 +972,21 @@
{{ item.Class_Price.toFixed(2) }} {{ item.Class_Price.toFixed(2) }}
</template> </template>
</td> </td>
<td :style="{ <td style="border:none;">
<template v-if="item.TextbookFee >= 0">
{{ item.TextbookFee.toFixed(2) }}
</template>
</td>
<td style="border:none;">
<template v-if="item.CoursewareFee >= 0">
{{ item.CoursewareFee.toFixed(2) }}
</template>
</td>
<td style="border:none;">
{{ item.TotalClassHours }}
</td>
<td :style="{
color: color:
item.Class_Price != item.Unit_Price item.Class_Price != item.Unit_Price
? 'var(--q-color-negative)' ? 'var(--q-color-negative)'
...@@ -933,6 +997,7 @@ ...@@ -933,6 +997,7 @@
{{ item.Unit_Price.toFixed(2) }} {{ item.Unit_Price.toFixed(2) }}
</template> </template>
</td> </td>
<td style="border:none"> <td style="border:none">
<template v-if="item.PreferPrice >= 0"> <template v-if="item.PreferPrice >= 0">
{{ item.PreferPrice.toFixed(2) }} {{ item.PreferPrice.toFixed(2) }}
...@@ -993,7 +1058,7 @@ ...@@ -993,7 +1058,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td :colspan="13" style="text-align: left"> <td :colspan="17" style="text-align: left">
<div class="row" v-if="item.GuestList && item.GuestList.length > 0"> <div class="row" v-if="item.GuestList && item.GuestList.length > 0">
学生名单: 学生名单:
<template v-for="(x, j) in item.GuestList"> <template v-for="(x, j) in item.GuestList">
...@@ -1017,7 +1082,7 @@ ...@@ -1017,7 +1082,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td :colspan="13" style="height: 168px;text-align: left"> <td :colspan="15" style="height: 168px;text-align: left">
<div class="col row remarks q-gutter-x-md"> <div class="col row remarks q-gutter-x-md">
<div class="col"> <div class="col">
<div>销售备注:</div> <div>销售备注:</div>
......
...@@ -807,7 +807,7 @@ export default { ...@@ -807,7 +807,7 @@ export default {
this.OrderMsg.HelpEnterId = this.stuData.StuList[0].STTeacherId; this.OrderMsg.HelpEnterId = this.stuData.StuList[0].STTeacherId;
this.AssistName = this.stuData.StuList[0].STTeacherName this.AssistName = this.stuData.StuList[0].STTeacherName
} }
console.log("selectedCourseList",this.selectedCourseList); console.log("this.selectedCourseList",this.selectedCourseList);
if(this.selectedCourseList.length>1){ if(this.selectedCourseList.length>1){
this.selectedCourseList.forEach(item => { this.selectedCourseList.forEach(item => {
let dataObj = { let dataObj = {
...@@ -867,8 +867,8 @@ export default { ...@@ -867,8 +867,8 @@ export default {
if (item.SellPriceType) { if (item.SellPriceType) {
dataObj.Unit_PriceType = item.SellPriceType; dataObj.Unit_PriceType = item.SellPriceType;
} }
if (item.ClassHours) { if (item.TotalClassHours) {
dataObj.TotalClassHours = item.ClassHours; dataObj.TotalClassHours = item.TotalClassHours;
} }
if (item.CoursewareFee) { if (item.CoursewareFee) {
dataObj.CoursewareFee = item.CoursewareFee; dataObj.CoursewareFee = item.CoursewareFee;
...@@ -898,7 +898,6 @@ export default { ...@@ -898,7 +898,6 @@ export default {
0}%`; 0}%`;
} }
this.courseInformationList.push(dataObj) this.courseInformationList.push(dataObj)
}); });
this.totalCourseFee() this.totalCourseFee()
...@@ -926,7 +925,7 @@ export default { ...@@ -926,7 +925,7 @@ export default {
) )
); );
if(item.Unit_PriceType==1){ if(item.Unit_PriceType==1){
item.PreferPrice = item.GuestNum*item.Unit_Price+Number(item.TextbookFee)+Number(item.CoursewareFee) item.PreferPrice = item.GuestNum*item.Unit_Price
} }
else if(item.Unit_PriceType==2){ else if(item.Unit_PriceType==2){
...@@ -940,7 +939,7 @@ export default { ...@@ -940,7 +939,7 @@ export default {
this.accMul(item.Class_Price, item.B2CRatio / 100) this.accMul(item.Class_Price, item.B2CRatio / 100)
); );
if(item.Unit_PriceType==1){ if(item.Unit_PriceType==1){
item.PreferPrice = item.GuestNum*item.Unit_Price+Number(item.TextbookFee)+Number(item.CoursewareFee) item.PreferPrice = item.GuestNum*item.Unit_Price
} }
else if(item.Unit_PriceType==2){ else if(item.Unit_PriceType==2){
item.TextbookFee=Number((item.TotalClassHours*item.Unit_Price*item.GuestNum)*(20/100)).toFixed(2); item.TextbookFee=Number((item.TotalClassHours*item.Unit_Price*item.GuestNum)*(20/100)).toFixed(2);
...@@ -1190,10 +1189,10 @@ export default { ...@@ -1190,10 +1189,10 @@ export default {
if (this.saveObj.SellPriceType) { if (this.saveObj.SellPriceType) {
this.OrderMsg.Unit_PriceType = this.saveObj.SellPriceType; this.OrderMsg.Unit_PriceType = this.saveObj.SellPriceType;
} }
if (this.saveObj.ClassHours) { if (this.saveObj.TotalClassHours) {
this.OrderMsg.TotalClassHours = this.saveObj.ClassHours; this.OrderMsg.TotalClassHours = this.saveObj.TotalClassHours;
} }
if (this.saveObj.TextbookFee) { if (this.saveObj.TextbookFee) {
this.OrderMsg.TextbookFee = this.saveObj.TextbookFee; this.OrderMsg.TextbookFee = this.saveObj.TextbookFee;
} }
......
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