Commit e9857fc2 authored by 罗超's avatar 罗超

2

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