diff --git a/src/api/Lecturer.js b/src/api/Lecturer.js index 24ae116e..ffe4cebc 100644 --- a/src/api/Lecturer.js +++ b/src/api/Lecturer.js @@ -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}`) //查询未汇总的数据(批量确认弹框) diff --git a/src/assets/icon.png b/src/assets/icon.png new file mode 100644 index 00000000..6d9a5120 Binary files /dev/null and b/src/assets/icon.png differ diff --git a/src/assets/iconnot.png b/src/assets/iconnot.png new file mode 100644 index 00000000..c492aef5 Binary files /dev/null and b/src/assets/iconnot.png differ diff --git a/src/components/project/AddOrgContent.vue b/src/components/project/AddOrgContent.vue index 8fffb02f..d5769b02 100644 --- a/src/components/project/AddOrgContent.vue +++ b/src/components/project/AddOrgContent.vue @@ -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){ diff --git a/src/components/project/ConfirmLecturer.vue b/src/components/project/ConfirmLecturer.vue index 1231e3c4..474fdd67 100644 --- a/src/components/project/ConfirmLecturer.vue +++ b/src/components/project/ConfirmLecturer.vue @@ -27,6 +27,7 @@
{{item?.trainOrgName||'-'}}
{{item?.summaryTotal?Number(item?.summaryTotal).toFixed(2)+'元':'-'}}
+
@@ -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; diff --git a/src/views/lecturer/MonthlyStatistics.vue b/src/views/lecturer/MonthlyStatistics.vue index 5ba7f779..8ca19765 100644 --- a/src/views/lecturer/MonthlyStatistics.vue +++ b/src/views/lecturer/MonthlyStatistics.vue @@ -133,7 +133,8 @@ -