Commit f808410d authored by 吴春's avatar 吴春

1

parent 7cd7066a
...@@ -28,7 +28,7 @@ export function getOrderSourceEnumList(data) { ...@@ -28,7 +28,7 @@ export function getOrderSourceEnumList(data) {
*/ */
export function setClassOrder(data) { export function setClassOrder(data) {
return request({ return request({
url: '/order/SetClassOrder', url: '/order/SetNewClassOrder',
method: 'post', method: 'post',
data data
}) })
...@@ -40,7 +40,7 @@ export function setClassOrder(data) { ...@@ -40,7 +40,7 @@ export function setClassOrder(data) {
*/ */
export function SetClassOrderBatch(data) { export function SetClassOrderBatch(data) {
return request({ return request({
url: '/order/SetClassOrderBatch', url: '/order/SetNewClassOrderBatch',
method: 'post', method: 'post',
data data
}) })
......
...@@ -198,7 +198,13 @@ ...@@ -198,7 +198,13 @@
</div> </div>
</template> </template>
<template v-if="item.OrderType == 1"> <template v-if="item.OrderType == 1">
<div v-if="item.CourseName"> <div v-if="item.ClassList&&item.ClassList.length>0">
课程名称:
<span v-for="(itemc, indexc) in item.ClassList">
{{indexc>1?',':""}}{{ itemc.CourseName }}
</span>
</div>
<div v-else="item.CourseName">
课程名称:{{ item.CourseName }} 课程名称:{{ item.CourseName }}
</div> </div>
<div v-if="item.CourseSubjectName"> <div v-if="item.CourseSubjectName">
......
...@@ -311,14 +311,40 @@ export default { ...@@ -311,14 +311,40 @@ export default {
selectCourse(val) { selectCourse(val) {
this.selectedCourseList = [] this.selectedCourseList = []
if (val.length > 0) { if (val.length > 0) {
this.saveObj = val[0]; // this.saveObj = val[0];
this.saveObj.Unit_Price = this.saveObj.SellPrice; // this.saveObj.Unit_Price = this.saveObj.SellPrice;
this.selectedCourseList = val; this.selectedCourseList = val;
} else { }
this.saveObj = {}; this.saveObj = {};
this.saveObj.Unit_Price = 0; this.saveObj.Unit_Price = 0;
this.selectedCourseList = []; this.saveObj.OrderCourseList =[];
if(this.selectedCourseList&&this.selectedCourseList.length>0){
this.selectedCourseList.forEach((item,index) => {
if(index==0){
this.saveObj = JSON.parse(JSON.stringify(item));
console.log("this.saveObj111",this.saveObj);
this.saveObj.Unit_Price = item.SellPrice;
this.saveObj.PreferPrice = item.SellPrice;
console.log("this.saveObj111.Unit_Price",this.saveObj.Unit_Price);
} }
else{
this.saveObj.CourseName+=","+item.CourseName
this.saveObj.SellPrice+=Number(item.SellPrice)
this.saveObj.Unit_Price+=Number(item.SellPrice)
this.saveObj.TotalClassHours+=Number(item.TotalClassHours)
this.saveObj.DiscountMoney=0;//number(item.DiscountMoney)
this.saveObj.LessPrice=0;
this.saveObj.TextbookFee+=Number(item.TextbookFee)
this.saveObj.PreferPrice +=Number(item.SellPrice)
this.saveObj.CoursewareFee+=Number(item.CoursewareFee)
}
});
this.saveObj.OrderCourseList =[];
this.saveObj.OrderCourseList =this.selectedCourseList;
}
console.log("this.saveObj",this.saveObj);
console.log("this.selectedCourseList",this.selectedCourseList);
}, },
next() { next() {
if (this.step == 1 && this.mode <= 0) { if (this.step == 1 && this.mode <= 0) {
......
<!--订单操作-->
<template>
<div>
<div class="q-mb-sm text-accent">
<span class="text-primary" v-if="mode === 1">班级:</span>
<span v-if="mode === 1">{{ saveObj.ClassName }}</span>
<span v-if="mode!=2&&selectedCourseList.length==0||selectedCourseList.length==1">
<span class="q-ml-md text-primary">课程:</span>
{{ saveObj.CourseName }}
</span>
</div>
<div class="row q-mb-md">
<div class="col-10 flex">
<div v-for="(item, index) in stuData.StuList">
<q-chip icon="person" class="primary"
>{{ item.StuName }}
<span v-if="item.IsRenewGuest === 1">(续费)</span>
</q-chip>
</div>
</div>
<div class="col-2" v-if="mode == 1">
<q-toggle
v-model="OrderMsg.IsChaBan"
:true-value="1"
:false-value="0"
label="插班报入"
/>
</div>
</div>
<!-- 多个约课 -->
<div v-if="selectedCourseList.length>1">
<div class="column shadow-4 q-mb-md q-pb-md" v-for="(item,index) in courseInformationList" :key="index">
<div class="q-pt-md q-pb-md">
<span class="q-ml-md text-primary">课程:</span>{{item.CourseName}}
</div>
<div class="col row wrap q-mr-lg q-ml-lg q-col-gutter-md">
<q-input
filled
stack-label
maxlength="3"
:dense="false"
v-model="item.GuestNum"
label="人数"
:rules="[val => !!val || '请填写人数']"
disable
class="col-6 q-py-sm"
/>
<q-input
filled
stack-label
:dense="false"
v-model="item.Class_Price"
:disable="true"
class="col-6 q-py-sm"
label="单价(课程售价)"
style="display:none;"
/>
<template v-if="modityOrderType == 1">
<q-input
filled
stack-label
:dense="false"
v-model="item.Unit_Price"
:disable="IsShowUpPrice == true ? false : true"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model="IsShowUpPrice"
label="高于定价收生"
class="q-mb-md"
style="display:none;"
/>
</template>
<template v-if="modityOrderType == 2">
<q-input
filled
stack-label
:dense="false"
v-model="item.Unit_Price"
:disable="true"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
</template>
<q-input
v-if="false"
filled
stack-label
:dense="false"
v-model="item.DiscountMoney"
:disable="true"
class="col-6 q-py-sm"
label="优惠金额"
/>
<template v-if="item.Unit_PriceType==2">
<q-input
filled
stack-label
:dense="false"
type="number"
:min="1"
@input="totalCourseFee(1)"
v-model="item.TotalClassHours"
class="col-6 q-py-sm"
label="总课时数"
/>
</template>
<q-input
filled
stack-label
:dense="false"
type="number"
:min="0"
@input="totalCourseFee(0)"
v-model="item.TextbookFee"
class="col-6 q-py-sm"
label="课件费"
/>
<q-input
filled
stack-label
:dense="false"
type="number"
:min="0"
@input="totalCourseFee(0)"
v-model="item.CoursewareFee"
class="col-6 q-py-sm"
label="教材费"
/>
<template v-if="modityOrderType == 3">
<q-input
filled
min
stack-label
:dense="false"
v-model="item.Unit_Price"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
</template>
<q-input
filled
stack-label
:disable="modityOrderType != 3"
:dense="false"
maxlength="10"
v-model="item.PreferPrice"
class="col-6 q-py-sm"
label="应收"
/>
<q-select
v-if="mode == 2"
standout="bg-primary text-white"
option-value="SId"
option-label="SName"
v-model="item.ScrollSchoolId"
:options="newSchoolList"
emit-value
map-options
class="col-6 q-py-sm"
label="校区"
/>
<q-select style="display:none;"
:disable="modityOrderType == 2"
standout="bg-primary text-white"
option-value="Id"
option-label="Name"
v-model="item.OrderSource"
:options="SourceEnumList"
emit-value
map-options
class="col-6 q-py-sm"
label="客人来源"
/>
<q-select v-if="false"
:disable="
modityOrderType == 2 ||
item.JoinType == 3 ||
CourseConsultantDisable
"
v-model="item.CourseConsultantId"
:options="EmployeeList2"
filled
use-input
label="课程顾问"
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName2"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterFn2"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<q-input
:disable="modityOrderType == 2"
v-if="item.OrderSource == 3"
filled
stack-label
:dense="false"
maxlength="50"
v-model="item.GeneralOccupation"
class="col-6 q-py-sm"
label="一般同行"
/>
<q-input
:disable="modityOrderType == 2"
v-if="item.OrderSource == 7"
filled
stack-label
:dense="false"
maxlength="50"
v-model="item.EduOccupation"
class="col-6 q-py-sm"
label="教育同行"
/>
<q-input
:disable="modityOrderType == 2"
v-if="item.IsLessPrice == 1"
maxlength="10"
filled
stack-label
:dense="false"
v-model="item.PerLessMoney"
class="col-6 q-py-sm"
label="少价金额(每人)"
:hint="'总少价金额:' + item.PerLessMoney * item.GuestNum"
/>
<q-input
disable
v-if="item.EnterId > 0"
filled
stack-label
v-model="EnterName"
class="col-6 q-py-sm"
label="市场人员"
/>
<q-input
v-if="OrderMsg.HelpEnterId>0"
filled
stack-label
disable
:dense="false"
maxlength="10"
v-model="AssistName"
class="col-6 q-py-sm"
label="协助老师"
/>
<q-input
filled
stack-label
:dense="false"
v-model="item.SaleRemark"
type="textarea"
class="col-12 q-py-sm"
label="备注"
/>
</div>
</div>
</div>
<!-- 一个约课、班课 -->
<div v-else class="column items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<q-input
filled
stack-label
maxlength="3"
:dense="false"
@keyup.native="checkInteger(OrderMsg, 'GuestNum')"
v-model="OrderMsg.GuestNum"
@input="calcPrice()"
label="人数"
:rules="[val => !!val || '请填写人数']"
disable
class="col-6 q-py-sm"
/>
<template v-if="OrderMsg.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="col-6 q-py-sm"
:rules="[val => !!val || '请选择课程']"
label="选择课程"
@input="calcPrice()"
/>
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.StartClassHours"
:disable="modityOrderType == 2"
@keyup.native="checkInteger(OrderMsg, 'StartClassHours')"
ref="StartClassHours"
@input="calcPrice()"
class="col-6 q-py-sm"
label="起始课时"
/>
<q-input
filled
v-model="OrderMsg.EffectTime"
ref="EffectTime"
:rules="[val => !!val || '请填生效时间']"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
mask="date"
label="生效时间"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
ref="qDateProxy1"
transition-show="scale"
transition-hide="scale"
>
<q-date
v-model="OrderMsg.EffectTime"
@input="() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-select
filled
option-value="OrderId"
option-label="CourseName"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
v-model="OrderMsg.UpOrderId"
:options="beforeOrderList"
emit-value
map-options
label="前置订单"
>
<template
v-slot:option="{
itemProps,
itemEvents,
opt,
selected,
toggleOption
}"
>
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label
><span style="color:blue">{{ opt.OrderId }}</span>
{{ opt.CourseName }} {{ opt.ClassName }}
{{ getStudent(opt.GuestList) }}</q-item-label
>
</q-item-section>
</q-item>
</template>
</q-select>
</template>
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.Class_Price"
:disable="true"
class="col-6 q-py-sm"
label="单价(课程售价)"
style="display:none;"
/>
<template v-if="modityOrderType == 1">
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.Unit_Price"
:disable="IsShowUpPrice == true ? false : true"
@blur="calcPrice()"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model="IsShowUpPrice"
label="高于定价收生"
class="q-mb-md"
style="display:none;"
/>
</template>
<template v-if="modityOrderType == 2">
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.Unit_Price"
:disable="true"
@input="calcPrice()"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
</template>
<q-input
v-if="false"
filled
stack-label
:dense="false"
v-model="OrderMsg.DiscountMoney"
:disable="true"
class="col-6 q-py-sm"
label="优惠金额"
/>
<template v-if="OrderMsg.Unit_PriceType==2">
<q-input
filled
stack-label
:dense="false"
type="number"
:min="1"
@input="oneTotalCourseFee(1)"
v-model="OrderMsg.TotalClassHours"
class="col-6 q-py-sm"
label="总课时数"
/>
</template>
<q-input
filled
stack-label
:dense="false"
type="number"
:min="0"
@input="oneTotalCourseFee(0)"
v-model="OrderMsg.TextbookFee"
class="col-6 q-py-sm"
label="课件费"
/>
<q-input
filled
stack-label
:dense="false"
type="number"
:min="0"
@input="oneTotalCourseFee(0)"
v-model="OrderMsg.CoursewareFee"
class="col-6 q-py-sm"
label="教材费"
/>
<!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-6 q-py-sm" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<template v-if="modityOrderType == 3">
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.Unit_Price"
@input="calcPrice()"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
</template>
<q-input
filled
stack-label
:disable="modityOrderType != 3"
:dense="false"
maxlength="10"
@keyup.native="checkPrice(OrderMsg, 'PreferPrice')"
v-model="OrderMsg.PreferPrice"
class="col-6 q-py-sm"
label="应收"
/>
<q-select
v-if="mode == 2"
standout="bg-primary text-white"
option-value="SId"
option-label="SName"
v-model="OrderMsg.ScrollSchoolId"
:options="newSchoolList"
emit-value
map-options
class="col-6 q-py-sm"
label="校区"
/>
<q-select style="display:none;"
:disable="modityOrderType == 2"
standout="bg-primary text-white"
option-value="Id"
option-label="Name"
v-model="OrderMsg.OrderSource"
:options="SourceEnumList"
emit-value
map-options
class="col-6 q-py-sm"
label="客人来源"
/>
<!-- <q-select
:disable="
modityOrderType == 2 || OrderMsg.JoinType == 3 || HelpEnterDisable
"
v-model="OrderMsg.HelpEnterId"
:options="EmployeeList"
filled
use-input
label="协助老师"
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterFn"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select> -->
<q-select v-if="false"
:disable="
modityOrderType == 2 ||
OrderMsg.JoinType == 3 ||
CourseConsultantDisable
"
v-model="OrderMsg.CourseConsultantId"
:options="EmployeeList2"
filled
use-input
label="课程顾问"
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName2"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterFn2"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<q-input
:disable="modityOrderType == 2"
v-if="OrderMsg.OrderSource == 3"
filled
stack-label
:dense="false"
maxlength="50"
v-model="OrderMsg.GeneralOccupation"
class="col-6 q-py-sm"
label="一般同行"
/>
<q-input
:disable="modityOrderType == 2"
v-if="OrderMsg.OrderSource == 7"
filled
stack-label
:dense="false"
maxlength="50"
v-model="OrderMsg.EduOccupation"
class="col-6 q-py-sm"
label="教育同行"
/>
<!-- <q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" /> -->
<q-input
:disable="modityOrderType == 2"
v-if="OrderMsg.IsLessPrice == 1"
@input="calcPrice()"
@keyup.native="checkPrice(OrderMsg, 'PerLessMoney')"
maxlength="10"
filled
stack-label
:dense="false"
v-model="OrderMsg.PerLessMoney"
class="col-6 q-py-sm"
label="少价金额(每人)"
:hint="'总少价金额:' + OrderMsg.PerLessMoney * OrderMsg.GuestNum"
/>
<q-input
disable
v-if="OrderMsg.EnterId > 0"
filled
stack-label
v-model="EnterName"
class="col-6 q-py-sm"
label="市场人员"
/>
<q-input
v-if="OrderMsg.HelpEnterId>0"
filled
stack-label
disable
:dense="false"
maxlength="10"
v-model="AssistName"
class="col-6 q-py-sm"
label="协助老师"
/>
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.SaleRemark"
type="textarea"
class="col-12 q-py-sm"
label="备注"
/>
</div>
</div>
<div
class="dialog-out-close"
@click="closeEditOrder"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
<q-icon name="iconfont icon-jujue1" size="26px" />
</div>
<q-dialog v-model="inception">
<q-card v-if="inceptionData">
<q-card-section>
<div class="text-h6">提示</div>
</q-card-section>
<q-card-section class="q-pt-none">
{{ inceptionData.Message }}
</q-card-section>
<q-card-actions align="right" class="text-primary">
<q-btn flat label="取消" size="sm" v-close-popup />
<q-btn
label="立即查看"
size="sm"
color="accent q-px-md"
style="font-weight:400 !important"
@click="goorder"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
getClassOrderInfo, //获取订单操作日志列表
getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder, //修改订单
SetClassOrderBatch, //多个约课订单
queryChaClassInfo,
GetSelectClassOrderList //获取前置下拉
} from "../../../../api/sale/sale";
import { GetStudentAssistList } from "../../../../api/sale/sale"; //获取协助人员
import { queryEmployee } from "../../../../api/users/user"; //获取员工
export default {
props: {
saveObj: {
type: Object,
default: null
},
mode: {
type: Number, //1:约课,2:班课
default: 1
},
//订单类型
orderType: {
type: Number,
default: 1
},
//修改订单类型
modityOrderType: {
type: Number,
default: 0 //1-销售修改,2-OP修改,3-总经理修改
},
stuData: {
//学生是否续费
type: Object,
default: null
},
schoolList: {
type: Array,
default: () => []
},
// 已选的多选课程
selectedCourseList: {
type: Array,
default: () => []
}
},
data() {
return {
courseInformationList:[],//存储多个课程
AssistName:"",//协助老师名称
IsShowEditOrder: true,
OrderMsg: {
ClassId: 0, //班级编号
GuestNum: 0, //人数
B2CRatio: 0,
B2CReNewRatio: 0,
Unit_Price: 0,
PreferPrice: 0, //应收
OrderSource: 0,
SaleRemark: "",
Class_Price: 0, //单价
Unit_PriceType:1,//价格类型:1-总课时费,2-课时单价 2024-08-26 add by:W
TotalClassHours:0,//总课时数 2024-08-26 add by:W
CoursewareFee:0,//教材费
TextbookFee:0,//课件费
OrderId: 0,
OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号
HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少
LessPrice: 0, //少价金额
PerLessMoney: 0, //每人少价金额
OrderNature: 1, //订单性质
OldPreferPrice: 0, //原实际应收
IsChaBan: 0, //是否插班报入(1-是)
CourseId: "", //课程编号
StartClassHours: 0, //已上课时
EffectTime: "", //生效时间
UpOrderId: 0, //前置订单编号
JoinType: 1, //订单报入类型
DiscountMoney: 0, //优惠金额
PerDiscountMoney: 0, //每人优惠金额
CourseConsultantId: 0, //课程顾问
CustomerId: 0, //同行
OrderIdentify: 2, //标识参数, 1产品下单 2客户转订单
StuIds: "",
EnterId: 0, //市场人员
// NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额
ScrollSchoolId: -1,
},
newSchoolList: [],
EnterName: "", //市场人员
Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价
UnitPrice: 0,
SourceEnumList: [], //订单来源
EmployeeList: [], //教师列表
AllemployeeList: [], //所有教师列表
EmployeeList2: [], //课程顾问列表
AllemployeeList2: [], //所有课程顾问列表
CourseList: [], //课程列表
courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据
HelpEnterDisable: false, //是否可选择协助教师
CourseConsultantDisable: false, //是否可选择课程顾问
inception: false,
inceptionData: null
};
},
computed: {
},
watch: {
},
created() {
if (this.saveObj && this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId;
}
this.getOrderSEList();
this.getEmployee(0);
this.getEmployee(2);
this.initConfig();
this.getSelectClass();
},
mounted() {
this.newSchoolList = [];
this.newSchoolList = JSON.parse(JSON.stringify(this.schoolList));
this.newSchoolList.unshift({
SName: "不限",
SId: -1
});
this.initData();
this.getAssistList();
this.OrderMsg.EnterId = this.stuData.EnterId;
this.EnterName = this.stuData.EnterName;
// 判断是否续费协助老师赋值
if (this.stuData.StuList[0].IsRenewGuest!=1){
this.OrderMsg.HelpEnterId = this.stuData.StuList[0].STTeacherId;
this.AssistName = this.stuData.StuList[0].STTeacherName
}
console.log("this.selectedCourseList",this.selectedCourseList);
if(this.selectedCourseList.length>1){
this.selectedCourseList.forEach(item => {
let dataObj = {
CourseName: "",//课程名称
ClassId: 0, //班级编号
GuestNum: 1, //人数
B2CRatio: 0,
B2CReNewRatio: 0,
Unit_Price: 0,
PreferPrice: 0, //应收
OrderSource: 0,
SaleRemark: "",
Class_Price: 0, //单价
Unit_PriceType:1,//价格类型:1-总课时费,2-课时单价 2024-08-26 add by:W
TotalClassHours:0,//总课时数 2024-08-26 add by:W
CoursewareFee:0,//教材费
TextbookFee:0,//课件费
OrderId: 0,
OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号
HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少
LessPrice: 0, //少价金额
PerLessMoney: 0, //每人少价金额
OrderNature: 1, //订单性质
OldPreferPrice: 0, //原实际应收
IsChaBan: 0, //是否插班报入(1-是)
CourseId: "", //课程编号
StartClassHours: 0, //已上课时
EffectTime: "", //生效时间
UpOrderId: 0, //前置订单编号
JoinType: 1, //订单报入类型
DiscountMoney: 0, //优惠金额
PerDiscountMoney: 0, //每人优惠金额
CourseConsultantId: 0, //课程顾问
CustomerId: 0, //同行
OrderIdentify: 2, //标识参数, 1产品下单 2客户转订单
StuIds: "",
EnterId: 0, //市场人员
// NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额
ScrollSchoolId: -1,
OrderType:1
}
if(item.CourseName){
dataObj.CourseName = item.CourseName
}
if (item.ClassId) {
dataObj.ClassId = item.ClassId;
}
if (item.SellPrice) {
dataObj.Unit_Price = item.SellPrice;
dataObj.Class_Price = item.SellPrice;
}
if (item.SellPriceType) {
dataObj.Unit_PriceType = item.SellPriceType;
}
if (item.TotalClassHours) {
dataObj.TotalClassHours = item.TotalClassHours;
}
if (item.CoursewareFee) {
dataObj.CoursewareFee = item.CoursewareFee;
}
if (item.TextbookFee) {
dataObj.TextbookFee = item.TextbookFee;
}
if (item.SourceId) {
dataObj.SourceId = item.SourceId;
}
if (item.CourseId) {
dataObj.CourseId = item.CourseId;
} else {
dataObj.CourseId = "";
}
if (item.B2CRatio) {
dataObj.B2CRatio = item.B2CRatio;
}
if (item.B2CReNewRatio) {
dataObj.B2CReNewRatio = item.B2CReNewRatio;
}
if (this.stuData.RenewNum > 0) {
dataObj.SaleRemark = `首次报名优惠比例${item.B2CRatio ??
0}%;续费优惠比例${item.B2CReNewRatio ?? 0}%`;
} else {
dataObj.SaleRemark = `首次报名优惠比例${item.B2CRatio ??
0}%`;
}
this.courseInformationList.push(dataObj)
});
this.totalCourseFee(1)
}
},
methods: {
//单个课程计算
oneTotalCourseFee(type){
if(this.OrderMsg.Unit_PriceType==2){
if(type==1){
this.OrderMsg.TextbookFee=Number((this.OrderMsg.TotalClassHours*this.OrderMsg.Unit_Price*this.OrderMsg.GuestNum)*(20/100)).toFixed(2);
}
this.OrderMsg.PreferPrice = this.OrderMsg.GuestNum*this.OrderMsg.Unit_Price*this.OrderMsg.TotalClassHours+Number(this.OrderMsg.TextbookFee)+Number(this.OrderMsg.CoursewareFee)
}
},
// 多个课程计算
totalCourseFee(type){
this.courseInformationList.forEach((item)=>{
if(this.stuData.StuList[0].IsRenewGuest==1){
item.DiscountMoney = this.accAdd(
item.DiscountMoney,
this.accMul(
item.Class_Price,
item.B2CReNewRatio / 100
)
);
if(item.Unit_PriceType==1){
item.PreferPrice = item.GuestNum*item.Unit_Price
}
else if(item.Unit_PriceType==2){
if(type==1){
item.TextbookFee=Number((item.TotalClassHours*item.Unit_Price*item.GuestNum)*(20/100)).toFixed(2);
}
item.PreferPrice = (item.GuestNum*item.Unit_Price*item.TotalClassHours)+Number(item.TextbookFee)+Number(item.CoursewareFee)
}
}else{
item.DiscountMoney = this.accAdd(
item.DiscountMoney,
this.accMul(item.Class_Price, item.B2CRatio / 100)
);
if(item.Unit_PriceType==1){
item.PreferPrice = item.GuestNum*item.Unit_Price
}
else if(item.Unit_PriceType==2){
item.TextbookFee=Number((item.TotalClassHours*item.Unit_Price*item.GuestNum)*(20/100)).toFixed(2);
item.PreferPrice = item.GuestNum*item.Unit_Price*item.TotalClassHours+Number(item.TextbookFee)+Number(item.CoursewareFee)
}
//item.PreferPrice = item.GuestNum*item.Unit_Price
}
})
},
//获取协助人员
getAssistList() {
const ids = this.stuData.StuList.map(e => e.StuId).toString();
GetStudentAssistList({ StuId: ids }).then(res => {
if (res.Code == 1) {
res.Data.map(e => {
if (e.AssistType == 4) {
if(this.stuData.StuList[0].IsRenewGuest==1){
this.OrderMsg.HelpEnterId = e.AssistId;
this.AssistName = e.AssistName
}
this.HelpEnterDisable = true;
}
if (e.AssistType == 2) {
this.OrderMsg.CourseConsultantId = e.AssistId;
this.CourseConsultantDisable = true;
if(this.selectedCourseList.length>1){
this.courseInformationList.forEach(item=>{
return item.CourseConsultantId = e.AssistId
})
}
}
});
}
});
},
//获取班级课程信息
initConfig() {
var qMsg = {
ClassId: 0
};
if (this.saveObj.ClassId) {
qMsg.ClassId = this.saveObj.ClassId;
}
queryChaClassInfo(qMsg).then(res => {
if (res.Code == 1) {
this.CourseList = res.Data.otherCourse;
if (this.saveObj && this.saveObj.OrderId > 0) {
} else {
this.OrderMsg.StartClassHours = res.Data.finishHours;
}
if (this.OrderMsg && this.OrderMsg.CourseId) {
this.courseObj = this.CourseList.find(
x => x.CourseId == this.OrderMsg.CourseId
);
}
this.calcPrice();
}
});
},
//计算课程单价和应收金额
calcPrice() {
var guestNum = 0;
if (this.OrderMsg.GuestNum && this.OrderMsg.GuestNum > 0) {
guestNum = Number(this.OrderMsg.GuestNum);
}
if(this.saveObj.SellPriceType==2){
this.OrderMsg.TextbookFee=((Number(this.OrderMsg.TotalClassHours) * Number(this.OrderMsg.Unit_Price) * Number(this.OrderMsg.GuestNum)) * (20/100)).toFixed(2);
}
let temp = this.CourseList.find(
x => x.CourseId == this.OrderMsg.CourseId
);
if (temp) {
this.courseObj = temp;
var tempDiscountMoney = 0; //优惠金额
// var tempSaleRemark = `直客首次报名优惠比例${temp.B2CRatio ?? 0}%`; //备注
//插班课时单价
var classHourPrice = temp.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(
classHourPrice *
(this.courseObj.ClassHours - this.OrderMsg.StartClassHours)
).toFixed(2);
if (guestNum == 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[0].PriceType == 0) {
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney =
(chaBanPrice * temp.CoursePriceList[0].PriceMoney) / 100;
} else {
tempDiscountMoney =
(temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100;
}
// tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%";
} else {
tempDiscountMoney = item.CoursePriceList[0].PriceMoney;
// tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney;
}
}
}
if (guestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) {
// tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%";
if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney =
(chaBanPrice * temp.CoursePriceList[1].PriceMoney) / 100;
} else {
tempDiscountMoney =
(temp.SellPrice * temp.CoursePriceList[1].PriceMoney) / 100;
}
} else {
tempDiscountMoney = item.CoursePriceList[1].PriceMoney;
// tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
}
}
}
var perDiscountMoney = Number(tempDiscountMoney).toFixed(2);
this.OrderMsg.PerDiscountMoney = perDiscountMoney;
//计算每人优惠和总优惠
// if (this.OrderMsg.IsChaBan == 1) {
// this.OrderMsg.Unit_Price = chaBanPrice;
// this.UnitPrice = chaBanPrice;
// } else {
// this.OrderMsg.Unit_Price = temp.SellPrice;
// this.UnitPrice = temp.SellPrice;
// }
// this.OrderMsg.SaleRemark = tempSaleRemark;
} else {
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
this.courseObj = {};
}
/**计算少价---开始*/
var tempPerLessMoney = 0;
if (this.OrderMsg.PerLessMoney && this.OrderMsg.PerLessMoney > 0) {
tempPerLessMoney = this.OrderMsg.PerLessMoney;
}
this.OrderMsg.LessPrice = tempPerLessMoney * guestNum;
/**计算少价----结束*/
var unit_price = 0;
if (this.OrderMsg.Unit_Price && this.OrderMsg.Unit_Price > 0) {
unit_price = Number(this.OrderMsg.Unit_Price);
}
var str = "";
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0;
if (
this.courseObj &&
this.courseObj.CourseId &&
this.courseObj.CourseId > 0
) {
if(this.OrderMsg.Unit_PriceType==1){
newPreferPrice= chaBanPrice * guestNum
}
else if(this.OrderMsg.Unit_PriceType==2){
newPreferPrice = chaBanPrice * guestNum*this.OrderMsg.TotalClassHours
}
}
this.OrderMsg.PreferPrice =
Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice;
} else {
if(this.OrderMsg.Unit_PriceType==1){
this.OrderMsg.PreferPrice =
Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice ;
}
else if(this.OrderMsg.Unit_PriceType==2){
this.OrderMsg.PreferPrice =
Number((guestNum * unit_price*this.OrderMsg.TotalClassHours)+Number(this.OrderMsg.TextbookFee)+Number(this.OrderMsg.CoursewareFee)).toFixed(2) - this.OrderMsg.LessPrice;
}
}
//留学就业订单
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
}
this.OrderMsg.GuestNum = this.stuData.StuList.length;
this.OrderMsg.DiscountMoney = 0;
this.stuData.StuList.map(e => {
if (e.IsRenewGuest == 0) {
this.OrderMsg.DiscountMoney = this.accAdd(
this.OrderMsg.DiscountMoney,
this.accMul(this.OrderMsg.Class_Price, this.OrderMsg.B2CRatio / 100)
);
} else {
this.OrderMsg.DiscountMoney = this.accAdd(
this.OrderMsg.DiscountMoney,
this.accMul(
this.OrderMsg.Class_Price,
this.OrderMsg.B2CReNewRatio / 100
)
);
}
});
},
// 初始化
initData() {
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.StartClassHours = 0;
this.OrderMsg.IsChaBan = 0;
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;
this.OrderMsg.TotalClassHours = 0;
this.OrderMsg.Unit_PriceType = 1;
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1;
}
console.log("saveObj",this.saveObj);
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.SellPriceType) {
this.OrderMsg.Unit_PriceType = this.saveObj.SellPriceType;
}
if (this.saveObj.TotalClassHours) {
this.OrderMsg.TotalClassHours = this.saveObj.TotalClassHours;
}
if (this.saveObj.TextbookFee) {
this.OrderMsg.TextbookFee = this.saveObj.TextbookFee;
}
if (this.saveObj.CoursewareFee) {
this.OrderMsg.CoursewareFee = this.saveObj.CoursewareFee;
}
if (this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId;
} else {
this.OrderMsg.CourseId = "";
}
if (this.saveObj.B2CRatio) {
this.OrderMsg.B2CRatio = this.saveObj.B2CRatio;
}
if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio;
}
if(this.selectedCourseList.length>1){
return
}
}
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}%`; //备注})
}
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === "") {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList));
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(
v => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//筛选课程顾问
filterFn2(val, update) {
update(() => {
if (val === "") {
this.EmployeeList2 = JSON.parse(
JSON.stringify(this.AllemployeeList2)
);
} else {
const needle = val.toLowerCase();
this.EmployeeList2 = this.AllemployeeList2.filter(
v => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取业务员
getEmployee(n) {
var qMsg = {
IsLeave: 1,
UserRole: n
};
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
if (n == 0) {
//教师
this.EmployeeList = res.Data;
this.AllemployeeList = res.Data;
let obj = {
Id: 0,
EmployeeName: "不限"
};
this.EmployeeList.unshift(obj);
}
if (n == 2) {
//课程顾问
this.EmployeeList2 = res.Data;
this.AllemployeeList2 = res.Data;
let obj = {
Id: 0,
EmployeeName: "不限"
};
this.EmployeeList2.unshift(obj);
}
}
});
},
//关闭弹窗
closeEditOrder() {
this.IsShowEditOrder = false;
this.$emit("close");
},
//获取订单来源
getOrderSEList() {
getOrderSourceEnumList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
this.SourceEnumList = tempArray;
this.OrderMsg.OrderSource = tempArray[0].Id;
if(this.selectedCourseList.length>0){
this.courseInformationList.forEach(item=>{
return item.OrderSource = this.OrderMsg.OrderSource
})
}
}
});
},
//修改订单
saveOrderInfo() {
if(this.selectedCourseList.length>1){
this.multipleAppointmentsFun()
}else{
this.singleAppointmentsFun()
}
},
// 多个约课
multipleAppointmentsFun(){
//插班验证课程和生效时间
this.courseInformationList.forEach(item=>{
item.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
item.HelpEnterId = this.OrderMsg.HelpEnterId
item.CustomerId = this.stuData.CustomerId;
})
let Msg = {
OrderList: this.courseInformationList
}
SetClassOrderBatch(Msg)
.then(res => {
this.$emit("cancelloading"); //取消按钮的加载
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "操作成功!",
position: "top"
});
//调用父页面成功方法
this.$emit("success");
this.IsShowEditOrder = false;
} else {
this.$q.notify({
type: "negative",
position: "top",
message: res.Message
});
}
})
.catch(err => {
this.$emit("cancelloading"); //取消按钮的加载
if (err.Code == 2) {
this.inceptionData = err;
this.inception = true;
}
});
},
// 单个班课、约课
singleAppointmentsFun(){
//插班验证课程和生效时间
if (this.OrderMsg.IsChaBan == 1) {
this.$refs.CourseId.validate();
this.$refs.EffectTime.validate();
if (this.$refs.CourseId.hasError) {
this.$q.notify({
type: "negative",
position: "top",
message: `请选择课程!`
});
return;
}
if (this.$refs.EffectTime.hasError) {
this.$q.notify({
type: "negative",
position: "top",
message: `请选择生效时间!`
});
return;
}
}
this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
this.OrderMsg.CustomerId = this.stuData.CustomerId;
setClassOrder(this.OrderMsg)
.then(res => {
this.$emit("cancelloading"); //取消按钮的加载
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "操作成功!",
position: "top"
});
//调用父页面成功方法
this.$emit("success");
this.IsShowEditOrder = false;
} else {
this.$q.notify({
type: "negative",
position: "top",
message: res.Message
});
}
})
.catch(err => {
this.$emit("cancelloading"); //取消按钮的加载
if (err.Code == 2) {
this.inceptionData = err;
this.inception = true;
}
});
},
goorder() {
this.OpenNewUrl("/sale/myOrder", {
OrderId: this.inceptionData.Data
});
this.inception = false;
},
//获取前置下拉数据
getSelectClass() {
var qMsg = {
ClassId: 0
};
if (this.saveObj.ClassId) {
qMsg.ClassId = this.saveObj.ClassId;
}
GetSelectClassOrderList(qMsg).then(res => {
if (res.Code == 1) {
this.beforeOrderList = res.Data;
}
});
},
getStudent(item) {
let str = "";
if (item && item.length > 1) {
str = item[0].GuestName + "等" + item.length + "人";
}
if (item.length == 1) {
str = item[0].GuestName;
}
return str;
}
}
};
</script>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="q-mb-sm text-accent"> <div class="q-mb-sm text-accent">
<span class="text-primary" v-if="mode === 1">班级:</span> <span class="text-primary" v-if="mode === 1">班级:</span>
<span v-if="mode === 1">{{ saveObj.ClassName }}</span> <span v-if="mode === 1">{{ saveObj.ClassName }}</span>
<span v-if="mode!=2&&selectedCourseList.length==0||selectedCourseList.length==1"> <span >
<span class="q-ml-md text-primary">课程:</span> <span class="q-ml-md text-primary">课程:</span>
{{ saveObj.CourseName }} {{ saveObj.CourseName }}
</span> </span>
...@@ -27,29 +27,114 @@ ...@@ -27,29 +27,114 @@
/> />
</div> </div>
</div> </div>
<!-- 多个约课 -->
<div v-if="selectedCourseList.length>1"> <!-- 一个约课、班课 -->
<div class="column shadow-4 q-mb-md q-pb-md" v-for="(item,index) in courseInformationList" :key="index"> <div class="column items-center">
<div class="q-pt-md q-pb-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<span class="q-ml-md text-primary">课程:</span>{{item.CourseName}}
</div>
<div class="col row wrap q-mr-lg q-ml-lg q-col-gutter-md">
<q-input <q-input
filled filled
stack-label stack-label
maxlength="3" maxlength="3"
:dense="false" :dense="false"
v-model="item.GuestNum" @keyup.native="checkInteger(OrderMsg, 'GuestNum')"
v-model="OrderMsg.GuestNum"
@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">
<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="col-6 q-py-sm"
:rules="[val => !!val || '请选择课程']"
label="选择课程"
@input="calcPrice()"
/>
<q-input <q-input
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="item.Class_Price" v-model="OrderMsg.StartClassHours"
:disable="modityOrderType == 2"
@keyup.native="checkInteger(OrderMsg, 'StartClassHours')"
ref="StartClassHours"
@input="calcPrice()"
class="col-6 q-py-sm"
label="起始课时"
/>
<q-input
filled
v-model="OrderMsg.EffectTime"
ref="EffectTime"
:rules="[val => !!val || '请填生效时间']"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
mask="date"
label="生效时间"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
ref="qDateProxy1"
transition-show="scale"
transition-hide="scale"
>
<q-date
v-model="OrderMsg.EffectTime"
@input="() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-select
filled
option-value="OrderId"
option-label="CourseName"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
v-model="OrderMsg.UpOrderId"
:options="beforeOrderList"
emit-value
map-options
label="前置订单"
>
<template
v-slot:option="{
itemProps,
itemEvents,
opt,
selected,
toggleOption
}"
>
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label
><span style="color:blue">{{ opt.OrderId }}</span>
{{ opt.CourseName }} {{ opt.ClassName }}
{{ getStudent(opt.GuestList) }}</q-item-label
>
</q-item-section>
</q-item>
</template>
</q-select>
</template>
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.Class_Price"
:disable="true" :disable="true"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="单价(课程售价)" label="单价(课程售价)"
...@@ -60,8 +145,9 @@ ...@@ -60,8 +145,9 @@
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="item.Unit_Price" v-model="OrderMsg.Unit_Price"
:disable="IsShowUpPrice == true ? false : true" :disable="IsShowUpPrice == true ? false : true"
@blur="calcPrice()"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="成交单价" label="成交单价"
:rules="[val => !!val || '请填成交单价']" :rules="[val => !!val || '请填成交单价']"
...@@ -78,8 +164,9 @@ ...@@ -78,8 +164,9 @@
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="item.Unit_Price" v-model="OrderMsg.Unit_Price"
:disable="true" :disable="true"
@input="calcPrice()"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="成交单价" label="成交单价"
:rules="[val => !!val || '请填成交单价']" :rules="[val => !!val || '请填成交单价']"
...@@ -90,20 +177,20 @@ ...@@ -90,20 +177,20 @@
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="item.DiscountMoney" v-model="OrderMsg.DiscountMoney"
:disable="true" :disable="true"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="优惠金额" label="优惠金额"
/> />
<template v-if="item.Unit_PriceType==2"> <template v-if="OrderMsg.Unit_PriceType==2">
<q-input <q-input
filled filled
stack-label stack-label
:dense="false" :dense="false"
type="number" type="number"
:min="1" :min="1"
@input="totalCourseFee(1)" @input="oneTotalCourseFee(1)"
v-model="item.TotalClassHours" v-model="OrderMsg.TotalClassHours"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="总课时数" label="总课时数"
/> />
...@@ -114,8 +201,8 @@ ...@@ -114,8 +201,8 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="totalCourseFee(0)" @input="oneTotalCourseFee(0)"
v-model="item.TextbookFee" v-model="OrderMsg.TextbookFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="课件费" label="课件费"
/> />
...@@ -125,19 +212,18 @@ ...@@ -125,19 +212,18 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="totalCourseFee(0)" @input="oneTotalCourseFee(0)"
v-model="item.CoursewareFee" v-model="OrderMsg.CoursewareFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="教材费" label="教材费"
/> />
<template v-if="modityOrderType == 3"> <template v-if="modityOrderType == 3">
<q-input <q-input
filled filled
min
stack-label stack-label
:dense="false" :dense="false"
v-model="item.Unit_Price" v-model="OrderMsg.Unit_Price"
@input="calcPrice()"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="成交单价" label="成交单价"
:rules="[val => !!val || '请填成交单价']" :rules="[val => !!val || '请填成交单价']"
...@@ -149,16 +235,17 @@ ...@@ -149,16 +235,17 @@
:disable="modityOrderType != 3" :disable="modityOrderType != 3"
:dense="false" :dense="false"
maxlength="10" maxlength="10"
v-model="item.PreferPrice" @keyup.native="checkPrice(OrderMsg, 'PreferPrice')"
v-model="OrderMsg.PreferPrice"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="应收" label="应收"
/> />
<q-select <q-select v-show="false"
v-if="mode == 2" v-if="mode == 2"
standout="bg-primary text-white" standout="bg-primary text-white"
option-value="SId" option-value="SId"
option-label="SName" option-label="SName"
v-model="item.ScrollSchoolId" v-model="OrderMsg.ScrollSchoolId"
:options="newSchoolList" :options="newSchoolList"
emit-value emit-value
map-options map-options
...@@ -170,7 +257,7 @@ ...@@ -170,7 +257,7 @@
standout="bg-primary text-white" standout="bg-primary text-white"
option-value="Id" option-value="Id"
option-label="Name" option-label="Name"
v-model="item.OrderSource" v-model="OrderMsg.OrderSource"
:options="SourceEnumList" :options="SourceEnumList"
emit-value emit-value
map-options map-options
...@@ -180,10 +267,10 @@ ...@@ -180,10 +267,10 @@
<q-select v-if="false" <q-select v-if="false"
:disable=" :disable="
modityOrderType == 2 || modityOrderType == 2 ||
item.JoinType == 3 || OrderMsg.JoinType == 3 ||
CourseConsultantDisable CourseConsultantDisable
" "
v-model="item.CourseConsultantId" v-model="OrderMsg.CourseConsultantId"
:options="EmployeeList2" :options="EmployeeList2"
filled filled
use-input use-input
...@@ -206,48 +293,50 @@ ...@@ -206,48 +293,50 @@
</q-select> </q-select>
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="item.OrderSource == 3" v-if="OrderMsg.OrderSource == 3"
filled filled
stack-label stack-label
:dense="false" :dense="false"
maxlength="50" maxlength="50"
v-model="item.GeneralOccupation" v-model="OrderMsg.GeneralOccupation"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="一般同行" label="一般同行"
/> />
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="item.OrderSource == 7" v-if="OrderMsg.OrderSource == 7"
filled filled
stack-label stack-label
:dense="false" :dense="false"
maxlength="50" maxlength="50"
v-model="item.EduOccupation" v-model="OrderMsg.EduOccupation"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="教育同行" label="教育同行"
/> />
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="item.IsLessPrice == 1" v-if="OrderMsg.IsLessPrice == 1"
@input="calcPrice()"
@keyup.native="checkPrice(OrderMsg, 'PerLessMoney')"
maxlength="10" maxlength="10"
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="item.PerLessMoney" v-model="OrderMsg.PerLessMoney"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="少价金额(每人)" label="少价金额(每人)"
:hint="'总少价金额:' + item.PerLessMoney * item.GuestNum" :hint="'总少价金额:' + OrderMsg.PerLessMoney * OrderMsg.GuestNum"
/> />
<q-input <q-input
disable disable
v-if="item.EnterId > 0" v-if="OrderMsg.EnterId > 0"
filled filled
stack-label stack-label
v-model="EnterName" v-model="EnterName"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="市场人员" label="市场人员"
/> />
<q-input <!-- <q-input
v-if="OrderMsg.HelpEnterId>0" v-if="OrderMsg.HelpEnterId>0"
filled filled
stack-label stack-label
...@@ -257,126 +346,63 @@ ...@@ -257,126 +346,63 @@
v-model="AssistName" v-model="AssistName"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="协助老师" label="协助老师"
/> /> -->
<q-select
v-model="OrderMsg.HelpEnterId"
:options="AssistList"
filled
use-input
label="协助老师"
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName2"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterAssisFn"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<q-input <q-input
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="item.SaleRemark" v-model="OrderMsg.SaleRemark"
type="textarea" type="textarea"
class="col-12 q-py-sm" class="col-12 q-py-sm"
label="备注" label="备注"
/> />
</div> </div>
</div> </div>
<!-- 多个约课 -->
<!-- <div v-else>
<div class="column shadow-4 q-mb-md q-pb-md" v-for="(item,index) in courseInformationList" :key="index">
<div class="q-pt-md q-pb-md">
<span class="q-ml-md text-primary">课程:</span>{{item.CourseName}}
</div> </div>
<!-- 一个约课、班课 --> <div class="col row wrap q-mr-lg q-ml-lg q-col-gutter-md">
<div v-else class="column items-center">
<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')" v-model="item.GuestNum"
v-model="OrderMsg.GuestNum"
@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">
<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="col-6 q-py-sm"
:rules="[val => !!val || '请选择课程']"
label="选择课程"
@input="calcPrice()"
/>
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.StartClassHours"
:disable="modityOrderType == 2"
@keyup.native="checkInteger(OrderMsg, 'StartClassHours')"
ref="StartClassHours"
@input="calcPrice()"
class="col-6 q-py-sm"
label="起始课时"
/>
<q-input
filled
v-model="OrderMsg.EffectTime"
ref="EffectTime"
:rules="[val => !!val || '请填生效时间']"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
mask="date"
label="生效时间"
>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
ref="qDateProxy1"
transition-show="scale"
transition-hide="scale"
>
<q-date
v-model="OrderMsg.EffectTime"
@input="() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-select
filled
option-value="OrderId"
option-label="CourseName"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
v-model="OrderMsg.UpOrderId"
:options="beforeOrderList"
emit-value
map-options
label="前置订单"
>
<template
v-slot:option="{
itemProps,
itemEvents,
opt,
selected,
toggleOption
}"
>
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label
><span style="color:blue">{{ opt.OrderId }}</span>
{{ opt.CourseName }} {{ opt.ClassName }}
{{ getStudent(opt.GuestList) }}</q-item-label
>
</q-item-section>
</q-item>
</template>
</q-select>
</template>
<q-input <q-input
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.Class_Price" v-model="item.Class_Price"
:disable="true" :disable="true"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="单价(课程售价)" label="单价(课程售价)"
...@@ -387,9 +413,8 @@ ...@@ -387,9 +413,8 @@
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.Unit_Price" v-model="item.Unit_Price"
:disable="IsShowUpPrice == true ? false : true" :disable="IsShowUpPrice == true ? false : true"
@blur="calcPrice()"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="成交单价" label="成交单价"
:rules="[val => !!val || '请填成交单价']" :rules="[val => !!val || '请填成交单价']"
...@@ -406,36 +431,30 @@ ...@@ -406,36 +431,30 @@
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.Unit_Price" v-model="item.Unit_Price"
:disable="true" :disable="true"
@input="calcPrice()"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="成交单价" label="成交单价"
:rules="[val => !!val || '请填成交单价']" :rules="[val => !!val || '请填成交单价']"
/> />
</template> </template>
<q-input <q-input v-if="false"
v-if="false"
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.DiscountMoney" v-model="item.DiscountMoney"
:disable="true" :disable="true" class="col-6 q-py-sm" label="优惠金额"/>
class="col-6 q-py-sm" <template v-if="item.Unit_PriceType==2">
label="优惠金额"
/>
<template v-if="OrderMsg.Unit_PriceType==2">
<q-input <q-input
filled filled
stack-label stack-label
:dense="false" :dense="false"
type="number" type="number"
:min="1" :min="1"
@input="oneTotalCourseFee(1)" @input="totalCourseFee(1)"
v-model="OrderMsg.TotalClassHours" v-model="item.TotalClassHours"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="总课时数" label="总课时数" />
/>
</template> </template>
<q-input <q-input
filled filled
...@@ -443,8 +462,8 @@ ...@@ -443,8 +462,8 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="oneTotalCourseFee(0)" @input="totalCourseFee(0)"
v-model="OrderMsg.TextbookFee" v-model="item.TextbookFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="课件费" label="课件费"
/> />
...@@ -454,20 +473,19 @@ ...@@ -454,20 +473,19 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="oneTotalCourseFee(0)" @input="totalCourseFee(0)"
v-model="OrderMsg.CoursewareFee" v-model="item.CoursewareFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="教材费" label="教材费"
/> />
<!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-6 q-py-sm" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<template v-if="modityOrderType == 3"> <template v-if="modityOrderType == 3">
<q-input <q-input
filled filled
min
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.Unit_Price" v-model="item.Unit_Price"
@input="calcPrice()"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="成交单价" label="成交单价"
:rules="[val => !!val || '请填成交单价']" :rules="[val => !!val || '请填成交单价']"
...@@ -479,8 +497,7 @@ ...@@ -479,8 +497,7 @@
:disable="modityOrderType != 3" :disable="modityOrderType != 3"
:dense="false" :dense="false"
maxlength="10" maxlength="10"
@keyup.native="checkPrice(OrderMsg, 'PreferPrice')" v-model="item.PreferPrice"
v-model="OrderMsg.PreferPrice"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="应收" label="应收"
/> />
...@@ -489,7 +506,7 @@ ...@@ -489,7 +506,7 @@
standout="bg-primary text-white" standout="bg-primary text-white"
option-value="SId" option-value="SId"
option-label="SName" option-label="SName"
v-model="OrderMsg.ScrollSchoolId" v-model="item.ScrollSchoolId"
:options="newSchoolList" :options="newSchoolList"
emit-value emit-value
map-options map-options
...@@ -501,45 +518,20 @@ ...@@ -501,45 +518,20 @@
standout="bg-primary text-white" standout="bg-primary text-white"
option-value="Id" option-value="Id"
option-label="Name" option-label="Name"
v-model="OrderMsg.OrderSource" v-model="item.OrderSource"
:options="SourceEnumList" :options="SourceEnumList"
emit-value emit-value
map-options map-options
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="客人来源" label="客人来源"
/> />
<!-- <q-select
:disable="
modityOrderType == 2 || OrderMsg.JoinType == 3 || HelpEnterDisable
"
v-model="OrderMsg.HelpEnterId"
:options="EmployeeList"
filled
use-input
label="协助老师"
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterFn"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select> -->
<q-select v-if="false" <q-select v-if="false"
:disable=" :disable="
modityOrderType == 2 || modityOrderType == 2 ||
OrderMsg.JoinType == 3 || item.JoinType == 3 ||
CourseConsultantDisable CourseConsultantDisable
" "
v-model="OrderMsg.CourseConsultantId" v-model="item.CourseConsultantId"
:options="EmployeeList2" :options="EmployeeList2"
filled filled
use-input use-input
...@@ -562,45 +554,41 @@ ...@@ -562,45 +554,41 @@
</q-select> </q-select>
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="OrderMsg.OrderSource == 3" v-if="item.OrderSource == 3"
filled filled
stack-label stack-label
:dense="false" :dense="false"
maxlength="50" maxlength="50"
v-model="OrderMsg.GeneralOccupation" v-model="item.GeneralOccupation"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="一般同行" label="一般同行"
/> />
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="OrderMsg.OrderSource == 7" v-if="item.OrderSource == 7"
filled filled
stack-label stack-label
:dense="false" :dense="false"
maxlength="50" maxlength="50"
v-model="OrderMsg.EduOccupation" v-model="item.EduOccupation"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="教育同行" label="教育同行"
/> />
<!-- <q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" /> -->
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="OrderMsg.IsLessPrice == 1" v-if="item.IsLessPrice == 1"
@input="calcPrice()"
@keyup.native="checkPrice(OrderMsg, 'PerLessMoney')"
maxlength="10" maxlength="10"
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.PerLessMoney" v-model="item.PerLessMoney"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="少价金额(每人)" label="少价金额(每人)"
:hint="'总少价金额:' + OrderMsg.PerLessMoney * OrderMsg.GuestNum" :hint="'总少价金额:' + item.PerLessMoney * item.GuestNum"
/> />
<q-input <q-input
disable disable
v-if="OrderMsg.EnterId > 0" v-if="item.EnterId > 0"
filled filled
stack-label stack-label
v-model="EnterName" v-model="EnterName"
...@@ -622,13 +610,15 @@ ...@@ -622,13 +610,15 @@
filled filled
stack-label stack-label
:dense="false" :dense="false"
v-model="OrderMsg.SaleRemark" v-model="item.SaleRemark"
type="textarea" type="textarea"
class="col-12 q-py-sm" class="col-12 q-py-sm"
label="备注" label="备注"
/> />
</div> </div>
</div> </div>
</div> -->
<div <div
class="dialog-out-close" class="dialog-out-close"
...@@ -764,13 +754,17 @@ export default { ...@@ -764,13 +754,17 @@ export default {
AllemployeeList: [], //所有教师列表 AllemployeeList: [], //所有教师列表
EmployeeList2: [], //课程顾问列表 EmployeeList2: [], //课程顾问列表
AllemployeeList2: [], //所有课程顾问列表 AllemployeeList2: [], //所有课程顾问列表
AssistList: [], //协助人员列表
AllAssistList: [], //所有协助人员列表
CourseList: [], //课程列表 CourseList: [], //课程列表
courseObj: {}, //选择的课程 courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据 beforeOrderList: [], //前置订单数据
HelpEnterDisable: false, //是否可选择协助教师 HelpEnterDisable: false, //是否可选择协助教师
CourseConsultantDisable: false, //是否可选择课程顾问 CourseConsultantDisable: false, //是否可选择课程顾问
inception: false, inception: false,
inceptionData: null inceptionData: null,
OrderCourseList:[],//选择的课程信息
}; };
}, },
computed: { computed: {
...@@ -781,14 +775,13 @@ export default { ...@@ -781,14 +775,13 @@ export default {
}, },
created() { created() {
if (this.saveObj && this.saveObj.CourseId) { if (this.saveObj && this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId; // this.OrderMsg.CourseId = this.saveObj.CourseId;
} }
this.getOrderSEList(); this.getOrderSEList();
this.getEmployee(0); this.getEmployee(0);
this.getEmployee(2); this.getEmployee(2);
this.initConfig(); this.initConfig();
this.getSelectClass(); this.getSelectClass();
}, },
mounted() { mounted() {
this.newSchoolList = []; this.newSchoolList = [];
...@@ -807,7 +800,7 @@ export default { ...@@ -807,7 +800,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("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 = {
...@@ -960,6 +953,9 @@ export default { ...@@ -960,6 +953,9 @@ export default {
if (res.Code == 1) { if (res.Code == 1) {
res.Data.map(e => { res.Data.map(e => {
if (e.AssistType == 4) { if (e.AssistType == 4) {
this.AssistList.push({Id:e.AssistId,EmployeeName: e.AssistName});
this.AllAssistList.push({Id:e.AssistId,EmployeeName: e.AssistName});
console.log(" this.AssistList", this.AssistList);
if(this.stuData.StuList[0].IsRenewGuest==1){ if(this.stuData.StuList[0].IsRenewGuest==1){
this.OrderMsg.HelpEnterId = e.AssistId; this.OrderMsg.HelpEnterId = e.AssistId;
this.AssistName = e.AssistName this.AssistName = e.AssistName
...@@ -978,6 +974,20 @@ export default { ...@@ -978,6 +974,20 @@ export default {
}); });
} }
}); });
if(this.AssistList.length==0){
var qMsg = { IsLeave: 1, UserRole: 0};
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
res.Data.map(e => {
this.AssistList.push({Id:e.Id,EmployeeName: e.EmployeeName});
this.AllAssistList.push({Id:e.Id,EmployeeName: e.EmployeeName});
});
console.log(" this.AssistListData", this.AssistList);
}
});
}
console.log(" this.AllAssistList", this.AllAssistList);
}, },
//获取班级课程信息 //获取班级课程信息
initConfig() { initConfig() {
...@@ -1005,8 +1015,8 @@ export default { ...@@ -1005,8 +1015,8 @@ export default {
}, },
//计算课程单价和应收金额 //计算课程单价和应收金额
calcPrice() { calcPrice() {
this.OrderMsg.GuestNum = this.stuData.StuList.length;
var guestNum = 0; var guestNum = 0;
if (this.OrderMsg.GuestNum && this.OrderMsg.GuestNum > 0) { if (this.OrderMsg.GuestNum && this.OrderMsg.GuestNum > 0) {
guestNum = Number(this.OrderMsg.GuestNum); guestNum = Number(this.OrderMsg.GuestNum);
} }
...@@ -1112,17 +1122,23 @@ export default { ...@@ -1112,17 +1122,23 @@ export default {
newPreferPrice = chaBanPrice * guestNum*this.OrderMsg.TotalClassHours newPreferPrice = chaBanPrice * guestNum*this.OrderMsg.TotalClassHours
} }
} }
console.log("我进来了1");
this.OrderMsg.PreferPrice = this.OrderMsg.PreferPrice =
Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice; Number(newPreferPrice).toFixed(2) - this.OrderMsg.LessPrice;
} else { } else {
if(this.OrderMsg.Unit_PriceType==1){ if(this.OrderMsg.Unit_PriceType==1){
console.log("guestNum",guestNum);
console.log("unit_price",unit_price);
console.log("this.OrderMsg.LessPrice",this.OrderMsg.LessPrice);
this.OrderMsg.PreferPrice = this.OrderMsg.PreferPrice =
Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice ; Number(guestNum * unit_price).toFixed(2) - this.OrderMsg.LessPrice ;
console.log("我进来了2");
} }
else if(this.OrderMsg.Unit_PriceType==2){ else if(this.OrderMsg.Unit_PriceType==2){
this.OrderMsg.PreferPrice = this.OrderMsg.PreferPrice =
Number((guestNum * unit_price*this.OrderMsg.TotalClassHours)+Number(this.OrderMsg.TextbookFee)+Number(this.OrderMsg.CoursewareFee)).toFixed(2) - this.OrderMsg.LessPrice; Number((guestNum * unit_price*this.OrderMsg.TotalClassHours)+Number(this.OrderMsg.TextbookFee)+Number(this.OrderMsg.CoursewareFee)).toFixed(2) - this.OrderMsg.LessPrice;
console.log("我进来了3");
} }
} }
//留学就业订单 //留学就业订单
...@@ -1130,7 +1146,8 @@ export default { ...@@ -1130,7 +1146,8 @@ export default {
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2); this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
} }
this.OrderMsg.GuestNum = this.stuData.StuList.length;
this.OrderMsg.DiscountMoney = 0; this.OrderMsg.DiscountMoney = 0;
this.stuData.StuList.map(e => { this.stuData.StuList.map(e => {
...@@ -1174,6 +1191,7 @@ export default { ...@@ -1174,6 +1191,7 @@ export default {
this.OrderMsg.CourseConsultantId = 0; this.OrderMsg.CourseConsultantId = 0;
this.OrderMsg.TotalClassHours = 0; this.OrderMsg.TotalClassHours = 0;
this.OrderMsg.Unit_PriceType = 1; this.OrderMsg.Unit_PriceType = 1;
this.OrderMsg.OrderCourseList = [];
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1; this.OrderMsg.OrderNature = 1;
} }
...@@ -1214,6 +1232,9 @@ export default { ...@@ -1214,6 +1232,9 @@ export default {
if (this.saveObj.B2CReNewRatio) { if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio; this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio;
} }
if (this.saveObj.OrderCourseList&&this.saveObj.OrderCourseList.length>0) {
this.OrderMsg.OrderCourseList =JSON.parse(JSON.stringify(this.saveObj.OrderCourseList)) ;
}
if(this.selectedCourseList.length>1){ if(this.selectedCourseList.length>1){
return return
...@@ -1243,6 +1264,19 @@ export default { ...@@ -1243,6 +1264,19 @@ export default {
} }
}); });
}, },
//筛选协助老师
filterAssisFn(val, update) {
update(() => {
if (val === "") {
this.AssistList = JSON.parse(JSON.stringify(this.AllAssistList));
} else {
const needle = val.toLowerCase();
this.AssistList = this.AllAssistList.filter(
v => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//筛选课程顾问 //筛选课程顾问
filterFn2(val, update) { filterFn2(val, update) {
update(() => { update(() => {
...@@ -1311,11 +1345,12 @@ export default { ...@@ -1311,11 +1345,12 @@ export default {
}, },
//修改订单 //修改订单
saveOrderInfo() { saveOrderInfo() {
if(this.selectedCourseList.length>1){ // if(this.selectedCourseList.length>1){
this.multipleAppointmentsFun() // this.multipleAppointmentsFun()
}else{ // }else{
// this.singleAppointmentsFun()
// }
this.singleAppointmentsFun() this.singleAppointmentsFun()
}
}, },
// 多个约课 // 多个约课
multipleAppointmentsFun(){ multipleAppointmentsFun(){
......
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