diff --git a/src/api/Lecturer.js b/src/api/Lecturer.js index 1658ef7a..7645dc3a 100644 --- a/src/api/Lecturer.js +++ b/src/api/Lecturer.js @@ -64,7 +64,7 @@ export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id //讲师费统计详情 export const expenseSummaryById = (obj) => http.get( `/admin/expenseSummary/queryById?id=${obj.id}&name=${obj.name}&trainOrgId=${obj.trainOrgId}`) //查看月度讲师费详情 -export const queryDetailId = (obj) => http.get(`/admin/expenseSummary/queryDetailId?summaryId=${obj.summaryId}&name=${obj.name}`) +export const queryDetailId = (obj) => http.get(`/admin/expenseSummary/queryDetailId?summaryId=${obj.summaryId}&name=${obj.name}&startTime=${obj.startTime}&endTime=${obj.endTime}`) //查询未汇总的数据(批量确认弹框) export const getListByStatus = (obj) => http.get(`/admin/teacherExpense/getListByStatus`) //根据发生组织查询汇总的数据(一键确认弹框使用) diff --git a/src/views/lecturer/MonthlyStatistics.vue b/src/views/lecturer/MonthlyStatistics.vue index 116f4758..3bdf61e7 100644 --- a/src/views/lecturer/MonthlyStatistics.vue +++ b/src/views/lecturer/MonthlyStatistics.vue @@ -101,7 +101,8 @@ -
@@ -110,7 +111,7 @@
讲师费发放情况 - + @@ -139,7 +140,7 @@ import { useRouter,useRoute } from "vue-router"; import { UploadOutlined, } from '@ant-design/icons-vue'; - import { getPayRollPlace,expenseSummaryById } from "../../api/Lecturer"; + import { getPayRollPlace,expenseSummaryById ,queryDetailId} from "../../api/Lecturer"; import { getOrganization } from "../../api/Teaching"; import ProjectManager from "@/components/project/ProjectManagerNew"; import {queryTeacherFeeMonthly} from "../../api/lecturerFeeStatistics"; @@ -156,6 +157,7 @@ export default { const route = useRoute(); const { query: { id }} = useRoute(); const state = reactive({ + tableLoadings: false, opendrawer:false, id, summaryDate: null, @@ -174,20 +176,21 @@ export default { searchParam: { pageNo: "1", pageSize: "10", - name: null, + name: '', payrollPlaceId: null, departId: null, summaryDate:null, - id: route.query.id, - name: route.query.name, - trainOrgId: route.query.trainOrgId, + id: '2', + trainOrgId: '', }, name:null, drawer: { - name: null, - drawersearchdate: null, + name: '', + drawersearchdate: '', pageNo: '1', pageSize: '10', + endTime: '', + startTime: '', } }) watch( @@ -214,8 +217,8 @@ export default { }, { title: '所属组织 ', - dataIndex: 'teacherOrg', - key: 'teacherOrg', + dataIndex: 'orgName', + key: 'orgName', elipsis: true, align: "center", width: 300, @@ -223,24 +226,24 @@ export default { }, { title: '讲师发薪地 ', - dataIndex: 'teacherpayrollPlace', - key: 'teacherpayrollPlace', + dataIndex: 'trainOrgName', + key: 'trainOrgName', elipsis: true, align: "center", width: 200, }, { title: '授课时长(系统 ) ', - dataIndex: 'teachingTime', - key: 'teachingTime', + dataIndex: 'teachingSystem', + key: 'teachingSystem', elipsis: true, align: "center", width: 200, }, { title: '授课时长(录入) ', - dataIndex: 'teachingTime', - key: 'teachingTime', + dataIndex: 'teachingEnter', + key: 'teachingEnter', elipsis: true, align: "center", width: 200, @@ -306,7 +309,7 @@ export default { expenseSummaryById(state.searchParam) .then((res) => { console.log(res,'resssss') - tableData.value = res.data.data.records + tableData.value = res.data.data state.tableDataTotal = Number(res.data.data.total); state.tableLoading = false }) @@ -338,7 +341,21 @@ export default { getOrganizationLista() //表格内查看数据操作 const handleLook = (record) => { + state.drawer={ + name: '', + drawersearchdate: '', + pageNo: '1', + pageSize: '10', + endTime: '', + startTime: '', + } state.opendrawer=true + searchSubmitdrawer() + } + const searchTimeChange = (e) => { + state.drawer.startTime = e[0] + state.drawer.endTime = e[1] + } const changePagination = (page, pageSize) => { state.searchParam.pageNo = page; @@ -367,34 +384,48 @@ export default { }; //二级页面重置 const searchResetdrawer =()=>{ - state. drawer={ - name: null, - drawersearchdate: null, - pageNo: '1', - pageSize: '10', - } + state.drawer={ + name: '', + drawersearchdate: '', + pageNo: '1', + pageSize: '10', + endTime: '', + startTime: '', + } + searchSubmitdrawer() } //二级页面查询 const searchSubmitdrawer=()=>{ - + state.tableLoadings = true + const params = { + summaryId: '', + name: state.drawer.name, + endTime: state.drawer.endTime, + startTime: state.drawer.startTime, + } + queryDetailId(params).then(res=>{ + console.log(res,'resss') + tableDatas.value = res.data.data + state.tableLoadings = false + }) } - const tableDatas = ref[{}] + const tableDatas = ref([]) const column = ref([ { title: '讲师姓名 ', - dataIndex: 'teacherName', - key: 'teacherName', + dataIndex: 'name', + key: 'name', elipsis: true, align: "center", - width: 200, + width: 100, }, { title: '讲师工号', - dataIndex: 'teacherNo', - key: 'teacherNo', + dataIndex: 'userNo', + key: 'userNo', align: "center", elipsis: true, - width: 200, + width: 100, }, { title: '课程名称 ', @@ -433,11 +464,11 @@ export default { }, { title: '授课时间', - dataIndex: 'teacherOrg', - key: 'teacherOrg', + dataIndex: 'teachingDate', + key: 'teachingDate', elipsis: true, align: "center", - width: 300, + width: 120, scopedSlots: { customRender: "teacherOrg" }, }, { @@ -460,7 +491,7 @@ export default { key: 'teacherpayrollPlace', elipsis: true, align: "center", - width: 200, + width: 120, }, { @@ -468,7 +499,7 @@ export default { dataIndex: 'teacherlevelPay', key: 'teacherlevelPay', elipsis: true, align: "center", - width: 120, + width: 100, }, { title: '计划费用 ', @@ -476,7 +507,7 @@ export default { key: 'expense', elipsis: true, align: "center", - width: 200, + width: 100, }, { title: '应发费用 ', @@ -484,13 +515,22 @@ export default { key: 'payableExpense', elipsis: true, align: "center", - width: 200, + width: 100, }, ]) //取消按钮 清空输入的数据 - const cancelTeachingDialog = () => { + const cancelTeachingDialog = () => { state.opendrawer = false + + state.drawer={ + name: '', + drawersearchdate: '', + pageNo: '1', + pageSize: '10', + endTime: '', + startTime: '', + } }; return { ...toRefs(state), @@ -501,6 +541,8 @@ export default { handleFeeMonthly, handleLook, changePagination, + searchTimeChange, + searchSubmitdrawer, getTableDate, searchSubmit, tableData,