讲师管理

This commit is contained in:
zhangsir
2024-11-11 19:08:17 +08:00
parent 6b4412aa9a
commit 572d39d3bb
7 changed files with 94 additions and 47 deletions

View File

@@ -3,7 +3,7 @@
:visible="visible"
class="drawerStyle RouterFaceStu"
placement="right"
width="1200"
width="80%"
>
<div class="drawerMain">
<div class="header">
@@ -213,7 +213,7 @@ const queryDrawer = () => {
return
}
emit("selectedRowKeys", selectedRowKeys.value)
closeDrawer()
// closeDrawer()
}
</script>

View File

@@ -3,7 +3,7 @@
:visible="visible"
class="drawerStyle RouterFaceStu"
placement="right"
width="1200"
width="60%"
>
<div class="drawerMain">
<div class="header">

View File

@@ -152,7 +152,7 @@
<a-form-item label="讲师组织" name="orgName">
<a-popover>
<template #content>
{{ formParam.orgName }}
{{ formParam.orgNames }}
</template>
<a-input disabled v-model:value="formParam.orgName" class="draitem"

View File

@@ -160,7 +160,7 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="name">
<SearchTeacher @tlevel="tlevelChange" v-model:value="formParam.name" v-model:lable="formParam.orgName"
<SearchTeacher @tlevel="tlevelChange" v-model:value="formParam.name" v-model:lable="formParam.orgNames"
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher>
</a-form-item>
</a-col>
@@ -168,7 +168,7 @@
<a-form-item label="讲师组织" name="orgName">
<a-popover>
<template #content>
{{ formParam.orgName }}.
{{ formParam.orgNames }}
</template>
<a-input disabled v-model:value="formParam.orgName" class="draitem"
@@ -892,6 +892,14 @@ export default {
state.formParam.tlevelName = e?.tlevelName
state.formParam.tlevelId = e?.tlevelId
}
watch(() => state.formParam.orgNames, (val) => {
console.log(val, 'orgName')
if(val){
const parts = val.split('/');
const reversedParts = parts.reverse();
state.formParam.orgName = reversedParts.join('/');
}
})
//保存
const createTeacherDialog = async () => {
state.formParam.teacherName = state.formParam.name?.split('/')[0]
@@ -906,6 +914,7 @@ export default {
return message.error(rules[formItemNames[i]][0].log)
}
}
state.formParam.orgName = state.formParam.orgNames
state.formParam = {...state.formParam,...state.tSystemNames}
console.log( state.formParam)
if (state.vf == false) {
@@ -1056,6 +1065,7 @@ export default {
state.formParam.name = res.data.data.teacherName+'/'+res.data.data.userNo
state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item=>({ name: item }))
state.teachingDate=dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm' ),
state.formParam.orgNames = state.formParam.orgName
console.log( state.formParam);
})
.catch((err) => {

View File

@@ -368,10 +368,13 @@
{ value: 2, label: "路径开课" },
{ value: 3, label: "面授开课" },
])
//认证状态
//认证状态0待确认 1待提交 2审核中 3审核通过 4.审核拒绝
const AuthenticationStatusList = ref([
{ value: 0, label: "未认证" },
{ value: 1, label: "已认证" },
{ value: 0, label: "待确认" },
{ value: 1, label: "待提交" },
{ value: 2, label: "审核中" },
{ value: 3, label: "审核通过" },
{ value: 4, label: "审核拒绝" },
])
//状态

View File

@@ -17,14 +17,14 @@
</div>
</a-form-item>
<a-form-item class="select">
<a-input v-model:value="searchParam.orgId" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入培训发生组织进行搜索" allowClear showSearch
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.trainOrgId" placeholder="请输入培训发生组织进行搜索" allowClear
:options="orgList" showSearch
v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</a-select>
</a-form-item>
<a-form-item class="select ">
<div class="select addTimeBox">
<div class="addTime" >创建时间</div>
<div class="addTime" >授课日期</div>
<a-range-picker
v-model:value="searchdate"
style="width: 420px"
@@ -66,12 +66,12 @@
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<!-- <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear
:options="AuthenticationStatusList"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
</a-form-item> -->
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px ;margin-bottom:20px" placeholder="请选择讲师体系" v-model:value="searchParam.tsystemId" allowClear
:options="lecturerSystemList" @change="changetlevel"
@@ -161,7 +161,7 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="name">
<SearchTeacher @tlevel="tlevelChange" v-model:id="formParam.teacherId" v-model:value="formParam.name" v-model:orgId="formParam.orgId" v-model:lable="formParam.orgName" v-model:user="formParam.userNo"
<SearchTeacher @tlevel="tlevelChange" v-model:id="formParam.teacherId" v-model:value="formParam.name" v-model:orgId="formParam.orgId" v-model:lable="formParam.orgNames" v-model:user="formParam.userNo"
v-model:system="tSystemNames" v-model:payrollPlaceCode="formParam.payrollPlaceId"
v-model:payrollPlaceName="formParam.payrollPlace" v-model:level="formParam.tlevelId" ></SearchTeacher>
</a-form-item>
@@ -180,7 +180,7 @@
<a-form-item label="讲师组织" name="orgName">
<a-popover>
<template #content>
{{ formParam.orgName }}.
{{ formParam.orgNames }}
</template>
<a-input disabled v-model:value="formParam.orgName" class="draitem"
@@ -244,7 +244,7 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate">
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD"
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm"
placeholder="请选择课程日期" />
</a-form-item>
</a-col>
@@ -369,19 +369,19 @@
<a-descriptions-item label="讲师组织" :span="2">{{formParam.orgName}}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{formParam.tsystemName}}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{formParam.tlevelName }}</a-descriptions-item>
<a-descriptions-item label="发薪地">{{formParam.payrollPlace}}</a-descriptions-item>
<a-descriptions-item label="费用类型">"费用类型(未命名)"</a-descriptions-item>
<a-descriptions-item label="课程类型">{{formParam.courseType==1?'项目开课' :formParam.courseType==2 ?'路径开课':formParam.courseType==3 ?'面授开课':''}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{formParam.courseName}}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">{{formParam.teachingDate}}</a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{formParam.teachingDate}}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{formParam.studys}}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{formParam.score}}</a-descriptions-item>
<a-descriptions-item label="课酬基准 ">{{formParam.levelPay}}</a-descriptions-item>
<a-descriptions-item label="计划费用 ">{{formParam.expense}}</a-descriptions-item>
<a-descriptions-item label="应发费用 ">{{formParam.payableExpense}}</a-descriptions-item>
<a-descriptions-item label="状态">{{formParam.status=="0"?'待确认' :formParam.status=="1"?'待提交':formParam.status== "2" ?'审核中':formParam.status== "3"?'审核通过':''}}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{formParam.remark}}</a-descriptions-item>
<a-descriptions-item label="发薪地">{{formParam?.payrollPlace || '-'}}</a-descriptions-item>
<a-descriptions-item label="费用类型">"差字段"</a-descriptions-item>
<a-descriptions-item label="课程类型">{{formParam.courseType==1?'项目开课' :formParam.courseType==2 ?'路径开课':formParam.courseType==3 ?'面授开课':'-'}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{formParam.courseName || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">{{formParam.teachingDate || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{formParam.teachingDate || '-'}}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{formParam.studys || '-'}}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{formParam.score || '-'}}</a-descriptions-item>
<a-descriptions-item label="课酬基准 ">{{formParam.levelPay || '-'}}</a-descriptions-item>
<a-descriptions-item label="计划费用 ">{{formParam.expense || '-'}}</a-descriptions-item>
<a-descriptions-item label="应发费用 ">{{formParam.payableExpense || '-'}}</a-descriptions-item>
<a-descriptions-item label="状态">{{formParam.status=="0"?'待确认' :formParam.status=="1"?'待提交':formParam.status== "2" ?'审核中':formParam.status== "3"?'审核通过':'-'}}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{formParam.remark || '-'}}</a-descriptions-item>
</a-descriptions>
<span class="line"></span>
<div :style="{
@@ -408,7 +408,7 @@
<BatchLecturer @selectedRowKeys="selectedRowKeys" v-model:visible="allFeedialog" :name="'批量审批'" />
</template>
<script lang="jsx">
import { reactive, toRefs, ref ,watch} from "vue";
import { reactive, toRefs, ref ,watch,onMounted} from "vue";
import { message } from "ant-design-vue";
import dayjs from "dayjs";
import {
@@ -427,6 +427,7 @@
// import AddTeacher from "../../components/drawers/project/AddTeacher"
import ConfirmLecturer from "@/components/project/ConfirmLecturer"
import BatchLecturer from "@/components/project/BatchLecturer"
import { queryTrainOrg,} from "../../api/organization";
export default {
name: "LecturerFee",
components: {
@@ -443,6 +444,7 @@
setup() {
const formRef = ref();
const state = reactive({
orgList: [],
selectsIds: '',
visibleConfirm: false,
title:'导入讲师费记录',
@@ -486,7 +488,7 @@
searchParam: {
userNo:null,
name:null,
orgId:null,
trainOrgId:null,
tsystemId:null,
levelId:null,
courseType:null,
@@ -513,19 +515,38 @@
levelVoList: []
},
})
onMounted(()=>{
orgLists()
})
const orgLists = () => {
const obj = {
pageNo:1,
pageSize:50
}
queryTrainOrg(obj).then((res) => {
console.log(res,'rssssss')
state.orgList = res.data.data?.records?.map(item=>{
return{
label: item.affiliationName,
value: item.id
}
})
})
}
//费用类型
const courseTypeList=ref([
{ value: '0', label: "在线" },
{ value: '1', label: "面授 " },
{ value: '2', label: "授课 " },
{ value: '3', label: "课程开发" },
{ value: '4', label: "作业员模培训" },
// { value: '0', label: "在线" },
// { value: '1', label: "面授 " },
// { value: '2', label: "授课 " },
{ value: '0', label: "课程开发" },
{ value: '1', label: "作业员模培训" },
{ value: '2', label: "其他" },
])
//课程类型
const OnTheJobStatusList = ref([
{ value: 1, label: "项目开课" },
{ value: 2, label: "路径开课" },
{ value: 3, label: "面授开课" },
{ value: '', label: "全部" },
{ value: 0, label: "面授课" },
{ value: 1, label: "在线课" },
])
//认证状态
const AuthenticationStatusList = ref([
@@ -562,6 +583,7 @@
const changetlevel = (val) => {
console.log( "讲师体系id" +val);
getLevel( {id:val}).then((res) => {
console.log(res,'rssssss')
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
@@ -885,11 +907,19 @@ console.log( "讲师体系id" +val);
});
});
}
watch(() => state.formParam.orgNames, (val) => {
console.log(val, 'orgName')
if(val){
const parts = val.split('/');
const reversedParts = parts.reverse();
state.formParam.orgName = reversedParts.join('/');
}
})
//保存
const createTeacherDialog = async () => {
console.log(state.formParam,'formParam')
state.formParam.expense = String(state.formParam.expense)
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : ""
state.formParam.tsystemName = state.tSystemNames.systemName
state.formParam.tsystemId = state.tSystemNames.systemId
const formItemNames = Object.keys(rules);
@@ -899,6 +929,7 @@ console.log( "讲师体系id" +val);
return message.error(rules[formItemNames[i]][0].log)
}
}
state.formParam.orgName = state.formParam.orgNames
state.formParam = {...state.formParam,...state.tSystemNames}
state.formParam.name = state.formParam?.name?.split('/')[0]
if (state.vf == false) {
@@ -986,6 +1017,7 @@ console.log( "讲师体系id" +val);
state.formParam ={
name:null,
userNo:null,
orgNames:null,
orgName:null,
tsystemName:null,
tlevelId:null,
@@ -1035,6 +1067,7 @@ console.log( "讲师体系id" +val);
state.formParam.name = res.data.data.name+'/'+res.data.data.userNo
state.teachingDate = dayjs(res.data.data.teachingDate)
state.formParam.payrollPlaceId = res.data.data.payrollPlaceId
state.formParam.orgNames = state.formParam.orgName
})
.catch((err) => {
console.log("详情", err);
@@ -1371,6 +1404,7 @@ const column = ref([
closeDeleteTeacher,
cancelTeachingDialog,
courseTypeList,
orgLists,
// searchTimeChange,
handlemoreid,
handleExport,

View File

@@ -6,7 +6,7 @@
<a-tab-pane key="1" tab="讲师费管理">
<LecturerFee />
</a-tab-pane>
<a-tab-pane key="2" tab="讲师费审批" v-if="lecturerAdmin('lecturer-admin')">
<a-tab-pane key="2" tab="审批中心" v-if="lecturerAdmin('lecturer-admin')">
<LecturerApproval/>
</a-tab-pane>
</a-tabs>