mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
讲师管理bug
This commit is contained in:
@@ -56,7 +56,7 @@ export const getUserList = (keyword) => http.get(`/admin/thirdApi/user/list?page
|
||||
//查询弹框选择的组织信息
|
||||
export const getSelectOrg = (id) => http.get(`/admin/affiliation/getSelectOrg?id=${id}`)
|
||||
//查询弹框不可选择组织(审核中的组织)
|
||||
export const getUnSelectOrg = () => http.get(`/admin/affiliation/getUnSelectOrg`)
|
||||
export const getUnSelectOrg = (isParent) => http.get(`/admin/affiliation/getUnSelectOrg?isParent=${isParent}`)
|
||||
//获取培训发生组织编号
|
||||
export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliationCode')
|
||||
//查看或编辑回显培训发生组织
|
||||
@@ -79,6 +79,8 @@ export const affiliatIsConfirm = (id) => http.post(`/admin/affiliation/isConfirm
|
||||
export const expenseSummaryById = (obj) => http.get( `/admin/expenseSummary/queryById?id=${obj.id}&name=${obj.name}&trainOrgId=${obj.trainOrgId||''}&pageNo=${obj.pageNo}&pageSize=${obj.pageSize}`)
|
||||
//撤回讲师费统计详情
|
||||
export const removeBySummaryId = (obj) => http.post(`/admin/expenseSummary/removeBySummaryId?summaryId=${obj.summaryId}`,obj)
|
||||
//撤回讲师费统计详情二级页面
|
||||
export const removeBySummaryDetailId = (obj) => http.post(`/admin/expenseSummary/removeBySummaryDetailId?detailId=${obj.detailId}`,obj)
|
||||
//查看月度讲师费详情
|
||||
export const queryDetailId = (obj) => http.get(`/admin/expenseSummary/queryDetailId?summaryId=${obj.summaryId}&name=${obj.name}&startTime=${obj.startTime}&endTime=${obj.endTime}`)
|
||||
//查询未汇总的数据(批量确认弹框)
|
||||
|
||||
BIN
src/assets/icon.png
Normal file
BIN
src/assets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/assets/iconnot.png
Normal file
BIN
src/assets/iconnot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -77,6 +77,10 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
AddContentList:{
|
||||
type:Array,
|
||||
default: ()=>[],
|
||||
},
|
||||
isParent:{
|
||||
type:String,
|
||||
default: '',
|
||||
}
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
@@ -119,7 +123,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
});
|
||||
const notLists = ref([])
|
||||
const getNot = () => {
|
||||
lecturerApi.getUnSelectOrg().then(res=>{
|
||||
lecturerApi.getUnSelectOrg(props.isParent).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
notLists.value = res.data.data
|
||||
}
|
||||
@@ -144,7 +148,10 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
const onCheck = async (checkedKey, {checked: bool, checkedNodes, node, event}) => {
|
||||
// "965356037047586816"
|
||||
let length = treeAddData.value.length
|
||||
if(checkedNodes.length > length){
|
||||
const checkedNodeIds = checkedNodes.map(item => item.id);
|
||||
const treeAddDataOrgIds = treeAddData.value.map(item => item.orgId);
|
||||
const combinedUniqueIds = [...new Set([...checkedNodeIds, ...treeAddDataOrgIds])];
|
||||
if(combinedUniqueIds.length > length){
|
||||
await lecturerApi.getSelectOrg(node.id).then(res=>{
|
||||
const targetNode = checkedNodes.find(item=>item.id == res?.data?.data[0]?.orgId)
|
||||
if(targetNode){
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<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>
|
||||
</div>
|
||||
<div class="box">
|
||||
@@ -140,16 +141,16 @@ const handleConfirm = () => {
|
||||
// }
|
||||
// numTime.value+=1
|
||||
// localStorage.setItem('numTime',numTime.value)
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
// 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('暂无可提交的数据')
|
||||
}
|
||||
// if(!ids.length){
|
||||
// return message.error('暂无可提交的数据')
|
||||
// }
|
||||
modalVisible.value = false;
|
||||
emit('example',true)
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
@@ -218,6 +219,7 @@ watch(()=>props.visible,(val)=>{
|
||||
nameUserNo.value = null
|
||||
dateValue.value = null
|
||||
indexList.value = 0
|
||||
activeList.value = []
|
||||
drawerContent.value?.$el.querySelector('.ant-table-body')?.scrollTo({top:0,behavior: 'smooth'})
|
||||
}
|
||||
})
|
||||
@@ -482,8 +484,20 @@ const columns = [
|
||||
},
|
||||
]
|
||||
const closeDrawer = () => emit("update:visible", false);
|
||||
const activeList = ref([])
|
||||
const setList = (item) => {
|
||||
const index = activeList.value.findIndex(listItem => listItem === item.trainOrgId);
|
||||
if (index > -1) {
|
||||
activeList.value.splice(index, 1);
|
||||
} else {
|
||||
activeList.value.push(item.trainOrgId);
|
||||
}
|
||||
}
|
||||
const qureyDrawer = () => {
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
const filterList = forData.value.filter(item=>{
|
||||
return activeList.value.includes(item.trainOrgId)
|
||||
})
|
||||
const ids = filterList?.flatMap(item => item.expenseList?.map(item => item.id));
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
@@ -493,7 +507,6 @@ const qureyDrawer = () => {
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
}
|
||||
console.log(ids,'idssssss')
|
||||
dialog({
|
||||
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
|
||||
ok: () => {
|
||||
@@ -515,7 +528,11 @@ const qureyDrawer = () => {
|
||||
})
|
||||
}
|
||||
const config = () => {
|
||||
if(!expenseList.value.length){
|
||||
const filterList = forData.value.filter(item=>{
|
||||
return activeList.value.includes(item.trainOrgId)
|
||||
})
|
||||
const ids = filterList?.flatMap(item => item.expenseList?.map(item => item.id));
|
||||
if(!ids.length){
|
||||
message.error('暂无可提交的数据')
|
||||
return
|
||||
}
|
||||
@@ -679,7 +696,7 @@ const config = () => {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-bottom: 20px;
|
||||
// margin-bottom: 20px;
|
||||
|
||||
.headerTitle {
|
||||
margin: 24px 0;
|
||||
@@ -696,6 +713,7 @@ const config = () => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
padding-top: 20px;
|
||||
.list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -706,6 +724,25 @@ const config = () => {
|
||||
border-radius:6px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
.icon{
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -10px;
|
||||
width:24px;
|
||||
height:24px;
|
||||
cursor: pointer;
|
||||
// background: url('@/assets/icon.png') no-repeat;
|
||||
// background-size: 100% 100%;
|
||||
}
|
||||
.active{
|
||||
background: url('@/assets/icon.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.not{
|
||||
background: url('@/assets/iconnot.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.left{
|
||||
width: 35%;
|
||||
min-width: 86px;
|
||||
|
||||
@@ -133,7 +133,8 @@
|
||||
</a-form>
|
||||
<!-- <span>讲师费发放情况</span> -->
|
||||
<a-table :columns="column" :scroll="{ x: '1000' }" :data-source="tableDatas" :loading="tableLoadings" :pagination="false">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template #action="{ record, column }">
|
||||
<a-button type="link" @click="handleDetail(record)">撤回</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
<!-- <div :style="{
|
||||
@@ -163,7 +164,7 @@ import { useRouter,useRoute } from "vue-router";
|
||||
import {
|
||||
UploadOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
import { getPayRollPlace,expenseSummaryById ,removeBySummaryId,queryDetailId} from "../../api/Lecturer";
|
||||
import { getPayRollPlace,expenseSummaryById ,removeBySummaryId,removeBySummaryDetailId,queryDetailId} from "../../api/Lecturer";
|
||||
import { getOrganization } from "../../api/Teaching";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import {queryTeacherFeeMonthly} from "../../api/lecturerFeeStatistics";
|
||||
@@ -457,7 +458,6 @@ export default {
|
||||
searchSubmitdrawer()
|
||||
}
|
||||
const handleLess = (record) => {
|
||||
console.log(record,'record')
|
||||
dialog({
|
||||
content: '是否确认撤回 ?',
|
||||
ok:()=>{
|
||||
@@ -475,6 +475,26 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDetail = (record) => {
|
||||
dialog({
|
||||
content: '是否确认撤回 ?',
|
||||
ok:()=>{
|
||||
removeBySummaryDetailId({detailId:record.detailId}).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
message.success('撤回成功')
|
||||
emits.emit('tableList',true)
|
||||
searchSubmit()
|
||||
searchSubmitdrawer()
|
||||
}else{
|
||||
message.error(res.data.msg)
|
||||
}
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const searchTimeChange = (e) => {
|
||||
console.log(e,'eeeee')
|
||||
if(e){
|
||||
@@ -687,7 +707,16 @@ export default {
|
||||
return text ? text+'元' : '-'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作 ',
|
||||
dataIndex: 'operation',
|
||||
key: 'operation',
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
])
|
||||
//取消按钮 清空输入的数据
|
||||
const cancelTeachingDialog = () => {
|
||||
@@ -720,6 +749,7 @@ export default {
|
||||
handleFeeMonthly,
|
||||
handleLook,
|
||||
handleLess,
|
||||
handleDetail,
|
||||
changePagination,
|
||||
pagination,
|
||||
searchTimeChange,
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
||||
<AddOrgContent :Addtitle="'选择组织'" :isParent="formParam.isParent" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
|
||||
Reference in New Issue
Block a user