讲师管理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 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}`)
//撤回培训发生组织

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?.three||'-'}}</a-descriptions-item>
<a-descriptions-item label="状态">
{{{1:'待审核', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}}
{{{1:'待提交', 2:'审核中',3: '已完成',4: '审核失败',5:'待审核'}[formData?.status]}}
</a-descriptions-item>
</a-descriptions>
</div>
@@ -74,17 +74,20 @@
</a-tabs>
</div>
</div>
<!-- <div class="btnn">
<button class="btn2" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div> -->
<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="confirm">撤销编辑内容</button>
</div>
</div>
</a-drawer>
</template>
<script setup lang="jsx">
import {defineEmits, defineProps, ref,watch} from "vue";
import dialog from '@/utils/dialog'
import * as api from '@/api/Lecturer'
import { message } from 'ant-design-vue';
const props = defineProps({
id: {
type: String,
@@ -131,7 +134,7 @@ const columns = [
customRender: ({text})=>{
switch (text) {
case 1:
return <span>审核</span>;
return <span>提交</span>;
case 2:
return <span>审核中</span>;
case 3:
@@ -213,18 +216,21 @@ const lookList = (record) => {
}
const visible = ref(false);
watch(visible, (val)=>{
console.log(val,'val',props.id)
if(val){
threeList.value = false
api.getAffiliationById(props.id).then(res=>{
console.log(res,'resssss')
formData.value = res.data.data
formData.value.act = filterList(formData.value.affiliationUserList,0)
formData.value.one = filterList(formData.value.affiliationUserList,1)
formData.value.two = filterList(formData.value.affiliationUserList,2)
formData.value.three = filterList(formData.value.affiliationUserList,3)
formData.value.tableData = res.data.data.affiliationOrgList
// formData.value.tableDataTwo = res.data.data.affiliationOrgList
if(res.data.code == 200){
formData.value = res.data.data
formData.value.act = filterList(formData.value.affiliationUserList,0)
formData.value.one = filterList(formData.value.affiliationUserList,1)
formData.value.two = filterList(formData.value.affiliationUserList,2)
formData.value.three = filterList(formData.value.affiliationUserList,3)
formData.value.tableData = 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 = () => {
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 change = (val)=>{
console.log(val,'val')
@@ -319,7 +342,7 @@ function openDrawer() {
.btn2 {
cursor: pointer;
width: 100px;
width: 120px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;

View File

@@ -132,7 +132,7 @@
</div>
<span class="line"></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?.trainOrgName||'-'}}</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>
<div style="padding-bottom:70px">
<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>
</div>
</a-tab-pane>
@@ -712,6 +712,7 @@
}
}
const tableDataExamine = ref([])
const tableDataExamineTwo = ref([])
const gettableDataExamine = () => {
state.examinetableLoading = true
queryExpnseByBillId({
@@ -977,6 +978,7 @@
columnsExamineTwo,
tableData,
tableDataExamine,
tableDataExamineTwo,
seeDateChange,
changePagination,
addTeacher,

View File

@@ -35,7 +35,7 @@
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<a-space >
<lockLecturer :id="record.id" :title="'培训发生组织详情'">
<lockLecturer :id="record.id" :title="'培训发生组织详情'" @searchList="searchList">
<div style="color: #1890ff;cursor: pointer;">查看</div>
</lockLecturer>
<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;
getTableDate();
};
const searchList = (val)=>{
getTableDate();
}
//重置
const searchReset = () => {
state.searchParam = {
@@ -735,6 +738,7 @@ const getTableDate = (obj) => {
PlaceOfPayListTwo,
placeData,
searchReset,
searchList,
deleteModal,
updateModal,
cancelTeacherDialog,