Commit ec7b0ee6 authored by Mac's avatar Mac

1修改学员的来源关系

2新增滚动开班的页面
parent 6c7fe394
import request from '../../utils/request'
/**
* 获取班次列表
* @param {JSON参数} data
*/
export function getScrollShiftList(data) {
return request({
url: '/Scroll/GetScrollShiftList',
method: 'post',
data
})
}
/**
* 新增修改班次
* @param {JSON参数} data
*/
export function setScrollShiftInfo(data) {
return request({
url: '/Scroll/SetScrollShiftInfo',
method: 'post',
data
})
}
/**
* 新增修改班次
* @param {JSON参数} data
*/
export function delScrollShiftInfo(data) {
return request({
url: '/Scroll/DelScrollShiftInfo',
method: 'post',
data
})
}
/**
* 获取排班计划
* @param {JSON参数} data
*/
export function getScrollPlanMonthList(data) {
return request({
url: '/Scroll/GetScrollPlanMonthList',
method: 'post',
data
})
}
\ No newline at end of file
<style scoped>
.shiftform{
}
.shiftform .yuan{
width: 16px;
height: 16px;
border-radius: 50%;
margin-right: 10px;
}
.shifttc .el-input__inner{
border-radius: 4px;
height: 40px;
}
</style>
<template>
<div class="shiftform">
<div>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table" separator="none" title="班次" :data="shiftList" dense
:columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">班次</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增班次" @click="Editshift(null)" />
</div>
</template>
<template v-slot:body-cell-Name="props">
<q-td :props="props" class="row">
<div class="yuan" :style="{ background: props.row.Color }" ></div>
<div>{{props.row.Name}}</div>
</q-td>
</template>
<template v-slot:body-cell-time="props">
<q-td :props="props">
<div class="text-blue" >{{props.row.StartTime}}<span v-if="props.row.EndTime" style="margin: 0 3px;">--</span>{{props.row.EndTime}}</div>
</q-td>
</template>
<template v-slot:bottom>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div v-if="addshiftpower">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="Editshift(props.row)" />
<template >
<q-btn flat size="xs" icon="iconfont icon-shanchu" color="negative" style="font-weight:400"
class="q-mr-xs" label="删除" @click="removeshift(props.row)" />
</template>
</div>
</q-td>
</template>
</q-table>
</div>
<q-dialog v-model="isShowEditshift" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale" >
<q-card style="width: 600px;max-width:600px;">
<q-card-section>
<div class="text-h6">{{shiftOption.Id==0?'新增班次':'修改班次'}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<q-input filled stack-label maxlength="20" :dense="false" v-model="shiftOption.Name" ref="Name"
class="col-12" label="班次名称" :rules="[val => !!val || '请填写班次名称']" />
</div>
<div class="row wrap ">
<q-input filled stack-label class="col-12" label="背景颜色" v-model="shiftOption.Color" ref="color" :rules="['anyColor']" >
<template v-slot:append>
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy transition-show="scale" transition-hide="scale">
<q-color v-model="shiftOption.Color" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="row wrap shifttc">
<el-time-select
class="q-mr-lg"
v-model="shiftOption.StartTime"
:picker-options="{
start: '00:00',
step: '00:15',
end: '23:55',
maxTime:shiftOption.EndTime
}"
placeholder="班次开始时间(格式00:00)">
</el-time-select>
<el-time-select
v-model="shiftOption.EndTime"
:picker-options="{
start: '06:00',
step: '00:15',
end: '23:55',
minTime:shiftOption.StartTime
}"
placeholder="班次结束时间(格式00:00)">
</el-time-select>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="isShowEditshift=false" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="onSubmit()" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
getStudentFollowUpPageList,
} from '../../api/studyabroad/index'
import {
getScrollShiftList,
setScrollShiftInfo,
delScrollShiftInfo
} from '../../api/course/roll'
export default {
meta: {
title: "滚动排班"
},
props: [],
data() {
return {
loading:false,
isShowEditshift:false,
saveLoading:false,
msg: {
rowsPerPage: 9999,
},
columns: [
{
name: 'Name',
label: '名称',
field: 'Name',
align: 'left'
},
{
name: 'time',
label: '时间范围',
align: 'left',
field: 'time'
},
{
name: 'UpdateByName',
label: '操作人',
align: 'left',
field: 'UpdateByName'
},
{
name: 'UpdateTime',
label: '操作时间',
align: 'left',
field: 'UpdateTime'
},
{
name: 'optioned',
label: '操作',
field: 'RoomId'
}
],
addshiftpower:true,//是否有操作的权限
shiftOption:{},
shiftList:[],
}
},
created() {
// let userinfo = this.getLocalStorage();
// userinfo.ActionMenuList.map(x=>{//判断权限
// if(x.FunctionCode == "workutaTeaching_look"){//判断是否有保存的权限
// this.msg.IsQueryMyStu = 0
// return
// }
// })
this.getList()
},
mounted() {
},
methods: {
getList(){
getScrollShiftList({}).then(res => {
if (res.Code == 1) {
this.shiftList = res.Data;
if(res.Data.length>0){
this.$emit('getList',res.Data)
}
}
})
},
//新增修改班次
Editshift(obj) {
if (obj) {
this.shiftOption = JSON.parse(JSON.stringify(obj) ) ;
} else {
this.shiftOption = {
Id:0,
Name:'',
color:'',
StartTime:'',
EndTime:'',
};
}
this.isShowEditshift = true;
},
onSubmit(){
this.$refs.Name.validate()
this.$refs.color.validate()
if (!this.$refs.Name.hasError && !this.$refs.color.hasError) {
if(!this.shiftOption.StartTime){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择班次开始时间`
})
return
}
if(!this.shiftOption.EndTime){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择班次结束时间`
})
return
}
this.saveLoading = true;
//掉接口
setScrollShiftInfo(this.shiftOption).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
this.getList();
}
this.saveLoading = false;
this.isShowEditshift = false;
})
}
},
removeshift(obj){//删除
let that = this;
this.$q.dialog({
title: "提示",
message: '是否删除该班次信息?',
isShowEditClassRoomForm: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
delScrollShiftInfo({ShiftId:obj.Id}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
that.getList();
}
})
});
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style scoped>
</style>
...@@ -129,6 +129,14 @@ ...@@ -129,6 +129,14 @@
/> />
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-StuSourceIdName="props">
<q-td :props="props">
<div>
<span v-if="props.row.CreateType == 2 && props.row.EnterpriseName">{{props.row.EnterpriseName}}:</span>
{{ props.row.StuSourceIdName }}
</div>
</q-td>
</template>
<template v-slot:body-cell-CurseManager="props"> <template v-slot:body-cell-CurseManager="props">
<q-td :props="props" v-html="getCurseManager(props.row)"></q-td> <q-td :props="props" v-html="getCurseManager(props.row)"></q-td>
......
<style scoped>
@import "../financial/css/cssReset.css";
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.singeRowTable tr th {
border: 1px solid #d2d2d2;
background: #FFF;
}
.workutaTeaching td:first-child{background-color: #E6E6E6;position: sticky;left:0px;}
.workutaTeaching th:first-child{position: sticky;left:0px;}
.workutaTeaching .finger{
cursor: pointer;
}
</style>
<template>
<div class="page-body workutaTeaching">
<div >
<shiftform :shiftList="shiftList" @getList="getshift"></shiftform>
</div>
<div style="width: 100%;margin-top: 20px">
<div style="width: 100%;height: 50px;display: flex;align-items: center;justify-content: center;border: 1px solid #d2d2d2;color: #409EFF;">
<i class="el-icon-d-arrow-left" @click="reduceMonth" style="font-size: 18px;"></i>
<span style="margin: 0 10px;">{{month.split('-')[0]}}{{month.split('-')[1]}}</span>
<i class="el-icon-d-arrow-right" @click="addMonth" style="font-size: 18px;"></i>
</div>
<div style="width: 100%;overflow-x: auto;" >
<table
class="po_content singeRowTable"
style="border:1px solid #E6E6E6;"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr >
<th width="100" style="min-width: 100px;">
名字
</th>
<th width="50" style="min-width: 50px;" v-for="(item,index) in dayArry" :key="index">
<div>
<div>{{item.day}}</div>
<div>{{item.week}}</div>
</div>
</th>
</tr>
<tr v-for="(item,index) in dataList.TeacherList" :key="index" v-if="dataList.TeacherList && dataList.TeacherList.length>0">
<td>{{item.TeacherName}}</td>
<td v-for="(x,y) in item.RDateList" :key="y" class="finger" @click="choicedate(x,index,y)" :style="{background:getcolor(x).background,color:getcolor(x).color}">
{{x.ShiftName}}
<q-popup-proxy>
<q-banner v-if="isShowpopup">
</q-banner>
</q-popup-proxy>
</td>
</tr>
</table>
</div>
<div v-if='!dataList.TeacherList||(dataList.TeacherList && dataList.TeacherList.length==0)'
style="width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;">
暂无数据
</div>
</div>
</div>
</template>
<script>
import {
getScrollPlanMonthList,
} from '../../api/course/roll'
import {
queryClassRoomList,
} from '../../api/school/index';
import shiftform from '../../components/course/shift-form'
export default {
meta: {
title: "滚动排班"
},
props: {},
components: {
shiftform
},
data() {
return {
msg: {
STime: '',
ETime:'',
},
month:'',
isShowpopup:false,
loading: false,
shiftList:[],//班次列表
dataList:[],
dayArry:[],//天数列表
ClassRoomList:[],//教室列表
}
},
created() {
this.month = ''
let yy = new Date().getFullYear()
let mm = new Date().getMonth() + 1
mm = mm<10?'0'+mm:mm
this.month = yy + '-' + mm
this.getday()
},
mounted() {
this.getClassRoomList();
},
methods: {
getday(){//获取月份天数
let arr = this.month.split("-");
let year = parseInt(arr[0]);
let month = parseInt(arr[1]);
let setDate = new Date(year,parseInt(month),0)
let day = setDate.getDate()
this.dayArry=[];
this.msg.STime = this.month+'-01';//开始时间之间赋值
for (var k = 1; k <= day; k++) {
if(k==day){
this.msg.ETime = this.month+'-'+k;//开始时间之间赋值
}
let obj = {
day :k,
week:this.getWeek(this.month+'-'+k)
}
this.dayArry.push(obj);
}
this.getList(); //获取规则
},
getWeek(dateString){//获取周几
let dateArray = dateString.split("-");
let date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
return "日一二三四五六".charAt(date.getDay());
},
addMonth(){//加月份
let arr = this.month.split("-");
let year = parseInt(arr[0]);
let month = parseInt(arr[1]);
if (month == 12) {
year = year + 1;
month = 1;
} else {
month = month + 1;
}
month = month<10?'0'+month:month
this.month = year + "-" + month;
this.getday()
},
reduceMonth(){//月份减
let arr = this.month.split("-");
let year = parseInt(arr[0]);
let month = parseInt(arr[1]);
if (month == 1) {
year = year - 1;
month = 12;
} else {
month = month - 1;
}
month = month<10?'0'+month:month
this.month = year + "-" + month;
this.getday()
},
getshift(data){//从子组件获取班次的列表
this.shiftList = data;
let obj = {
ShiftId: 0,
ShiftName: "休息"
}
this.shiftList.push(obj)
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
}
})
},
getcolor(row){
let obj ={
background:'#FFF',
color:'#111'
}
if(row.ShiftId>=0){//判断下 节约性能
for(let i = 0;i<this.shiftList.length;i++){
if(this.shiftList[i].Id == row.ShiftId){
obj.background = this.shiftList[i].Color
obj.color = '#FFF';
break
}
}
}
return obj
},
choicedate(item,index,y){//点击某一个弹出
this.isShowpopup =true
console.log(item)
},
getList(type) {
this.loading = true;
getScrollPlanMonthList(this.msg).then(res => {
this.loading = false;
this.dataList = res.Data
})
.catch(() => {
this.loading = false;
});
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style scoped>
/deep/.el-input__inner,
/deep/.el-range-input {
background-color: transparent;
border: none;
}
</style>
...@@ -78,14 +78,7 @@ ...@@ -78,14 +78,7 @@
</div> </div>
</div> </div>
<div style="width: 100%;text-align: right;padding: 0 20px;margin-bottom: 10px;"> <div class="page-search row items-center" v-if="morequery">
<span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;" >
<span style="margin-right:5px;color: #089bab;">高级查询</span>
<img v-show="!morequery" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
</span>
</div>
<div class="page-search row items-center" v-if="morequery">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" dense filled v-model="msg.StuStage" :options="customState" option-label="Name" <q-select @input="resetSearch" dense filled v-model="msg.StuStage" :options="customState" option-label="Name"
...@@ -116,6 +109,20 @@ ...@@ -116,6 +109,20 @@
</div> </div>
</div> </div>
</div> </div>
<div style="width: 100%;padding: 0 10px;margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between;">
<div style="font-weight: bold;">
总人数:{{Count}}人
</div>
<div>
<span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;" >
<span style="margin-right:5px;color: #089bab;">高级查询</span>
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
<img v-show="!morequery" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
</span>
</div>
</div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table " class="sticky-column-table sticky-right-column-table "
...@@ -255,6 +262,7 @@ export default { ...@@ -255,6 +262,7 @@ export default {
RoleListData: [], //课程顾问下拉数据 RoleListData: [], //课程顾问下拉数据
StuChannelList: [], //收客渠道 StuChannelList: [], //收客渠道
allStuChannelList: [], //所有收客渠道 allStuChannelList: [], //所有收客渠道
Count:0,
columns: [{ columns: [{
name: "StuName", name: "StuName",
label: "学生", label: "学生",
...@@ -448,6 +456,7 @@ export default { ...@@ -448,6 +456,7 @@ export default {
this.loading = false; this.loading = false;
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.PageCount = res.Data.PageCount; this.PageCount = res.Data.PageCount;
this.Count = res.Data.Count
}) })
......
...@@ -76,13 +76,7 @@ ...@@ -76,13 +76,7 @@
</div> </div>
</div> </div>
<div style="width: 100%;text-align: right;padding: 0 20px;margin-bottom: 10px;">
<span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;" >
<span style="margin-right:5px;color: #089bab;">高级查询</span>
<img v-show="!morequery" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
</span>
</div>
<div class="page-search row items-center" v-if="morequery"> <div class="page-search row items-center" v-if="morequery">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
...@@ -170,20 +164,16 @@ ...@@ -170,20 +164,16 @@
(<q-radio size="xs" v-model="msg.Q_FType" val="1" label="范围内有跟进记录" @input ='resetSearch'/> (<q-radio size="xs" v-model="msg.Q_FType" val="1" label="范围内有跟进记录" @input ='resetSearch'/>
<q-radio size="xs" v-model="msg.Q_FType" val="2" label="范围内没有跟进记录" @input ='resetSearch' /> <q-radio size="xs" v-model="msg.Q_FType" val="2" label="范围内没有跟进记录" @input ='resetSearch' />
<!-- <q-option-group
v-model="msg.Q_FType"
inline
class="q-mb-md"
@input="resetSearch"
:options="[
{ label: '范围内有跟进记录', value: '1' },
{ label: '范围内没有跟进记录', value: '2' },
]"
/> -->
</div> </div>
</div> </div>
</div> </div>
<div style="width: 100%;text-align: right;padding: 0 20px;margin-bottom: 10px;">
<span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;" >
<span style="margin-right:5px;color: #089bab;">高级查询</span>
<img v-show="!morequery" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/images/more.png" alt="">
</span>
</div>
<div class="col row wrap q-gutter-x-md" v-if="dataList.Stat"> <div class="col row wrap q-gutter-x-md" v-if="dataList.Stat">
<div class="col stics"> <div class="col stics">
...@@ -282,7 +272,7 @@ ...@@ -282,7 +272,7 @@
<span>{{ item.CreateTypeName?item.CreateTypeName:'-' }}</span> <span>{{ item.CreateTypeName?item.CreateTypeName:'-' }}</span>
</td> </td>
<td> <td>
<span>{{ item.StuSourceIdName?item.StuSourceIdName:'-' }}</span> <span><span v-if="item.CreateType==2 && item.EnterpriseName">{{item.EnterpriseName}}:</span> {{ item.StuSourceIdName?item.StuSourceIdName:'-' }}</span>
</td> </td>
<td> <td>
<span>{{ item.StuChannelName?item.StuChannelName:'-' }}</span> <span>{{ item.StuChannelName?item.StuChannelName:'-' }}</span>
......
...@@ -304,6 +304,15 @@ ...@@ -304,6 +304,15 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-StuSourceIdName="props">
<q-td :props="props">
<div>
<span v-if="props.row.CreateType == 2 && props.row.EnterpriseName">{{props.row.EnterpriseName}}:</span>
{{ props.row.StuSourceIdName }}
</div>
</q-td>
</template>
<template v-slot:body-cell-ClassName="props"> <template v-slot:body-cell-ClassName="props">
<q-td :props="props"> <q-td :props="props">
<div style="color: #f00; cursor: pointer" @click="seeClassDetail(props.row)"> <div style="color: #f00; cursor: pointer" @click="seeClassDetail(props.row)">
...@@ -545,6 +554,12 @@ ...@@ -545,6 +554,12 @@
label: "收客渠道", label: "收客渠道",
field: "StuChannelName", field: "StuChannelName",
align: "left", align: "left",
},
{
name: "StuCreateByName",
label: "负责人",
align: "left",
field: "StuCreateByName"
}, },
{ {
name: "Mobile", name: "Mobile",
...@@ -685,12 +700,7 @@ ...@@ -685,12 +700,7 @@
field: "JoinTypeStr", field: "JoinTypeStr",
align: "left", align: "left",
}, },
{
name: "StuCreateByName",
label: "负责人",
align: "left",
field: "StuCreateByName"
},
{ {
name: "optioned", name: "optioned",
label: "操作", label: "操作",
......
...@@ -1145,6 +1145,12 @@ const routes = [{ ...@@ -1145,6 +1145,12 @@ const routes = [{
component: () => component: () =>
import("pages/course/achievements.vue") import("pages/course/achievements.vue")
}, },
{
path: "/course/workutaTeaching", //教学中心 排课
component: () =>
import("pages/course/workutaTeaching.vue")
},
{ {
path: "/user/backbill", //退课单据 path: "/user/backbill", //退课单据
component: () => 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