Commit 5f3aa961 authored by Mac's avatar Mac
parents 8f6a28e9 7708a1f1
<template> <template>
<div class="classHourReward page-body"> <div class="classHourReward page-body">
<div class="page-search row items-center"> <div class="page-search row items-center">
<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" standout="bg-primary text-white" option-value="TId" option-label="TeacherName" <q-select @input="resetSearch" standout="bg-primary text-white" option-value="TId" option-label="TeacherName" v-model="msg.TeacherId" :options="TeacherList" emit-value map-options label="带班老师" />
v-model="msg.TeacherId" :options="TeacherList" emit-value map-options label="带班老师" />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name" v-model="msg.State" :options="StateList" emit-value map-options label="状态" />
v-model="msg.State" :options="StateList" emit-value map-options label="状态" />
</div> </div>
<div class="col-3 Sysuser_Date"> <div class="col-3 Sysuser_Date">
<q-field filled> <q-field filled>
...@@ -21,24 +19,31 @@ ...@@ -21,24 +19,31 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" separator="none" title="" :data="data" :columns="columns" row-key="name">
separator="none" title="" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="page-option" style="width:100%;"> <div class="page-option" style="width:100%;">
<q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" label="新增课时奖励" @click="drawer=true" ></q-btn> <q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" label="新增课时奖励" @click="drawer=true"></q-btn>
</div> </div>
</template> </template>
<template v-slot:body-cell-State="props"> <template v-slot:body-cell-State="props">
<q-td :props="props"> <q-td :props="props">
<div class="state-item" v-if="props.row.State==1" style="background: rgba(255, 204, 0, 0.2);color: #EDBE00">{{props.row.StateName}}</div> <div class="state-item" v-if="props.row.State==1" style="background: rgba(255, 204, 0, 0.2);color: #EDBE00">
<div class="state-item" v-if="props.row.State==2" style="background: rgba(2, 196, 153, 0.2);color: #02C499">{{props.row.StateName}}</div> {{props.row.StateName}}
<div class="state-item" v-if="props.row.State==3" style="background: rgba(247, 46, 82, 0.2);color: #F72E52">{{props.row.StateName}}</div> </div>
<div class="state-item" v-if="props.row.State==4" style="background: rgba(41, 97, 254, 0.2);color: #2961FE">{{props.row.StateName}}</div> <div class="state-item" v-if="props.row.State==2" style="background: rgba(2, 196, 153, 0.2);color: #02C499">
{{props.row.StateName}}
</div>
<div class="state-item" v-if="props.row.State==3" style="background: rgba(247, 46, 82, 0.2);color: #F72E52">
{{props.row.StateName}}
</div>
<div class="state-item" v-if="props.row.State==4" style="background: rgba(41, 97, 254, 0.2);color: #2961FE">
{{props.row.StateName}}
</div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-TeacherList="props"> <template v-slot:body-cell-TeacherList="props">
<q-td :props="props"> <q-td :props="props">
<span style="color: #3FC4FF;cursor: pointer">{{props.row.TeacherList[0].TeacherName}}{{props.row.TeacherList.length}}位老师 <span style="color: #3FC4FF;cursor: pointer" v-if="props.row.TeacherList.length>0&&props.row.TeacherList[0].TeacherName">{{props.row.TeacherList[0].TeacherName}}{{props.row.TeacherList.length}}位老师
<q-popup-proxy> <q-popup-proxy>
<q-banner> <q-banner>
<div class="price-popup"> <div class="price-popup">
...@@ -66,8 +71,7 @@ ...@@ -66,8 +71,7 @@
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="iconfont icon-xiangqing-" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="iconfont icon-xiangqing-" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="明细" @click="goDetailed(props.row,'0')" />
label="明细" @click="goDetailed(props.row,'0')" />
<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 v-if="props.row.State==1"> <q-item clickable v-close-popup v-if="props.row.State==1">
...@@ -96,14 +100,12 @@ ...@@ -96,14 +100,12 @@
</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 class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" :input="true" @input="changePage" />
:input="true" @input="changePage" />
</template> </template>
</q-table> </q-table>
</div> </div>
<!-- 一键制单--> <!-- 一键制单-->
<q-dialog v-model="ISsystem" persistent <q-dialog v-model="ISsystem" persistent>
>
<q-card style="width: 400px;max-width:500px;"> <q-card style="width: 400px;max-width:500px;">
<q-card-section> <q-card-section>
<div class="text-h6">一键制单</div> <div class="text-h6">一键制单</div>
...@@ -114,28 +116,20 @@ ...@@ -114,28 +116,20 @@
<q-radio v-model="FinanceMsg.IsPublic" val="1" label="公账" /> <q-radio v-model="FinanceMsg.IsPublic" val="1" label="公账" />
</div> </div>
<div class="col" style="margin-top: 20px"> <div class="col" style="margin-top: 20px">
<q-select standout="bg-primary text-white" option-value="ID" option-label="Name" <q-select standout="bg-primary text-white" option-value="ID" option-label="Name" v-model="FinanceMsg.CurrencyId" :options="coinGetList" emit-value map-options label="币种" />
v-model="FinanceMsg.CurrencyId" :options="coinGetList" emit-value map-options label="币种" />
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<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="ISsystem=false,Resetsystem()" v-if="!Floading"/> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="ISsystem=false,Resetsystem()" v-if="!Floading" />
<q-btn label="立即制单" color="accent" class="q-px-md" style="font-weight:400 !important" :loading="Floading" <q-btn label="立即制单" color="accent" class="q-px-md" style="font-weight:400 !important" :loading="Floading" @click="savesystem()" />
@click="savesystem()" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
<el-drawer <el-drawer title="" :visible.sync="drawer" :wrapperClosable="false" :with-header="false">
title=""
:visible.sync="drawer"
:wrapperClosable="false"
:with-header="false">
<div style="padding: 15px" class="class-popover"> <div style="padding: 15px" class="class-popover">
<div style="margin: 10px 0;font-size: 14px;font-weight: bold;color:#2D2D2D;">新增课时奖励</div> <div style="margin: 10px 0;font-size: 14px;font-weight: bold;color:#2D2D2D;">新增课时奖励</div>
<q-select class="col-12 q-pb-lg q-pr-lg" multiple clearable filled stack-label use-input use-chips <q-select class="col-12 q-pb-lg q-pr-lg" multiple clearable filled stack-label use-input use-chips option-value="TId" option-label="TeacherName" v-model="tempManager" ref="ManagerId" :options="TeacherList" label="所有老师" :dense="false" emit-value map-options @filter="filterFn">
option-value="TId" option-label="TeacherName" v-model="tempManager" ref="ManagerId" :options="TeacherList"
label="所有老师" :dense="false" emit-value map-options @filter="filterFn">
<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">
...@@ -156,42 +150,42 @@ ...@@ -156,42 +150,42 @@
<div class="row col" style="margin-top: 30px"> <div class="row col" style="margin-top: 30px">
<q-btn class="q-mr-md" label="取消" @click="drawer=false" /> <q-btn class="q-mr-md" label="取消" @click="drawer=false" />
<q-btn color="accent" class="q-mr-md" label="保存" @click="saveOrderInfo()" :loading="Dloading"/> <q-btn color="accent" class="q-mr-md" label="保存" @click="saveOrderInfo()" :loading="Dloading" />
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
<script> <script>
import { import {
getTeachingBonusPageList, getTeachingBonusPageList,
getBonusStateEnumList,//教师奖励状态 枚举 getBonusStateEnumList, //教师奖励状态 枚举
setTeachingBonusAdd,//新增课时奖励 setTeachingBonusAdd, //新增课时奖励
setTeachingBonusState,//教师绩效 设置状态 setTeachingBonusState, //教师绩效 设置状态
setTeachingBonusFinance,//教师奖励 生成财务单据 setTeachingBonusFinance, //教师奖励 生成财务单据
} from '../../api/course/class' } from '../../api/course/class'
import { import {
getTeacherDropDownList, getTeacherDropDownList,
} from '../../api/school/index'; } from '../../api/school/index';
export default { export default {
name: "classHourReward", name: "classHourReward",
data(){ data() {
return{ return {
loading:false, loading: false,
ISsystem:false, ISsystem: false,
Floading:false, Floading: false,
Dloading:false, Dloading: false,
drawer:false, drawer: false,
data:[], data: [],
pageCount:0, pageCount: 0,
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:10, pageSize: 10,
rowsPerPage:10, rowsPerPage: 10,
Month:'', Month: '',
TeacherId:0, TeacherId: 0,
State:0, State: 0,
}, },
//公告column //公告column
columns: [{ columns: [{
...@@ -219,7 +213,7 @@ ...@@ -219,7 +213,7 @@
{ {
name: 'UpdateTime', name: 'UpdateTime',
label: '生成时间', label: '生成时间',
field:'UpdateTime', field: 'UpdateTime',
align: 'left' align: 'left'
}, },
{ {
...@@ -236,23 +230,24 @@ ...@@ -236,23 +230,24 @@
name: 'optioned', name: 'optioned',
label: '操作', label: '操作',
field: 'DeptId' field: 'DeptId'
}], }
],
TeacherList: [], //关联教师下拉数据 TeacherList: [], //关联教师下拉数据
AllTeacherList:[],//保存值 AllTeacherList: [], //保存值
StateList: [], //状态下拉 StateList: [], //状态下拉
tempManager:[], tempManager: [],
visible:false, visible: false,
addMsg:{//新增课时奖励 addMsg: { //新增课时奖励
Month:'', Month: '',
TeacherIds:'', TeacherIds: '',
}, },
coinGetList:[],//币种数组 coinGetList: [], //币种数组
FinanceMsg:{//生成财务单据的参数 FinanceMsg: { //生成财务单据的参数
BonusId:0, BonusId: 0,
IsPublic:'0', IsPublic: '0',
CurrencyId:'', CurrencyId: '',
}, },
pickerOptions:{ pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now(); return time.getTime() > Date.now();
}, },
...@@ -265,7 +260,7 @@ ...@@ -265,7 +260,7 @@
this.GetBonusStateList() this.GetBonusStateList()
this.financeinfo_post_GetList() this.financeinfo_post_GetList()
}, },
methods:{ methods: {
financeinfo_post_GetList() { // 获取币种 financeinfo_post_GetList() { // 获取币种
this.apipost('financeinfo_post_GetList', { this.apipost('financeinfo_post_GetList', {
Name: '', Name: '',
...@@ -286,7 +281,7 @@ ...@@ -286,7 +281,7 @@
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList() this.getList()
}, },
getList(){ getList() {
this.loading = true; this.loading = true;
getTeachingBonusPageList(this.msg).then(res => { getTeachingBonusPageList(this.msg).then(res => {
...@@ -295,7 +290,6 @@ ...@@ -295,7 +290,6 @@
console.log(this.data) console.log(this.data)
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
...@@ -313,7 +307,7 @@ ...@@ -313,7 +307,7 @@
} }
}) })
}, },
GetBonusStateList(){ GetBonusStateList() {
getBonusStateEnumList({}).then(res => { getBonusStateEnumList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.StateList = res.Data; this.StateList = res.Data;
...@@ -335,28 +329,28 @@ ...@@ -335,28 +329,28 @@
} }
}) })
}, },
saveOrderInfo(){ saveOrderInfo() {
if(this.tempManager && this.tempManager.length>0){ if (this.tempManager && this.tempManager.length > 0) {
let all =false let all = false
this.tempManager.forEach(x=>{ this.tempManager.forEach(x => {
if(x==0){ if (x == 0) {
all = true all = true
} }
}) })
if(all==true){//如果选了全部 就不所有老师带过去 if (all == true) { //如果选了全部 就不所有老师带过去
let data = [] let data = []
this.AllTeacherList.forEach(x=>{ this.AllTeacherList.forEach(x => {
if(x.TId!=0){ if (x.TId != 0) {
data.push(x.TId) data.push(x.TId)
} }
}) })
this.addMsg.TeacherIds =data.join(',') this.addMsg.TeacherIds = data.join(',')
}else { } else {
this.addMsg.TeacherIds =this.tempManager.join(',') this.addMsg.TeacherIds = this.tempManager.join(',')
} }
}else { } else {
this.$q.notify({ this.$q.notify({
type: 'warning', type: 'warning',
position: 'top', position: 'top',
...@@ -365,7 +359,7 @@ ...@@ -365,7 +359,7 @@
}) })
return return
} }
if(this.addMsg.Month==''){ if (this.addMsg.Month == '') {
this.$q.notify({ this.$q.notify({
type: 'warning', type: 'warning',
position: 'top', position: 'top',
...@@ -374,9 +368,9 @@ ...@@ -374,9 +368,9 @@
}) })
return return
} }
this.Dloading=true this.Dloading = true
setTeachingBonusAdd(this.addMsg).then(res => { setTeachingBonusAdd(this.addMsg).then(res => {
this.Dloading=false this.Dloading = false
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -386,17 +380,17 @@ ...@@ -386,17 +380,17 @@
position: 'top' position: 'top'
}) })
this.resetSearch() this.resetSearch()
this.drawer=false this.drawer = false
} }
}) })
}, },
gostudent(item,type){//确认 gostudent(item, type) { //确认
let that = this let that = this
let text = ''; let text = '';
if(type==1){ if (type == 1) {
text = '确认奖励' text = '确认奖励'
}else if(type==2){ } else if (type == 2) {
text = '取消奖励' text = '取消奖励'
} }
this.$q.dialog({ this.$q.dialog({
...@@ -410,7 +404,7 @@ ...@@ -410,7 +404,7 @@
}).onOk(() => { }).onOk(() => {
setTeachingBonusState({ setTeachingBonusState({
BonusId: item.Id, BonusId: item.Id,
Type:type Type: type
}).then(res => { }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
that.$q.notify({ that.$q.notify({
...@@ -428,19 +422,19 @@ ...@@ -428,19 +422,19 @@
}); });
}, },
systemShan(item){//一键制单 systemShan(item) { //一键制单
this.FinanceMsg.BonusId = item.Id this.FinanceMsg.BonusId = item.Id
this.ISsystem =true; this.ISsystem = true;
}, },
Resetsystem(){ Resetsystem() {
this.FinanceMsg={ this.FinanceMsg = {
BonusId:0, BonusId: 0,
IsPublic:'0', IsPublic: '0',
CurrencyId:'', CurrencyId: '',
} }
}, },
savesystem(){ savesystem() {
if(this.FinanceMsg.CurrencyId==''){ if (this.FinanceMsg.CurrencyId == '') {
this.$q.notify({ this.$q.notify({
type: 'warning', type: 'warning',
position: 'top', position: 'top',
...@@ -463,8 +457,7 @@ ...@@ -463,8 +457,7 @@
that.getList() that.getList()
that.Resetsystem() that.Resetsystem()
that.Floading = false that.Floading = false
that.ISsystem=false that.ISsystem = false
} }
}).catch(() => { }).catch(() => {
...@@ -472,29 +465,33 @@ ...@@ -472,29 +465,33 @@
}) })
}, },
goexport(){//导出 goexport() { //导出
}, },
goDetailed(item,TeacherId){//明细 goDetailed(item, TeacherId) { //明细
var tempStr = '/course/rewardDetailed?Id=' + item.Id+'&TeacherId='+TeacherId; var tempStr = '/course/rewardDetailed?Id=' + item.Id + '&TeacherId=' + TeacherId;
this.$router.push({ this.$router.push({
path: tempStr path: tempStr
}); });
} }
} }
} }
</script> </script>
<style> <style>
.classHourReward .Sysuser_Date .el-input--prefix .el-input__inner { .classHourReward .Sysuser_Date .el-input--prefix .el-input__inner {
background-color: red; background-color: red;
border: 0; border: 0;
} }
.classHourReward .state-item{
padding: 3px 0px;border-radius: 3px;width: 70px; .classHourReward .state-item {
padding: 3px 0px;
border-radius: 3px;
width: 70px;
text-align: center; text-align: center;
} }
.classHourReward .frIdlist{
.classHourReward .frIdlist {
padding: 3px 10px; padding: 3px 10px;
border-radius: 3px; border-radius: 3px;
background: #EEEEEF; background: #EEEEEF;
...@@ -503,23 +500,27 @@ ...@@ -503,23 +500,27 @@
margin-right: 5px; margin-right: 5px;
margin-bottom: 5px; margin-bottom: 5px;
cursor: pointer; cursor: pointer;
} }
.class-popover .q-pr-lg{ .class-popover .q-pr-lg {
padding-right: 0; padding-right: 0;
margin-top: 20px; margin-top: 20px;
} }
.classHourReward .el-date-editor.el-input{
.classHourReward .el-date-editor.el-input {
width: 100%; width: 100%;
} }
.classHourReward .el-date-editor.el-input input{
background-color: transparent!important; .classHourReward .el-date-editor.el-input input {
} background-color: transparent !important;
.classHourReward .el-range-editor .el-range-input { }
.classHourReward .el-range-editor .el-range-input {
background: none; background: none;
} }
.Sysuser_Date .el-input__inner{
background: transparent!important; .Sysuser_Date .el-input__inner {
border:0!important; background: transparent !important;
} border: 0 !important;
}
</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