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