Files
fe-manage/src/views/lecturer/LecturerApproval.vue
2025-03-04 20:56:14 +08:00

1576 lines
45 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 讲师费审批页面 -->
<template>
<div>
<!-- 搜索框及按钮 -->
<div class="filter">
<a-form layout="inline" style="min-width: 1380px;">
<a-form-item class="select">
<a-select style="width: 235px" v-model:value="searchParam.trainOrgId" placeholder="培训发生组织" allowClear
:options="trainOrglist" v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<a-form-item class="select ">
<!-- <div class="select addTimeBox">
<div class="addTime" >汇总时间</div> -->
<a-range-picker v-model:value="searchdate" style="width: 340px !important;" format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD" separator="至" :placeholder="['汇总时间开始时间', '汇总时间结束时间']"
v-on:keydown.enter="enterPressHadlerSearch" />
<!-- </div> -->
</a-form-item>
<a-form-item class="select">
<a-select style="width: 200px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态"
allowClear :options="AuthenticationStatusList" v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
<!-- <div class="btn btn1" @click="searchReset" style="background:rgba(64, 158, 255, 0);" > -->
<!-- <div class="search"></div> -->
<a-button class="resetbtn " @click="searchReset">重置</a-button>
<!-- 更多筛选-->
<!-- <div v-if="moreid == 1">
<a-button @click="handlemoreid()" class="moreidbtn" type="text"> 展开
<RightOutlined />
</a-button>
</div>
<div v-if="moreid == 2">
<a-button @click="handlemoreid()" class="moreidbtn"> 返回
<UpOutlined />
</a-button>
</div> -->
</div>
<!-- <div style="width:100%"></div> -->
<!-- <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.courseType" placeholder="请选择费用类型" allowClear
:options="courseTypeList">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.type" placeholder="请选择课程类型" allowClear
:options="OnTheJobStatusList">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear
:options="AuthenticationStatusList">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:20px" placeholder="请选择讲师体系" v-model:value="searchParam.kid" allowClear
:options="lecturerSystemList" @change="changetlevel">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:10px" v-model:value="searchParam.levelId" placeholder="请选择讲师级别" allowClear :disabled="getLevelList.length!==0 ? false:true"
:options="getLevelList">
</a-select>
</a-form-item> -->
</a-form>
<!-- <div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="handleExport()" class="resetbtn">
<UploadOutlined /> 导出
</a-button>
<div v-if="moreid == 2" style="line-height: 40px;" >当前页面汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">1,230,490</span>元 当前总汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">9,230,490</span></div>
</div> -->
<!-- 表格 -->
<div>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columns"
:data-source="tableData" :loading="tableLoading" @expand="expandTable" :pagination="false">
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<a-space>
<a-button type="link" v-if="record.status != 2 && record.status != 3" @click="goDdit(record)">提交</a-button>
<a-button type="link" v-if="record.status != 1 && record.status != 5"
@click="() => handleLook(record, String(record.courseform))">查看</a-button>
<!-- <a-button type="link" @click="() => handleOperate(record, String(record.courseform))">审批</a-button> -->
<!-- TODO1 -->
<a-button v-if="record.status == 1 || record.status == 4" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
<!-- <a-button v-if="record.status == 4" type="link" @click="submit(record)">提交</a-button> -->
<a-button v-if="record.status == 2 && false" type="link" @click="withdraw(record)">撤回</a-button>
</a-space>
</template>
</template>
</a-table>
</div>
</div>
<div class="tableBox ">
<div style="float: right;">
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
:hideOnSinglePage="false" :pageSize="searchParam.pageSize" :current="searchParam.pageNo"
:total="tableDataTotal" class="pagination" @change="changePagination" />
</div>
</div>
<!-- 弹窗组件 -->
<!--查看讲师费详情 -->
<a-drawer class="largeDrawerInside" :closable="false" v-model:visible="teachingdialog" placement="right"
@closa="cancelTeachingDialog" width="60%" :title="false">
<div style="padding:24px;">
<div class="headers" style="margin-top:-24px;">
<div class="headerTitle">汇总讲师费详情</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="cancelTeachingDialog" />
</div>
<span class="line"></span>
<span style="font-weight:600;">基本信息</span>
<a-descriptions style="margin-top:16px" bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="审批编号">
<div style="user-select:text">{{ formParam?.approvalNumber || '-' }}</div>
</a-descriptions-item>
<a-descriptions-item label="培训发生组织">
<div style="user-select:text">{{ formParam?.trainOrgName || '-' }}</div>
</a-descriptions-item>
<a-descriptions-item label="汇总时间">{{ formParam?.summaryTime || '-' }}</a-descriptions-item>
<a-descriptions-item
label="汇总金额">{{ formParam?.summaryTotal ? formParam?.summaryTotal + '元' : '-' }}</a-descriptions-item>
<a-descriptions-item label="提交时间">{{ formParam?.approvalSubmitTime || '-' }}</a-descriptions-item>
<a-descriptions-item label="状态">{{ {
0: '待确认', 1: '待提交', 2: '审核中', 3: '审核通过',
4: '审核拒绝', 5: '待提交'
}[formParam?.status]}}</a-descriptions-item>
</a-descriptions>
<!-- <span>审批详情</span> -->
<!-- <span class="line" style="margin-top:15px;"></span> -->
<a-tabs v-model:activeKey="activeKey" @change="tabsChange">
<a-tab-pane key="1" tab="讲师费列表">
<div style="padding: 10px 0;">
<div style="display: flex;margin-bottom: 20px;">
<div style="margin-right:20px;">
<a-input @pressEnter="searchTeacherFeeApprovalList()" style="height:40px;border-radius:8px;"
v-model:value="userNoOrName" placeholder="请输入工号/讲师名称进行搜索" />
</div>
<div style="margin-right:20px;">
<a-range-picker style="height:40px;border-radius:8px;" @change="seeDateChange"
valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="seeDateValue" />
</div>
<div style="margin-right:20px;">
<a-button style="margin-right:15px;height:40px;border-radius:8px;" type="primary"
@click="searchTeacherFeeApprovalList()">搜索</a-button>
<a-button style="margin-right:15px;height:40px;border-radius:8px;" type="primary"
@click="resetSearch()">重置</a-button>
</div>
</div>
<div style="padding-bottom:70px">
<a-table :scroll="{ x: 'max-content' }" :header-cell-style="{ 'text-align': 'center' }"
style="border: 1px solid #f2f6fe" :columns="columnsExamine" :data-source="tableDataExamine"
:loading="examinetableLoading" @expand="expandTable" :pagination="pagination">
</a-table>
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="讲师费审批记录" force-render v-if="false">
<div style="padding-bottom:70px">
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe"
:columns="columnsExamineTwo" :data-source="tableDataExamineTwo" :loading="tableDataExamineLoading"
@expand="expandTable" :pagination="false">
</a-table>
</div>
</a-tab-pane>
</a-tabs>
<div v-if="formParam?.status == 1 || formParam?.status == 5" :style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
}">
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog(1)" :loading="buttonLoading">提交
</a-button>
<!-- <a-button class="drabtn" @click="cancelTeachingDialog" type="primary" danger>拒绝</a-button> -->
</div>
</div>
</a-drawer>
<!-- 修改状态功能弹窗 -->
<div>
<a-modal v-model:visible="editTeacher" :footer="null" :closable="close" wrapClassName="" centered="true">
<div class="delete" style="width:500px">
<div class="del_header"></div>
<div class="del_main">
<div class="header">
<div class="icon1"></div>
<span>提示</span>
</div>
<a-form style="margin-left:20px; margin-top:10px ">
<a-form-item label="审批">
<a-radio-group v-model:value="formParamstatues.status">
<a-radio value="S20">同意</a-radio>
<a-radio value="E10">拒绝</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="备注">
<a-textarea v-model:value="formParamstatues.remark"
style="width: 90%; height: 100px; border-radius: 8px ;" placeholder="一旦拒绝 备注变为必填" />
</a-form-item>
</a-form>
<div class="del_btnbox">
<div class="del_btn btn2" @click="cancelTeachingDialog" style="margin-right: 32px">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="closehandleOperate">
<div class="btnText">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
</div>
<!-- <div> <Upload/> </div> -->
<LecturerAppEdit @example="getExample" @successParams="successParams" v-model:visible="editTeacherDialog"
:id="editId">
</LecturerAppEdit>
<div class="example" v-if="example">
<a-spin />
</div>
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref, watch, watchEffect, computed, onMounted, onUpdated} from "vue";
import { useRouter } from "vue-router";
import { message } from "ant-design-vue";
import dayjs from "dayjs";
import dialog from '@/utils/dialog'
import {
RightOutlined,
UpOutlined,
UploadOutlined,
FolderAddOutlined,
DownloadOutlined
} from '@ant-design/icons-vue';
import ProjectManager from "@/components/project/ProjectManagerNew";
import { expenseBillList, queryById, queryExpnseByBillId, updateTeacherFee, updateStatusSubmit, approveTeacherFee, getTrainOrg, isConfirm , expenseBillDelById} from "../../api/lecturerFeeManagement";
import { getTeacherSystemList, getApprovalResultByBusinessIdList } from "../../api/Lecturer";
import { queryTrainOrgPor, } from "../../api/organization";
// lecturerFeeManagement
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
import LecturerAppEdit from "./LecturerAPPEdit"
export default {
name: "LecturerApproval",
components: {
RightOutlined, //图标--展开
UpOutlined,//图标--收起
UploadOutlined,//图标--导出
DownloadOutlined,//图标-导入
FolderAddOutlined,//图标--新增
ProjectManager,
LecturerAppEdit,
},
props: {
activeKeyProps: String,
},
setup(props) {
onMounted(() => {
console.log("props.activeKeyProps",props.activeKeyProps)
// const search = sessionStorage.getItem('searchApprlval')
// console.log(search,'search')
// if(search){
// state.searchParam = JSON.parse(search)
// state.searchdate = state.searchParam.searchdate
// }
getTableDate()
})
const router = useRouter()
const state = reactive({
example: false,
editId: null,
editTeacherDialog: false,
tableDataExamineLoading: false,
tableDataExamineTwo: [],
tableDataParams: {
pageNo: 1,
pageSize: 10,
total: 0,
},
userNoOrName: null,
seeDateValue: [],
seeBegin: null,
seeEnd: null,
activeKey: '1',
moreid: 1,
byPid: null,
currentPage1: 1,
pageSize1: 10,
promotionrecordsLoading: false, //晋级记录遮罩层
teacherrecordsLoading: false,// 授课记录遮罩层
tableLoading: false,
examinetableLoading: false,
tagsshow: "1",
delTeacherId: null, //删除id确认
newStatus: null, //修改状态码确认
id: null, //内部讲师工号确认
lookTeacherId: null, //内部讲师详情id确认
// deleteInTeacherdialog: false, //删除弹窗
editTeacher: false, //修改状态弹窗
handleOperate1: null, //修改状态弹窗内容
teacherdialog1: null,
teachingdialog: false, //控制讲师弹窗
teacherdialogtitle: '',//讲师弹框title内容
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
pageSize: 10,
tableDataTotal: -1,//table列表总条数
formParam: {
beginTime: null,
defaultTeachingTime: "0",
},
formParamstatues: {
status: 'S20',
remark: null,
id: null,
},
searchdate: null, //选择时间
searchParam: {
teacherNo: null,
teacherName: null,
trainOrgId: null,
id: null,
levelId: null,
courseType: null,
certStatus: null,
salaryName: null,
payrollPlaceId: null,
status: null,
pageNo: "1",
pageSize: "10",
beginTime: null,
endTime: null,
},
})
//费用类型
const courseTypeList = ref([
{ value: 1, label: "课程开发" },
{ value: 2, label: "作业人员入模培训" },
{ value: 3, label: "其他" },
])
const lecturerSystemList = ref([
]);
///获取讲师体系列表
const LecturerSystemLista = () => {
// console.log('点击了LecturerSystemLista')
getTeacherSystemList().then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
arr?.map((value) => {
let obj = {
value: value.kid,
label: value.systemName,
};
array.push(obj);
});
lecturerSystemList.value = array;
}
})
}
// LecturerSystemLista()
const trainOrglist = ref([])
//获取培训发生组织
const trainOrglista = () => {
let obj = {
pageNo: "1",
pageSize: "10000"
}
queryTrainOrgPor(obj).then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
arr.map((value) => {
let obj = {
value: value.id,
label: value.affiliationName,
};
array.push(obj);
});
trainOrglist.value = array;
trainOrglist.value.unshift({
value: '',
label: "全部"
})
}
})
}
trainOrglista()
//课程类型
const OnTheJobStatusList = ref([
{ value: 1, label: "项目开课" },
{ value: 2, label: "路径开课" },
{ value: 3, label: "面授开课" },
])
//认证状态0待确认 1待提交 2审核中 3审核通过 4.审核拒绝
const AuthenticationStatusList = ref([
{ value: '', label: "全部" },
{ value: 1, label: "待提交" },
{ value: 2, label: "审核中" },
{ value: 4, label: "审核拒绝" },
{ value: 3, label: "已审核" },
])
//状态
const AccountStatusList = ref([
{ value: "A10", label: "待审核", },
{ value: "A20", label: "已提交", },
{ value: "A30", label: "审核中", },
{ value: "E10", label: "审核打回", },
{ value: "S20", label: "审核通过", },
])
//切换筛选
const handlemoreid = () => {
if (state.moreid == 1) {
state.moreid = 2
}
else if (state.moreid == 2) {
state.moreid = 1
state.searchParam.certStatus = null
state.searchParam.salaryName = null
state.searchParam.payrollPlaceId = null
state.searchParam.status = null
}
}
//新增页面内部姓名
const infoteacherList = ref([
// { value: 0, systemName: "讲师体系" },
]);
const getinfoteacher = () => {
// state.tableLoading=true
// ()
// .then((res) => {
// infoteacherList.value = res.data.data.records
// })
};
const columns = ref([
{
title: '培训发生组织 ',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
ellipsis: true, align: "center",
width: 200,
customCell: () => { return { style: { userSelect: 'text' } } }
},
{
title: '汇总时间 ',
dataIndex: 'summaryTime',
key: 'summaryTime',
ellipsis: true,
align: "center",
width: 200
},
{
title: '汇总金额 ',
dataIndex: 'summaryTotal',
key: 'summaryTotal',
ellipsis: true,
align: "center",
width: 200,
customRender: ({ text }) => {
return text ? text + '元' : '-'
}
},
{
title: '提交时间',
dataIndex: 'approvalSubmitTime',
key: 'approvalSubmitTime',
ellipsis: true, align: "center",
width: 200,
customRender: ({ text, record }) => {
return text ? text : '-'
}
},
{
title: '状态 ',
dataIndex: 'status',
key: 'status',
ellipsis: true,
align: "center",
width: 120,
// customCell: (record) => {return{style:{color:['#67C23A','#F56C6C'][record.status]}}},
customRender: (value) => {
switch (value.record.status) {
case 0:
return "待确认 "
case 1:
return "待提交"
case 2:
return "审核中"
case 3:
return "审核通过"
case 4:
return "审核拒绝"
case 5:
return "待提交"
default:
return "-"
}
}
},
{
title: '操作 ',
dataIndex: 'operation',
key: 'operation',
ellipsis: true, align: "center",
fixed: "right",
width: 120,
scopedSlots: { customRender: "action" },
},
])
//列表数据
const tableData = ref([
])
// 搜索
const searchSubmit = () => {
state.searchParam.pageNo = 1;
getTableDate();
// sessionStorage.removeItem('searchApprlval')
};
//重置
const searchReset = () => {
state.searchdate = null,
state.searchParam = {
endTime: null,
beginTime: null,
teacherNo: null,
id: null,
levelId: null,
courseType: null,
certStatus: null,
salaryName: null,
payrollPlaceId: null,
status: null,
pageNo: 1,
pageSize: 10,
};
getTableDate();
// sessionStorage.removeItem('searchApprlval')
};
// //修改时间
// function searchTimeChange(time, timeStr) {
// let startTime = timeStr[0]
// let endTime = timeStr[1] ;
// state.startTime = new Date(startTime).getTime();
// state.endTime = new Date(endTime).getTime();
// // state.searchParam.beginTime = new Date(beginTime).getTime() ;
// // state.searchParam.endTime = new Date(endTime).getTime() ;
// state.searchParam.beginTime = state.startTime ? state.startTime : null,
// state.searchParam.endTime = state.endTime ? state.endTime : null
// }
// List接口数据
const getTableDate = (obj) => {
console.log("执行 getTableDate")
state.tableLoading = true
let objA = { ...state.searchParam };
objA.beginTime = state.searchdate ? dayjs(state.searchdate[0]).format("YYYY-MM-DD") : "",
objA.endTime = state.searchdate ? dayjs(state.searchdate[1]).format("YYYY-MM-DD") : "",
expenseBillList(objA)
.then((res) => {
tableData.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total);
state.tableLoading = false
}).catch(err => {
state.tableLoading = false
message.destroy()
message.error(err.data.msg)
})
};
// getTableDate()
// // 翻页
const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page;
// state.pageNo = page;
state.searchParam.pageSize = pageSize;
getTableDate();
};
// 新增讲师
const addTeacher = () => {
state.teachingdialog = true;
state.teacherdialogtitle = '添加讲师费'
}
//修改状态窗口
const handleOperate = (record) => {
state.editTeacher = true
state.formParamstatues.id = record.id
};
//提交
const closehandleOperate = () => {
approveTeacherFee(state.formParamstatues).then((res) => {
message.success("审批成功");
state.editTeacher = false
getTableDate();
})
}
//取消按钮 清空输入的数据
const cancelTeachingDialog = (val) => {
if (state.teachingdialog = true) {
if (val == 1) {
submit(state.formParam)
return
}
state.teachingdialog = false
cancel()
}
state.deleteInTeacherdialog = false
state.editTeacher = false
};
//清空数据
const cancel = () => {
state.formParam = {
teacher: null,
teacherNo: null,
departId: null,
id: null,
courseName: 0,
levelId: null,
payrollPlaceId: null,
// 费用类型 : null
teacherpayrollPlace: null,
teachingDate: null,
defaultTeachingTime: 0,
courseType: null,
studys: null,
teacherlevelPay: null,
score: null,
trainOrg: null,
payableExpense: null,
expense: null,
remark: null,
}
}
const goDdit = (record) => {
state.editTeacherDialog = true
state.editId = record.id
// state.searchParam.searchdate = state.searchdate
// sessionStorage.setItem('searchApprlval', JSON.stringify(state.searchParam))
// router.push({
// path:'/LecturerAppEdit',
// query:{
// id: record.id
// }
// })
}
//表格内查看数据操作
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) => {
dialog({
content: '请仔细核对讲师费信息,确认无误后,将自动进入(BPM系统)审批流程',
ok: () => {
isConfirm({
id: record.id,
status: 2
}).then(res => {
if (res.data.code == 200) {
message.success('提交成功')
getTableDate();
cancel()
state.teachingdialog = false
}
}).catch(err => {
message.destroy()
cancel()
state.teachingdialog = false
message.error(err.data.msg)
})
}
})
}
const successParams = () => {
getTableDate();
}
const getExample = (val) => {
state.example = val
}
const withdraw = (record) => {
dialog({
content: '确定要撤回此条数据吗?',
ok: () => {
isConfirm({
id: record.id,
status: 1
}).then(res => {
if (res.data.code == 200) {
message.success('撤回成功')
getTableDate();
}
}).catch(err => {
message.destroy()
message.error(err.data.msg)
})
}
})
}
//详情
const TeacherSystem = () => {
queryById({ id: state.id }).then((res) => {
// state.formParam=Object.assign({} ,res.data.data)
state.formParam = res.data.data
})
.catch((err) => {
console.log("详情", err);
});
}
const searchTeacherFeeApprovalList = () => {
state.tableDataParams.pageNo = 1
gettableDataExamine()
}
const resetSearch = () => {
state.userNoOrName = null
state.seeDateValue = []
state.seeBegin = null
state.seeEnd = null
searchTeacherFeeApprovalList()
}
const seeDateChange = (e) => {
if (e) {
state.seeBegin = e[0]
state.seeEnd = e[1]
} else {
state.seeBegin = null
state.seeEnd = null
}
}
const tableDataExamine = ref([])
const gettableDataExamine = () => {
state.examinetableLoading = true
queryExpnseByBillId({
billId: state.id,
pageNo: state.tableDataParams.pageNo,
pageSize: state.tableDataParams.pageSize,
name: state.userNoOrName,
startTime: state.seeBegin,
endTime: state.seeEnd
}).then((res) => {
tableDataExamine.value = res.data.data.records
state.tableDataParams.total = Number(res.data.data.total);
state.examinetableLoading = false
}).catch(err => {
state.examinetableLoading = false
message.error(err.data.msg)
})
};
const pagination = computed(() => ({
total: state.tableDataParams.total,
showSizeChanger: true,
showQuickJumper: true,
current: state.tableDataParams.pageNo,
pageSize: state.tableDataParams.pageSize,
onChange: paginationChange,
}));
const paginationChange = (e, pageSize) => {
state.tableDataParams.pageNo = e;
state.tableDataParams.pageSize = pageSize
gettableDataExamine();
};
//TODO1
const deleteModal = (record) => {
dialog({
content: '是否确认进行删除?',
ok: () => {
expenseBillDelById(record.id).then(res => {
if (typeof (res.data.data) != 'object') {
message.success('删除成功')
message.error(res.data.data)
return
}
message.success("删除成功");
searchSubmit()
}).catch(err => {
message.destroy()
message.error(err.data.msg)
})
}
})
}
const columnsExamineTwo = ref([
{
title: '审批层级 ',
dataIndex: 'levelName',
key: 'levelName',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '层级审批人 ',
dataIndex: 'employeeNames',
key: 'employeeNames',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '操作 ',
dataIndex: 'approvalStatus',
key: 'approvalStatus',
ellipsis: true,
align: "center",
width: 120,
customRender: ({ text }) => {
switch (text) {
case -1:
return <span>未处理</span>;
case 3:
return <span>通过</span>;
case 4:
return <span>拒绝</span>;
default:
return <span>-</span>;
}
}
},
{
title: '审批人 ',
dataIndex: 'employeeName',
key: 'employeeName',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '审批时间 ',
dataIndex: 'approvalTime',
key: 'approvalTime',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '审批建议 ',
dataIndex: 'approvalMsg',
key: 'approvalMsg',
ellipsis: true,
align: "center",
width: 120,
customRender: ({ text }) => {
return text || '-'
}
},
])
//二级页面
const columnsExamine = ref([
{
title: '讲师姓名 ',
dataIndex: 'name',
key: 'name',
ellipsis: true,
align: "center",
width: 180,
customRender: (value) => {
return (
<div style="user-select:text">
{ value.record?.name } / { value.record?.userNo }
</div>
);
},
},
// {
// title: '讲师工号 ',
// dataIndex: 'userNo',
// key: 'userNo',
// ellipsis: true,
// align: "center",
// width: 120,
// },
{
title: '课程名称 ',
dataIndex: 'courseName',
key: 'courseName',
ellipsis: true,
align: "center",
width: 200,
customCell: () => { return { style: { userSelect: 'text' } } }
},
{
title: '培训发生组织',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
ellipsis: true,
align: "center",
width: 120,
customCell: () => { return { style: { userSelect: 'text' } } }
},
{
title: '授课时长 ',
dataIndex: 'teachingTime',
key: 'teachingTime',
ellipsis: true,
align: "center",
width: 120,
customRender: (value) => {
return (
<div>
{ (value.record?.teachingTime / 60).toFixed(2) }小时
</div>
)
}
},
{
title: '授课时间 ',
dataIndex: 'teachingDate',
key: 'teachingDate',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '讲师体系',
dataIndex: 'tsystemName',
key: 'tsystemName',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '讲师级别 ',
dataIndex: 'tlevelName',
key: 'tlevelName',
ellipsis: true,
align: "center",
width: 120,
},
{
title: '发薪地 ',
dataIndex: 'payrollPlace',
key: 'payrollPlace',
ellipsis: true,
align: "center",
width: 120,
customRender: ({ text }) => {
return text || '-'
}
},
{
title: '基准课酬 ',
dataIndex: 'levelPay',
key: 'levelPay',
ellipsis: true,
align: "center",
width: 120,
customRender: ({ text }) => {
return text || text == 0 ? text + '元' : '-';
}
},
{
title: '计划费用 ',
dataIndex: 'expense',
key: 'expense',
ellipsis: true,
align: "center",
width: 120,
customRender: ({ text }) => {
return text ? text + '元' : '-';
}
},
{
title: '参训人数 ',
dataIndex: 'studys',
key: 'studys',
ellipsis: true,
align: "center",
width: 120,
customRender: ({ text }) => {
return text ? text + '人' : '-';
}
},
{
title: '评分 ',
dataIndex: 'score',
key: 'score',
ellipsis: true,
align: "center",
width: 120,
customRender: (value) => {
return (
<div>
{ value.record.score ? Number(value.record.score).toFixed(0) == 0 ? '-' : Number(value.record.score).toFixed(2) + '分' : '-' }
</div>
)
}
},
{
title: '课程类型 ',
dataIndex: ' courseType',
key: ' courseType',
ellipsis: true,
align: "center",
width: 120,
customRender: (value) => {
return (
<div>
{ String(value.record.courseType)
? {
"0": "在线课",
"1": "面授课",
"2": "课程开发",
"3": "作业员入模培训",
"4": "其他",
}[value.record.courseType + ""]
: "-" }
</div>
)
}
},
])
function managerChange(e, l, d, t, orgName) {
state.searchParam.teacherNo = d;
state.searchParam.teacherName = t;
// state.searchParam.trainorgName=orgName
}
//导出功能
const handleExport = () => {
window.open(
`${process.env.VUE_APP_BASE_API}/teachez/fee/exportTeacherFee?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&trainOrgId=${state.searchParam.trainOrgId ? state.searchParam.trainOrgId : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}&beginTime=${state.searchParam.beginTime ? state.searchParam.beginTime : ""}&endTime=${state.searchParam.endTime ? state.searchParam.endTime : ""}`
);
// this.download('lesson_records/export', {
// ...state.searchParam
// }, `project_${new Date().getTime()}.xlsx` )
}
//回车
const enterPressHadlerSearch = e => {
if (e.keyCode === 13) {
searchSubmit()
}
}
//TODO1
// watchEffect(() => {
// console.log('Item changed:', props.activeKeyProps);
// if(props.activeKeyProps == 2){
// state.searchParam.pageNo = 1;
// getTableDate()
// }
// // 在这里你可以根据 props.item 进行一些操作
// });
return {
...toRefs(state),
enterPressHadlerSearch,
// searchTimeChange,
gettableDataExamine,
courseTypeList,
managerChange,
trainOrglist,
trainOrglista,
handlemoreid,
handleExport,
lecturerSystemList,
OnTheJobStatusList,
AuthenticationStatusList,
AccountStatusList,
searchSubmit,
searchReset,
columns,
columnsExamine,
columnsExamineTwo,
tableData,
tableDataExamine,
seeDateChange,
changePagination,
addTeacher,
cancelTeachingDialog,
handleLook,
submit,
getListData,
tabsChange,
withdraw,
successParams,
getExample,
goDdit,
cancel,
handleOperate,
closehandleOperate,
getTableDate, //list接口数据调用
// getStu
LecturerSystemLista,
TeacherSystem,
infoteacherList,
getinfoteacher,
pagination,
paginationChange,
searchTeacherFeeApprovalList,
resetSearch,
paginations,
paginationChanges,
deleteModal
}
},
};
</script>
<style lang="scss" scoped>
.example {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.45);
position: fixed;
top: 0;
left: 0;
z-index: 999999;
display: flex;
justify-content: center;
align-items: center;
}
.select .ant-picker {
width: 410px !important;
}
.headers {
height: 73px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
// background-color: red;
margin-bottom: 20px;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
// margin-left: 24px;
}
}
.addTimeBox {
position: relative;
display: flex;
align-items: center;
.addTime {
position: absolute;
z-index: 1;
margin-left: 10px;
color: rgba(0, 0, 0, 0.4);
}
.ant-picker {
padding-left: 85px;
}
::v-deep .ant-picker-range .ant-picker-active-bar {
margin-left: 85px !important;
}
}
//导出按钮icon
.daochu {
width: 16px;
height: 18px;
background-image: url("../../assets/images/coursewareManage/export1.png");
}
//弹窗内详情样式
.display1 {
display: inline-block;
width: 200px;
}
// .display0{
// display:inline-block ;
// width:200px ;
// text-align:center }
//弹窗内确认取消按钮布局
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
margin-right: 14px;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
}
}
.ant-table-cell-fix-right {
width: 300px !important;
}
.ant-table-tbody>tr>td {
text-align: center;
}
.InsideTeaching {
width: 100%;
height: 100%;
.filter {
margin-left: 38px;
margin-right: 38px;
margin-top: 30px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.select {
margin-right: 20px;
margin-bottom: 10px;
}
}
}
.delete {
z-index: 9999;
width: 424px;
background: #ffffff;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
border-radius: 4px;
position: absolute;
left: 30%;
top: 10%;
// transform: translate(-50%, -50%);
.del_header {
position: absolute;
width: calc(100%);
height: 40px;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.del-icon {
width: 16px;
height: 16px;
margin-right: 10px;
background-image: url(@/assets/images/coursewareManage/notice.png);
background-size: 100% 100%;
}
.icon {
width: 16px;
height: 16px;
margin-right: 10px;
background-image: url(@/assets/images/coursewareManage/QR.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
cursor: pointer;
width: 20px;
height: 20px;
background-image: url(@/assets/images/coursewareManage/close.png);
background-size: 100% 100%;
}
}
.body {
width: 100%;
margin: 34px auto 56px auto;
display: flex;
justify-content: center;
align-items: center;
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
}
}
}
}
.CreatePath {
.out {
z-index: 9999;
display: block;
position: absolute;
top: 90px;
width: 1080px !important;
height: 650px;
overflow: auto;
background-color: #fff;
box-shadow: 0 0 10px rgba(118, 136, 166, 0.21);
left: 50%;
top: 300px;
transform: translate(-50%, -50%);
.top {
width: 100%;
height: 68px;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
display: flex;
align-items: center;
.topimg {
width: 18px;
height: 18px;
margin-left: 27px;
margin-top: -2px;
}
.topc {
color: #000000;
font-size: 16px;
margin-left: 8px;
}
}
.mid {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.d {
// margin-top: 8px;
// color: #ff4e4e;
margin-left: -5px;
}
}
}
}
//添加样式
.langbtn {
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
}
// 重置样式
.resetbtn {
width: 100px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
}
//展开收起样式
.moreidbtn {
border: none;
color: #4ea6ff;
width: 80px
}
//小竖线
.line {
float: left;
width: 3px;
height: 17px;
background: #4ea6ff;
border-radius: 30%;
margin-right: 5px;
margin-top: 3px;
}
//抽屉功能
.drawaer // /* 改变所有 a-tree-select 输入框的高度 */
// ::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{
// height: 40px;
// line-height: 40px;
// border-radius: 8px
// /* 确保文字垂直居中 */
// }
::v-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
height: 40px !important;
line-height: 40px;
border-radius: 8px
}
// 抽屉内样式
.draitem {
width: 100%;
height: 40px !important;
border-radius: 8px;
line-height: 40px;
}
.drabtn {
height: 40px;
width: 80px;
border-radius: 8px;
margin-right: 20px
}
::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector {
border-radius: 8px;
height: 40px;
}
.ant-col-12 {
height: 90px;
}
::v-deep .ant-select-selection-overflow-item {
margin-top: -2px;
}
::v-deep .ant-select-multiple .ant-select-selection-item {
height: 34px
}
.tableBox {
padding-bottom: 20px;
margin: 20px 38px 30px;
::v-deep .ant-select-dropdown {
display: inline-block;
}
::v-deep .ant-select-selection-item {
margin-left: 3px;
}
::v-deep .ant-pagination-options-size-changer.ant-select {
width: 84px;
}
.pa {
width: 100%;
display: flex;
justify-content: right;
}
}
</style>