Commit e9857fc2 authored by 罗超's avatar 罗超

2

parent b1831100
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<div> <div>
<div class="q-mb-sm text-accent"> <div class="q-mb-sm text-accent">
<span class="text-primary">班级:</span>{{saveObj.ClassName}} <span class="text-primary">班级:</span>{{ saveObj.ClassName }}
<span class="q-ml-md text-primary">课程:</span>{{saveObj.CourseName}} <span class="q-ml-md text-primary">课程:</span>{{ saveObj.CourseName }}
</div> </div>
<div class="row q-mb-md"> <div class="row q-mb-md">
<div class="col-10 flex"> <div class="col-10 flex">
...@@ -214,7 +214,9 @@ ...@@ -214,7 +214,9 @@
label="客人来源" label="客人来源"
/> />
<q-select <q-select
:disable="(modityOrderType == 2 || OrderMsg.JoinType == 3)||HelpEnterDisable" :disable="
modityOrderType == 2 || OrderMsg.JoinType == 3 || HelpEnterDisable
"
v-model="OrderMsg.HelpEnterId" v-model="OrderMsg.HelpEnterId"
:options="EmployeeList" :options="EmployeeList"
filled filled
...@@ -237,19 +239,23 @@ ...@@ -237,19 +239,23 @@
</template> </template>
</q-select> </q-select>
<q-select <q-select
:disable="(modityOrderType == 2 || OrderMsg.JoinType == 3)||CourseConsultantDisable" :disable="
modityOrderType == 2 ||
OrderMsg.JoinType == 3 ||
CourseConsultantDisable
"
v-model="OrderMsg.CourseConsultantId" v-model="OrderMsg.CourseConsultantId"
:options="EmployeeList" :options="EmployeeList2"
filled filled
use-input use-input
label="课程顾问" label="课程顾问"
option-label="EmployeeName" option-label="EmployeeName"
option-value="Id" option-value="Id"
ref="EmployeeName" ref="EmployeeName2"
class="col-6 q-py-sm" class="col-6 q-py-sm"
emit-value emit-value
map-options map-options
@filter="filterFn" @filter="filterFn2"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
...@@ -299,7 +305,7 @@ ...@@ -299,7 +305,7 @@
/> />
<q-input <q-input
disable disable
v-if="OrderMsg.EnterId >0" v-if="OrderMsg.EnterId > 0"
filled filled
stack-label stack-label
v-model="EnterName" v-model="EnterName"
...@@ -333,11 +339,9 @@ import { ...@@ -333,11 +339,9 @@ import {
getOrderSourceEnumList, //获取订单来源 枚举 getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder, //修改订单 setClassOrder, //修改订单
queryChaClassInfo, queryChaClassInfo,
GetSelectClassOrderList, //获取前置下拉 GetSelectClassOrderList //获取前置下拉
} from "../../../../api/sale/sale"; } from "../../../../api/sale/sale";
import { import { GetStudentAssistList } from "../../../../api/sale/sale"; //获取协助人员
GetStudentAssistList,
} from '../../../../api/sale/sale'//获取协助人员
import { queryEmployee } from "../../../../api/users/user"; //获取员工 import { queryEmployee } from "../../../../api/users/user"; //获取员工
export default { export default {
props: { props: {
...@@ -398,22 +402,24 @@ export default { ...@@ -398,22 +402,24 @@ export default {
CustomerId: 0, //同行 CustomerId: 0, //同行
OrderIdentify: 2, //标识参数, 1产品下单 2客户转订单 OrderIdentify: 2, //标识参数, 1产品下单 2客户转订单
StuIds: "", StuIds: "",
EnterId:0,//市场人员 EnterId: 0 //市场人员
// NormalCommission:'',//正常返佣金额 // NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额 // RenewCommission:"",// 预计返佣金额
}, },
EnterName:'',//市场人员 EnterName: "", //市场人员
Unit_PriceRemark: "", //单价规则 Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价 IsShowUpPrice: false, //是否显示高于定价
UnitPrice: 0, UnitPrice: 0,
SourceEnumList: [], //订单来源 SourceEnumList: [], //订单来源
EmployeeList: [], //员工列表 EmployeeList: [], //教师列表
AllemployeeList: [], //所有员工列表 AllemployeeList: [], //所有教师列表
EmployeeList2: [], //课程顾问列表
AllemployeeList2: [], //所有课程顾问列表
CourseList: [], //课程列表 CourseList: [], //课程列表
courseObj: {}, //选择的课程 courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据 beforeOrderList: [], //前置订单数据
HelpEnterDisable:false,//是否可选择协助教师 HelpEnterDisable: false, //是否可选择协助教师
CourseConsultantDisable:false,//是否可选择课程顾问 CourseConsultantDisable: false //是否可选择课程顾问
}; };
}, },
created() { created() {
...@@ -421,34 +427,35 @@ export default { ...@@ -421,34 +427,35 @@ export default {
this.OrderMsg.CourseId = this.saveObj.CourseId; this.OrderMsg.CourseId = this.saveObj.CourseId;
} }
this.getOrderSEList(); this.getOrderSEList();
this.getEmployee(); this.getEmployee(0);
this.getEmployee(2);
this.initConfig(); this.initConfig();
this.getSelectClass(); this.getSelectClass();
}, },
mounted() { mounted() {
this.initData(); this.initData();
this.getAssistList(); this.getAssistList();
this.OrderMsg.EnterId=this.stuData.EnterId this.OrderMsg.EnterId = this.stuData.EnterId;
this.EnterName=this.stuData.EnterName this.EnterName = this.stuData.EnterName;
}, },
methods: { methods: {
//获取协助人员 //获取协助人员
getAssistList() { getAssistList() {
const ids = this.stuData.StuList.map(e => e.StuId).toString(); const ids = this.stuData.StuList.map(e => e.StuId).toString();
GetStudentAssistList({StuId: ids}).then(res => { GetStudentAssistList({ StuId: ids }).then(res => {
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.OrderMsg.HelpEnterId=e.AssistId this.OrderMsg.HelpEnterId = e.AssistId;
this.HelpEnterDisable=true this.HelpEnterDisable = true;
} }
if(e.AssistType==2){ if (e.AssistType == 2) {
this.OrderMsg.CourseConsultantId=e.AssistId this.OrderMsg.CourseConsultantId = e.AssistId;
this.CourseConsultantDisable=true this.CourseConsultantDisable = true;
} }
}) });
} }
}) });
}, },
//获取班级课程信息 //获取班级课程信息
initConfig() { initConfig() {
...@@ -590,11 +597,15 @@ export default { ...@@ -590,11 +597,15 @@ export default {
this.stuData.StuList.map(e => { this.stuData.StuList.map(e => {
if (e.IsRenewGuest == 0) { if (e.IsRenewGuest == 0) {
this.OrderMsg.DiscountMoney =this.accAdd( this.OrderMsg.DiscountMoney,this.accMul(this.OrderMsg.Class_Price , this.OrderMsg.B2CRatio)) this.OrderMsg.DiscountMoney = this.accAdd(
this.OrderMsg.DiscountMoney,
this.accMul(this.OrderMsg.Class_Price, this.OrderMsg.B2CRatio)
);
} else { } else {
this.OrderMsg.DiscountMoney =this.accAdd( this.OrderMsg.DiscountMoney,this.accMul(this.OrderMsg.Class_Price , this.OrderMsg.B2CReNewRatio)) this.OrderMsg.DiscountMoney = this.accAdd(
this.OrderMsg.DiscountMoney,
this.accMul(this.OrderMsg.Class_Price, this.OrderMsg.B2CReNewRatio)
);
} }
}); });
}, },
...@@ -657,11 +668,11 @@ export default { ...@@ -657,11 +668,11 @@ export default {
this.calcPrice(); this.calcPrice();
if (this.stuData.RenewNum > 0) { if (this.stuData.RenewNum > 0) {
this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj.B2CRatio ??
.B2CRatio ?? 0}%;续费优惠比例${this.saveObj.B2CReNewRatio ?? 0}%`; //备注 0}%;续费优惠比例${this.saveObj.B2CReNewRatio ?? 0}%`; //备注
} else { } else {
this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj this.OrderMsg.SaleRemark = `首次报名优惠比例${this.saveObj.B2CRatio ??
.B2CRatio ?? 0}%`; //备注 0}%`; //备注
} }
}, },
//筛选员工 //筛选员工
...@@ -677,13 +688,31 @@ export default { ...@@ -677,13 +688,31 @@ export default {
} }
}); });
}, },
//筛选课程顾问
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() { getEmployee(n) {
var qMsg = { var qMsg = {
Dept_Id: 0 IsLeave: 1,
UserRole: 2
}; };
queryEmployee(qMsg).then(res => { queryEmployee(qMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
if (n == 0) {
//教师
this.EmployeeList = res.Data; this.EmployeeList = res.Data;
this.AllemployeeList = res.Data; this.AllemployeeList = res.Data;
let obj = { let obj = {
...@@ -692,6 +721,17 @@ export default { ...@@ -692,6 +721,17 @@ export default {
}; };
this.EmployeeList.unshift(obj); this.EmployeeList.unshift(obj);
} }
if (n == 2) {
//课程顾问
this.EmployeeList2 = res.Data;
this.AllemployeeList2 = res.Data;
let obj = {
Id: 0,
EmployeeName: "不限"
};
this.EmployeeList2.unshift(obj);
}
}
}); });
}, },
//关闭弹窗 //关闭弹窗
...@@ -778,7 +818,7 @@ export default { ...@@ -778,7 +818,7 @@ export default {
str = item[0].GuestName; str = item[0].GuestName;
} }
return str; return str;
}, }
} }
}; };
</script> </script>
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