Commit f6446599 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents 7e491630 5e122e6a
......@@ -575,6 +575,24 @@ export function GetStudentMarketYearRate(data) {
});
}
//保存批量转交
export function BatchForwardStudent(data) {
return request({
url: '/User/BatchForwardStudent',
method: 'post',
data
});
}
//全公司每日数据统计
export function GetStudentCompany(data) {
return request({
url: '/StudentStat/GetStudentCompany',
method: 'post',
data
});
}
......
......@@ -20,7 +20,7 @@
<q-btn v-if="userInfo.IsTenCccUser == 1" @click="callUserHandler" class="q-mr-md" round unelevated
color="primary" dense icon="phone" title="拨打电话"></q-btn>
<q-btn unelevated color="positive" v-if="
!baseObj.IsHaveCurseManager && userInfo.Id == baseObj.CreateBy
!IsHaveCurseManager && userInfo.Id == baseObj.CreateBy
" size="sm" :loading="pushing" class="q-mr-md" @click="assistBatchHandler">推送课程顾问</q-btn>
<q-btn v-if="getJudgeTrans()" color="primary" unelevated size="sm" label="转交" @click="isShowTrans = true">
<q-popup-proxy :offset="[10, 10]">
......@@ -93,8 +93,8 @@
</student-Assit>
</template>
<template v-if="ckedTab == 6">
                  <classRecord :save-obj="baseObj" @success="refreshStudentPage"></classRecord>
                </template>
<classRecord :save-obj="baseObj" @success="refreshStudentPage" />
</template>
</div>
</div>
</div>
......@@ -213,7 +213,8 @@
stateId: 0,
stuData: {},
userInfo: {},
isconsult: false //学生咨询弹窗
isconsult: false, //学生咨询弹窗
IsHaveCurseManager:false,//是否存在课程顾问
};
},
created() {
......@@ -223,13 +224,14 @@
},
mounted() {
this.baseObj = this.saveObj;
this.baseObj.IsHaveCurseManager = false;
this.IsHaveCurseManager = false;
if (this.baseObj.AssistList && this.baseObj.AssistList.length > 0) {
this.baseObj.AssistList.forEach(x => {
if (x.AssistType == 2) {
this.baseObj.IsHaveCurseManager = true;
}
});
var obj = this.baseObj.AssistList.find((item) => {
return item.AssistType === 2;
})
if (obj) {
this.IsHaveCurseManager = true;
}
}
this.getEmployeeList();
if (this.checkType && this.checkType > 0) {
......@@ -327,23 +329,26 @@
StuId: this.saveObj.StuId
}).then(res => {
if (res.Code == 1) {
this.stuData = res.Data;
this.stateId = res.Data.StuStage;
res.Data.BelongType = this.baseObj.BelongType;
this.baseObj = res.Data;
var tempData = res.Data;
if (tempData) {
res.Data.BelongType = this.baseObj.BelongType;
this.stuData = tempData;
this.stateId = tempData.StuStage;
this.baseObj = tempData;
}
}
});
},
//批量推送课程顾问
assistBatchHandler() {
if (this.pushing || this.baseObj.IsHaveCurseManager) return;
if (this.pushing || this.IsHaveCurseManager) return;
this.pushing = true;
let parameter = {
stuIds: this.baseObj.StuId
};
SetStudentAssistBatch(parameter).then(r => {
this.$emit("success");
this.baseObj.IsHaveCurseManager = true;
this.IsHaveCurseManager = true;
this.pushing = false;
});
},
......
......@@ -65,6 +65,8 @@
<div class="col-2 q-table__title">学员信息</div>
<q-space />
<div class="page-option" v-if="!pushMode">
<q-btn color="accent" v-if="IsTrasferAll()" outline class="q-mr-md" size="sm" icon="swap_horiz" label="批量转交"
@click="pushMode = true" />
<q-btn color="accent" outline class="q-mr-md" size="sm" icon="swap_horiz" label="推送课程顾问"
v-if="userInfo.IsCourseConsultant == 0" @click="pushMode = true" />
<q-btn color="accent" class="q-mr-md" size="sm" icon="swap_horiz" label="转订单"
......@@ -76,6 +78,17 @@
label="下载" @click="downloadStudent" />
</div>
<div class="page-option" v-if="pushMode">
<q-btn color="accent" unelevated class="q-mr-md" size="sm" icon="swap_horiz" label="转交"
@click="isShowTrans = true">
<q-popup-proxy :offset="[10, 10]">
<q-banner v-if="isShowTrans">
<q-select style="margin-top:20px;" filled v-model="transMsg.CreateBy" @filter="filterEmployee" use-input
:options="myEmployeeList" option-label="EmployeeName" option-value="Id" emit-value map-options />
<q-btn label="保存" style="float:right;margin-top:15px" color="accent q-mb-lg" size="sm"
@click="saveTransForm" />
</q-banner>
</q-popup-proxy>
</q-btn>
<q-btn color="accent" unelevated class="q-mr-md" size="sm" icon="swap_horiz" label="立即推送" :loading="pushing"
@click="assistBatchHandler" />
<q-btn color="accent" outline size="sm" label="退出" :disable="pushing" @click="
......@@ -245,11 +258,16 @@
mapGetters
} from "vuex";
import {
SetStudentAssistBatch
SetStudentAssistBatch,
BatchForwardStudent
} from "../../../api/sale/sale";
import {
EduDownLoad
} from "../../../api/common/common";
import {
queryEmployee
} from "../../../api/users/user";
export default {
props: {
//数据列表
......@@ -456,14 +474,22 @@
stuOption: null,
isShowAdd: false,
selection: [],
isShowTransfer: false,//是否显示转订单弹窗
isShowTransfer: false, //是否显示转订单弹窗
BelongType: 1,
pushMode: false,//是否显示推送按钮
pushMode: false, //是否显示推送按钮
pushing: false,
assistListFormat: [],
checkType: 1, //打开右侧弹窗类型
isShowAbroad: false, //是否显示转留学就业订单弹窗
userInfo: {}, //当前登录人员
isShowTrans: false,
transMsg: {
StuIds: '',
CreateBy: ''
},
//员工列表
employeeList: [],
myEmployeeList: [],
};
},
watch: {
......@@ -479,7 +505,9 @@
this.userInfo = this.getLocalStorage();
this.formatAssistList();
},
mounted() {},
mounted() {
this.getEmployeeList();
},
computed: {
...mapGetters(["logo", "name"])
},
......@@ -501,6 +529,19 @@
return false;
}
},
//是否有批量转移权限
IsTrasferAll(){
var isHaveAuth = false;
if (this.userInfo && this.userInfo.ActionMenuList && this.userInfo.ActionMenuList.length >
0) {
this.userInfo.ActionMenuList.forEach((x) => {
if (x.FunctionCode == "IsTranserAll") {
isHaveAuth = true;
}
});
}
return isHaveAuth
},
//下载文件
downloadStudent() {
var msg = JSON.parse(JSON.stringify(this.queryMsg));
......@@ -745,6 +786,62 @@
position: "top",
message: msg
});
},
//获取员工列表
getEmployeeList() {
queryEmployee({
IsLeave: 1
}).then(res => {
this.employeeList = res.Data;
this.myEmployeeList = res.Data;
});
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
this.myEmployeeList = this.employeeList.filter(
v => v.EmployeeName.indexOf(val) > -1
);
});
},
//保存批量转交
saveTransForm() {
if (this.selection.length == 0) {
this.$q.notify({
type: "negative",
position: "top",
message: '请选择推送学员'
});
return;
}
if (this.transMsg.CreateBy == "") {
this.$q.notify({
type: "negative",
position: "top",
message: '请选择接收人员!'
});
return;
}
let newArr = []
this.selection.forEach(x => {
newArr.push(x.StuId);
})
this.transMsg.StuIds = newArr.toString();
BatchForwardStudent(this.transMsg).then(res => {
if (res.Code == 1) {
this.refreshStuList();
this.selection = [];
this.transMsg.StuIds = "";
this.transMsg.CreateBy = "";
this.pushMode = false;
this.$q.notify({
type: "iconfont icon-chenggong",
position: "top",
message: r.Message
});
}
});
}
}
};
......
<style>
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
}
.myTable_Zk tbody tr:first-child td {
background: yellow !important;
}
.myTable_Zk tbody tr:first-child {
background: yellow !important;
z-index: 1 !important;
}
</style>
<template>
<div class="page-body">
<div class="col row wrap q-mb-lg" style="justify-content:space-between;">
<div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense>
<template v-slot:control>
<el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()"
size="small" type="month" placeholder="选择年月">
</el-date-picker>
</template>
</q-field>
</div>
<div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;"
@click="downloadStudentStatic" label="下载" />
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}"
no-data-label="暂无相关数据" flat class="sticky-column-table sticky-header-column-table no-bottom-table myTable_Zk"
separator="none" :data="dataList" :columns="columns" row-key="">
<template v-slot:bottom>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
GetStudentCompany
} from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default {
props: {},
meta: {
title: "全公司每日数据统计"
},
components: {},
data() {
return {
columns: [{
name: 'DateStr',
label: '日期',
field: 'DateStr',
align: 'left'
},
{
name: 'PushCount',
label: '推送人数',
field: 'PushCount',
align: 'left'
},
{
name: 'NewCount',
label: '新客户',
field: 'NewCount',
align: 'left',
},
{
name: 'CommunicationCount',
label: '初步沟通(二次沟通)',
field: 'CommunicationCount',
align: 'left',
},
{
name: 'TrialLessonCount',
label: '预约试听(已到店,已试听)',
field: 'TrialLessonCount',
align: 'left'
},
{
name: 'NotContacted',
label: '待联系',
field: 'NotContacted',
align: 'left'
},
{
name: 'JPCount',
label: '日本语培',
field: 'JPCount',
align: 'left'
},
{
name: 'KRCount',
label: '韩国语培',
field: 'KRCount',
align: 'left'
},
{
name: 'FRCount',
label: '法国语培',
field: 'FRCount',
align: 'left'
},
{
name: 'JPStudyCount',
label: '日本留学',
field: 'JPStudyCount',
align: 'left'
},
{
name: 'KRStudyCount',
label: '韩国留学',
field: 'KRStudyCount',
align: 'left'
},
{
name: 'YGAStudyCount',
label: '英港澳留学',
field: 'YGAStudyCount',
align: 'left'
},
{
name: 'USStudyCount',
label: '美国留学',
field: 'USStudyCount',
align: 'left'
},
{
name: 'SGStudyCount',
label: '新加坡留学',
field: 'SGStudyCount',
align: 'left'
},
{
name: 'AXStudyCount',
label: '澳新留学',
field: 'AXStudyCount',
align: 'left'
},
{
name: 'OtherCount',
label: '其他',
field: 'OtherCount',
align: 'left'
},
{
name: 'ClassACount',
label: 'A类客户',
field: 'ClassACount',
align: 'left'
},
{
name: 'ClassBCount',
label: 'B类客户',
field: 'ClassBCount',
align: 'left'
},
{
name: 'ClassCCount',
label: 'C类客户',
field: 'ClassCCount',
align: 'left'
},
{
name: 'ClassDCount',
label: 'D类客户',
field: 'ClassDCount',
align: 'left'
},
{
name: 'CustomerCount',
label: '同行介绍',
field: 'CustomerCount',
align: 'left'
},
{
name: 'B2CCount',
label: '直客',
field: 'B2CCount',
align: 'left'
},
{
name: 'TransCount',
label: '学员转介绍',
field: 'TransCount',
align: 'left'
},
{
name: 'InnerCount',
label: '内部介绍',
field: 'InnerCount',
align: 'left'
},
{
name: 'InvalidCount',
label: '无效',
field: 'InvalidCount',
align: 'left'
},
{
name: 'SuspectedCount',
label: '疑似',
field: 'SuspectedCount',
align: 'left'
},
{
name: 'IntentionCount',
label: '意向',
field: 'IntentionCount',
align: 'left'
},
{
name: 'InvitationCount',
label: '近期可邀约',
field: 'InvitationCount',
align: 'left'
},
{
name: 'NegotiationCount',
label: '谈判',
field: 'NegotiationCount',
align: 'left'
},
{
name: 'ContractCount',
label: '签约(成交.续费)',
field: 'ContractCount',
align: 'left'
},
{
name: 'OrderMoney',
label: '语培签约金额',
field: 'OrderMoney',
align: 'left'
},
{
name: 'StudyOrderMoney',
label: '留学签约金额',
field: 'StudyOrderMoney',
align: 'left'
}
],
dataList: [],
loading: false,
myDate: '',
tableHeight: 500,
msg: {
YearStr: '',
MonthStr: '',
rowsPerPage: 0
},
}
},
created() {
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90;
}, 100)
},
mounted() {
let d = new Date();
this.msg.YearStr = d.getFullYear().toString();
this.msg.MonthStr = (d.getMonth() + 1).toString();
this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr
this.getList();
},
methods: {
//下载数据
downloadStudentStatic() {
this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/StudentStat/DownLoadStudentCompany",
msg,
"全公司每日数据统计.xls", res => {
this.loading = false;
}
);
},
getCheckDate() {
if (this.myDate) {
this.msg.YearStr = this.myDate.split('-')[0];
this.msg.MonthStr = this.myDate.split('-')[1];
this.getList();
}
},
//获取数据
getList() {
this.loading = true;
GetStudentCompany(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
}
})
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -1095,6 +1095,11 @@ const routes = [{
component: ()=>
import("pages/sale/everyMonthTotal.vue")
},
{
path: "/sale/companyday",
component: ()=>
import("pages/sale/companyday.vue")
},
{
path: "/activity/activeType", //活动 活动类型
component: () =>
......
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