讲师管理bug

This commit is contained in:
zhangsir
2024-12-02 14:46:01 +08:00
parent 694f9d22da
commit 1ffe96bc90
14 changed files with 255 additions and 45 deletions

View File

@@ -61,6 +61,10 @@ export const getUnSelectOrg = () => http.get(`/admin/affiliation/getUnSelectOrg`
export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliationCode')
//查看或编辑回显培训发生组织
export const getAffiliationById = (id) => http.get(`/admin/affiliation/queryById?id=${id}`)
//审核记录
export const getByBusinessIdList = (obj) => http.post(`/admin/approval/getByBusinessIdList?businessId=${obj.businessId}&businessType=${obj.businessType}&pageNo=${obj.pageNo}&pageSize=${obj.pageSize}`)
//审核记录查看操作
export const getApprovalResultByApprovalIdList = (approvalId) => http.post(`/admin/approval/getApprovalResultByApprovalIdList?approvalId=${approvalId}`)
//恢复培训发生组织的数据
export const recovery = (id) => http.post(`/admin/affiliation/recovery?id=${id}`)
//删除培训发生组织

View File

@@ -5,6 +5,8 @@ export const getExpenseByCourseId = (obj) => http.get('/admin/teacherExpense/get
export const getTeacherFeeList = (obj) => http.get('/admin/teacherExpense/list', {params: obj})
//获取讲师费详情
export const getTeacherFeeDetail= (obj) => http.get('/admin/teacherExpense/queryById',{params: obj})
//查看详情讲师费审批
export const getListByTeacherExpenseId= (teacherExpenseId) => http.post(`/admin/approval/getListByTeacherExpenseId?teacherExpenseId=${teacherExpenseId}`)
//添加讲师费
export const addTeacherFee= (obj) => http.post('/admin/teacherExpense/addTeacherExpense',obj)
//删除讲师费

View File

@@ -137,12 +137,18 @@ const columns = [
dataIndex: 'tlevelName',
key: 'tlevelName',
align: 'center',
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '发薪地',
dataIndex: 'payrollPlace',
key: 'payrollPlace',
align: 'center',
customRender: ({ text })=>{
return text||'-'
}
},
{
@@ -193,12 +199,18 @@ const columns = [
dataIndex: 'studys',
key: 'studys',
align: 'center',
customRender: ({ text })=>{
return text||'0'
}
},
{
title: '评分',
dataIndex: 'score',
key: 'score',
align: 'center',
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '课酬基准',

View File

@@ -287,12 +287,18 @@ const columns = [
dataIndex: 'tlevelName',
key: 'tlevelName',
align: 'center',
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '发薪地',
dataIndex: 'payrollPlace',
key: 'payrollPlace',
align: 'center',
customRender: ({ text })=>{
return text||'-'
}
},
{
@@ -343,12 +349,18 @@ const columns = [
dataIndex: 'studys',
key: 'studys',
align: 'center',
customRender: ({ text })=>{
return text||'0'
}
},
{
title: '评分',
dataIndex: 'score',
key: 'score',
align: 'center',
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '课酬基准',

View File

@@ -59,7 +59,7 @@
</a-tab-pane>
<a-tab-pane key="2" tab="审批记录" force-render>
<div style="margin-bottom: 20px">
<a-table :columns="columnsThree" :data-source="formData?.tableDataTwo" :pagination="false">
<a-table :columns="columnsTwo" :loading="formData?.loadingTwo" :data-source="formData?.tableDataTwo" :pagination="pagination">
<template #action="{ record }">
<div class="action">
<div style="color: #1890ff;cursor: pointer;" class="btn" @click="lookList(record)">查看</div>
@@ -68,7 +68,7 @@
</a-table>
</div>
<div style="margin-bottom: 100px">
<a-table v-if="threeList" :columns="columnsTwo" :data-source="formData?.tableDataTwo" :pagination="false"/>
<a-table v-if="threeList" :columns="columnsThree" :data-source="formData?.tableDataThree" :pagination="false"/>
</div>
</a-tab-pane>
</a-tabs>
@@ -84,7 +84,7 @@
</template>
<script setup lang="jsx">
import {defineEmits, defineProps, ref,watch} from "vue";
import {defineEmits, defineProps, ref,watch,reactive,computed} from "vue";
import dialog from '@/utils/dialog'
import * as api from '@/api/Lecturer'
import { message } from 'ant-design-vue';
@@ -150,55 +150,92 @@ const columns = [
},
];
const formData = ref({})
const columnsTwo = [
const columnsThree = [
{
title: '层级审批人',
dataIndex: 'name',
key: 'name',
dataIndex: 'employeeNames',
key: 'employeeNames',
align: 'center',
},
{
title: '操作',
dataIndex: 'age',
key: 'age',
dataIndex: 'approvalStatus',
key: 'approvalStatus',
align: 'center',
customRender: ({text})=>{
switch (text) {
case -1:
return <span>未处理</span>;
case 3:
return <span>通过</span>;
case 4:
return <span>拒绝</span>;
default:
return <span>-</span>;
}
}
},
{
title: '审批人',
dataIndex: 'address',
key: 'age',
dataIndex: 'employeeName',
key: 'employeeName',
align: 'center',
},
{
title: '审批时间',
dataIndex: 'updateTime',
key: 'updateTime',
dataIndex: 'approvalTime',
key: 'approvalTime',
align: 'center',
},
{
title: '审批建议',
dataIndex: 'address',
key: 'age',
dataIndex: 'approvalMsg',
key: 'approvalMsg',
align: 'center',
ellipsis: true,
width: 200,
customRender: ({text})=>{
return <span>{text||'-'}</span>
}
},
]
const columnsThree = ref([
const columnsTwo = ref([
{
title: '审批提交时间',
dataIndex: 'name',
key: 'name',
dataIndex: 'createTime',
key: 'createTime',
align: 'center',
},
{
title: '审批状态',
dataIndex: 'age',
key: 'age',
dataIndex: 'status',
key: 'status',
align: 'center',
customRender: ({text})=>{
switch (text) {
case 0:
return <span>待提交</span>;
case 1:
return <span>待审核</span>;
case 2:
return <span>审核中</span>;
case 3:
return <span>审核通过</span>;
case 4:
return <span>拒绝</span>;
case 5:
return <span>撤销中</span>;
case 6:
return <span>已撤销</span>;
default:
return <span>-</span>;
}
}
},
{
title: '审批人',
dataIndex: 'address',
key: 'age',
dataIndex: 'employeeName',
key: 'employeeName',
align: 'center',
},
{
@@ -213,11 +250,20 @@ const threeList = ref(false)
const lookList = (record) => {
console.log(record,'resssssss')
threeList.value = true
api.getApprovalResultByApprovalIdList(record.approvalId).then(res=>{
if(res.data.code == 200){
formData.value.tableDataThree = res.data.data
}
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
}
const visible = ref(false);
watch(visible, (val)=>{
if(val){
threeList.value = false
activeKey.value = '1'
api.getAffiliationById(props.id).then(res=>{
if(res.data.code == 200){
formData.value = res.data.data
@@ -226,14 +272,49 @@ watch(visible, (val)=>{
formData.value.two = filterList(formData.value.affiliationUserList,2)
formData.value.three = filterList(formData.value.affiliationUserList,3)
formData.value.tableData = res.data.data.affiliationOrgList
// formData.value.tableDataTwo = res.data.data.affiliationOrgList
}
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
// getTwoData()
}
})
const getTwoData = () => {
formData.value.loadingTwo = true
api.getByBusinessIdList(params).then(res=>{
if(res.data.code == 200){
formData.value.tableDataTwo = res.data.data.records
params.total = res.data.data.total
}
formData.value.loadingTwo = false
console.log(formData.value.tableDataTwo,'xixixi')
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
formData.value.loadingTwo = false
})
}
const params = reactive({
pageNo: 1,
pageSize: 10,
total: 0,
businessType: 2,
businessId: props.id
})
const pagination = computed(() => ({
total: params.total,
showSizeChanger: true,
showQuickJumper:true,
current: params.pageNo,
pageSize: params.pageSize,
onChange: paginationChange,
}));
const paginationChange = (e,pageSize) => {
params.pageNo = e;
params.pageSize = pageSize
getTwoData()
};
const filterList = (val,index) => {
return val?.filter(item=>item.type==index).map(item=>item.userName).join(',')
}
@@ -259,7 +340,10 @@ const confirm = () => {
}
const activeKey = ref("1");
const change = (val)=>{
console.log(val,'val')
// console.log(val,'val')
if(val==2){
getTwoData()
}
}
function openDrawer() {
visible.value = true;

View File

@@ -24,10 +24,10 @@
</a-form>
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="resetbtn">
<FolderAddOutlined /> 新增讲师
<a-button @click="addTeacher()" type="primary" style="width:120px;" class="resetbtn">
<div class="search"></div> 新增讲师
</a-button>
<div style="margin-left: 20px ;">
<div>
<a-button @click="handleExport()" class="resetbtn">
<UploadOutlined /> 导出
</a-button>
@@ -1105,6 +1105,13 @@ export default {
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 16px;
margin-right: 5px;
background: url("../../assets/images/courseManage/add0.png") no-repeat;
background-size: 100% 100%;
}
}
//展开收起样式

View File

@@ -77,7 +77,7 @@
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="langbtn">
<FolderAddOutlined /> 添加授课记录
<div class="search"></div> 添加授课记录
</a-button>
<!-- <div style="margin-left: 20px ;">
<a-button @click="addTeacher()" class="langbtn">
@@ -1229,6 +1229,13 @@ const sendName=()=>{
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 16px;
margin-right: 5px;
background: url("../../assets/images/courseManage/add0.png") no-repeat;
background-size: 100% 100%;
}
}
// 重置样式

View File

@@ -61,10 +61,10 @@
</a-form>
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="resetbtn">
<FolderAddOutlined /> 新增讲师
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width:120px;">
<div class="search"></div> 新增讲师
</a-button>
<div style="margin-left: 20px ;">
<div>
<a-button @click="handleExport()" class="resetbtn">
<UploadOutlined /> 导出
</a-button>
@@ -2005,6 +2005,13 @@ export default {
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 16px;
margin-right: 5px;
background: url("../../assets/images/courseManage/add0.png") no-repeat;
background-size: 100% 100%;
}
}
//展开收起样式

View File

@@ -95,7 +95,7 @@
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="langbtn">
<FolderAddOutlined /> 添加授课记录
<div class="search"></div> 添加授课记录
</a-button>
<!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2"> -->
<a-button class="resetbtn" @click="handleImport()">
@@ -1652,6 +1652,13 @@ export default {
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 16px;
margin-right: 5px;
background: url("../../assets/images/courseManage/add0.png") no-repeat;
background-size: 100% 100%;
}
}
// 重置样式

View File

@@ -89,7 +89,7 @@
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="langbtn">
<FolderAddOutlined /> 添加费用
<div class="search"></div> 添加费用
</a-button>
<!-- <div style="margin-left: 20px ;">
<a-button @click="addTeacher()" class="langbtn">
@@ -121,7 +121,7 @@
<!-- :disabled="record.createFrom==1 ?false :true" -->
<a-button type="link" v-if="record.status != 2&&record.status!=3" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<!-- <a-button :disabled="record.status==='A20' || record.status==='A30'||record.status==='S20' ?true :false" type="link" @click="() => handleOperate(record, String(record.courseform))">提交</a-button> -->
<a-button type="link" @click="handleOperate(record)">撤回</a-button>
<!-- <a-button type="link" @click="handleOperate(record)">撤回</a-button> -->
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
</a-space>
</template>
@@ -390,7 +390,7 @@
/>
</div>
<span class="line"></span>
<span>讲师费用详情</span>
<span style="font-weight: 600;">讲师费用详情</span>
<a-descriptions style="padding-bottom: 35px;margin-top:20px;" bordered :column="2" :contentStyle="{width:'300px',}" :labelStyle="{width:'160px'}">
<a-descriptions-item label="讲师名称">{{formParam.name}}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{formParam.userNo}}</a-descriptions-item>
@@ -415,10 +415,10 @@
</a-descriptions>
<div style="margin-bottom: 20px;">
<span class="line"></span>
<span>讲师费审批</span>
<span style="font-weight: 600;">讲师费审批</span>
</div>
<div style="margin-bottom:32px;">
<a-table :columns="columnSee" :data-source="tableDataSee" :pagination="false" />
<a-table :columns="columnSee" :loading="SeeLoading" :data-source="tableDataSee" :pagination="false" />
</div>
<!-- <span class="line"></span> -->
<!-- <div :style="{
@@ -457,7 +457,7 @@
} from '@ant-design/icons-vue';
import ImportWork from "../../components/lecturer/ImportWork.vue";
import SearchTeacher from "@/components/project/SearchTeacher";
import {getTeacherFeeList,getTeacherFeeDetail,addTeacherFee ,getListByIds,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement";
import {getTeacherFeeList,getTeacherFeeDetail,getListByTeacherExpenseId,addTeacherFee ,getListByIds,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement";
import {getTeacherSystemList, getAllLevelList,getPayRollPlace,fileUp,submitApproval } from "../../api/Lecturer";
// lecturerFeeManagement
// import {getProjSt} from "../../api/indexProjStu";
@@ -485,6 +485,7 @@
const formRef = ref();
const state = reactive({
tableDataSee: [],
SeeLoading: false,
orgList: [],
selectsIds: '',
visibleConfirm: false,
@@ -793,6 +794,9 @@ getAllLevelList().then((res) => {
key: 'tsystemName',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '讲师级别 ',
@@ -800,6 +804,9 @@ getAllLevelList().then((res) => {
key: 'tlevelName',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '发薪地 ',
@@ -807,6 +814,9 @@ getAllLevelList().then((res) => {
key: 'payrollPlace',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '基准课酬 ',
@@ -823,11 +833,14 @@ getAllLevelList().then((res) => {
width: 120,
},
{
title: '参训人',
title: '参训人',
dataIndex: 'studys',
key: 'studys',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'0'
}
},
{
title: '评分 ',
@@ -835,6 +848,9 @@ getAllLevelList().then((res) => {
key: 'score',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '课程类型 ',
@@ -1166,8 +1182,23 @@ getAllLevelList().then((res) => {
state.id= record.id
// alert(record.grade)
TeacherSystem()
getListData()
// getteacherrecordstableData ()
}
const getListData = () => {
state.SeeLoading = true
getListByTeacherExpenseId(state.id).then(res=>{
console.log(res,'ressssss')
if(res.data.code == 200){
state.tableDataSee = res.data.data
}
state.SeeLoading = false
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
state.SeeLoading = false
})
}
//详情
const TeacherSystem=()=>{
getTeacherFeeDetail({id : state.id}).then((res) => {
@@ -1386,6 +1417,9 @@ const column = ref([
key: 'levelName',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
// customRender: (value, record) => {
// return (
// <div>
@@ -1407,6 +1441,9 @@ const column = ref([
key: 'teacherpayrollPlace',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '基准课酬 ',
@@ -1428,6 +1465,9 @@ const column = ref([
key: 'studentNum',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '评分 ',
@@ -1435,6 +1475,9 @@ const column = ref([
key: 'courseAssess',
ellipsis: true, align: "center",
width: 120,
customRender: ({ text })=>{
return text||'-'
}
},
{
title: '课程类型 ',
@@ -1601,6 +1644,7 @@ const column = ref([
// getStu
LecturerSystemLista,
TeacherSystem,
getListData,
changetlevel,
canceleditTeacherDialog,
allFee,
@@ -1912,6 +1956,13 @@ const column = ref([
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 16px;
margin-right: 5px;
background: url("../../assets/images/courseManage/add0.png") no-repeat;
background-size: 100% 100%;
}
}
// 重置样式
@@ -1938,10 +1989,11 @@ const column = ref([
.line {
float: left;
width: 3px;
height: 25px;
height: 17px;
background: #4ea6ff;
border-radius: 30%;
margin-right: 5px;
margin-top: 3px;
}
//抽屉功能

View File

@@ -1,7 +1,7 @@
<!-- 讲师费管理 -->
<template>
<div class="LecturerFeeManagement">
<div style="margin: 20px;" >
<div style="margin: 20px;margin-top:0;" >
<a-tabs v-model:activeKey="activeKey" :destroyInactiveTabPane="true">
<a-tab-pane key="1" tab="讲师费管理">
<LecturerFee />
@@ -54,6 +54,9 @@ import {useStore} from 'vuex'
};
</script>
<style lang="scss" scoped>
::v-deep .ant-tabs-tab{
font-weight: 600;
}
.LecturerFeeManagement {
width: 100%;
height: 100%;

View File

@@ -1,7 +1,7 @@
<!-- 讲师列表 -->
<template>
<div class="LecturerList">
<div style="margin: 20px;" >
<div style="margin: 20px;margin-top:0;" >
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="内部讲师">
<InsideLecturer/>
@@ -45,6 +45,9 @@
};
</script>
<style lang="scss" scoped>
::v-deep .ant-tabs-tab{
font-weight: 600;
}
.LecturerList {
width: 100%;
height: 100%;

View File

@@ -18,8 +18,8 @@
</a-form>
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 160px;">
<FolderAddOutlined /> 新增培训发生组织
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 164px;">
<div class="search"></div> 新增培训发生组织
</a-button>
<div
class="btnn btn2"
@@ -1052,6 +1052,13 @@ position: relative;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
width: 15px;
height: 16px;
margin-right: 5px;
background: url("../../assets/images/courseManage/add0.png") no-repeat;
background-size: 100% 100%;
}
}
.btnn {
padding: 0px 26px 0px 26px;

View File

@@ -1,7 +1,7 @@
<!-- 授课记录 -->
<template>
<div class="TeachingRecord" >
<div style="margin: 20px;" >
<div style="margin: 20px;margin-top:0;" >
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="内部讲师授课记录">
<InsideTeaching/>
@@ -37,7 +37,10 @@
};
</script>
<style lang="scss" scoped>
.TeachingRecord {
::v-deep .ant-tabs-tab{
font-weight: 600;
}
.TeachingRecord {
width: 100%;
height: 100%;
display: flex;