Commit 408c576a authored by Mac's avatar Mac

关联教师

parent bb1b1bb1
...@@ -344,4 +344,15 @@ export function GetSelectClassOrderList(data) { ...@@ -344,4 +344,15 @@ export function GetSelectClassOrderList(data) {
}) })
} }
/**
* 今日订单 修改订单的关联老师
*
*/
export function setOrderHelpEnterId(data) {
return request({
url: '/Order/SetOrderHelpEnterId',
method: 'post',
data
})
}
...@@ -213,10 +213,30 @@ ...@@ -213,10 +213,30 @@
</div> </div>
</td> </td>
<td style="border:none" v-if="viewType==0"> <td style="border:none" v-if="viewType==0">
<template v-if="isEditOrder||AuthorityObj.isShowEdit"> <template v-if="(isEditOrder||AuthorityObj.isShowEdit) && comefrom == 0">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="editOrder(item)" /> @click="editOrder(item)" />
</template> </template>
<template v-if="comefrom==1">
<q-btn flat size="xs" color="accent" style="font-weight:400" label="关联老师"
@click="gettanchuteacher(item)" >
<q-popup-proxy >
<q-banner v-if="isShowteacher">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">请选择关联教师</div>
<q-select standout="bg-primary text-white" option-value="Id" option-label="EmployeeName"
v-model="teacherMsg.HelpEnterId" :options="TeacherList" emit-value map-options label="请选择关联教师" />
<q-card-actions align="right" class="bg-white" style="margin-top:20px;">
<q-btn label="取消" flat color="grey-10" size="sm" @click="isShowteacher=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" size="sm" style="font-weight:400 !important"
@click="setCheckStatus()" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</q-btn>
</template>
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"> <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list> <q-list>
<q-item clickable v-close-popup> <q-item clickable v-close-popup>
...@@ -249,7 +269,7 @@ ...@@ -249,7 +269,7 @@
<q-item-label>校长备注</q-item-label> <q-item-label>校长备注</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup v-if="isEditOrder"> <q-item clickable v-close-popup v-if="isEditOrder && comefrom == 0">
<q-item-section @click="editOrder(item)"> <q-item-section @click="editOrder(item)">
<q-item-label>总经理修改</q-item-label> <q-item-label>总经理修改</q-item-label>
</q-item-section> </q-item-section>
...@@ -270,9 +290,9 @@ ...@@ -270,9 +290,9 @@
<q-item-label>额外奖励</q-item-label> <q-item-label>额外奖励</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<div v-if="comefrom == 0">
<q-item clickable v-close-popup disabled <q-item clickable v-close-popup disabled
v-if="(item.FinanceList&&item.FinanceList.length>0)||(item.RefundFinanceList&&item.RefundFinanceList.length>0)"> v-if="(item.FinanceList&&item.FinanceList.length>0)||(item.RefundFinanceList&&item.RefundFinanceList.length>0) ">
<q-item-section> <q-item-section>
<q-item-label> <q-item-label>
取消订单 取消订单
...@@ -287,6 +307,9 @@ ...@@ -287,6 +307,9 @@
<q-item-label>取消订单</q-item-label> <q-item-label>取消订单</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</div>
<q-item clickable v-close-popup v-close-popup v-if="AuthorityObj.isShowBackClass"> <q-item clickable v-close-popup v-close-popup v-if="AuthorityObj.isShowBackClass">
<q-item-section> <q-item-section>
<q-item-label @click="showBackClassForm(item)">退课</q-item-label> <q-item-label @click="showBackClassForm(item)">退课</q-item-label>
...@@ -847,6 +870,7 @@ ...@@ -847,6 +870,7 @@
import eduinfoForm from '../sale/eduinfo-form' import eduinfoForm from '../sale/eduinfo-form'
import { import {
setOrderHelpEnterId,//老师关联
cancelClassOrder, //取消订单 cancelClassOrder, //取消订单
} from '../../api/sale/sale' } from '../../api/sale/sale'
...@@ -857,7 +881,9 @@ ...@@ -857,7 +881,9 @@
SetOrderReceiveContract, //领取合同 SetOrderReceiveContract, //领取合同
SetEducationContractAudit SetEducationContractAudit
} from '../../api/sale/contract' } from '../../api/sale/contract'
import {
getTeacherDropDownList
} from '../../api/school/index'
export default { export default {
components: { components: {
editorderForm, editorderForm,
...@@ -900,6 +926,11 @@ ...@@ -900,6 +926,11 @@
viewType: { viewType: {
type: Number, type: Number,
default: 0 default: 0
},
//因为今天订单 取消了一些操作
comefrom:{//来自 1是来自 学管今日订单
type: Number,
default: 0
} }
}, },
data() { data() {
...@@ -954,12 +985,16 @@ ...@@ -954,12 +985,16 @@
newModityOrderType: 0, newModityOrderType: 0,
isChaBan: 0, //是否插班(0-正常报入,1-插班报入) isChaBan: 0, //是否插班(0-正常报入,1-插班报入)
isShowTransferClass: false, //是否显示转班 isShowTransferClass: false, //是否显示转班
ChangeType:1 //1-转班 2-分拆 ChangeType:1, //1-转班 2-分拆
isShowteacher:false,//关联教师显示
teacherMsg:{OrderId:0,HelpEnterId:'',},//关联老师参数
TeacherList:[],//下拉老师
} }
}, },
created() { created() {
this.initAuth(); this.initAuth();
this.Employee(); this.Employee();
this.GetTeacherList()//获取老师数据
var localStorageData = window.localStorage["loginUserInfo"]; var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList
if (ActionMenuList && ActionMenuList.length > 0) { if (ActionMenuList && ActionMenuList.length > 0) {
...@@ -1425,7 +1460,54 @@ ...@@ -1425,7 +1460,54 @@
this.$emit('success'); this.$emit('success');
} }
}) })
},
//获取教师下拉
GetTeacherList() {
var qMsg = {
AccountTypeStr:2
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
} }
})
},
gettanchuteacher(item){
this.isShowteacher = true
this.teacherMsg.OrderId = item.OrderId;
this.teacherMsg.HelpEnterId = item.HelpEnterId>0?item.HelpEnterId:'';
},
setCheckStatus(){
if( this.teacherMsg.HelpEnterId==0 || this.teacherMsg.HelpEnterId==''){
this.$q.notify({
icon: 'close',
color: 'accent',
timeout: 2000,
message: '请选择关联老师',
position: 'top'
})
return
}
setOrderHelpEnterId(this.teacherMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
//调用父页面成功方法
this.isShowteacher = false
this.$emit('success');
}
})
}
} }
} }
......
...@@ -68,6 +68,10 @@ ...@@ -68,6 +68,10 @@
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" <q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id"
option-label="EmployeeName" v-model="msg.EnterID" :options="EmployeeList" emit-value map-options label="业务员" use-input @filter="filterFn2"/> option-label="EmployeeName" v-model="msg.EnterID" :options="EmployeeList" emit-value map-options label="业务员" use-input @filter="filterFn2"/>
</div> </div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id"
option-label="EmployeeName" v-model="msg.HelpEnterId" :options="TeacherList" emit-value map-options label="关联教师" use-input @filter="filterFn3"/>
</div>
</div> </div>
</div> </div>
<div class="col row wrap q-gutter-x-md" v-if="data.Statistics"> <div class="col row wrap q-gutter-x-md" v-if="data.Statistics">
...@@ -181,6 +185,8 @@ ...@@ -181,6 +185,8 @@
PlatformTax: 0, //平台税金 PlatformTax: 0, //平台税金
EnterID:'',//业务员id EnterID:'',//业务员id
ClassNo:'',//班号 ClassNo:'',//班号
HelpEnterId:'',//关联教师
}, },
//订单状态 //订单状态
OrderStateList: [], OrderStateList: [],
...@@ -203,6 +209,8 @@ ...@@ -203,6 +209,8 @@
}, },
EmployeeList:[],//业务员 EmployeeList:[],//业务员
AllemployeeList:[], AllemployeeList:[],
TeacherList:[],//关联教师
AllTeacherList:[],
} }
}, },
created() { created() {
...@@ -234,6 +242,8 @@ ...@@ -234,6 +242,8 @@
mounted() { mounted() {
this.getList(); this.getList();
this.getEmployee(0); this.getEmployee(0);
this.getglteacher()
}, },
methods: { methods: {
//订单状态 //订单状态
...@@ -330,6 +340,33 @@ ...@@ -330,6 +340,33 @@
closeClass() { closeClass() {
this.isShowClassInfo = false; this.isShowClassInfo = false;
}, },
getglteacher(){
var qMsg = {
AccountTypeStr:2
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
let obj={
Id:"",
EmployeeName:"不限"
}
this.TeacherList.unshift(obj)
this.AllTeacherList = JSON.parse(JSON.stringify(this.TeacherList));
}
})
},
//筛选关联老师
filterFn3(val, update) {
update(() => {
if (val === '') {
this.TeacherList = JSON.parse(JSON.stringify(this.AllTeacherList))
} else {
const needle = val.toLowerCase()
this.TeacherList = this.AllTeacherList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
//业务员 //业务员
getEmployee(id) { getEmployee(id) {
var qMsg = { var qMsg = {
......
<template> <template>
<div class="page-body myOrder"> <div class="page-body myOrder">
<div style="width: 100%;display: flex;justify-content: space-between"> <div style="width: 100%;display: flex;justify-content: space-between">
<span style="font-size: 20px;font-weight: 400; ">报名统计</span> <span style="font-size: 20px;font-weight: 400; ">今日订单</span>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<span> <span>
...@@ -68,6 +68,10 @@ ...@@ -68,6 +68,10 @@
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" <q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id"
option-label="EmployeeName" v-model="msg.EnterID" :options="EmployeeList" emit-value map-options label="业务员" use-input @filter="filterFn2"/> option-label="EmployeeName" v-model="msg.EnterID" :options="EmployeeList" emit-value map-options label="业务员" use-input @filter="filterFn2"/>
</div> </div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id"
option-label="EmployeeName" v-model="msg.HelpEnterId" :options="TeacherList" emit-value map-options label="关联教师" use-input @filter="filterFn3"/>
</div>
</div> </div>
</div> </div>
<div class="col row wrap q-gutter-x-md" v-if="data.Statistics"> <div class="col row wrap q-gutter-x-md" v-if="data.Statistics">
...@@ -119,7 +123,7 @@ ...@@ -119,7 +123,7 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<orderlist :dataList="data.List" :authObj="authObj" @success="refreshClassOrder" :modityOrderType="3" ref="orderL" > <orderlist :dataList="data.List" :authObj="authObj" @success="refreshClassOrder" :modityOrderType="3" :comefrom="comefrom" ref="orderL" >
</orderlist> </orderlist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px"> <div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end" <q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
...@@ -149,7 +153,7 @@ ...@@ -149,7 +153,7 @@
} from '../../api/common/common'; } from '../../api/common/common';
export default { export default {
meta: { meta: {
title: "报名统计" title: "今日订单"
}, },
components: { components: {
myOrderForm, myOrderForm,
...@@ -181,6 +185,7 @@ ...@@ -181,6 +185,7 @@
PlatformTax: 0, //平台税金 PlatformTax: 0, //平台税金
EnterID:'',//业务员id EnterID:'',//业务员id
ClassNo:'',//班号 ClassNo:'',//班号
HelpEnterId:'',//关联教师
}, },
//订单状态 //订单状态
OrderStateList: [], OrderStateList: [],
...@@ -201,8 +206,11 @@ ...@@ -201,8 +206,11 @@
isShowBackClass:false,//不显示退课 isShowBackClass:false,//不显示退课
isShowRenewClass:false,//不显示续课 isShowRenewClass:false,//不显示续课
}, },
comefrom:1,
EmployeeList:[],//业务员 EmployeeList:[],//业务员
AllemployeeList:[], AllemployeeList:[],
TeacherList:[],//关联教师
AllTeacherList:[],
} }
}, },
created() { created() {
...@@ -234,6 +242,7 @@ ...@@ -234,6 +242,7 @@
mounted() { mounted() {
this.getList(); this.getList();
this.getEmployee(0); this.getEmployee(0);
this.getglteacher()
}, },
methods: { methods: {
//订单状态 //订单状态
...@@ -330,6 +339,33 @@ ...@@ -330,6 +339,33 @@
closeClass() { closeClass() {
this.isShowClassInfo = false; this.isShowClassInfo = false;
}, },
getglteacher(){
var qMsg = {
AccountTypeStr:2
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
let obj={
Id:"",
EmployeeName:"不限"
}
this.TeacherList.unshift(obj)
this.AllTeacherList = JSON.parse(JSON.stringify(this.TeacherList));
}
})
},
//筛选关联老师
filterFn3(val, update) {
update(() => {
if (val === '') {
this.TeacherList = JSON.parse(JSON.stringify(this.AllTeacherList))
} else {
const needle = val.toLowerCase()
this.TeacherList = this.AllTeacherList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
//业务员 //业务员
getEmployee(id) { getEmployee(id) {
var qMsg = { var qMsg = {
...@@ -350,6 +386,7 @@ ...@@ -350,6 +386,7 @@
}) })
}, },
//筛选业务员 //筛选业务员
filterFn2(val, update) { filterFn2(val, update) {
update(() => { update(() => {
......
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