Commit c90d34bc authored by 罗超's avatar 罗超

1

parent ff1264a8
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale"> <q-dialog
<q-card style="width: 800px;max-width:900px;"> v-model="persistent"
content-class="bg-grey-1"
persistent
transition-show="scale"
transition-hide="scale"
>
<q-card style="width: 800px; max-width: 900px">
<q-card-section> <q-card-section>
<div class="text-h6" v-if="this.msg.Id===0">添加事件</div> <div class="text-h6" v-if="this.msg.Id === 0">添加事件</div>
<div class="text-h6" v-if="this.msg.Id>0">修改事件</div> <div class="text-h6" v-if="this.msg.Id > 0">修改事件</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<div class="row "> <div class="row">
<div class="col-6 q-pr-lg"> <div class="col-6 q-pr-lg">
<q-input filled v-model="msg.Title" label="标题" /> <q-input filled v-model="msg.Title" label="标题" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-select @input="" standout="bg-primary text-white" v-model="msg.EventType" class="col-6" <q-select
option-label="Name" option-value="Id" :options="typeOpts" emit-value map-options label="类型" /> @input=""
standout="bg-primary text-white"
v-model="msg.EventType"
class="col-6"
option-label="Name"
option-value="Id"
:options="typeOpts"
emit-value
map-options
label="类型"
/>
</div> </div>
</div> </div>
<q-input filled type="textarea" :rows="3" style="margin-top:20px;" stack-label maxlength="2000" <q-input
v-model="msg.EventContent" :dense="false" class="col-12 q-pb-lg" label="内容" /> filled
<div class="row wrap" style="padding-top:20px"> type="textarea"
<div style="display:flex;flex-wrap: wrap;"> :rows="3"
<div v-if="msg.EventPicList&&msg.EventPicList.length>0" v-for="(item,index) in msg.EventPicList"> style="margin-top: 20px"
stack-label
maxlength="2000"
v-model="msg.EventContent"
:dense="false"
class="col-12 q-pb-lg"
label="内容"
/>
<div class="row wrap" style="padding-top: 20px">
<div style="display: flex; flex-wrap: wrap">
<div
v-if="msg.EventPicList && msg.EventPicList.length > 0"
v-for="(item, index) in msg.EventPicList"
>
<div class="ItemImgDiv"> <div class="ItemImgDiv">
<q-img :src="item" spinner-color="white" style="height: 100%;height:100%" /> <q-img
<q-btn size="7px" @click="deleteItemImg(index)" style="position:absolute;right:-5px;top:-5px;" round :src="item"
color="red" icon="iconfont icon-guanbi1" /> spinner-color="white"
style="height: 100%; height: 100%"
/>
<q-btn
size="7px"
@click="deleteItemImg(index)"
style="position: absolute; right: -5px; top: -5px"
round
color="red"
icon="iconfont icon-guanbi1"
/>
</div> </div>
</div> </div>
<el-upload class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile" <el-upload
:show-file-list="false"> class="avatar-uploader addDutyMain"
action=""
:before-upload="uploadFile"
:show-file-list="false"
>
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" /> <q-btn
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading" label="取消"
@click="save" /> flat
color="grey-10"
style="font-weight: 400 !important"
@click="closeSaveForm"
/>
<q-btn
label="立即提交"
color="accent q-px-md"
style="font-weight: 400 !important"
:loading="saveLoading"
@click="save"
/>
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<script> <script>
import { import { UploadSelfFile } from "../../api/common/common";
UploadSelfFile, import { addEvent } from "../../api/stuMan/index.js";
} from '../../api/common/common' export default {
import {
addEvent
} from '../../api/stuMan/index.js'
export default {
props: { props: {
setObj: { setObj: {
type: Object, type: Object,
default: null default: null,
} },
}, },
data() { data() {
return { return {
...@@ -67,9 +117,10 @@ ...@@ -67,9 +117,10 @@
EventType: 2, EventType: 2,
EventContent: "", EventContent: "",
Title: "", Title: "",
EventPicList: [] EventPicList: [],
}, },
typeOpts: [{ typeOpts: [
{
Name: "处分", Name: "处分",
Id: 1, Id: 1,
}, },
...@@ -77,89 +128,89 @@ ...@@ -77,89 +128,89 @@
Name: "奖励", Name: "奖励",
Id: 2, Id: 2,
}, },
] ],
} };
}, },
mounted() { mounted() {
console.log(85, this.setObj) console.log(85, this.setObj);
if (this.setObj) { if (this.setObj) {
if (this.setObj.Student_Id) { if (this.setObj.STUID) {
this.msg.StuId = this.setObj.Student_Id this.msg.StuId = this.setObj.STUID;
} }
if (this.setObj.School_Id) { if (this.setObj.School_Id) {
this.msg.School_Id = this.setObj.School_Id this.msg.School_Id = this.setObj.School_Id;
} }
if (this.setObj.Id>0) { if (this.setObj.Id > 0) {
this.msg.Id = this.setObj.Id this.msg.Id = this.setObj.Id;
if (this.setObj.EventType) { if (this.setObj.EventType) {
this.msg.EventType = this.setObj.EventType this.msg.EventType = this.setObj.EventType;
} }
if (this.setObj.Title) { if (this.setObj.Title) {
this.msg.Title = this.setObj.Title this.msg.Title = this.setObj.Title;
} }
if (this.setObj.EventContent) { if (this.setObj.EventContent) {
this.msg.EventContent = this.setObj.EventContent this.msg.EventContent = this.setObj.EventContent;
} }
if (this.setObj.EventPicList) { if (this.setObj.EventPicList) {
this.msg.EventPicList = this.setObj.EventPicList this.msg.EventPicList = this.setObj.EventPicList;
} }
}else{ } else {
this.msg.Id =0 this.msg.Id = 0;
this.msg.EventType = 2 this.msg.EventType = 2;
this.msg.Title = "" this.msg.Title = "";
this.msg.EventContent = "" this.msg.EventContent = "";
this.msg.EventPicList =[] this.msg.EventPicList = [];
} }
} else {
}else{ this.msg.Id = 0;
this.msg.Id =0 this.msg.EventType = 2;
this.msg.EventType = 2 this.msg.Title = "";
this.msg.Title = "" this.msg.EventContent = "";
this.msg.EventContent = "" this.msg.EventPicList = [];
this.msg.EventPicList =[]
} }
console.log(109, this.msg) console.log(109, this.msg);
this.$forceUpdate(); this.$forceUpdate();
}, },
methods: { methods: {
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit("close");
this.persistent = false this.persistent = false;
}, },
save() { save() {
console.log(89, this.msg) console.log(89, this.msg);
this.saveLoading = true this.saveLoading = true;
addEvent(this.msg).then(res => { addEvent(this.msg)
this.saveLoading = false .then((res) => {
this.saveLoading = false;
if (res.Code === 1) { if (res.Code === 1) {
this.$message.success("操作成功") this.$message.success("操作成功");
this.$emit("success") this.$emit("success");
this.persistent = false this.persistent = false;
} else { } else {
this.$message.error(res.Message) this.$message.error(res.Message);
} }
}).catch(err => {
this.saveLoading = false
}) })
.catch((err) => {
this.saveLoading = false;
});
}, },
uploadFile(files) { uploadFile(files) {
UploadSelfFile('studentIcon', files, res => { UploadSelfFile("studentIcon", files, (res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.msg.EventPicList.push(res.FileUrl); this.msg.EventPicList.push(res.FileUrl);
} }
}) });
}, },
//删除图片 //删除图片
deleteItemImg(index) { deleteItemImg(index) {
this.msg.EventPicList.splice(index, 1); this.msg.EventPicList.splice(index, 1);
}
}, },
} },
};
</script> </script>
<style> <style>
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
...@@ -167,26 +218,26 @@ ...@@ -167,26 +218,26 @@
color: #8c939d; color: #8c939d;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.addDutyMain { .addDutyMain {
display: inline-block; display: inline-block;
width: 118px; width: 118px;
height: 118px; height: 118px;
font-size: 70px; font-size: 70px;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
line-height: 120px; line-height: 120px;
} }
.ItemImgDiv { .ItemImgDiv {
width: 118px; width: 118px;
height: 118px; height: 118px;
position: relative; position: relative;
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
display: inline-block; display: inline-block;
} }
._delete_img { ._delete_img {
position: absolute; position: absolute;
top: 0px; top: 0px;
height: 82px; height: 82px;
...@@ -196,20 +247,20 @@ ...@@ -196,20 +247,20 @@
background-color: rgba(2, 2, 2, 0.6); background-color: rgba(2, 2, 2, 0.6);
display: inherit; display: inherit;
opacity: 0; opacity: 0;
transition: all linear .5s transition: all linear 0.5s;
} }
._delete_img i.iconfont { ._delete_img i.iconfont {
display: inline-block; display: inline-block;
width: 32px; width: 32px;
height: 32px; height: 32px;
border-radius: 50%; border-radius: 50%;
color: #E95252 !important; color: #e95252 !important;
background-color: rgba(251, 251, 251, 0.9); background-color: rgba(251, 251, 251, 0.9);
margin-top: 26px; margin-top: 26px;
} }
._upload_box ul li { ._upload_box ul li {
float: left; float: left;
height: 82px; height: 82px;
width: 143px; width: 143px;
...@@ -218,18 +269,18 @@ ...@@ -218,18 +269,18 @@
position: relative; position: relative;
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
._upload_box ul li img { ._upload_box ul li img {
height: 82px; height: 82px;
width: 143px; width: 143px;
} }
._upload_box ul li:hover ._delete_img { ._upload_box ul li:hover ._delete_img {
opacity: 1; opacity: 1;
} }
._upload_tips { ._upload_tips {
font-size: 12px; font-size: 12px;
position: absolute; position: absolute;
top: 71%; top: 71%;
...@@ -237,6 +288,5 @@ ...@@ -237,6 +288,5 @@
left: 0; left: 0;
text-align: center; text-align: center;
color: #949494; color: #949494;
} }
</style> </style>
<style> <style>
li { li {
list-style-type: none; list-style-type: none;
} }
.stuList ul { .stuList ul {
padding: 0px; padding: 0px;
} }
.stuList li { .stuList li {
background: rgba(221, 222, 224, 0.2); background: rgba(221, 222, 224, 0.2);
border-radius: 4px; border-radius: 4px;
margin-top: 15px; margin-top: 15px;
} }
.stuList li .dline { .stuList li .dline {
display: table; display: table;
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.stuList li .d1, .stuList li .d1,
.stuList li .d2, .stuList li .d2,
.stuList li .d3, .stuList li .d3,
.stuList li .d4, .stuList li .d4,
.stuList li .d5 { .stuList li .d5 {
width: 18%; width: 18%;
padding: 20px 20px 10px; padding: 20px 20px 10px;
} }
.stuList li .d7 { .stuList li .d7 {
flex: 1; flex: 1;
width: 1px; width: 1px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.stuList li .d1 .di-title { .stuList li .d1 .di-title {
font-size: 16px; font-size: 16px;
color: #111111; color: #111111;
} }
.stuList li .d1 .di-c { .stuList li .d1 .di-c {
font-size: 14px; font-size: 14px;
display: flex; display: flex;
line-height: 28px; line-height: 28px;
color: #111111; color: #111111;
} }
.stuList li .d6 { .stuList li .d6 {
padding: 10px 20px; padding: 10px 20px;
width: 100%; width: 100%;
height: inherit; height: inherit;
position: relative; position: relative;
border-top: 1px solid #dddee0; border-top: 1px solid #dddee0;
} }
.stuList li .d6 .progress { .stuList li .d6 .progress {
width: 100%; width: 100%;
height: 5px; height: 5px;
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 0; bottom: 0;
} }
.stuList li .d2 div { .stuList li .d2 div {
margin: 2px 0; margin: 2px 0;
font-size: 14px; font-size: 14px;
color: #111111; color: #111111;
} }
.stuList li .d2-n { .stuList li .d2-n {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
margin-right: 20px; margin-right: 20px;
} }
.stuList li .d3 .d3-s { .stuList li .d3 .d3-s {
color: var(--q-color-negative); color: var(--q-color-negative);
font-weight: bold; font-weight: bold;
} }
.stuList li .d3 div { .stuList li .d3 div {
margin: 2px 0; margin: 2px 0;
font-size: 14px; font-size: 14px;
} }
.stuList li .d4 div { .stuList li .d4 div {
font-size: 14px; font-size: 14px;
color: #111111; color: #111111;
margin: 2px 0; margin: 2px 0;
} }
.stuList li .d5 div { .stuList li .d5 div {
font-size: 14px; font-size: 14px;
color: #111111; color: #111111;
margin: 2px 0; margin: 2px 0;
} }
.stuList .myCourseNName { .stuList .myCourseNName {
width: 25px; width: 25px;
height: 25px; height: 25px;
border-radius: 50%; border-radius: 50%;
...@@ -108,45 +108,45 @@ ...@@ -108,45 +108,45 @@
text-align: center; text-align: center;
line-height: 25px; line-height: 25px;
background-color: #004d40; background-color: #004d40;
} }
.stuList .app-image { .stuList .app-image {
background-position: center center; background-position: center center;
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 0%; border-radius: 0%;
float: left; float: left;
margin-right: 8px; margin-right: 8px;
} }
.Sysuser_Date .el-input { .Sysuser_Date .el-input {
width: 100%; width: 100%;
border: none; border: none;
background-color: transparent; background-color: transparent;
} }
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
width: 100%; width: 100%;
border: none; border: none;
background-color: transparent; background-color: transparent;
} }
.Sysuser_Date .el-range-editor .el-range-input { .Sysuser_Date .el-range-editor .el-range-input {
width: 100%; width: 100%;
border: none; border: none;
background-color: transparent; background-color: transparent;
} }
.el-picker-panel { .el-picker-panel {
z-index: 99999 !important; z-index: 99999 !important;
} }
.syster_qDropdown .q-btn__wrapper { .syster_qDropdown .q-btn__wrapper {
padding: 0 3px; padding: 0 3px;
min-height: 0 !important; min-height: 0 !important;
} }
.editOrderDrawerTop { .editOrderDrawerTop {
width: 100%; width: 100%;
height: 50px; height: 50px;
display: flex; display: flex;
...@@ -154,31 +154,56 @@ ...@@ -154,31 +154,56 @@
background-color: #f0f5fb; background-color: #f0f5fb;
padding: 5px 10px; padding: 5px 10px;
align-items: center; align-items: center;
} }
</style> </style>
<template> <template>
<div class="page-body stuList"> <div class="page-body stuList">
<div class="row q-mb-md"> <div class="row q-mb-md">
<q-space></q-space> <q-space></q-space>
<!-- <el-badge :value="11" style="float:right"> --> <!-- <el-badge :value="11" style="float:right"> -->
<div style="position:relative;"> <div style="position: relative">
<q-btn color="accent" label="高级查询" @click="IsShowQuery=true"></q-btn> <q-btn
<q-badge floating rounded color="red">{{queryNum}}</q-badge> color="accent"
label="高级查询"
@click="IsShowQuery = true"
></q-btn>
<q-badge floating rounded color="red">{{ queryNum }}</q-badge>
</div> </div>
<!-- </el-badge> --> <!-- </el-badge> -->
</div> </div>
<div class="page-search row items-center flex"> <div class="page-search row items-center flex">
<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="changeSchool" standout="bg-primary text-white" v-model="msg.School_Id" class="col-6" <q-select
option-label="SName" option-value="SId" :options="SchoolList" emit-value map-options label="校区" /> @input="changeSchool"
standout="bg-primary text-white"
v-model="msg.School_Id"
class="col-6"
option-label="SName"
option-value="SId"
:options="SchoolList"
emit-value
map-options
label="校区"
/>
</div> </div>
<div class="col-3 "> <div class="col-3">
<q-select @input="changeCourse" standout="bg-primary text-white" v-model="msg.CourseId" class="col-6" <q-select
option-label="CourseName" option-value="CourseId" use-input :options="CourseList" @filter="filterCourse" @input="changeCourse"
emit-value map-options label="课程" clearable> standout="bg-primary text-white"
v-model="msg.CourseId"
class="col-6"
option-label="CourseName"
option-value="CourseId"
use-input
:options="CourseList"
@filter="filterCourse"
emit-value
map-options
label="课程"
clearable
>
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -188,11 +213,31 @@ ...@@ -188,11 +213,31 @@
</template> </template>
</q-select> </q-select>
</div> </div>
<div class="col-3 "> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.ClassId" class="col-6" use-input <q-select
@filter="filterClass" option-label="ClassName" option-value="ClassId" :options="classList" emit-value @input="resetSearch"
map-options label="班级" clearable> standout="bg-primary text-white"
<template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }"> v-model="msg.ClassId"
class="col-6"
use-input
@filter="filterClass"
option-label="ClassName"
option-value="ClassId"
:options="classList"
emit-value
map-options
label="班级"
clearable
>
<template
v-slot:option="{
itemProps,
itemEvents,
opt,
selected,
toggleOption,
}"
>
<q-item v-bind="itemProps" v-on="itemEvents"> <q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section> <q-item-section>
<q-item-label v-html="opt.ClassName"></q-item-label> <q-item-label v-html="opt.ClassName"></q-item-label>
...@@ -212,98 +257,167 @@ ...@@ -212,98 +257,167 @@
</q-select> </q-select>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.GuestName" label="学员姓名" <q-input
@clear="resetSearch" maxlength="20" /> @input="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.GuestName"
label="学员姓名"
@clear="resetSearch"
maxlength="20"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table
class="sticky-tow-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns" :pagination="msg"
row-key="name"> :loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table sticky-right-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">学员名单</div> <div class="col-2 q-table__title">学员名单</div>
</template> </template>
<template v-slot:body-cell-ContractNo="props"> <template v-slot:body-cell-ContractNo="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="seeContract(props.row)"> <div
{{props.row.ContractNo}} style="color: #f00; cursor: pointer"
@click="seeContract(props.row)"
>
{{ props.row.ContractNo }}
</div> </div>
</q-td> </q-td>
</template> </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
{{props.row.ClassName}} style="color: #f00; cursor: pointer"
@click="seeClassDetail(props.row)"
>
{{ props.row.ClassName }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-OrderId="props"> <template v-slot:body-cell-OrderId="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showOrderDetail(props.row,1)"> <div
{{props.row.OrderId}} style="color: #f00; cursor: pointer"
@click="showOrderDetail(props.row, 1)"
>
{{ props.row.OrderId }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Income="props"> <template v-slot:body-cell-Income="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showOrderDetail(props.row,4)"> <div
{{props.row.Income}} style="color: #f00; cursor: pointer"
@click="showOrderDetail(props.row, 4)"
>
{{ props.row.Income }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Refund="props"> <template v-slot:body-cell-Refund="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showOrderDetail(props.row,4)"> <div
{{props.row.Refund}} style="color: #f00; cursor: pointer"
@click="showOrderDetail(props.row, 4)"
>
{{ props.row.Refund }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-CompleteHours="props"> <template v-slot:body-cell-CompleteHours="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="seeStudentsClassUse(props.row)"> <div
{{props.row.CompleteHours}} style="color: #f00; cursor: pointer"
@click="seeStudentsClassUse(props.row)"
>
{{ props.row.CompleteHours }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-MakeUpHours="props"> <template v-slot:body-cell-MakeUpHours="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showList(props.row,1)"> <div
{{props.row.MakeUpHours}} style="color: #f00; cursor: pointer"
@click="showList(props.row, 1)"
>
{{ props.row.MakeUpHours }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-AbsenceNum="props"> <template v-slot:body-cell-AbsenceNum="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showList(props.row,2)"> <div
{{props.row.AbsenceNum}} style="color: #f00; cursor: pointer"
@click="showList(props.row, 2)"
>
{{ props.row.AbsenceNum }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-LeaveNum="props" > <template v-slot:body-cell-LeaveNum="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showList(props.row,3)"> <div
{{props.row.LeaveNum}} style="color: #f00; cursor: pointer"
@click="showList(props.row, 3)"
>
{{ props.row.LeaveNum }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-EventlogNum="props"> <template v-slot:body-cell-EventlogNum="props">
<q-td :props="props"> <q-td :props="props">
<div style="color:#f00;cursor:pointer;" @click="showEventLog(props.row)"> <div
{{props.row.EventlogNum}} style="color: #f00; cursor: pointer"
@click="showEventLog(props.row)"
>
{{ props.row.EventlogNum }}
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div> <div>
<q-btn flat size="xs" color="accent" style="font-weight:400" label="停课" v-if="props.row.GuestState===1" <q-btn
@click="ShowStopLesson(props.row)" /> flat
<q-btn flat size="xs" color="accent" style="font-weight:400" label="转班" v-if="props.row.GuestState===1" size="xs"
@click="transferClass(props.row,1)" /> color="accent"
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"> style="font-weight: 400"
label="停课"
v-if="props.row.GuestState === 1"
@click="ShowStopLesson(props.row)"
/>
<q-btn
flat
size="xs"
color="accent"
style="font-weight: 400"
label="转班"
v-if="props.row.GuestState === 1"
@click="transferClass(props.row, 1)"
/>
<q-btn-dropdown
flat
size="xs"
color="dark"
label="更多"
style="margin-left: 10px"
>
<q-list> <q-list>
<q-item clickable v-close-popup @click="showAddEvent(props.row)"> <q-item
clickable
v-close-popup
@click="showAddEvent(props.row)"
>
<q-item-section> <q-item-section>
<q-item-label>添加事件</q-item-label> <q-item-label>添加事件</q-item-label>
</q-item-section> </q-item-section>
...@@ -314,57 +428,100 @@ ...@@ -314,57 +428,100 @@
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
</q-table> </q-table>
</div> </div>
<!-- 高级查询 --> <!-- 高级查询 -->
<MoreQuery v-if="IsShowQuery" :typeEnum="typeEnum" :warnEnum="warnEnum" :saveQuery="msg" @close="closeHandle" <MoreQuery
@success="morequery"> v-if="IsShowQuery"
:typeEnum="typeEnum"
:warnEnum="warnEnum"
:saveQuery="msg"
@close="closeHandle"
@success="morequery"
>
</MoreQuery> </MoreQuery>
<!-- 停课申请 --> <!-- 停课申请 -->
<StopLesson-form v-if="isShowStopLesson" :setObj="stuObj" @success="resetSearch" @close="closeHandle" /> <StopLesson-form
v-if="isShowStopLesson"
:setObj="stuObj"
@success="resetSearch"
@close="closeHandle"
/>
<!-- 转班申请 --> <!-- 转班申请 -->
<transferclass-form v-if="isShowTransferClass" :save-obj="orderObj" :ChangeType="ChangeType" @close="closeHandle" <transferclass-form
@success="resetSearch"></transferclass-form> v-if="isShowTransferClass"
:save-obj="orderObj"
:ChangeType="ChangeType"
@close="closeHandle"
@success="resetSearch"
></transferclass-form>
<!-- 添加事件 --> <!-- 添加事件 -->
<AddEvent-form v-if="isShowAddEvent" :setObj="eventObj" @success="resetSearch" @close="closeHandle" /> <AddEvent-form
v-if="isShowAddEvent"
:setObj="eventObj"
@success="resetSearch"
@close="closeHandle"
/>
<!-- 班级详情 --> <!-- 班级详情 -->
<classinfo-form v-if="isShowClassInfo" :seting-obj="eventObj" @close="closeHandle" <classinfo-form
@success="refreshPage"/> v-if="isShowClassInfo"
:seting-obj="eventObj"
@close="closeHandle"
@success="refreshPage"
/>
<!-- 订单详情 --> <!-- 订单详情 -->
<myOrder-form v-if="isShowmyorderForm" :save-obj="eventObj" @close="closeHandle"></myOrder-form> <myOrder-form
v-if="isShowmyorderForm"
:save-obj="eventObj"
@close="closeHandle"
></myOrder-form>
<!-- 可补课课时,缺勤次数,请假次数 --> <!-- 可补课课时,缺勤次数,请假次数 -->
<list v-if="isShowList" :type="showType" :set-obj="eventObj" @close="closeHandle"/> <list
v-if="isShowList"
:type="showType"
:set-obj="eventObj"
@close="closeHandle"
/>
<!-- 事件记录 --> <!-- 事件记录 -->
<eventLog v-if="isShowEventLog" :set-obj="eventObj" @modify="modifyEvent" @close="closeHandle"/> <eventLog
v-if="isShowEventLog"
:set-obj="eventObj"
@modify="modifyEvent"
@close="closeHandle"
/>
</div> </div>
</template> </template>
<script> <script>
import { import {
getSchoolDropdown, getSchoolDropdown,
getClassDropDownList, getClassDropDownList,
} from '../../api/school/index' } from "../../api/school/index";
import { import { queryCourseDropdownList } from "../../api/course/index";
queryCourseDropdownList import {
} from '../../api/course/index'
import {
getStuList, getStuList,
getEarlyWarningEnum, getEarlyWarningEnum,
getTypeEnum, getTypeEnum,
} from '../../api/stuMan/index.js' } from "../../api/stuMan/index.js";
import MoreQuery from '../../components/stuMan/moreQuery.vue' import MoreQuery from "../../components/stuMan/moreQuery.vue";
import StopLessonForm from '../../components/teacher/stopLessonForm' import StopLessonForm from "../../components/teacher/stopLessonForm";
import transferclassForm from '../../components/sale/transferclass-form' //转班信息 import transferclassForm from "../../components/sale/transferclass-form"; //转班信息
import AddEventForm from '../../components/stuMan/addEvent-form.vue' //转班信息 import AddEventForm from "../../components/stuMan/addEvent-form.vue"; //转班信息
import classinfoForm from '../../components/course/classinfo-form';//班级详情 import classinfoForm from "../../components/course/classinfo-form"; //班级详情
import myOrderForm from '../../components/sale/myOrder-form';//订单详情 import myOrderForm from "../../components/sale/myOrder-form"; //订单详情
import list from '../../components/stuMan/makeUpHours.vue';//可补课课时,缺勤次数,请假次数 import list from "../../components/stuMan/makeUpHours.vue"; //可补课课时,缺勤次数,请假次数
import eventLog from '../../components/stuMan/eventRecord.vue';//事件记录 import eventLog from "../../components/stuMan/eventRecord.vue"; //事件记录
export default { export default {
meta: { meta: {
title: "学员名单" title: "学员名单",
}, },
components: { components: {
MoreQuery, MoreQuery,
...@@ -388,8 +545,8 @@ ...@@ -388,8 +545,8 @@
School_Id: -1, //校区 School_Id: -1, //校区
CourseId: 0, //课程 CourseId: 0, //课程
ClassId: 0, //班级 ClassId: 0, //班级
GuestName: '', //学生姓名 GuestName: "", //学生姓名
ClassNo: '', //班号 ClassNo: "", //班号
OrderId: 0, //订单号 OrderId: 0, //订单号
EnterID: 0, //业务员 EnterID: 0, //业务员
EffectStatus: "", //状态 EffectStatus: "", //状态
...@@ -399,7 +556,8 @@ ...@@ -399,7 +556,8 @@
EndOrderTime: "", //下单结束时间 EndOrderTime: "", //下单结束时间
}, },
pageCount: 0, pageCount: 0,
columns: [{ columns: [
{
name: "Id", name: "Id",
label: "编号", label: "编号",
field: "Id", field: "Id",
...@@ -417,7 +575,7 @@ ...@@ -417,7 +575,7 @@
name: "Mobile", name: "Mobile",
label: "电话", label: "电话",
align: "left", align: "left",
field: "Mobile" field: "Mobile",
}, },
{ {
name: "ContractNo", name: "ContractNo",
...@@ -459,92 +617,92 @@ ...@@ -459,92 +617,92 @@
name: "EnterName", name: "EnterName",
label: "业务员", label: "业务员",
field: "EnterName", field: "EnterName",
align: "left" align: "left",
}, },
{ {
name: "PreferPrice", name: "PreferPrice",
label: "应收金额", label: "应收金额",
field: "PreferPrice", field: "PreferPrice",
align: "left" align: "left",
}, },
{ {
name: "Income", name: "Income",
label: "实收金额", label: "实收金额",
field: "Income", field: "Income",
align: "left" align: "left",
}, },
{ {
name: "Refund", name: "Refund",
label: "退款金额", label: "退款金额",
field: "Refund", field: "Refund",
align: "left" align: "left",
}, },
{ {
name: "TotalHours", name: "TotalHours",
label: "课程总课时", label: "课程总课时",
field: "TotalHours", field: "TotalHours",
align: "left" align: "left",
}, },
{ {
name: "ValidClassHours", name: "ValidClassHours",
label: "有效课时", label: "有效课时",
field: "ValidClassHours", field: "ValidClassHours",
align: "left" align: "left",
}, },
{ {
name: "CompleteHours", name: "CompleteHours",
label: "消耗课时", label: "消耗课时",
field: "CompleteHours", field: "CompleteHours",
align: "left" align: "left",
}, },
{ {
name: "SurplusHours", name: "SurplusHours",
label: "剩余课时", label: "剩余课时",
field: "SurplusHours", field: "SurplusHours",
align: "left" align: "left",
}, },
{ {
name: "MakeUpHours", name: "MakeUpHours",
label: "可补课课时", label: "可补课课时",
field: "MakeUpHours", field: "MakeUpHours",
align: "left" align: "left",
}, },
{ {
name: "AbsenceNum", name: "AbsenceNum",
label: "缺勤次数", label: "缺勤次数",
field: "AbsenceNum", field: "AbsenceNum",
align: "left" align: "left",
}, },
{ {
name: "LeaveNum", name: "LeaveNum",
label: "请假次数", label: "请假次数",
field: "LeaveNum", field: "LeaveNum",
align: "left" align: "left",
}, },
{ {
name: "EventlogNum", name: "EventlogNum",
label: "事件记录", label: "事件记录",
field: "EventlogNum", field: "EventlogNum",
align: "left" align: "left",
}, },
{ {
name: "GuestStateStr", name: "GuestStateStr",
label: "状态", label: "状态",
field: "GuestStateStr", field: "GuestStateStr",
align: "left" align: "left",
}, },
{ {
name: "JoinTypeStr", name: "JoinTypeStr",
label: "类型", label: "类型",
field: "JoinTypeStr", field: "JoinTypeStr",
align: "left" align: "left",
}, },
{ {
name: 'optioned', name: "optioned",
label: '操作', label: "操作",
required: true, required: true,
align: "left" align: "left",
} },
], ],
SchoolList: [], SchoolList: [],
CourseList: [], CourseList: [],
...@@ -557,7 +715,7 @@ ...@@ -557,7 +715,7 @@
SchoolId: -1, SchoolId: -1,
Teacher_Id: 0, Teacher_Id: 0,
MoreStatus: "1,2,3", MoreStatus: "1,2,3",
IsQuerySurplusPlan: 0 IsQuerySurplusPlan: 0,
}, },
typeEnum: [], typeEnum: [],
warnEnum: [], warnEnum: [],
...@@ -569,12 +727,12 @@ ...@@ -569,12 +727,12 @@
ChangeType: 1, //1-转班 2-分拆 ChangeType: 1, //1-转班 2-分拆
isShowAddEvent: false, //是否显示添加事件 isShowAddEvent: false, //是否显示添加事件
eventObj: {}, eventObj: {},
isShowClassInfo:false,//是否显示班级详情 isShowClassInfo: false, //是否显示班级详情
isShowmyorderForm: false, //是否显示订单详情 isShowmyorderForm: false, //是否显示订单详情
isShowList:false,//是否显示可补课课时,缺勤次数,请假次数 isShowList: false, //是否显示可补课课时,缺勤次数,请假次数
showType:1, showType: 1,
isShowEventLog:false,//是否显示事件记录 isShowEventLog: false, //是否显示事件记录
} };
}, },
mounted() { mounted() {
this.getSchool(); this.getSchool();
...@@ -587,20 +745,20 @@ ...@@ -587,20 +745,20 @@
methods: { methods: {
//获取校区下拉 //获取校区下拉
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then((res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.SchoolList = res.Data; this.SchoolList = res.Data;
var obj = { var obj = {
SName: '不限', SName: "不限",
SId: -1 SId: -1,
} };
this.SchoolList.unshift(obj); this.SchoolList.unshift(obj);
} }
}) });
}, },
//获取课程 //获取课程
getCourseList() { getCourseList() {
queryCourseDropdownList({}).then(res => { queryCourseDropdownList({}).then((res) => {
if (res.Code == 1) { if (res.Code == 1) {
var tempArray = res.Data; var tempArray = res.Data;
if (!tempArray) { if (!tempArray) {
...@@ -608,36 +766,38 @@ ...@@ -608,36 +766,38 @@
} }
tempArray.unshift({ tempArray.unshift({
CourseId: 0, CourseId: 0,
CourseName: "不限" CourseName: "不限",
}) });
this.CourseList = tempArray; this.CourseList = tempArray;
this.AllCourseList = tempArray; this.AllCourseList = tempArray;
} }
}) });
}, },
// 筛选课程 // 筛选课程
filterCourse(val, update) { filterCourse(val, update) {
update(() => { update(() => {
if (val === '') { if (val === "") {
this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList)) this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList));
} else { } else {
const needle = val.toLowerCase(); const needle = val.toLowerCase();
this.CourseList = this.AllCourseList.filter(v => v.CourseName.toLowerCase().indexOf(needle) > -1); this.CourseList = this.AllCourseList.filter(
(v) => v.CourseName.toLowerCase().indexOf(needle) > -1
);
} }
}) });
}, },
//获取班级 //获取班级
getClass() { getClass() {
getClassDropDownList(this.queryClass).then(res => { getClassDropDownList(this.queryClass).then((res) => {
this.classList = []; this.classList = [];
this.msg.ClassId = 0 this.msg.ClassId = 0;
if (res.Code == 1) { if (res.Code == 1) {
this.classList = res.Data; this.classList = res.Data;
this.AllClassList = res.Data; this.AllClassList = res.Data;
var obj = { var obj = {
ClassName: '不限', ClassName: "不限",
ClassId: 0 ClassId: 0,
} };
this.classList.unshift(obj); this.classList.unshift(obj);
} }
}); });
...@@ -645,54 +805,58 @@ ...@@ -645,54 +805,58 @@
//筛选班级 //筛选班级
filterClass(val, update) { filterClass(val, update) {
update(() => { update(() => {
if (val === '') { if (val === "") {
this.classList = JSON.parse(JSON.stringify(this.AllClassList)) this.classList = JSON.parse(JSON.stringify(this.AllClassList));
} else { } else {
const needle = val.toLowerCase(); const needle = val.toLowerCase();
this.classList = this.AllClassList.filter(v => v.ClassName.toLowerCase().indexOf(needle) > -1); this.classList = this.AllClassList.filter(
(v) => v.ClassName.toLowerCase().indexOf(needle) > -1
);
} }
}) });
}, },
changeSchool(val) { changeSchool(val) {
this.queryClass.SchoolId = val this.queryClass.SchoolId = val;
this.getClass(); this.getClass();
this.resetSearch(); this.resetSearch();
}, },
changeCourse(val) { changeCourse(val) {
this.queryClass.CourseId = val this.queryClass.CourseId = val;
this.getClass(); this.getClass();
this.resetSearch(); this.resetSearch();
}, },
getList() { getList() {
this.loading = true; this.loading = true;
getStuList(this.msg).then(res => { getStuList(this.msg)
this.loading = false .then((res) => {
this.loading = false;
if (res.Code === 1) { if (res.Code === 1) {
this.data = res.Data.PageData this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount this.pageCount = res.Data.PageCount;
} }
}).catch(err => {
this.loading = false;
}) })
.catch((err) => {
this.loading = false;
});
}, },
//显示停课弹窗 //显示停课弹窗
ShowStopLesson(item) { ShowStopLesson(item) {
this.isShowStopLesson = true; this.isShowStopLesson = true;
this.stuObj = item this.stuObj = item;
}, },
// 高级查询 // 高级查询
morequery(val) { morequery(val) {
this.IsShowQuery = false this.IsShowQuery = false;
this.queryNum = val.chooseNum this.queryNum = val.chooseNum;
this.msg.ClassNo = val.ClassNo this.msg.ClassNo = val.ClassNo;
this.msg.OrderId = val.OrderId this.msg.OrderId = val.OrderId;
this.msg.EnterID = val.EnterID this.msg.EnterID = val.EnterID;
this.msg.EffectStatus = val.EffectStatus this.msg.EffectStatus = val.EffectStatus;
this.msg.JoinType = val.JoinType this.msg.JoinType = val.JoinType;
this.msg.EarlyWarning = val.EarlyWarning this.msg.EarlyWarning = val.EarlyWarning;
this.msg.OrderTime = val.OrderTime this.msg.OrderTime = val.OrderTime;
this.msg.EndOrderTime = val.EndOrderTime this.msg.EndOrderTime = val.EndOrderTime;
this.resetSearch(); this.resetSearch();
}, },
//重新查询 //重新查询
...@@ -703,7 +867,7 @@ ...@@ -703,7 +867,7 @@
//翻页 //翻页
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList() this.getList();
}, },
//关闭弹窗 //关闭弹窗
closeHandle() { closeHandle() {
...@@ -711,11 +875,11 @@ ...@@ -711,11 +875,11 @@
this.isShowStopLesson = false; this.isShowStopLesson = false;
this.isShowTransferClass = false; this.isShowTransferClass = false;
this.isShowAddEvent = false; this.isShowAddEvent = false;
this.isShowClassInfo=false; this.isShowClassInfo = false;
this.isShowmyorderForm=false; this.isShowmyorderForm = false;
this.isShowList=false; this.isShowList = false;
this.isShowEventLog=false; this.isShowEventLog = false;
this.isShowEventLog=false; this.isShowEventLog = false;
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
...@@ -727,16 +891,16 @@ ...@@ -727,16 +891,16 @@
this.$router.push({ this.$router.push({
path: url, path: url,
query: { query: {
Id: item.Id Id: item.Id,
} },
}) });
} else { } else {
this.$router.push({ this.$router.push({
path: url, path: url,
query: { query: {
Id: 0 Id: 0,
} },
}) });
} }
}, },
goUrl1(url, item) { goUrl1(url, item) {
...@@ -744,27 +908,27 @@ ...@@ -744,27 +908,27 @@
path: url, path: url,
query: { query: {
Id: item.Id, Id: item.Id,
name: item.ActivityName name: item.ActivityName,
} },
}) });
}, },
getTypeEnum() { getTypeEnum() {
getTypeEnum({}).then(res => { getTypeEnum({}).then((res) => {
if (res.Code === 1) { if (res.Code === 1) {
res.Data.unshift({ res.Data.unshift({
Name: "不限", Name: "不限",
Id: 0 Id: 0,
}) });
this.typeEnum = res.Data this.typeEnum = res.Data;
} }
}) });
}, },
getEarlyWarningEnum() { getEarlyWarningEnum() {
getEarlyWarningEnum({}).then(res => { getEarlyWarningEnum({}).then((res) => {
if (res.Code === 1) { if (res.Code === 1) {
this.warnEnum = res.Data this.warnEnum = res.Data;
} }
}) });
}, },
//转班 //转班
transferClass(item, type) { transferClass(item, type) {
...@@ -774,55 +938,55 @@ ...@@ -774,55 +938,55 @@
}, },
//显示添加事件 //显示添加事件
showAddEvent(item) { showAddEvent(item) {
let newitem=JSON.parse(JSON.stringify(item)) let newitem = JSON.parse(JSON.stringify(item));
newitem.Id=0 // Id和修改的Id冲突 自定义学生id=STUID
this.eventObj = newitem newitem.STUID = newitem.Id;
newitem.Id = 0;
this.eventObj = newitem;
this.isShowAddEvent = true; this.isShowAddEvent = true;
}, },
//查看合同 //查看合同
seeContract(item){ seeContract(item) {
this.OpenNewUrl("/contractView",{ContractId:item.ContractId}) this.OpenNewUrl("/contractView", { ContractId: item.ContractId });
}, },
//查看课时消耗 //查看课时消耗
seeStudentsClassUse(item){ seeStudentsClassUse(item) {
let obj={ let obj = {
StudentId:item.Id, StudentId: item.Id,
TeacherId:item.Teacher_Id, TeacherId: item.Teacher_Id,
ClassId:item.ClassId ClassId: item.ClassId,
} };
this.OpenNewUrl("/teacher/studentsClassSee",obj) this.OpenNewUrl("/teacher/studentsClassSee", obj);
}, },
//查看班级详情 //查看班级详情
seeClassDetail(item){ seeClassDetail(item) {
this.eventObj=item this.eventObj = item;
this.isShowClassInfo=true this.isShowClassInfo = true;
}, },
//查看订单详情 //查看订单详情
showOrderDetail(item,tab){ showOrderDetail(item, tab) {
item.tab = tab item.tab = tab;
this.eventObj=item this.eventObj = item;
this.isShowmyorderForm=true this.isShowmyorderForm = true;
}, },
showList(item,type){ showList(item, type) {
this.eventObj=item this.eventObj = item;
this.showType=type this.showType = type;
this.isShowList=true this.isShowList = true;
}, },
showEventLog(item){ showEventLog(item) {
this.eventObj=item this.eventObj = item;
this.isShowEventLog=true this.isShowEventLog = true;
}, },
// 修改事件 // 修改事件
modifyEvent(val){ modifyEvent(val) {
this.closeHandle(); this.closeHandle();
this.eventObj=val this.eventObj = val;
this.isShowAddEvent=true this.isShowAddEvent = true;
} },
} },
} };
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
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