diff --git a/src/api/Lecturer.js b/src/api/Lecturer.js index 772ba054..74398e73 100644 --- a/src/api/Lecturer.js +++ b/src/api/Lecturer.js @@ -62,7 +62,9 @@ export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliat //查看或编辑回显培训发生组织 export const getAffiliationById = (id) => http.get(`/admin/affiliation/queryById?id=${id}`) //审核记录 -export const getByBusinessIdList = (obj) => http.post(`/admin/approval/getByBusinessIdList?businessId=${obj.businessId}&businessType=${obj.businessType}&pageNo=${obj.pageNo}&pageSize=${obj.pageSize}`) +export const getByBusinessIdList = (obj) => http.post(`/admin/approval/getByBusinessIdListPage?businessId=${obj.businessId}&businessType=${obj.businessType}&pageNo=${obj.pageNo}&pageSize=${obj.pageSize}`) +//审批中心查看详情 +export const getApprovalResultByBusinessIdList = (obj) => http.post(`/admin/approval/getApprovalResultByBusinessIdList?businessId=${obj.businessId}&businessType=${obj.businessType}`) //审核记录查看操作 export const getApprovalResultByApprovalIdList = (approvalId) => http.post(`/admin/approval/getApprovalResultByApprovalIdList?approvalId=${approvalId}`) //恢复培训发生组织的数据 diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index a9d84b63..f3a4bf34 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -415,14 +415,14 @@ 意见 - + - + - + @@ -246,18 +246,28 @@ const columnsTwo = ref([ slots: { customRender: "action" }, } ]) +const approvalData = ref(null) const threeList = ref(false) const lookList = (record) => { console.log(record,'resssssss') - threeList.value = true - api.getApprovalResultByApprovalIdList(record.approvalId).then(res=>{ - if(res.data.code == 200){ - formData.value.tableDataThree = res.data.data - } - }).catch(err=>{ - message.destroy() - message.error(err.data.msg) - }) + if(!threeList.value||record.approvalId!=approvalData.value){ + threeList.value = true + approvalData.value = record.approvalId + formData.value.loadingThree = true + api.getApprovalResultByApprovalIdList(record.approvalId).then(res=>{ + if(res.data.code == 200){ + formData.value.tableDataThree = res.data.data + } + formData.value.loadingThree = false + }).catch(err=>{ + message.destroy() + formData.value.loadingThree = false + message.error(err.data.msg) + }) + }else{ + threeList.value = false + approvalData.value = null + } } const visible = ref(false); watch(visible, (val)=>{ @@ -288,7 +298,6 @@ const getTwoData = () => { params.total = res.data.data.total } formData.value.loadingTwo = false - console.log(formData.value.tableDataTwo,'xixixi') }).catch(err=>{ message.destroy() message.error(err.data.msg) @@ -358,7 +367,8 @@ function openDrawer() { .impotergroupleader { .drawerMain { min-width: 600px; - margin: 0px 32px 0px 32px; + margin:0; + padding: 0px 32px 0px 32px; overflow-x: auto; display: flex; flex-direction: column; @@ -379,6 +389,7 @@ function openDrawer() { color: #333333; line-height: 25px; // margin-left: 24px; + margin: 0; } } .content{ diff --git a/src/views/lecturer/LecturerApproval.vue b/src/views/lecturer/LecturerApproval.vue index 4e72ed19..ec2c4477 100644 --- a/src/views/lecturer/LecturerApproval.vue +++ b/src/views/lecturer/LecturerApproval.vue @@ -131,7 +131,7 @@ /> -讲师费用详情 +讲师费用详情 {{formParam?.approvalNumber||'-'}} {{formParam?.trainOrgName||'-'}} @@ -141,8 +141,8 @@ {{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'已完成', 4:'审核拒绝',5:'待提交'}[formParam?.status]}} - - + +
@@ -167,7 +167,7 @@
+ :data-source="tableDataExamineTwo" :loading="tableDataExamineLoading" @expand="expandTable" :pagination="false">
@@ -242,7 +242,7 @@ } from '@ant-design/icons-vue'; import ProjectManager from "@/components/project/ProjectManagerNew"; import {expenseBillList,queryById,queryExpnseByBillId ,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTrainOrg,isConfirm} from "../../api/lecturerFeeManagement"; - import { getTeacherSystemList } from "../../api/Lecturer"; + import { getTeacherSystemList,getApprovalResultByBusinessIdList } from "../../api/Lecturer"; // lecturerFeeManagement // import {getProjSt} from "../../api/indexProjStu"; // import AddTeacher from "../../components/drawers/project/AddTeacher" @@ -270,6 +270,8 @@ }) const router = useRouter() const state = reactive({ + tableDataExamineLoading: false, + tableDataExamineTwo: [], tableDataParams:{ pageNo: 1, pageSize: 10, @@ -632,11 +634,54 @@ } //表格内查看数据操作 const handleLook = (record) => { + state.activeKey = '1' state.teachingdialog = true; state.id= record.id TeacherSystem() gettableDataExamine() } + const params = reactive({ + pageNo: 1, + pageSize: 10, + total: 0, + businessType: 1, + businessId: '366' + }) + const paginations = computed(() => ({ + total: params.total, + showSizeChanger: true, + showQuickJumper:true, + current: params.pageNo, + pageSize: params.pageSize, + onChange: paginationChanges, + })); + const paginationChanges = (e,pageSize) => { + params.pageNo = e; + params.pageSize = pageSize + // getListData() + }; + const tabsChange = (val) => { + if(val == 2){ + getListData() + } + } + const getListData = () => { + state.tableDataExamineLoading = true + getApprovalResultByBusinessIdList({ + businessType: 1, + businessId: state.id + }).then(res=>{ + if(res.data.code == 200){ + state.tableDataExamineTwo = res.data.data + // params.total = res.data.data.total + } + state.tableDataExamineLoading = false + }).catch(err=>{ + message.destroy() + state.tableDataExamineLoading = false + message.error(err.data.msg) + }) + } const submit = (record) => { console.log(record,'record') dialog({ @@ -712,7 +757,6 @@ } } const tableDataExamine = ref([]) - const tableDataExamineTwo = ref([]) const gettableDataExamine = () => { state.examinetableLoading = true queryExpnseByBillId({ @@ -747,51 +791,66 @@ const columnsExamineTwo = ref([ { title: '审批层级 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'levelName', + key: 'levelName', ellipsis: true, align: "center", width: 120, }, { title: '层级审批人 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'employeeNames', + key: 'employeeNames', ellipsis: true, align: "center", width: 120, }, { title: '操作 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'approvalStatus', + key: 'approvalStatus', ellipsis: true, align: "center", width: 120, + customRender: ({text})=>{ + switch (text) { + case -1: + return 未处理; + case 3: + return 通过; + case 4: + return 拒绝; + default: + return -; + } + } }, { title: '审批人 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'employeeName', + key: 'employeeName', ellipsis: true, align: "center", width: 120, }, { title: '审批时间 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'approvalTime', + key: 'approvalTime', ellipsis: true, align: "center", width: 120, }, { title: '审批建议 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'approvalMsg', + key: 'approvalMsg', ellipsis: true, align: "center", width: 120, + customRender: ({text}) => { + return text||'-' + } }, ]) //二级页面 @@ -978,13 +1037,14 @@ columnsExamineTwo, tableData, tableDataExamine, - tableDataExamineTwo, seeDateChange, changePagination, addTeacher, cancelTeachingDialog, handleLook, submit, + getListData, + tabsChange, withdraw, goDdit, cancel, @@ -1000,6 +1060,8 @@ paginationChange, searchTeacherFeeApprovalList, resetSearch, + paginations, + paginationChanges, } }, }; @@ -1322,10 +1384,11 @@ .line { float: left; width: 3px; - height: 25px; + height: 17px; background: #4ea6ff; border-radius: 30%; margin-right: 5px; + margin-top: 3px; } //抽屉功能 diff --git a/src/views/lecturer/LecturerFee.vue b/src/views/lecturer/LecturerFee.vue index 01b9a5dc..d6cb93b0 100644 --- a/src/views/lecturer/LecturerFee.vue +++ b/src/views/lecturer/LecturerFee.vue @@ -701,38 +701,61 @@ getAllLevelList().then((res) => { const columnSee = ref([ { title: '审批层级', - dataIndex: 'name', - key: 'name', + dataIndex: 'levelName', + key: 'levelName', ellipsis: true, align: "center", }, { title: '审批人 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'employeeNames', + key: 'employeeNames', ellipsis: true, align: "center", }, { title: '审批状态 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'approvalStatus', + key: 'approvalStatus', ellipsis: true, align: "center", + customRender: ({text})=>{ + switch (text) { + case 0: + return 待提交; + case 1: + return 待审核; + case 2: + return 审核中; + case 3: + return 审核通过; + case 4: + return 拒绝; + case 5: + return 撤销中; + case 6: + return 已撤销; + default: + return -; + } + } }, { title: '审批时间 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'approvalTime', + key: 'approvalTime', ellipsis: true, align: "center", }, { title: '备注 ', - dataIndex: 'name', - key: 'name', + dataIndex: 'approvalMsg', + key: 'approvalMsg', ellipsis: true, align: "center", + customRender:({text})=>{ + return text||'-' + } }, ]) const columns = ref([