diff --git a/src/api/Lecturer.js b/src/api/Lecturer.js index 3cb7cfcd..a2dc3415 100644 --- a/src/api/Lecturer.js +++ b/src/api/Lecturer.js @@ -97,3 +97,7 @@ export const isConfirm = (obj) => http.post('/admin/expenseBill/isConfirm',obj) export const parentList = () => http.get('/admin/affiliation/parentList') //讲师级别获取 export const getAllLevelList = () => http.get('/admin/system/getAllLevelList') +//删除讲师费 +export const deleteLecturerFee = (obj) => http.post(`/admin/teacherExpense/delById?id=${obj.id}`,obj) +//停用/启用讲师费 +export const updateLecturerFee = (obj) => http.post(`/admin/teacherExpense/isEnable?id=${obj.id}&status=${obj.status}`,obj) diff --git a/src/views/lecturer/LecturerFee.vue b/src/views/lecturer/LecturerFee.vue index 656198b9..f4468cd9 100644 --- a/src/views/lecturer/LecturerFee.vue +++ b/src/views/lecturer/LecturerFee.vue @@ -102,10 +102,10 @@ 导出 - + 一键确认讲师费 - + 批量确认讲师费 @@ -117,12 +117,13 @@ @@ -528,7 +529,7 @@ {{formParam.expense?formParam.expense+'元': '-'}} - {{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'审核通过', 4:'审核拒绝',5:'待提交'}[formParam?.status]}} + {{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'审核通过', 4:'审核拒绝',5:'停用'}[formParam?.status]}} {{formParam.remark || '-'}} @@ -583,7 +584,7 @@ import ImportWork from "../../components/lecturer/ImportWork.vue"; import SearchTeacher from "@/components/project/SearchTeacher"; import {getTeacherFeeList,getTeacherFeeDetail,getListByTeacherExpenseId,addTeacherFee ,getListByIds,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement"; - import {getTeacherSystemList, getAllLevelList,getPayRollPlace,fileUp,submitApproval } from "../../api/Lecturer"; + import {getTeacherSystemList, getAllLevelList,getPayRollPlace,fileUp,submitApproval,deleteLecturerFee,updateLecturerFee } from "../../api/Lecturer"; // lecturerFeeManagement // import {getProjSt} from "../../api/indexProjStu"; // import AddTeacher from "../../components/drawers/project/AddTeacher" @@ -1051,7 +1052,7 @@ getAllLevelList().then((res) => { "2": "审核中", "3": "审核通过", '4': '审核拒绝', - '5': '待提交', + '5': '停用', }[value.record.status + ""] || "" : "-"} @@ -1102,7 +1103,7 @@ getAllLevelList().then((res) => { key: 'operation', ellipsis: true, align: "center", fixed: "right", - width: 160, + width: 180, scopedSlots: { customRender: "action" }, }, @@ -1275,10 +1276,43 @@ getAllLevelList().then((res) => { } }; //删除弹窗 - // const deleteModal = (record) => { - // state.deleteInTeacherdialog = true - // state.delTeacherId = record.id - // }; + const deleteModal = (record) => { + dialog({ + content: '是否确认进行删除?', + ok: () => { + deleteLecturerFee({id:record.id}).then(res=>{ + if(typeof (res.data.data) != 'object'){ + message.error(res.data.data) + return + } + message.success("删除成功"); + searchSubmit() + }).catch(err=>{ + message.destroy() + message.error(err.data.msg) + }) + } + }) + }; + const updateModal = (record) => { + dialog({ + content: `是否确认${record.status == 5 ? '启用':'停用'}?`, + ok: () => { + const status = record.status ==0 ? 5 : 0 + updateLecturerFee({id:record.id,status}).then(res=>{ + if(typeof (res.data.data) != 'object'){ + message.error(res.data.data) + return + } + message.success(`${status == 0 ? '启用':'停用'}成功`); + searchSubmit() + }).catch(err=>{ + message.destroy() + message.error(err.data.msg) + }) + } + }) + } //修改状态窗口 const handleOperate = (record) => { dialog({ @@ -1742,7 +1776,7 @@ const column = ref([ "2": "审核中", "3": "审核通过", '4': '审核拒绝', - '5': '待提交', + '5': '停用', }[value.record.status + ""] || "" : "-"} @@ -1866,7 +1900,8 @@ const column = ref([ handleLook, orgSplit, cancel, - // deleteModal, + deleteModal, + updateModal, handleModify, // closeDeleteTeacher, createTeacherDialog,