Commit efcb76a7 authored by Mac's avatar Mac

1

parent 714560dc
...@@ -167,3 +167,44 @@ export function getBonusStateEnumList(data) { ...@@ -167,3 +167,44 @@ export function getBonusStateEnumList(data) {
data data
}); });
} }
/**
* 新增课时奖励
*/
export function setTeachingBonusAdd(data) {
return request({
url: '/TeachingRewards/SetTeachingBonusAdd',
method: 'post',
data
});
}
/**
* 设置教师奖励状态
*/
export function setTeachingBonusState(data) {
return request({
url: '/TeachingRewards/SetTeachingBonusState',
method: 'post',
data
});
}
/**
* 教师奖励 生成财务单据
*/
export function setTeachingBonusFinance(data) {
return request({
url: '/TeachingRewards/SetTeachingBonusFinance',
method: 'post',
data
});
}
/**
* 获取教师课时奖励明细
*/
export function getTeachingBonusDetailList(data) {
return request({
url: '/TeachingRewards/GetTeachingBonusDetailList',
method: 'post',
data
});
}
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
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="Isadd=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">{{props.row.StateName}}</div>
<div class="state-item" v-if="props.row.State==2" style="background: rgba(2, 196, 153, 10.2);color: #02C499">{{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==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==4" style="background: rgba(41, 97, 254, 0.2);color: #2961FE">{{props.row.StateName}}</div>
</q-td> </q-td>
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<q-popup-proxy> <q-popup-proxy>
<q-banner> <q-banner>
<div class="price-popup"> <div class="price-popup">
<div class="row " v-for="(x,index2) in props.row.TeacherList" :key="index2" style="width: 200px;justify-content: space-between"> <div class="row " v-for="(x,index2) in props.row.TeacherList" :key="index2" style="width: 200px;justify-content: space-between;align-items: center;margin: 7px 0;cursor: pointer">
<div class="row"> <div class="row" @click="goDetailed(props.row,x.TeacherId)">
<span style="color:#2D2D2D;">{{x.TeacherName}}</span> <span style="color:#2D2D2D;">{{x.TeacherName}}</span>
</div> </div>
<span style="color: #2860FB">{{x.Money.toFixed(2)}}</span> <span style="color: #2860FB">{{x.Money.toFixed(2)}}</span>
...@@ -69,24 +69,29 @@ ...@@ -69,24 +69,29 @@
<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="EditConfig(props.row.Id)" /> 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> <q-item clickable v-close-popup v-if="props.row.State==1">
<q-item-section @click="gostudent(item)"> <q-item-section @click="gostudent(props.row,1)">
<q-item-label>确认</q-item-label> <q-item-label>确认</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup> <q-item clickable v-close-popup v-if="props.row.State==1 || props.row.State==2">
<q-item-section @click="transferOrder(item)"> <q-item-section @click="gostudent(props.row,2)">
<q-item-label>取消</q-item-label> <q-item-label>取消</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup> <q-item clickable v-close-popup v-if="props.row.State==2">
<q-item-section @click="editOrderRemark(item,1)"> <q-item-section @click="systemShan(props.row)">
<q-item-label>制单</q-item-label> <q-item-label>制单</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup v-if="props.row.State==1||props.row.State==2">
<q-item-section @click="goexport(props.row)">
<q-item-label>导出</q-item-label>
</q-item-section>
</q-item>
</q-list> </q-list>
</q-btn-dropdown> </q-btn-dropdown>
...@@ -98,49 +103,64 @@ ...@@ -98,49 +103,64 @@
</template> </template>
</q-table> </q-table>
</div> </div>
<q-dialog v-model="Isadd" maximized full-height seamless position="right" style="z-index: 1000"> <!-- 一键制单-->
<q-card style="margin-top:61px;width:400px" class="no-border-radius classinfo_Dialog"> <q-dialog v-model="ISsystem" persistent
<div class="drawerTop"> >
<div style="display:flex;align-items:center;margin:20px 0 0 20px;"> <q-card style="width: 400px;max-width:500px;">
<span class="drawer_Span" style="color: #2D2D2D;font-weight: bold">新增课时奖励</span> <q-card-section>
</div> <div class="text-h6">一键制单</div>
</div> </q-card-section>
<div style="padding:20px 15px;" class="col"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="price-popup"> <div class="col">
<div class="class-h-r-popup"> <q-radio v-model="FinanceMsg.IsPublic" val="0" label="私账" />
<q-select class="col-12 q-pb-lg q-pr-lg" multiple clearable filled stack-label use-input use-chips <q-radio v-model="FinanceMsg.IsPublic" val="1" label="公账" />
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">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<div class="col-12">
<div class="col-12 Sysuser_Date">
<q-field filled>
  <template v-slot:control>
<el-date-picker v-model="msg.Month" @change="resetSearch()"  type="month" style="border:none;" class='class-h-r-date' ></el-date-picker>       
</template>
</q-field>
</div>
</div> </div>
</div> <div class="col" style="margin-top: 20px">
</div> <q-select standout="bg-primary text-white" option-value="ID" option-label="Name"
<div style="margin:30px 10px 0 0;"> v-model="FinanceMsg.CurrencyId" :options="coinGetList" emit-value map-options label="币种" />
<q-btn class="q-mr-md" label="取消" @click="Isadd=false" /> </div>
<q-btn color="accent" class="q-mr-md" label="保存" @click="saveOrderInfo()" /> </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()" />
<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"
: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">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<div class="col-12">
<div class="col-12 Sysuser_Date">
<q-field filled>
  <template v-slot:control>
<el-date-picker v-model="addMsg.Month"   type="month" style="border:none;" :picker-options="pickerOptions"></el-date-picker>       
</template>
</q-field>
</div> </div>
</div> </div>
</q-card>
<div class="dialog-out-close" @click="Isadd=false" <div class="row col" style="margin-top: 30px">
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"> <q-btn class="q-mr-md" label="取消" @click="drawer=false" />
<q-icon name="iconfont icon-jujue1" size="26px" /> <q-btn color="accent" class="q-mr-md" label="保存" @click="saveOrderInfo()" />
</div>
</div> </div>
</q-dialog> </el-drawer>
</div> </div>
</template> </template>
...@@ -148,6 +168,9 @@ ...@@ -148,6 +168,9 @@
import { import {
getTeachingBonusPageList, getTeachingBonusPageList,
getBonusStateEnumList,//教师奖励状态 枚举 getBonusStateEnumList,//教师奖励状态 枚举
setTeachingBonusAdd,//新增课时奖励
setTeachingBonusState,//教师绩效 设置状态
setTeachingBonusFinance,//教师奖励 生成财务单据
} from '../../api/course/class' } from '../../api/course/class'
import { import {
getTeacherDropDownList, getTeacherDropDownList,
...@@ -157,9 +180,11 @@ ...@@ -157,9 +180,11 @@
data(){ data(){
return{ return{
loading:false, loading:false,
ISsystem:false,
Floading:false,
drawer:false,
data:[], data:[],
pageCount:0, pageCount:0,
Isadd:false,
msg:{ msg:{
pageIndex:1, pageIndex:1,
pageSize:10, pageSize:10,
...@@ -215,14 +240,41 @@ ...@@ -215,14 +240,41 @@
AllTeacherList:[],//保存值 AllTeacherList:[],//保存值
StateList: [], //状态下拉 StateList: [], //状态下拉
tempManager:[], tempManager:[],
visible:false,
addMsg:{//新增课时奖励
Month:'',
TeacherIds:'',
},
coinGetList:[],//币种数组
FinanceMsg:{//生成财务单据的参数
BonusId:0,
IsPublic:'0',
CurrencyId:'',
},
pickerOptions:{
disabledDate(time) {
return time.getTime() > Date.now();
},
},
} }
}, },
created() { created() {
this.getList(); this.getList();
this.GetTeacherList() this.GetTeacherList()
this.GetBonusStateList() this.GetBonusStateList()
this.financeinfo_post_GetList()
}, },
methods:{ methods:{
financeinfo_post_GetList() { // 获取币种
this.apipost('financeinfo_post_GetList', {
Name: '',
TCID: 0
}, res => {
if (res.data.resultCode == 1) {
this.coinGetList = res.data.data;
}
}, err => {})
},
resetSearch() { resetSearch() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getList() this.getList()
...@@ -280,6 +332,151 @@ ...@@ -280,6 +332,151 @@
} }
}) })
}, },
saveOrderInfo(){
if(this.tempManager && this.tempManager.length>0){
let all =false
this.tempManager.forEach(x=>{
if(x==0){
all = true
}
})
if(all==true){//如果选了全部 就不所有老师带过去
let data = []
this.AllTeacherList.forEach(x=>{
if(x.TId!=0){
data.push(x.TId)
}
})
this.addMsg.TeacherIds =data.join(',')
}else {
this.addMsg.TeacherIds =this.tempManager.join(',')
}
}else {
this.$q.notify({
type: 'warning',
position: 'top',
timeout: 1500,
message: `请选择教师`
})
return
}
if(this.addMsg.Month==''){
this.$q.notify({
type: 'warning',
position: 'top',
timeout: 1500,
message: `请选择月份`
})
return
}
setTeachingBonusAdd(this.addMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '保存成功!',
position: 'top'
})
this.resetSearch()
this.drawer=false
}
})
},
gostudent(item,type){//确认
let that = this
let text = '';
if(type==1){
text = '确认奖励'
}else if(type==2){
text = '取消奖励'
}
this.$q.dialog({
title: '提示信息',
message: text,
cancel: true,
persistent: true,
html: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
setTeachingBonusState({
BonusId: item.Id,
Type:type
}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
that.getList()
}
})
}).onCancel(() => {
});
},
systemShan(item){//一键制单
this.FinanceMsg.BonusId = item.Id
this.ISsystem =true;
},
Resetsystem(){
this.FinanceMsg={
BonusId:0,
IsPublic:'0',
CurrencyId:'',
}
},
savesystem(){
if(this.FinanceMsg.CurrencyId==''){
this.$q.notify({
type: 'warning',
position: 'top',
timeout: 1500,
message: `请选择币种`
})
return
}
let that = this
that.Floading = true
setTeachingBonusFinance(this.FinanceMsg).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '制单成功',
position: 'top'
})
that.getList()
that.Resetsystem()
that.Floading = false
that.ISsystem=false
}
}).catch(() => {
this.Floading = false
})
},
goexport(){//导出
},
goDetailed(item,TeacherId){//明细
var tempStr = '/course/rewardDetailed?Id=' + item.Id+'&TeacherId='+TeacherId;
this.$router.push({
path: tempStr
});
}
} }
} }
</script> </script>
...@@ -305,15 +502,19 @@ ...@@ -305,15 +502,19 @@
margin-bottom: 5px; margin-bottom: 5px;
cursor: pointer; cursor: pointer;
} }
.class-h-r-popup{
width: 340px; .class-popover .q-pr-lg{
}
.class-h-r-popup .q-pr-lg{
padding-right: 0; padding-right: 0;
margin-top: 20px;
} }
.fullscreen{ .classHourReward .el-date-editor.el-input{
z-index: 1000; width: 100%;
}
.classHourReward .el-input__inner {
background-color: red!important;
}
.class-popover .el-input__inner {
background-color: transparent!important;
} }
</style> </style>
<template>
<div class="rewardDetailed 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="getList" 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="getList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.Type" :options="TypeList" emit-value map-options label="上课类型" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="vertical" :data="data.List" :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" label="导出" />
</div>
</template>
<template v-slot:body-cell-Type="props">
<q-td :props="props">
<span >{{props.row.Type==1?'带班':'代课'}}</span>
</q-td>
</template>
<template v-slot:bottom>
</template>
</q-table>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" style="margin-top: 30px"
separator="vertical" :data="data.Statistics" :columns="columnsZ" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">教师课时费汇总</div>
<q-space />
</template>
<template v-slot:body-cell-Type="props">
<q-td :props="props">
<span >{{props.row.Type==1?'带班':'代课'}}</span>
</q-td>
</template>
<template v-slot:bottom>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
getTeachingBonusDetailList,//明细详情
} from '../../api/course/class'
import {
getTeacherDropDownList,
} from '../../api/school/index';
export default {
name: "rewardDetailed",
data(){
return{
columns: [{
name: 'Date',
label: '日期',
field: 'Date',
align: 'left'
},
{
name: 'TeacherName',
field: 'TeacherName',
required: true,
label: '老师',
align: 'left',
},
{
name: 'ClassName',
label: '班级',
field: 'ClassName',
align: 'left'
},
{
name: 'Type',
label: '类型',
align: 'left'
},
{
name: 'CourseHour',
label: '课时',
field: 'CourseHour',
align: 'left'
},
{
name: 'UnitPrice',
label: '课单价',
field: 'UnitPrice',
align: 'left'
},
{
name: 'CheckInNum',
label: '签到人数',
field: 'CheckInNum',
align: 'left'
},
{
name: 'Money',
label: '小计',
field: 'Money',
align: 'left'
},
],
columnsZ:[
{
name: 'TeacherName',
label: '教师姓名',
field: 'TeacherName',
align: 'left'
},
{
name: 'CourseHour',
field: 'CourseHour',
required: true,
label: '带班课时',
align: 'left',
},
{
name: 'DCourseHour',
label: '代课课时',
field: 'DCourseHour',
align: 'left'
},
{
name: 'UnitPrice',
field: 'UnitPrice',
label: '课时单价',
align: 'left'
},
{
name: 'Money',
label: '合计',
field: 'Money',
align: 'left'
},
],
data: [],
loading: true,
msg: {
BonusId:0,
TeacherId:0,
Type:0
},
TeacherList: [], //关联教师下拉数据
TypeList:[
{Id:0,Name:'不限'},
{Id:1,Name:'带班'},
{Id:2,Name:'代课'},
]
}
},
created() {
if(this.$route.query){
this.msg.BonusId =this.$route.query.Id;
this.msg.TeacherId =Number(this.$route.query.TeacherId);
}
this.getList();
this.GetTeacherList()
},
methods:{
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.TeacherList.unshift({
TId: 0,
TeacherName: "不限"
})
}
})
},
getList(){
this.loading = true;
getTeachingBonusDetailList(this.msg).then(res => {
this.loading = false
this.data = res.Data
}).catch(() => {
this.loading = false
})
},
goreturn(){
this.$router.go(-1)
},
}
}
</script>
<style scoped>
</style>
...@@ -366,6 +366,11 @@ const routes = [{ ...@@ -366,6 +366,11 @@ const routes = [{
component: () => component: () =>
import("pages/course/classHourReward.vue") import("pages/course/classHourReward.vue")
}, },
{
path: "/course/rewardDetailed", //教学奖励 奖励明细
component: () =>
import("pages/course/rewardDetailed.vue")
},
{ {
path: "/test", //API测试 path: "/test", //API测试
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