mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 17:55:39 +08:00
讲师管理bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="CommonStudent">
|
||||
<a-drawer :visible="visiable" class="drawerStyle ProjCheckship CommonStudent" placement="right" width="40%">
|
||||
<a-drawer destroyOnClose :visible="visiable" class="drawerStyle ProjCheckship CommonStudent" placement="right" width="40%">
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
@@ -217,7 +217,6 @@ const stuColumns = ref([
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const auditTableRef = ref();
|
||||
const screenHeight = ref(document.body.clientHeight);
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -282,8 +281,6 @@ watch(visiable, () => {
|
||||
audienceName.value.keyword = "";
|
||||
|
||||
if (!visiable.value) {
|
||||
auditTableRef.value && auditTableRef.value.clear();
|
||||
auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
|
||||
stuTableRef.value && stuTableRef.value.clear();
|
||||
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: '' });
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ const onSelectChange = (e, l) => {
|
||||
selectedRowKeys.value = e
|
||||
selectsData.value = l
|
||||
}
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits(['selectedRowKeys','update:visible'])
|
||||
const addList = (item) => {
|
||||
selectedRowKeys.value.push(item.id)
|
||||
selectsData.value.push(item)
|
||||
|
||||
@@ -136,16 +136,13 @@ const handleConfirm = () => {
|
||||
}
|
||||
numTime.value+=1
|
||||
localStorage.setItem('numTime',numTime.value)
|
||||
const ids = expenseList.value?.map(item=>item.id)
|
||||
api.teacherExpenseConfirm(ids).then(res=>{
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
}
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
const obj = ids?.map(item=>{
|
||||
return {
|
||||
id: item,
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
api.isConfirm(obj).then(res=>{
|
||||
api.submitApproval({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
message.success('提交成功')
|
||||
close()
|
||||
@@ -189,6 +186,13 @@ watch(()=>props.visible,(val)=>{
|
||||
}
|
||||
})
|
||||
const removeId = (e,i) =>{
|
||||
forData.value?.forEach(item=>{
|
||||
item.expenseList?.some((i,l)=>{
|
||||
if(i.id == e.id){
|
||||
return item.expenseList.splice(l,1)
|
||||
}
|
||||
})
|
||||
})
|
||||
if(searchTrue.value){
|
||||
searchList.value = searchList.value.filter(item=>item.id !== e.id)
|
||||
expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
|
||||
@@ -209,6 +213,9 @@ const searchData = (val) => {
|
||||
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;
|
||||
@@ -221,7 +228,7 @@ const resetData = () => {
|
||||
dateValue.value = null
|
||||
searchData(false)
|
||||
}
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits(['update:visible'])
|
||||
const columns = [
|
||||
{
|
||||
title: '讲师名称',
|
||||
@@ -340,15 +347,14 @@ const columns = [
|
||||
]
|
||||
const closeDrawer = () => emit("update:visible", false);
|
||||
const qureyDrawer = () => {
|
||||
if(!expenseList.value.length){
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
return
|
||||
}
|
||||
dialog({
|
||||
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
|
||||
ok: () => {
|
||||
const ids = expenseList.value.map(item=>item.id)
|
||||
api.teacherExpenseConfirm(ids).then(res=>{
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
message.success('提交成功')
|
||||
closeDrawer()
|
||||
|
||||
Reference in New Issue
Block a user