Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
fd165559
Commit
fd165559
authored
May 13, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7d947a57
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
669 additions
and
53 deletions
+669
-53
sale.js
src/api/sale/sale.js
+12
-0
transfer-order.vue
src/components/school/student/transfer-order.vue
+8
-5
order-form.vue
src/components/school/student/transfer-order/order-form.vue
+545
-46
sysuser.vue
src/pages/school/sysuser.vue
+104
-2
No files found.
src/api/sale/sale.js
View file @
fd165559
...
...
@@ -34,6 +34,18 @@ export function setClassOrder(data) {
})
}
/**
* 新增 多个约课订单
*
*/
export
function
SetClassOrderBatch
(
data
)
{
return
request
({
url
:
'/order/SetClassOrderBatch'
,
method
:
'post'
,
data
})
}
/**
* 销售 我的订单
*
...
...
src/components/school/student/transfer-order.vue
View file @
fd165559
...
...
@@ -65,7 +65,7 @@
:max=
"coursePageCount"
:input=
"true"
@
input=
"changePage"
/>
</template>
<
template
v-if=
"mode == 2"
>
<yueke
@
select=
"selectCourse"
:select=
"
defaultCourse
"
></yueke>
<yueke
@
select=
"selectCourse"
:select=
"
selectedCourseList
"
></yueke>
</
template
>
<
template
v-if=
"mode == 3"
>
<vipcourse
ref=
"vipCourse"
@
success=
"$emit('close')"
:stuData=
"stuData"
></vipcourse>
...
...
@@ -73,7 +73,7 @@
</q-step>
<q-step
:name=
"3"
title=
"确认"
icon=
"settings"
:done=
"step > 3"
>
<orderForm
ref=
"orderForm"
:mode=
"mode"
:schoolList=
"schoolList"
:save-obj=
"saveObj"
:stuData=
"stuData"
:modityOrderType=
"1"
:
defaultCourse=
"defaultCourse
"
@
success=
"$emit('close')"
@
cancelloading=
"cancelloading"
></orderForm>
:modityOrderType=
"1"
:
selectedCourseList=
"selectedCourseList
"
@
success=
"$emit('close')"
@
cancelloading=
"cancelloading"
></orderForm>
</q-step>
</q-stepper>
</q-card-section>
...
...
@@ -188,7 +188,8 @@
myClassList
:
[],
allClassList
:
[],
loading1
:
false
,
//防止多次点击
mode
:
1
mode
:
1
,
selectedCourseList
:[],
//多选课程
};
},
mounted
()
{
...
...
@@ -284,6 +285,7 @@
},
// 选择班级
selectClass
(
val
)
{
this
.
selectedCourseList
=
[]
if
(
val
.
length
>
0
)
{
this
.
saveObj
=
val
[
0
];
this
.
saveObj
.
Unit_Price
=
this
.
saveObj
.
SellPrice
;
...
...
@@ -296,14 +298,15 @@
},
// 选择课程
selectCourse
(
val
)
{
this
.
selectedCourseList
=
[]
if
(
val
.
length
>
0
)
{
this
.
saveObj
=
val
[
0
];
this
.
saveObj
.
Unit_Price
=
this
.
saveObj
.
SellPrice
;
this
.
defaultCourse
=
val
;
this
.
selectedCourseList
=
val
;
}
else
{
this
.
saveObj
=
{};
this
.
saveObj
.
Unit_Price
=
0
;
this
.
defaultCourse
=
[];
this
.
selectedCourseList
=
[];
}
},
next
()
{
...
...
src/components/school/student/transfer-order/order-form.vue
View file @
fd165559
...
...
@@ -4,14 +4,10 @@
<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
class=
"q-ml-md text-primary"
>
课程:
</span>
{{
saveObj
.
CourseName
}}
<!--
<span></span>
-->
<!--
<span
v-else
>
<span
class=
"yueke-CourseName"
v-for=
"(item,index) in defaultCourse"
>
<span>
{{
index
+
1
}}
、
</span>
{{
item
.
CourseName
}}
<span
v-if=
"mode!=2&&selectedCourseList.length==0||selectedCourseList.length==1"
>
<span
class=
"q-ml-md text-primary"
>
课程:
</span>
{{
saveObj
.
CourseName
}}
</span>
</span>
-->
</div>
<div
class=
"row q-mb-md"
>
<div
class=
"col-10 flex"
>
...
...
@@ -31,7 +27,213 @@
/>
</div>
</div>
<div
style=
"row items-center"
>
<!-- 多个约课 -->
<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
filled
stack-label
:dense=
"false"
v-model=
"item.DiscountMoney"
:disable=
"true"
class=
"col-6 q-py-sm"
label=
"优惠金额"
/>
<
template
v-if=
"modityOrderType == 3"
>
<q-input
filled
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
: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
: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
...
...
@@ -390,6 +592,7 @@ import {
getClassOrderInfo
,
//获取订单操作日志列表
getOrderSourceEnumList
,
//获取订单来源 枚举
setClassOrder
,
//修改订单
SetClassOrderBatch
,
//多个约课订单
queryChaClassInfo
,
GetSelectClassOrderList
//获取前置下拉
}
from
"../../../../api/sale/sale"
;
...
...
@@ -425,16 +628,16 @@ export default {
default
:
()
=>
[]
},
// 已选的多选课程
defaultCourse
:
{
selectedCourseList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
courseInformationList
:[],
//存储多个课程
AssistName
:
""
,
//协助老师名称
IsShowEditOrder
:
true
,
OrderMsg
:
{
ClassId
:
0
,
//班级编号
GuestNum
:
0
,
//人数
...
...
@@ -472,7 +675,6 @@ export default {
// NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额
ScrollSchoolId
:
-
1
,
HelpEnterId
:
0
,
//协助老师id:STTeacherId AssistType =4 表示老师
},
newSchoolList
:
[],
EnterName
:
""
,
//市场人员
...
...
@@ -493,22 +695,29 @@ export default {
inceptionData
:
null
};
},
computed
:
{
CourseCalculation
(){
return
this
.
courseInformationList
.
forEach
(
item
=>
{
return
item
})
}
},
watch
:
{
CourseCalculation
:{
handler
(
val
,
oldVal
)
{
this
.
totalCourseFee
()
},
deep
:
true
,
},
},
created
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
CourseId
)
{
this
.
OrderMsg
.
CourseId
=
this
.
saveObj
.
CourseId
;
}
// 判断是否续费协助老师赋值
if
(
this
.
stuData
.
StuList
[
0
].
IsRenewGuest
!=
1
){
this
.
OrderMsg
.
HelpEnterId
=
this
.
stuData
.
StuList
[
0
].
STTeacherId
;
this
.
AssistName
=
this
.
stuData
.
StuList
[
0
].
STTeacherName
}
this
.
getOrderSEList
();
this
.
getEmployee
(
0
);
this
.
getEmployee
(
2
);
this
.
initConfig
();
this
.
getSelectClass
();
// console.log(this.defaultCourse,'defaultCoursedefaultCourse')
},
mounted
()
{
this
.
newSchoolList
=
[];
...
...
@@ -521,8 +730,230 @@ export default {
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
}
if
(
this
.
selectedCourseList
.
length
>
1
){
this
.
selectedCourseList
.
forEach
(
item
=>
{
let
dataObj
=
{
CourseName
:
""
,
//课程名称
ClassId
:
0
,
//班级编号
GuestNum
:
0
,
//人数
B2CRatio
:
0
,
B2CReNewRatio
:
0
,
Unit_Price
:
0
,
PreferPrice
:
0
,
//应收
OrderSource
:
0
,
SaleRemark
:
""
,
Class_Price
:
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
,
// UnitPrice:0
}
if
(
item
.
CourseName
){
dataObj
.
CourseName
=
item
.
CourseName
}
if
(
item
.
ClassId
)
{
dataObj
.
ClassId
=
item
.
ClassId
;
}
if
(
item
.
Unit_Price
)
{
dataObj
.
Unit_Price
=
item
.
Unit_Price
;
dataObj
.
Class_Price
=
item
.
Unit_Price
;
dataObj
.
UnitPrice
=
item
.
Unit_Price
;
}
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()
}
},
methods: {
// 多个课程计算
totalCourseFee(){
this.courseInformationList.forEach(item=>{
var guestNum = 0;
if (item.GuestNum && item.GuestNum > 0) {
guestNum = Number(item.GuestNum);
}
let temp = this.CourseList.find(
x => x.CourseId == item.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 - item.StartClassHours)
).toFixed(2);
if (guestNum == 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[0].PriceType == 0) {
if (item.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);
item.PerDiscountMoney = perDiscountMoney;
//计算每人优惠和总优惠
// if (item.IsChaBan == 1) {
// item.Unit_Price = chaBanPrice;
// this.UnitPrice = chaBanPrice;
// } else {
// item.Unit_Price = temp.SellPrice;
// this.UnitPrice = temp.SellPrice;
// }
// item.SaleRemark = tempSaleRemark;
} else {
if (this.saveObj.ClassId) {
item.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
item.Unit_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
item.SourceId = this.saveObj.SourceId;
}
this.courseObj = {};
}
/**计算少价---开始*/
var tempPerLessMoney = 0;
if (item.PerLessMoney && item.PerLessMoney > 0) {
tempPerLessMoney = item.PerLessMoney;
}
item.LessPrice = tempPerLessMoney * guestNum;
/**计算少价----结束*/
var unit_price = 0;
if (item.Unit_Price && item.Unit_Price > 0) {
unit_price = Number(item.Unit_Price);
}
var str = "";
//计算应收价格
if (item.IsChaBan == 1) {
var newPreferPrice = 0;
if (
this.courseObj &&
this.courseObj.CourseId &&
this.courseObj.CourseId > 0
) {
newPreferPrice = chaBanPrice * guestNum;
}
item.PreferPrice =
Number(newPreferPrice).toFixed(2) - item.LessPrice;
} else {
item.PreferPrice =
Number(guestNum * unit_price).toFixed(2) - item.LessPrice;
}
//留学就业订单
if (item.OrderType == 2) {
item.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
}
item.GuestNum = this.stuData.StuList.length;
item.DiscountMoney = 0;
this.stuData.StuList.map(e => {
if (e.IsRenewGuest == 0) {
item.DiscountMoney = this.accAdd(
item.DiscountMoney,
this.accMul(item.Class_Price, item.B2CRatio / 100)
);
} else {
item.DiscountMoney = this.accAdd(
item.DiscountMoney,
this.accMul(
item.Class_Price,
item.B2CReNewRatio / 100
)
);
}
});
})
},
//获取协助人员
getAssistList() {
const ids = this.stuData.StuList.map(e => e.StuId).toString();
...
...
@@ -539,6 +970,11 @@ export default {
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
})
}
}
});
}
...
...
@@ -701,6 +1137,7 @@ export default {
}
});
},
// 初始化
initData() {
this.OrderMsg.HelpEnterId = 0;
this.OrderMsg.GeneralOccupation = "";
...
...
@@ -749,6 +1186,10 @@ export default {
if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio;
}
if(this.selectedCourseList.length>1){
return
}
}
this.IsShowEditOrder = true;
...
...
@@ -758,7 +1199,7 @@ export default {
0
}
%
;
续费优惠比例
$
{
this
.
saveObj
.
B2CReNewRatio
??
0
}
%
`; //备注
} else {
this.OrderMsg.SaleRemark = `
首次报名优惠比例
$
{
this
.
saveObj
.
B2CRatio
??
0
}
%
`; //备注
0
}
%
`; //备注
})
}
},
//筛选员工
...
...
@@ -832,11 +1273,69 @@ export default {
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{
return
this.singleAppointmentsFun()
}
},
// 多个约课
multipleAppointmentsFun(){
//插班验证课程和生效时间
this.courseInformationList.forEach(item=>{
item.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
item.CustomerId = this.stuData.CustomerId;
})
console.log(this.courseInformationList,'======')
// this.$emit("success");
// this.$emit("cancelloading"); //取消按钮的加载
// return
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();
...
...
src/pages/school/sysuser.vue
View file @
fd165559
...
...
@@ -182,6 +182,11 @@
<q-item-label>
客户交接
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"orderHandover(props.row)"
v-if=
'DeptEmpEnable==1'
>
<q-item-section>
<q-item-label>
订单交接
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
...
...
@@ -194,10 +199,11 @@
</employee-set>
<employee-info
v-if=
"isShowEmpInfo"
:save-obj=
"managerOption"
@
close=
"closeStuForm"
@
success=
"refreshPage"
>
</employee-info>
<!-- 企业微信客户交接 -->
<q-dialog
v-model=
"isDetails"
>
<q-card
style=
"width: 450px;"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
客户交接
</div>
<div
class=
"text-h6"
>
企业微信
客户交接
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
...
...
@@ -210,7 +216,7 @@
</div>
<div
style=
"font-size: 12px;color:red;margin-top: 10px;"
>
注:必须选择一项转移目标
</div>
<div
style=
"display: flex;align-items: center;margin-top: 0px;"
>
<div
style=
"width: 110px;"
>
客户转移
</div>
<div
style=
"width: 110px;"
>
企微
客户转移
</div>
<q-radio
v-model=
"joinMsg.CustomerTransfer"
val=
"1"
label=
"是"
/>
<q-radio
v-model=
"joinMsg.CustomerTransfer"
val=
"2"
label=
"否"
/>
</div>
...
...
@@ -228,6 +234,41 @@
</q-card>
</q-dialog>
<!-- 订单交接 -->
<q-dialog
v-model=
"orderIsDetails"
>
<q-card
style=
"width: 450px;"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
订单交接
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-separator
/>
<q-card-section>
<div>
<q-select
style=
"width: 100%;"
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
use-input
v-model=
"joinMsg.ReceiveUserId"
@
filter=
"filterFn"
ref=
"Id"
:options=
"Employeelist"
label=
"交接人员"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
style=
"font-size: 12px;color:red;margin-top: 10px;"
>
注:必须选择一项转移目标
</div>
<div
style=
"display: flex;align-items: center;margin-top: 0px;"
>
<div
style=
"width: 110px;"
>
订单转移
</div>
<q-radio
v-model=
"joinMsg.CustomerTransfer"
val=
"1"
label=
"是"
/>
<q-radio
v-model=
"joinMsg.CustomerTransfer"
val=
"2"
label=
"否"
/>
</div>
<div
style=
"display: flex;align-items: center;margin-top: 10px;"
>
<div
style=
"width: 110px;"
>
渠道码人员转移
</div>
<q-radio
v-model=
"joinMsg.ChannelTransfer"
val=
"1"
label=
"是"
/>
<q-radio
v-model=
"joinMsg.ChannelTransfer"
val=
"2"
label=
"否"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"isDetails=false"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"saveOrderHandoverInfo()"
:loading=
"jtloading"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</div>
</template>
...
...
@@ -428,6 +469,18 @@
Employeelist
:
[],
AllEmployeelist
:
[],
DeptEmpEnable
:
0
,
//是否显示企业微信信息 1 显示
orderIsDetails
:
false
,
//离职人员订单交接
orderHandoverMsg
:{
TransferUserId
:
""
,
//原跟进成员的userid
ReceiveUserId
:
""
,
//接替成员的userid
ClientList
:[
{
handover_userid
:
""
,
external_userid
:
""
,
dimission_time
:
""
}
]
},
//离职人员订单交接数据
}
},
mounted
()
{
...
...
@@ -440,6 +493,55 @@
this
.
getmicrodeploy
()
//获取企业微信的配置
},
methods
:
{
// 订单交接
orderHandover
(
row
){
this
.
orderHandoverMsg
.
TransferUserId
=
row
.
EmAccountId
this
.
orderIsDetails
=
true
},
saveOrderHandoverInfo
()
{
//保存
if
(
this
.
joinMsg
.
ReceiveUserId
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择接替人员`
,
position
:
'top'
})
return
}
if
(
this
.
joinMsg
.
ReceiveUserId
==
this
.
joinMsg
.
TransferUserId
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`接替人员不能是本人`
,
position
:
'top'
})
return
}
if
(
this
.
joinMsg
.
CustomerTransfer
==
2
&&
this
.
joinMsg
.
ChannelTransfer
==
2
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`转移目标必须选择一项`
,
position
:
'top'
})
return
}
this
.
jtloading
=
true
setUserCoustomerTransfer
(
this
.
joinMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
this
.
isDetails
=
false
this
.
jtloading
=
false
this
.
getManager
()
})
.
catch
(
err
=>
{
this
.
jtloading
=
false
})
},
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getManager
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment