讲师管理bug

This commit is contained in:
zhangsir
2024-11-29 15:46:28 +08:00
parent deab68f634
commit cac6535256
4 changed files with 50 additions and 19 deletions

View File

@@ -61,6 +61,8 @@ export const getUnSelectOrg = () => http.get(`/admin/affiliation/getUnSelectOrg`
export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliationCode') export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliationCode')
//查看或编辑回显培训发生组织 //查看或编辑回显培训发生组织
export const getAffiliationById = (id) => http.get(`/admin/affiliation/queryById?id=${id}`) export const getAffiliationById = (id) => http.get(`/admin/affiliation/queryById?id=${id}`)
//恢复培训发生组织的数据
export const recovery = (id) => http.post(`/admin/affiliation/recovery?id=${id}`)
//删除培训发生组织 //删除培训发生组织
export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id=${id}`) export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id=${id}`)
//撤回培训发生组织 //撤回培训发生组织

View File

@@ -32,7 +32,7 @@
<a-descriptions-item v-if="formData?.isParent==1" label="二级审批人">{{formData?.two||'-'}}</a-descriptions-item> <a-descriptions-item v-if="formData?.isParent==1" label="二级审批人">{{formData?.two||'-'}}</a-descriptions-item>
<a-descriptions-item v-if="formData?.isParent==1" label="三级审批人">{{formData?.three||'-'}}</a-descriptions-item> <a-descriptions-item v-if="formData?.isParent==1" label="三级审批人">{{formData?.three||'-'}}</a-descriptions-item>
<a-descriptions-item label="状态"> <a-descriptions-item label="状态">
{{{1:'待审核', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}} {{{1:'待提交', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}}
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
</div> </div>
@@ -74,17 +74,20 @@
</a-tabs> </a-tabs>
</div> </div>
</div> </div>
<!-- <div class="btnn"> <div class="btnn" v-if="formData?.status==1||formData?.status==4">
<button class="btn2" @click="closeDrawer">取消</button> <!-- <button class="btn2" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button> <button class="btn2" @click="closeDrawer">确定</button> -->
</div> --> <button class="btn2" @click="confirm">撤销编辑内容</button>
</div>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {defineEmits, defineProps, ref,watch} from "vue"; import {defineEmits, defineProps, ref,watch} from "vue";
import dialog from '@/utils/dialog'
import * as api from '@/api/Lecturer' import * as api from '@/api/Lecturer'
import { message } from 'ant-design-vue';
const props = defineProps({ const props = defineProps({
id: { id: {
type: String, type: String,
@@ -131,7 +134,7 @@ const columns = [
customRender: ({text})=>{ customRender: ({text})=>{
switch (text) { switch (text) {
case 1: case 1:
return <span>审核</span>; return <span>提交</span>;
case 2: case 2:
return <span>审核中</span>; return <span>审核中</span>;
case 3: case 3:
@@ -213,11 +216,10 @@ const lookList = (record) => {
} }
const visible = ref(false); const visible = ref(false);
watch(visible, (val)=>{ watch(visible, (val)=>{
console.log(val,'val',props.id)
if(val){ if(val){
threeList.value = false threeList.value = false
api.getAffiliationById(props.id).then(res=>{ api.getAffiliationById(props.id).then(res=>{
console.log(res,'resssss') if(res.data.code == 200){
formData.value = res.data.data formData.value = res.data.data
formData.value.act = filterList(formData.value.affiliationUserList,0) formData.value.act = filterList(formData.value.affiliationUserList,0)
formData.value.one = filterList(formData.value.affiliationUserList,1) formData.value.one = filterList(formData.value.affiliationUserList,1)
@@ -225,6 +227,10 @@ watch(visible, (val)=>{
formData.value.three = filterList(formData.value.affiliationUserList,3) formData.value.three = filterList(formData.value.affiliationUserList,3)
formData.value.tableData = res.data.data.affiliationOrgList formData.value.tableData = res.data.data.affiliationOrgList
// formData.value.tableDataTwo = res.data.data.affiliationOrgList // formData.value.tableDataTwo = res.data.data.affiliationOrgList
}
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
}) })
} }
}) })
@@ -234,6 +240,23 @@ const filterList = (val,index) => {
const closeDrawer = () => { const closeDrawer = () => {
visible.value = false; visible.value = false;
}; };
const confirm = () => {
dialog({
content: "您确定撤销编辑吗?撤销后将恢复到'已完成”前状态,且无法恢复。请谨慎操作。",
ok: () => {
api.recovery(props.id).then(res=>{
if(res.data.code == 200){
message.success("撤销成功")
visible.value = false;
emit('searchList',true)
}
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
}
})
}
const activeKey = ref("1"); const activeKey = ref("1");
const change = (val)=>{ const change = (val)=>{
console.log(val,'val') console.log(val,'val')
@@ -319,7 +342,7 @@ function openDrawer() {
.btn2 { .btn2 {
cursor: pointer; cursor: pointer;
width: 100px; width: 120px;
height: 40px; height: 40px;
background: #4ea6ff; background: #4ea6ff;
border-radius: 8px; border-radius: 8px;

View File

@@ -132,7 +132,7 @@
</div> </div>
<span class="line"></span> <span class="line"></span>
<span>讲师费用详情</span> <span>讲师费用详情</span>
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter"> <a-descriptions style="margin-top:16px" bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="审批编号">{{formParam?.approvalNumber||'-'}}</a-descriptions-item> <a-descriptions-item label="审批编号">{{formParam?.approvalNumber||'-'}}</a-descriptions-item>
<a-descriptions-item label="培训发生组织">{{formParam?.trainOrgName||'-'}}</a-descriptions-item> <a-descriptions-item label="培训发生组织">{{formParam?.trainOrgName||'-'}}</a-descriptions-item>
<a-descriptions-item v-if="activeKey==2" label="汇总周期" >{{formParam?.summaryDate||'-'}}</a-descriptions-item> <a-descriptions-item v-if="activeKey==2" label="汇总周期" >{{formParam?.summaryDate||'-'}}</a-descriptions-item>
@@ -167,7 +167,7 @@
<a-tab-pane key="2" tab="讲师费审批记录" force-render> <a-tab-pane key="2" tab="讲师费审批记录" force-render>
<div style="padding-bottom:70px"> <div style="padding-bottom:70px">
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columnsExamineTwo" <a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columnsExamineTwo"
:data-source="tableDataExamine" :loading="examinetableLoading" @expand="expandTable" :pagination="pagination"> :data-source="tableDataExamineTwo" :loading="examinetableLoading" @expand="expandTable" :pagination="pagination">
</a-table> </a-table>
</div> </div>
</a-tab-pane> </a-tab-pane>
@@ -712,6 +712,7 @@
} }
} }
const tableDataExamine = ref([]) const tableDataExamine = ref([])
const tableDataExamineTwo = ref([])
const gettableDataExamine = () => { const gettableDataExamine = () => {
state.examinetableLoading = true state.examinetableLoading = true
queryExpnseByBillId({ queryExpnseByBillId({
@@ -977,6 +978,7 @@
columnsExamineTwo, columnsExamineTwo,
tableData, tableData,
tableDataExamine, tableDataExamine,
tableDataExamineTwo,
seeDateChange, seeDateChange,
changePagination, changePagination,
addTeacher, addTeacher,

View File

@@ -35,7 +35,7 @@
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <a-space >
<lockLecturer :id="record.id" :title="'培训发生组织详情'"> <lockLecturer :id="record.id" :title="'培训发生组织详情'" @searchList="searchList">
<div style="color: #1890ff;cursor: pointer;">查看</div> <div style="color: #1890ff;cursor: pointer;">查看</div>
</lockLecturer> </lockLecturer>
<a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button> <a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
@@ -447,6 +447,9 @@ const getTableDate = (obj) => {
state.searchParam.pageNo = 1; state.searchParam.pageNo = 1;
getTableDate(); getTableDate();
}; };
const searchList = (val)=>{
getTableDate();
}
//重置 //重置
const searchReset = () => { const searchReset = () => {
state.searchParam = { state.searchParam = {
@@ -735,6 +738,7 @@ const getTableDate = (obj) => {
PlaceOfPayListTwo, PlaceOfPayListTwo,
placeData, placeData,
searchReset, searchReset,
searchList,
deleteModal, deleteModal,
updateModal, updateModal,
cancelTeacherDialog, cancelTeacherDialog,