mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
Merge branch '121-teacher-manage' into master_1202
# Conflicts: # src/views/lecturer/LecturerFee.vue
This commit is contained in:
@@ -97,3 +97,7 @@ export const isConfirm = (obj) => http.post('/admin/expenseBill/isConfirm',obj)
|
||||
export const parentList = () => http.get('/admin/affiliation/parentList')
|
||||
//讲师级别获取
|
||||
export const getAllLevelList = () => http.get('/admin/system/getAllLevelList')
|
||||
//删除讲师费
|
||||
export const deleteLecturerFee = (obj) => http.post(`/admin/teacherExpense/delById?id=${obj.id}`,obj)
|
||||
//停用/启用讲师费
|
||||
export const updateLecturerFee = (obj) => http.post(`/admin/teacherExpense/isEnable?id=${obj.id}&status=${obj.status}`,obj)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import http from "./config";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
//列表查询授课记录
|
||||
export const getNewInTeacherCourseList = (obj) => http.get('/admin/teacherRecord/list', {params: obj})
|
||||
export const getNewInTeacherCourseList = (obj) => http.get('/admin/teacherRecord/getlistByUserId', {params: obj})
|
||||
//新增授课记录
|
||||
export const insertInTeacherCourse = (obj) => http.post('/admin/teacherRecord/addTeacherRecord', obj)
|
||||
//删除讲师授课记录
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -415,7 +415,7 @@
|
||||
<router-link to="/teacheropinion">意见</router-link>
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
<a-sub-menu key="sub24" @titleClick="titleClick" v-if="checkMenu('lecturer')">
|
||||
<a-sub-menu key="sub24" @titleClick="titleClick" v-if="checkMenu('lecturer,lecturerRecords,lecturerExpense,lecturerSummary,lecturerTrainOrg,')">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img style="width: 15px; height: 15px" src="../assets/images/navleft/project.png" />
|
||||
@@ -431,7 +431,7 @@
|
||||
></span>
|
||||
<router-link to="/lecturerlist">讲师列表</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-2">
|
||||
<a-menu-item key="sub24-2" v-if="checkMenu('lecturerRecords')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive : selectedKeys[0] === 'sub24-2' ? true : false,
|
||||
@@ -440,7 +440,7 @@
|
||||
></span>
|
||||
<router-link to="/teachingrecord">授课记录</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-3">
|
||||
<a-menu-item key="sub24-3" v-if="checkMenu('lecturerExpense')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub24-3' ? true : false,
|
||||
@@ -449,7 +449,7 @@
|
||||
></span>
|
||||
<router-link to="/lecturerfeemanagement">讲师费管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-4">
|
||||
<a-menu-item key="sub24-4" v-if="checkMenu('lecturerSummary')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub24-4' ? true : false,
|
||||
@@ -458,7 +458,7 @@
|
||||
></span>
|
||||
<router-link to="/lecturerfeestatistics">讲师费统计</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-5">
|
||||
<a-menu-item key="sub24-5" v-if="checkMenu('lecturerTrainOrg')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub24-5' ? true : false,
|
||||
@@ -738,8 +738,8 @@
|
||||
<a-menu-item key="sub22" @titleClick="titleClick">
|
||||
<router-link to="/tooldown">教师专区</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24" @titleClick="titleClick">
|
||||
<router-link to="/lecturerlist">讲师管理</router-link>
|
||||
<a-menu-item key="sub24" v-if="lecturerPath()" @titleClick="titleClick">
|
||||
<router-link :to="'/'+lecturerPath()">讲师管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub13" @titleClick="titleClick">
|
||||
<router-link to="/articlemanage">文章</router-link>
|
||||
@@ -773,13 +773,15 @@
|
||||
import {reactive, toRefs, onMounted, onUnmounted, watch } from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
import {useStore} from "vuex";
|
||||
import {checkMenu,checkOrgs} from "@/utils/utils";
|
||||
import {checkMenu,checkOrgs,lecturerRoute} from "@/utils/utils";
|
||||
import { reportOrgs } from "@/api/indexProject";
|
||||
export default {
|
||||
name: "NavLeft",
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
lecturerRoute:['lecturerlist','teachingrecord','lecturerfeemanagement','lecturerfeestatistics','organization'],
|
||||
lecturerAdmin:'lecturer,lecturerRecords,lecturerExpense,lecturerSummary,lecturerTrainOrg',
|
||||
packup: false,
|
||||
screenHeight: document.body.clientHeight, // 屏幕 高度
|
||||
rootSubmenuKeys: [
|
||||
@@ -1284,6 +1286,9 @@ export default {
|
||||
const packUp = () => {
|
||||
state.packup = !state.packup;
|
||||
};
|
||||
const lecturerPath = () => {
|
||||
return state.lecturerRoute[lecturerRoute(state.lecturerAdmin)]
|
||||
}
|
||||
const getClientHeight = () => {
|
||||
state.screenHeight = document.body.clientHeight;
|
||||
};
|
||||
@@ -1298,6 +1303,8 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
checkMenu,
|
||||
lecturerPath,
|
||||
lecturerRoute,
|
||||
checkOrgs,
|
||||
onOpenChange,
|
||||
selectItem,
|
||||
|
||||
@@ -87,7 +87,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
default: '',
|
||||
}
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits(['update:showContent','update:AddContentList'])
|
||||
const treeAddData = ref([])
|
||||
const { data: treeData, loading: orgLoading } = useRequest(
|
||||
ORG_LIST,
|
||||
@@ -120,9 +120,9 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
orgLists.value = []
|
||||
}else{
|
||||
getNot()
|
||||
console.log(props?.AddContentList,'props?.AddContentList')
|
||||
// console.log(props?.AddContentList,'props?.AddContentList')
|
||||
treeAddData.value = props?.AddContentList
|
||||
orgLists.value = props?.AddContentLists
|
||||
orgLists.value = [...props?.AddContentLists,...props?.AddContentLists]
|
||||
checkedKeys.value = props?.AddContentList?.map(item=>item.orgId)
|
||||
}
|
||||
});
|
||||
@@ -131,15 +131,18 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
lecturerApi.getUnSelectOrg(props.isParent).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
notLists.value = res.data.data
|
||||
notLists.value = notLists.value.filter(item=>{
|
||||
return !treeAddData.value.some(item2=>item2.orgId == item.orgId)
|
||||
})
|
||||
}
|
||||
if(treeData.value.length){
|
||||
treeData.value.map(item=>{
|
||||
item.name = item.name?.split('(')[0]
|
||||
notLists.value.some(i=>{
|
||||
if(i.orgId == item.id){
|
||||
if(i.orgId == item.id ){
|
||||
item.disabled = true
|
||||
item.name = item.name + '(' + i.affiliationName + ')'
|
||||
// return true
|
||||
return true
|
||||
}
|
||||
})
|
||||
return item
|
||||
@@ -197,7 +200,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
})
|
||||
treeAddData.value = uniqueEndLists?.filter(item => checkedKeys.value?.checked?.includes(item.orgId));
|
||||
// treeAddData.value = checkedNodes;
|
||||
console.log(treeAddData.value,'checkedNodes',orgLists.value)
|
||||
// console.log(treeAddData.value,'checkedNodes',orgLists.value)
|
||||
}
|
||||
const clearTree = () => {
|
||||
treeAddData.value = [];
|
||||
|
||||
@@ -27,29 +27,29 @@
|
||||
<div class="org" :title="item?.trainOrgName">{{item?.trainOrgName||'-'}}</div>
|
||||
<div class="text org" :title="Number(item?.summaryTotal).toFixed(2)">{{item?.summaryTotal?Number(item?.summaryTotal).toFixed(2)+'元':'-'}}</div>
|
||||
</div>
|
||||
<div class="icon" :class="activeList.includes(item.trainOrgId)?'active':'not'" @click.stop="setList(item)"></div>
|
||||
<div class="icon" :class="activeList.includes(index)?'active':'not'" @click.stop="setList(index)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="top">
|
||||
<div class="item">
|
||||
<a-input @pressEnter="searchData(true)" style="border-radius: 8px;width:240px;height: 40px;" v-model:value="nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
<a-input @pressEnter="searchData(true,indexList)" style="border-radius: 8px;width:240px;height: 40px;" v-model:value="searchConditions[indexList].nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
</div>
|
||||
<div class="item">
|
||||
<a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="dateValue" />
|
||||
<a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="searchConditions[indexList].dateValue" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<a-button type="primary" @click="searchData(true)" style="margin-right:20px;border-radius:8px;width: 100px;height: 40px;">搜索</a-button>
|
||||
<a-button type="primary" @click="resetData()" style="border-radius:8px;width: 100px;height: 40px;">重置</a-button>
|
||||
<a-button type="primary" @click="searchData(true,indexList)" style="margin-right:20px;border-radius:8px;width: 100px;height: 40px;">搜索</a-button>
|
||||
<a-button type="primary" @click="resetData(indexList,true)" style="border-radius:8px;width: 100px;height: 40px;">重置</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<a-table
|
||||
ref="drawerContent"
|
||||
:columns="columns"
|
||||
:data-source="searchTrue?timesList:expenseList"
|
||||
:data-source="searchTrue?timesList[indexList]:expenseList[indexList]"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content',y:expenseList.length? pageHeight : null }"
|
||||
:scroll="{ x: 'max-content',y:expenseList[indexList]?.length? pageHeight : null }"
|
||||
:loading="loadingData"
|
||||
:custom-row="customRow"
|
||||
>
|
||||
@@ -135,24 +135,13 @@ const close = () => {
|
||||
modalVisible.value = false;
|
||||
}
|
||||
const handleConfirm = () => {
|
||||
// if(numTime.value >= 10){
|
||||
// message.error('提交审批次数已达上限')
|
||||
// return
|
||||
// }
|
||||
// numTime.value+=1
|
||||
// localStorage.setItem('numTime',numTime.value)
|
||||
// const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
// }else{
|
||||
// ids = expenseList.value.map(item=>item.id)
|
||||
// }
|
||||
// if(!ids.length){
|
||||
// return message.error('暂无可提交的数据')
|
||||
// }
|
||||
modalVisible.value = false;
|
||||
emit('example',true)
|
||||
const idList = []
|
||||
activeList.value?.map(item=>{
|
||||
idList.push(...timesList.value[item])
|
||||
})
|
||||
const ids = idList?.map(item=>item.id)
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
api.submitApproval({ids:res.data?.data?.join(',')}).then(res=>{
|
||||
@@ -184,13 +173,13 @@ const expenseList = ref([])
|
||||
const searchList = ref([])
|
||||
const timesList = ref([])
|
||||
const clickItem = (item,i) => {
|
||||
expenseList.value = item.expenseList
|
||||
indexList.value = i
|
||||
resetData()
|
||||
resetData(i,false)
|
||||
}
|
||||
const pageHeight = computed(() => {
|
||||
return window.innerHeight - 450
|
||||
});
|
||||
const searchConditions = ref([{ nameUserNo: '', dateValue: [] }])
|
||||
watch(()=>props.visible,(val)=>{
|
||||
if(val){
|
||||
loadingData.value = true
|
||||
@@ -207,17 +196,21 @@ watch(()=>props.visible,(val)=>{
|
||||
).then(res=>{
|
||||
if(res.data.code === 200){
|
||||
forData.value = res.data.data
|
||||
expenseList.value = res.data.data[indexList.value]?.expenseList || []
|
||||
forData.value.forEach((item,i) => {
|
||||
searchConditions.value.push({ nameUserNo: '', dateValue: [] });
|
||||
expenseList.value.push(forData.value[i]?.expenseList || [])
|
||||
timesList.value.push(forData.value[i]?.expenseList || [])
|
||||
});
|
||||
}
|
||||
loadingData.value = false
|
||||
resetData()
|
||||
}).catch(()=>{
|
||||
resetData(indexList.value,true)
|
||||
}).catch((err)=>{
|
||||
message.error('获取数据失败,请重新尝试')
|
||||
loadingData.value = false
|
||||
})
|
||||
}else{
|
||||
nameUserNo.value = null
|
||||
dateValue.value = null
|
||||
searchConditions.value = [{ nameUserNo: '', dateValue: [] }]
|
||||
timesList.value = []
|
||||
indexList.value = 0
|
||||
activeList.value = []
|
||||
drawerContent.value?.$el.querySelector('.ant-table-body')?.scrollTo({top:0,behavior: 'smooth'})
|
||||
@@ -235,11 +228,10 @@ const removeId = (e,i) =>{
|
||||
})
|
||||
})
|
||||
if(searchTrue.value){
|
||||
// searchList.value = searchList.value.filter(item=>item.id !== e.id)
|
||||
timesList.value = timesList.value.filter(item=>item.id !== e.id)
|
||||
expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
|
||||
timesList.value[indexList.value] = timesList.value[indexList.value].filter(item=>item.id !== e.id)
|
||||
expenseList.value[indexList.value] = expenseList.value[indexList.value].filter(item=>item.id !== e.id)
|
||||
}else{
|
||||
expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
|
||||
expenseList.value[indexList.value] = expenseList.value[indexList.value].filter(item=>item.id !== e.id)
|
||||
}
|
||||
forData.value[indexList.value].summaryTotal = (forData.value[indexList.value]?.summaryTotal - e.expense).toFixed(2)
|
||||
if(!forData.value[indexList.value].expenseList.length){
|
||||
@@ -249,8 +241,6 @@ const removeId = (e,i) =>{
|
||||
}
|
||||
})
|
||||
}
|
||||
const nameUserNo = ref(null)
|
||||
const dateValue = ref(null)
|
||||
const searchTrue = ref(false)
|
||||
const drawerContent = ref(null)
|
||||
const customRow = (record) => {
|
||||
@@ -261,7 +251,7 @@ const customRow = (record) => {
|
||||
};
|
||||
};
|
||||
let timeout = null
|
||||
const searchData = (val) => {
|
||||
const searchData = (val,index) => {
|
||||
searchTrue.value = val
|
||||
loadingData.value = true
|
||||
if (timeout) {
|
||||
@@ -269,43 +259,32 @@ const searchData = (val) => {
|
||||
}
|
||||
timeout = setTimeout(() => {
|
||||
loadingData.value = false;
|
||||
if(!nameUserNo.value&&!dateValue.value){
|
||||
const { nameUserNo, dateValue } = searchConditions.value[index];
|
||||
if(!nameUserNo&&!dateValue.length){
|
||||
searchList.value = [];
|
||||
timesList.value = expenseList.value
|
||||
forData.value[indexList.value].summaryTotal = expenseList.value.reduce((sum, item) => sum + (Number(item.expense) || 0), 0);
|
||||
timesList.value[indexList.value] = expenseList.value[indexList.value]
|
||||
forData.value[indexList.value].summaryTotal = expenseList.value[indexList.value].reduce((sum, item) => sum + (Number(item.expense) || 0), 0);
|
||||
return
|
||||
}
|
||||
//搜索 数组expenseList.value 参数名字或者工号:nameUserNo.value 日期:dateValue.value
|
||||
// const filteredList = expenseList.value.filter(item => {
|
||||
// const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
// const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
// if(dateValue.value==null){
|
||||
// return isNameMatch
|
||||
// }
|
||||
// const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
// const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
// const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
// if(nameUserNo.value&&startDateTimestamp&&endDateTimestamp){
|
||||
// return isNameMatch && isDateInRange;
|
||||
// }
|
||||
// return isNameMatch || isDateInRange;
|
||||
// });
|
||||
const timesLists = expenseList.value.filter(item => {
|
||||
const timesLists = expenseList.value[indexList.value].filter(item => {
|
||||
const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
if(dateValue.value==null){
|
||||
return expenseList.value
|
||||
if(dateValue==null||!dateValue.length){
|
||||
return expenseList.value[indexList.value]
|
||||
}
|
||||
const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
const startDateTimestamp = new Date(dateValue[0]).getTime();
|
||||
const endDateTimestamp = new Date(dateValue[1]).getTime();
|
||||
const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
return isDateInRange;
|
||||
});
|
||||
const filteredList = timesLists.filter(item => {
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
if(!nameUserNo){
|
||||
return
|
||||
}
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo);
|
||||
return isNameMatch
|
||||
});
|
||||
searchList.value = filteredList;
|
||||
timesList.value = timesLists
|
||||
timesList.value[indexList.value] = timesLists
|
||||
forData.value[indexList.value].summaryTotal = timesLists.reduce((sum, item) => sum + (Number(item.expense) || 0), 0);
|
||||
let scrollHeight = null
|
||||
filteredList.length && (scrollHeight = timesLists.findIndex(item => item.id === filteredList[0].id))
|
||||
@@ -314,10 +293,9 @@ const searchData = (val) => {
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
const resetData = () => {
|
||||
nameUserNo.value = null
|
||||
dateValue.value = null
|
||||
searchData(false)
|
||||
const resetData = (index,val) => {
|
||||
val && (searchConditions.value[index] = { nameUserNo: '', dateValue: [] });
|
||||
searchData(true,index);
|
||||
}
|
||||
const emit = defineEmits(['update:visible'])
|
||||
const columns = [
|
||||
@@ -341,6 +319,7 @@ const columns = [
|
||||
key: 'courseName',
|
||||
align: 'left',
|
||||
width:160,
|
||||
ellipsis:true,
|
||||
customCell :() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer'}}},
|
||||
},
|
||||
{
|
||||
@@ -486,24 +465,19 @@ const columns = [
|
||||
const closeDrawer = () => emit("update:visible", false);
|
||||
const activeList = ref([])
|
||||
const setList = (item) => {
|
||||
const index = activeList.value.findIndex(listItem => listItem === item.trainOrgId);
|
||||
const index = activeList.value.findIndex(listItem => listItem === item);
|
||||
if (index > -1) {
|
||||
activeList.value.splice(index, 1);
|
||||
} else {
|
||||
activeList.value.push(item.trainOrgId);
|
||||
activeList.value.push(item);
|
||||
}
|
||||
}
|
||||
const qureyDrawer = () => {
|
||||
const filterList = forData.value.filter(item=>{
|
||||
return activeList.value.includes(item.trainOrgId)
|
||||
const idList = []
|
||||
activeList.value?.map(item=>{
|
||||
idList.push(...timesList.value[item])
|
||||
})
|
||||
const ids = filterList?.flatMap(item => item.expenseList?.map(item => item.id));
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
// }else{
|
||||
// ids = expenseList.value.map(item=>item.id)
|
||||
// }
|
||||
const ids = idList?.map(item=>item.id)
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
}
|
||||
@@ -528,23 +502,15 @@ const qureyDrawer = () => {
|
||||
})
|
||||
}
|
||||
const config = () => {
|
||||
const filterList = forData.value.filter(item=>{
|
||||
return activeList.value.includes(item.trainOrgId)
|
||||
const idList = []
|
||||
activeList.value?.map(item=>{
|
||||
idList.push(...timesList.value[item])
|
||||
})
|
||||
const ids = filterList?.flatMap(item => item.expenseList?.map(item => item.id));
|
||||
const ids = idList?.map(item=>item.id)
|
||||
if(!ids.length){
|
||||
message.error('暂无可提交的数据')
|
||||
return
|
||||
}
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
// }else{
|
||||
// ids = expenseList.value.map(item=>item.id)
|
||||
// }
|
||||
// if(!ids.length){
|
||||
// return message.error('暂无可提交的数据')
|
||||
// }
|
||||
modalVisible.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -57,6 +57,12 @@ export function checkOwner(per) {
|
||||
export function checkMenu(path = "") {
|
||||
return store?.state?.menus.some(t => path.split(",").some(s => "/" + s === t));
|
||||
}
|
||||
export function checkBtn(path = "") {
|
||||
return store?.state?.menus.some(t => path.split(",").some(s => s === t));
|
||||
}
|
||||
export function lecturerRoute(path = []) {
|
||||
return path.split(",").findIndex(t => store?.state?.menus.some(s => s === "/" + t));
|
||||
}
|
||||
export function checkOrgs(){
|
||||
return store?.state?.userInfoOrgs.length > 0
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<a-space>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
|
||||
<a-button v-if="record.isPermission==='true'||record.isSuperPermission==='true'" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="(record.isPermission==='true'||record.isSuperPermission==='true')" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'&&(record.isPermission==='true'||record.isSuperPermission==='true')" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">停用</a-button>
|
||||
<a-button v-if="record.status == '2'&&(record.isPermission==='true'||record.isSuperPermission==='true')" type="link"
|
||||
@@ -443,6 +443,7 @@ import AddContent from "../../components/project/AddContent.vue"
|
||||
import UploadDragger from "@/components/project/UploadDragger.vue"
|
||||
import avatar from '@/assets/avatar.png'
|
||||
import LookInsideLecturer from "../../components/project/LookInsideLecturer.vue"
|
||||
import { checkBtn } from "../../utils/utils";
|
||||
export default {
|
||||
name: "InsideLecturer",
|
||||
components: {
|
||||
@@ -1440,6 +1441,7 @@ export default {
|
||||
cancelupdialog,
|
||||
createupdialog,
|
||||
removeList,
|
||||
checkBtn,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
</a-input>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<a-form-item class="select">
|
||||
<a-input v-model:value="searchParam.courseName" style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入课程名称进行检索" allowClear showSearch
|
||||
v-on:keydown.enter="enterPressHadlerSearch">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item class="select">
|
||||
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.trainOrgId" placeholder="请选择培训发生组织" allowClear
|
||||
:options="orgListSearch"
|
||||
@@ -42,7 +48,7 @@
|
||||
v-on:keydown.enter="enterPressHadlerSearch">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item class="select" >
|
||||
<a-form-item class="select" v-if="moreid==2">
|
||||
<a-select style="width: 200px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear
|
||||
:options="AuthenticationStatusList"
|
||||
v-on:keydown.enter="enterPressHadlerSearch">
|
||||
@@ -99,13 +105,13 @@
|
||||
<a-button class="resetbtn" @click="handleImport()" >
|
||||
<DownloadOutlined /> 导入
|
||||
</a-button>
|
||||
<!-- <a-button @click="handleExport()" class="resetbtn">
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button> -->
|
||||
<a-button @click="handleTeacher()" type="primary" class="langbtn">
|
||||
</a-button>
|
||||
<a-button v-if="orgList.length" @click="handleTeacher()" type="primary" class="langbtn">
|
||||
一键确认讲师费
|
||||
</a-button>
|
||||
<a-button @click="allFee()" type="primary" class="langbtn">
|
||||
<a-button v-if="orgList.length" @click="allFee()" type="primary" class="langbtn">
|
||||
批量确认讲师费
|
||||
</a-button>
|
||||
<!-- <div style="line-height: 40px;" >当前页面汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">1,230,490</span>元 当前总汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">9,230,490</span>元</div> -->
|
||||
@@ -117,12 +123,13 @@
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space >
|
||||
<a-button type="link" v-if="record.status==0||record.status==5" @click="updateModal(record,record.status)">{{record.status==0?'停用':'启用'}}</a-button>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<!-- :disabled="record.createFrom==1 ?false :true" -->
|
||||
<a-button type="link" v-if="record.createFrom==1&&record.status != 2&&record.status!=3" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button type="link" v-if="record.status == 0||record.status==4" @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="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
|
||||
<a-button type="link" v-if="record.status==0||record.status==4||record.status==5" @click="deleteModal(record)">删除</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -283,7 +290,7 @@
|
||||
/>
|
||||
费用类型
|
||||
</template>
|
||||
<a-select class="draitem" v-model:value="formParam.courseType" placeholder="请选择费用类型"
|
||||
<a-select :disabled="formParam.createFrom==0" class="draitem" v-model:value="formParam.courseType" placeholder="请选择费用类型"
|
||||
:options="courseTypeList">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
@@ -305,7 +312,7 @@
|
||||
<!-- <a-select class="draitem" v-model:value="formParam.courseName" placeholder="请选择输入或选择面授课" style="width:63%" allowClear
|
||||
:options="getLevelList">
|
||||
</a-select> -->
|
||||
<a-input :maxlength="20" show-count v-model:value="formParam.courseName" placeholder="请输入面授课名称" class="draitem">
|
||||
<a-input :disabled="formParam.createFrom==0" :maxlength="20" show-count v-model:value="formParam.courseName" placeholder="请输入面授课名称" class="draitem">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -326,7 +333,7 @@
|
||||
v-model:value="formParam.sourceBelongId"
|
||||
v-model:name="formParam.sourceBelongFullName"
|
||||
></OrgClass> -->
|
||||
<a-select v-model:value="formParam.trainOrgId" placeholder="请选择培训发生组织" allowClear
|
||||
<a-select :disabled="formParam.createFrom==0" v-model:value="formParam.trainOrgId" placeholder="请选择培训发生组织" allowClear
|
||||
:options="orgList" @change="changeOrg">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
@@ -341,7 +348,7 @@
|
||||
/>
|
||||
{{formParam.courseType==2?'课程':'授课'}}日期 :
|
||||
</template>
|
||||
<a-date-picker :locale="locale" class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm"
|
||||
<a-date-picker :disabled="formParam.createFrom==0" :locale="locale" class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm"
|
||||
placeholder="请选择课程日期" @select="handleSelect" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -376,7 +383,7 @@
|
||||
/>
|
||||
参训人数
|
||||
</template>
|
||||
<a-input v-model:value="formParam.studys" class="draitem" @change="clearstudysNumber"
|
||||
<a-input :disabled="formParam.createFrom==0" v-model:value="formParam.studys" class="draitem" @change="clearstudysNumber"
|
||||
placeholder="请输入参训人数" allowClear showSearch >
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -394,7 +401,7 @@
|
||||
/>
|
||||
评分
|
||||
</template>
|
||||
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="1" :precision="0" placeholder="请输入评分"
|
||||
<a-input-number :disabled="formParam.createFrom==0" class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="1" :precision="0" placeholder="请输入评分"
|
||||
allowClear @change="scoreNumber">
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
@@ -528,7 +535,7 @@
|
||||
<a-descriptions-item label="计划费用 ">{{formParam.expense?formParam.expense+'元': '-'}}</a-descriptions-item>
|
||||
<!-- <a-descriptions-item label="应发费用 ">{{formParam.payableExpense || '-'}}</a-descriptions-item> -->
|
||||
<!-- <a-descriptions-item label="费用发放时间">{{formParam.payableExpenseTime || '-'}}</a-descriptions-item> -->
|
||||
<a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'审核通过', 4:'审核拒绝',5:'待提交'}[formParam?.status]}}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'审核通过', 4:'审核拒绝',5:'停用'}[formParam?.status]}}</a-descriptions-item>
|
||||
<!-- <a-descriptions-item label="课程类型">{{{"0": "在线课","1": "面授课","2": "课程开发","3": "作业员入模培训","4": "其他",}[formParam.courseType + ""]}}</a-descriptions-item> -->
|
||||
<a-descriptions-item label="备注 ">{{formParam.remark || '-'}}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
@@ -583,7 +590,7 @@
|
||||
import ImportWork from "../../components/lecturer/ImportWork.vue";
|
||||
import SearchTeacher from "@/components/project/SearchTeacher";
|
||||
import {getTeacherFeeList,getTeacherFeeDetail,getListByTeacherExpenseId,addTeacherFee ,getListByIds,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement";
|
||||
import {getTeacherSystemList, getAllLevelList,getPayRollPlace,fileUp,submitApproval } from "../../api/Lecturer";
|
||||
import {getTeacherSystemList, getAllLevelList,getPayRollPlace,fileUp,submitApproval,deleteLecturerFee,updateLecturerFee } from "../../api/Lecturer";
|
||||
// lecturerFeeManagement
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||
@@ -661,6 +668,7 @@
|
||||
name:null,
|
||||
trainOrgId:null,
|
||||
tSystemId:null,
|
||||
courseName: null,
|
||||
tLevelName:null,
|
||||
courseType:null,
|
||||
certStatus:null,
|
||||
@@ -840,7 +848,7 @@ getAllLevelList().then((res) => {
|
||||
state.moreid=1
|
||||
// state.searchParam.certStatus=null
|
||||
// state.searchParam.salaryName=null
|
||||
// state.searchParam.status=null
|
||||
state.searchParam.status=null
|
||||
state.searchParam.tSystemId = null
|
||||
state.searchParam.tLevelName = null
|
||||
}
|
||||
@@ -1051,7 +1059,7 @@ getAllLevelList().then((res) => {
|
||||
"2": "审核中",
|
||||
"3": "审核通过",
|
||||
'4': '审核拒绝',
|
||||
'5': '待提交',
|
||||
'5': '停用',
|
||||
}[value.record.status + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
@@ -1102,7 +1110,7 @@ getAllLevelList().then((res) => {
|
||||
key: 'operation',
|
||||
ellipsis: true, align: "center",
|
||||
fixed: "right",
|
||||
width: 160,
|
||||
width: 180,
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
|
||||
@@ -1125,6 +1133,7 @@ getAllLevelList().then((res) => {
|
||||
beginTime:null,
|
||||
userNo:null,
|
||||
tSystemId:null,
|
||||
courseName: null,
|
||||
tLevelName:null,
|
||||
courseType:null,
|
||||
certStatus:null,
|
||||
@@ -1275,10 +1284,43 @@ getAllLevelList().then((res) => {
|
||||
}
|
||||
};
|
||||
//删除弹窗
|
||||
// const deleteModal = (record) => {
|
||||
// state.deleteInTeacherdialog = true
|
||||
// state.delTeacherId = record.id
|
||||
// };
|
||||
const deleteModal = (record) => {
|
||||
dialog({
|
||||
content: '是否确认进行删除?',
|
||||
ok: () => {
|
||||
deleteLecturerFee({id:record.id}).then(res=>{
|
||||
if(typeof (res.data.data) != 'object'){
|
||||
message.error(res.data.data)
|
||||
return
|
||||
}
|
||||
message.success("删除成功");
|
||||
searchSubmit()
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
};
|
||||
const updateModal = (record) => {
|
||||
dialog({
|
||||
content: `是否确认${record.status == 5 ? '启用':'停用'}?`,
|
||||
ok: () => {
|
||||
const status = record.status ==0 ? 5 : 0
|
||||
updateLecturerFee({id:record.id,status}).then(res=>{
|
||||
if(typeof (res.data.data) != 'object'){
|
||||
message.error(res.data.data)
|
||||
return
|
||||
}
|
||||
message.success(`${status == 0 ? '启用':'停用'}成功`);
|
||||
searchSubmit()
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//修改状态窗口
|
||||
const handleOperate = (record) => {
|
||||
dialog({
|
||||
@@ -1742,7 +1784,7 @@ const column = ref([
|
||||
"2": "审核中",
|
||||
"3": "审核通过",
|
||||
'4': '审核拒绝',
|
||||
'5': '待提交',
|
||||
'5': '停用',
|
||||
}[value.record.status + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
@@ -1787,7 +1829,7 @@ const column = ref([
|
||||
const handleExport = ()=>{
|
||||
window.open (
|
||||
`${process.env.VUE_APP_BASE_API}/admin/export/exportTeacherExpense?name=${state.searchParam.name || ""
|
||||
}&status=${ state.searchParam.status || ""}&trainOrgId=${ state.searchParam.trainOrgId || ""}&type=${state.searchParam.type || ""}&tSystemId=${ state.searchParam.tSystemId || ""}&tLevelName=${ state.searchParam.tLevelName || ""}&beginTime=${state.searchParam.beginTime || ""}&endTime=${state.searchParam.endTime || ""}`
|
||||
}&status=${ state.searchParam.status || ""}&trainOrgId=${ state.searchParam.trainOrgId || ""}&type=${state.searchParam.type || ""}&courseName=${ state.searchParam.courseName || ""}&tSystemId=${ state.searchParam.tSystemId || ""}&tLevelName=${ state.searchParam.tLevelName || ""}&beginTime=${state.searchParam.beginTime || ""}&endTime=${state.searchParam.endTime || ""}`
|
||||
);
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
@@ -1866,7 +1908,8 @@ const column = ref([
|
||||
handleLook,
|
||||
orgSplit,
|
||||
cancel,
|
||||
// deleteModal,
|
||||
deleteModal,
|
||||
updateModal,
|
||||
handleModify,
|
||||
// closeDeleteTeacher,
|
||||
createTeacherDialog,
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
</a-button>
|
||||
</div> -->
|
||||
<!-- 表格 -->
|
||||
<div style="margin-bottom: 4px;color: #aaaaaa;">
|
||||
注:下表为按讲师汇总的费用
|
||||
</div>
|
||||
<div style="padding: 10px 0">
|
||||
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columns"
|
||||
:data-source="tableData" :loading="tableLoading" :scroll="{ x: 600}" :pagination="pagination">
|
||||
@@ -105,7 +108,7 @@
|
||||
</div> -->
|
||||
<!-- 抽屉 -->
|
||||
<a-drawer class="largeDrawerInside" v-model:visible="opendrawer" placement="right"
|
||||
@closa="cancelTeachingDialog" :maskClosable="true" width="60%" :title="false">
|
||||
@closa="cancelTeachingDialog" :maskClosable="true" width="80%" :title="false">
|
||||
<div style="padding:24px;">
|
||||
<div class="headers" style="margin-top:-24px;">
|
||||
<div class="headerTitle">查看详情</div>
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<AddOrgContent :Addtitle="'选择组织'" :isParent="formParam.isParent" v-model:showContent="showContent" :AddContentLists="formParam.affiliationOrgLists" v-model:AddContentList="formParam.affiliationOrgList"/>
|
||||
<AddOrgContent :Addtitle="'选择组织'" :isParent="formParam.isParent" v-model:showContent="showContent" :AddContentLists="formParam.affiliationOrgLists" v-model:AddContentList="formParam.affiliationOrgList" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
@@ -354,7 +354,7 @@ export default{
|
||||
code: null,
|
||||
isContains: '0',
|
||||
affiliationOrgList: [],
|
||||
affiliationOrgLists: [],
|
||||
affiliationOrgLists:[],
|
||||
locking: 1,
|
||||
},
|
||||
})
|
||||
@@ -768,6 +768,7 @@ const getTableDate = (obj) => {
|
||||
code: null,
|
||||
isContains: '0',
|
||||
affiliationOrgList: [],
|
||||
affiliationOrgLists:[],
|
||||
locking: 1,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user