讲师管理bug

This commit is contained in:
zhangsir
2024-11-22 18:13:32 +08:00
parent ad64f71b38
commit fa05be699c
8 changed files with 294 additions and 165 deletions

View File

@@ -16,7 +16,7 @@
</div> </div>
<div class="content"> <div class="content">
<div class="box"> <div class="box">
<div style="margin-bottom: 20px;font-size: 18px;font-weight: 700;">选择讲师费汇总:<span style="color:red;margin-left:20px;">{{levelPay||0}}</span></div> <div style="margin-bottom: 20px;font-size: 18px;font-weight: 700;">选择讲师费汇总:<span style="color:red;margin-left:20px;">{{payableExpense||0}}</span></div>
<div class="table"> <div class="table">
<a-table <a-table
:columns="columns" :columns="columns"
@@ -86,14 +86,14 @@ const addList = (item) => {
selectedRowKeys.value.push(item.id) selectedRowKeys.value.push(item.id)
selectsData.value.push(item) selectsData.value.push(item)
} }
const levelPay = ref(0) const payableExpense = ref(0)
watch(()=>selectsData.value.length,(val)=>{ watch(()=>selectsData.value.length,(val)=>{
if(val){ if(val){
levelPay.value = selectsData.value.reduce((a,b)=>{ payableExpense.value = selectsData.value.reduce((a,b)=>{
return a + b.levelPay return a + b.payableExpense
},0) },0)
}else{ }else{
levelPay.value = 0 payableExpense.value = 0
} }
}) })
const removeList = (item) => { const removeList = (item) => {
@@ -115,35 +115,51 @@ const columns = [
}, },
{ {
title: '所属组织', title: '所属组织',
dataIndex: 'name', dataIndex: 'orgName',
key: 'name', key: 'orgName',
align: 'center', align: 'center',
}, },
{ {
title: '讲师体系', title: '讲师体系',
dataIndex: 'name', dataIndex: 'tsystemName',
key: 'name', key: 'tsystemName',
align: 'center', align: 'center',
}, },
{ {
title: '讲师等级', title: '讲师等级',
dataIndex: 'name', dataIndex: 'tlevelName',
key: 'name', key: 'tlevelName',
align: 'center', align: 'center',
}, },
{ {
title: '发薪地', title: '发薪地',
dataIndex: 'name', dataIndex: 'payrollPlace',
key: 'name', key: 'payrollPlace',
align: 'center', align: 'center',
}, },
{ {
title: '课程类型', title: '课程类型',
dataIndex: 'name', dataIndex: 'courseType',
key: 'name', key: 'courseType',
align: 'center', align: 'center',
customRender: ({ text,record })=>{
switch (text) {
case 0:
return "在线课"
case 1:
return "面授课"
case 2:
return "课程开发"
case 3:
return "作业员入模培训"
case 4:
return "其他"
default:
return "-"
}
}
}, },
{ {
title: '课程名称', title: '课程名称',
@@ -153,44 +169,47 @@ const columns = [
}, },
{ {
title: '授课/开发课程日期', title: '授课/开发课程日期',
dataIndex: 'name', dataIndex: 'teachingDate',
key: 'name', key: 'teachingDate',
align: 'center', align: 'center',
}, },
{ {
title: '授课/开发课程时长', title: '授课/开发课程时长',
dataIndex: 'name', dataIndex: 'teachingTime',
key: 'name', key: 'teachingTime',
align: 'center', align: 'center',
customRender: ({ text,record })=>{
return (text/60).toFixed(2)+'小时'
}
}, },
{ {
title: '参训人数', title: '参训人数',
dataIndex: 'name', dataIndex: 'studys',
key: 'name', key: 'studys',
align: 'center', align: 'center',
}, },
{ {
title: '评分', title: '评分',
dataIndex: 'name', dataIndex: 'score',
key: 'name', key: 'score',
align: 'center', align: 'center',
}, },
{ {
title: '课酬基准', title: '课酬基准',
dataIndex: 'name', dataIndex: 'levelPay',
key: 'name', key: 'levelPay',
align: 'center', align: 'center',
}, },
{ {
title: '计划费用', title: '计划费用',
dataIndex: 'name', dataIndex: 'expense',
key: 'name', key: 'expense',
align: 'center', align: 'center',
}, },
{ {
title: '应发费用', title: '应发费用',
dataIndex: 'name', dataIndex: 'payableExpense',
key: 'name', key: 'payableExpense',
align: 'center', align: 'center',
}, },
{ {

View File

@@ -4,6 +4,7 @@
class="drawerStyle RouterFaceStus" class="drawerStyle RouterFaceStus"
placement="right" placement="right"
width="60%" width="60%"
:zIndex="1001"
> >
<div class="drawerMains"> <div class="drawerMains">
<div class="headers"> <div class="headers">
@@ -23,14 +24,14 @@
</div> </div>
<div class="right"> <div class="right">
<div class="org" :title="item?.trainOrgName">{{item?.trainOrgName}}</div> <div class="org" :title="item?.trainOrgName">{{item?.trainOrgName}}</div>
<div class="text">{{item?.summaryTotal}}</div> <div class="text org" :title="item?.summaryTotal">{{item?.summaryTotal}}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="box"> <div class="box">
<div class="top"> <div class="top">
<div class="item"> <div class="item">
<a-input style="border-radius: 8px;width:240px;height: 40px;" v-model:value="nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear /> <a-input @pressEnter="searchData(true)" style="border-radius: 8px;width:240px;height: 40px;" v-model:value="nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear />
</div> </div>
<div class="item"> <div class="item">
<a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="dateValue" /> <a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="dateValue" />
@@ -148,6 +149,11 @@ const handleConfirm = () => {
close() close()
closeDrawer() closeDrawer()
}) })
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
close()
closeDrawer()
}) })
} }
const forData = ref() const forData = ref()
@@ -186,6 +192,9 @@ watch(()=>props.visible,(val)=>{
} }
}) })
const removeId = (e,i) =>{ const removeId = (e,i) =>{
dialog({
content: "是否确认移除",
ok: () =>{
forData.value?.forEach(item=>{ forData.value?.forEach(item=>{
item.expenseList?.some((i,l)=>{ item.expenseList?.some((i,l)=>{
if(i.id == e.id){ if(i.id == e.id){
@@ -199,6 +208,9 @@ const removeId = (e,i) =>{
}else{ }else{
expenseList.value = expenseList.value.filter(item=>item.id !== e.id) expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
} }
forData.value[indexList.value].summaryTotal = forData.value[indexList.value]?.summaryTotal - e.payableExpense
}
})
} }
const nameUserNo = ref(null) const nameUserNo = ref(null)
const dateValue = ref(null) const dateValue = ref(null)
@@ -244,15 +256,15 @@ const columns = [
}, },
{ {
title: '所属组织', title: '所属组织',
dataIndex: 'name', dataIndex: 'orgName',
key: 'name', key: 'orgName',
align: 'center', align: 'center',
}, },
{ {
title: '讲师体系', title: '讲师体系',
dataIndex: 'name', dataIndex: 'tsystemName',
key: 'name', key: 'tsystemName',
align: 'center', align: 'center',
}, },
{ {
@@ -276,15 +288,15 @@ const columns = [
customRender: ({ text,record })=>{ customRender: ({ text,record })=>{
switch (text) { switch (text) {
case 0: case 0:
return "在线" return "在线"
case 1: case 1:
return "面授" return "面授"
case 2: case 2:
return "授课"
case 3:
return "课程开发" return "课程开发"
case 3:
return "作业员入模培训"
case 4: case 4:
return "作业员如模培训" return "其他"
default: default:
return "-" return "-"
} }
@@ -307,6 +319,9 @@ const columns = [
dataIndex: 'teachingTime', dataIndex: 'teachingTime',
key: 'teachingTime', key: 'teachingTime',
align: 'center', align: 'center',
customRender: ({ text,record })=>{
return (text/60).toFixed(2)+'小时'
}
}, },
{ {
title: '参训人数', title: '参训人数',
@@ -528,6 +543,7 @@ const config = () => {
margin-bottom: 20px; margin-bottom: 20px;
.left{ .left{
width: 35%; width: 35%;
min-width: 86px;
text-align:right; text-align:right;
margin-right:30px; margin-right:30px;
color: rgba(116, 120, 141, 0.603921568627451); color: rgba(116, 120, 141, 0.603921568627451);
@@ -538,7 +554,7 @@ const config = () => {
.right{ .right{
color: #646C9A; color: #646C9A;
.org{ .org{
max-width: 180px; max-width: 148px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

View File

@@ -17,7 +17,7 @@
</a-form-item> </a-form-item>
<!-- <div @click="handlesearchlevel"> --> <!-- <div @click="handlesearchlevel"> -->
<a-form-item class="select" > <a-form-item class="select" >
<a-select style="width: 276px" v-model:value="searchParam.tLevelId" placeholder="请选择讲师级别" allowClear <a-select style="width: 276px" v-model:value="searchParam.tLevelName" placeholder="请选择讲师级别" allowClear
:options="getLevelList" > :options="getLevelList" >
<!-- :disabled="getLevelList.length !== 0 ? false : true" 禁用状态 --> <!-- :disabled="getLevelList.length !== 0 ? false : true" 禁用状态 -->
</a-select> </a-select>
@@ -473,7 +473,7 @@ export default {
// pageSize1: "10", // pageSize1: "10",
name: null, name: null,
tsystemName: null, tsystemName: null,
tLevelId: null, tLevelName: null,
waitStatus: null, waitStatus: null,
certStatus: null, certStatus: null,
courses: null, courses: null,
@@ -646,7 +646,7 @@ export default {
let array = []; let array = [];
arr.map((value) => { arr.map((value) => {
let obj = { let obj = {
value: value.id, value: value.levelName,
label: value.levelName, label: value.levelName,
}; };
array.push(obj); array.push(obj);
@@ -868,7 +868,7 @@ export default {
userNo: null, userNo: null,
newdepartId: null, newdepartId: null,
tsystemName: null, tsystemName: null,
tlevelId: null, tLevelName: null,
waitStatus: null, waitStatus: null,
certStatus: null, certStatus: null,
salaryName: null, salaryName: null,
@@ -1267,7 +1267,7 @@ export default {
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
window.open( window.open(
`${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacher?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""}&tsystemId=${state.searchParam.tsystemId ? state.searchParam.tsystemId : ""}&tLevelId=${state.searchParam.tLevelId ? state.searchParam.tLevelId : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}` `${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacher?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""}&tsystemId=${state.searchParam.tsystemId ? state.searchParam.tsystemId : ""}&tLevelName=${state.searchParam.tLevelName ? state.searchParam.tLevelName : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}`
); );
// this.download('lesson_records/export', { // this.download('lesson_records/export', {
// ...state.searchParam // ...state.searchParam

View File

@@ -31,7 +31,7 @@
<div class="desc"> <div class="desc">
<div class="input_box"> <div class="input_box">
<div class="input"> <div class="input">
<a-input style="height:40px;border-radius:8px;" v-model:value="params.userNoName" placeholder="请输入工号/讲师名称进行搜索" allowClear /> <a-input @pressEnter="search" style="height:40px;border-radius:8px;" v-model:value="params.userNoName" placeholder="请输入工号/讲师名称进行搜索" allowClear />
</div> </div>
<div class="input"> <div class="input">
<a-range-picker style="height:40px;border-radius:8px;" @change="dateChange" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="dateValue" /> <a-range-picker style="height:40px;border-radius:8px;" @change="dateChange" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="dateValue" />
@@ -205,18 +205,17 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="评分" name="score"> <a-form-item label="评分" name="score">
<a-input class="draitem" v-model:value="formParam.score" placeholder="请输入评分" <a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="10" :controls="false" :min="0" :precision="2" placeholder="请输入评分"
@blur="clearscoreNumber" allowClear allowClear >
showSearch > </a-input-number>
</a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课酬基准" name="levelPay"> <a-form-item label="课酬基准" name="levelPay">
<a-input v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" <a-input-number v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" :max="99999999" :controls="false" :min="0" :precision="2"
@blur="clearlevelPayNumber" @change="clearlevelPayNumber"
allowClear showSearch class="draitem"> allowClear showSearch class="draitem">
</a-input> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -231,9 +230,9 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="应发费用" name="payableExpense"> <a-form-item label="应发费用" name="payableExpense">
<a-input @blur="payExpense" v-model:value="formParam.payableExpense" class="draitem" <a-input-number :max="99999999" :controls="false" :min="0" :precision="2" v-model:value="formParam.payableExpense" class="draitem"
placeholder="请输入应发费用" allowClear showSearch> placeholder="请输入应发费用" allowClear>
</a-input> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -448,8 +447,10 @@ export default {
}); });
} }
const clearlevelPayNumber = () => { const clearlevelPayNumber = () => {
state.formParam.levelPay = state.formParam?.levelPay.replace(/\D/g, ''); // state.formParam.levelPay = state.formParam?.levelPay.replace(/\D/g, '');
state.formParam.expense = state.formParam?.levelPay*state.formParam?.teachingTime // state.formParam.expense = state.formParam?.levelPay*state.formParam?.teachingTime
state.formParam.levelPay == 0 && (state.formParam.levelPay = null);
state.formParam.levelPay&&state.formParam.teachingTime && (state.formParam.expense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2))
} }
const clearscoreNumber= () => { const clearscoreNumber= () => {
state.formParam.score = state.formParam?.score?.replace(/\D/g, ''); state.formParam.score = state.formParam?.score?.replace(/\D/g, '');
@@ -515,6 +516,13 @@ export default {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "" state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : ""
state.formParam.tsystemName = state.tSystemNames.systemName state.formParam.tsystemName = state.tSystemNames.systemName
state.formParam.tsystemId = state.tSystemNames.systemId state.formParam.tsystemId = state.tSystemNames.systemId
state.formParam.courseName = state.formParam.courseName?.trim()
if(state.formParam.score){
state.formParam.score = String(state.formParam.score)
}
if(state.formParam.levelPay){
state.formParam.levelPay = String(state.formParam.levelPay)
}
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); const result = await validateField(formItemNames[i]);
@@ -529,7 +537,7 @@ export default {
message.success("编辑成功"); message.success("编辑成功");
state.teacherdialog = false; state.teacherdialog = false;
cancel() cancel()
getTableDate(); search();
}).catch(err=>{ }).catch(err=>{
message.destroy() message.destroy()
state.teacherdialog = false; state.teacherdialog = false;
@@ -639,6 +647,7 @@ export default {
state.teachingDate = dayjs(res.data.data.teachingDate) state.teachingDate = dayjs(res.data.data.teachingDate)
state.formParam.payrollPlaceId = res.data.data.payrollPlaceId state.formParam.payrollPlaceId = res.data.data.payrollPlaceId
state.formParam.orgNames = state.formParam.orgName state.formParam.orgNames = state.formParam.orgName
state.formParam.teachingDate = dayjs(state.formParam.teachingDate).format("YYYY-MM-DD HH:mm")
}).catch((err) => { }).catch((err) => {
console.log("详情", err); console.log("详情", err);
}); });
@@ -667,7 +676,7 @@ export default {
key: 'name', key: 'name',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '讲师工号', title: '讲师工号',
@@ -675,7 +684,7 @@ export default {
key: 'userNo', key: 'userNo',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 200, width: 160,
}, },
{ {
title: '所属组织 ', title: '所属组织 ',
@@ -683,88 +692,109 @@ export default {
key: 'orgName', key: 'orgName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 300, width: 200,
scopedSlots: { customRender: "teacherOrg" },
}, },
{ {
title: '讲师体系', title: '讲师体系',
dataIndex: 'trainOrgName', dataIndex: 'tsystemName',
key: 'trainOrgName', key: 'tsystemName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '讲师级', title: '讲师级',
dataIndex: 'trainOrgName', dataIndex: 'tlevelName',
key: 'trainOrgName', key: 'tlevelName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '发薪地', title: '发薪地',
dataIndex: 'trainOrgName', dataIndex: 'payrollPlace',
key: 'trainOrgName', key: 'payrollPlace',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '课程类型', title: '课程类型',
dataIndex: 'trainOrgName', dataIndex: 'courseType',
key: 'trainOrgName', key: 'courseType',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
customRender: (value) => {
return (
<div>
{String(value.record. courseType)
? {
"0": "在线课",
"1": "面授课",
"2": "课程开发",
"3": "作业员入模培训",
"4": "其他",
}[value.record. courseType + ""]
: "-"}
</div>
)
}
}, },
{ {
title: '课程名称', title: '课程名称',
dataIndex: 'trainOrgName', dataIndex: 'courseName',
key: 'trainOrgName', key: 'courseName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 200,
}, },
{ {
title: '授课/开发课程日期', title: '授课/开发课程日期',
dataIndex: 'teachingSystem', dataIndex: 'teachingDate',
key: 'teachingSystem', key: 'teachingDate',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 200,
}, },
{ {
title: '授课/开发课程时长 ', title: '授课/开发课程时长 ',
dataIndex: 'teachingEnter', dataIndex: 'teachingTime',
key: 'teachingEnter', key: 'teachingTime',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
customRender:(value)=>{
return (
<div>
{(value.record?.teachingTime/60).toFixed(2)}小时
</div>
)
}
}, },
{ {
title: '参训人数 ', title: '参训人数 ',
dataIndex: 'trainOrgName', dataIndex: 'studys',
key: 'trainOrgName', key: 'studys',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '评分 ', title: '评分 ',
dataIndex: 'trainOrgName', dataIndex: 'score',
key: 'trainOrgName', key: 'score',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '课程基准 ', title: '课程基准 ',
dataIndex: 'trainOrgName', dataIndex: 'levelPay',
key: 'trainOrgName', key: 'levelPay',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '计划费用 ', title: '计划费用 ',
@@ -772,7 +802,7 @@ export default {
key: 'expense', key: 'expense',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '应发费用 ', title: '应发费用 ',
@@ -780,7 +810,7 @@ export default {
key: 'payableExpense', key: 'payableExpense',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 200, width: 160,
}, },
{ {
title: '操作 ', title: '操作 ',
@@ -789,7 +819,7 @@ export default {
ellipsis: true, ellipsis: true,
align: "center", align: "center",
fixed: "right", fixed: "right",
width: 200, width: 160,
slots: { customRender: "appEdit" }, slots: { customRender: "appEdit" },
}, },
]) ])
@@ -841,6 +871,24 @@ export default {
::v-deep .ant-descriptions-bordered .ant-descriptions-item-label{ ::v-deep .ant-descriptions-bordered .ant-descriptions-item-label{
width: 200px; width: 200px;
} }
.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;
}
}
.delete { .delete {
min-width: 424px; min-width: 424px;
background: #ffffff; background: #ffffff;

View File

@@ -12,7 +12,7 @@
</a-form-item> </a-form-item>
<a-form-item class="select "> <a-form-item class="select ">
<div class="select addTimeBox"> <div class="select addTimeBox">
<div class="addTime" >创建时间</div> <div class="addTime" >汇总时间</div>
<a-range-picker <a-range-picker
v-model:value="searchdate" v-model:value="searchdate"
style="width: 420px" style="width: 420px"
@@ -90,7 +90,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 >
<a-button type="link" @click="goDdit(record)">编辑</a-button> <a-button type="link" v-if="record.status != 2&&record.status!=3" @click="goDdit(record)">编辑</a-button>
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button> <a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
<!-- <a-button type="link" @click="() => handleOperate(record, String(record.courseform))">审批</a-button> --> <!-- <a-button type="link" @click="() => handleOperate(record, String(record.courseform))">审批</a-button> -->
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> --> <!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
@@ -109,7 +109,7 @@
v-if="tableDataTotal > 10" v-if="tableDataTotal > 10"
:showSizeChanger="true " :showSizeChanger="true "
:showQuickJumper="false" :showQuickJumper="false"
:hideOnSinglePage="true" :hideOnSinglePage="false"
:pageSize="searchParam.pageSize" :pageSize="searchParam.pageSize"
:current="searchParam.pageNo" :current="searchParam.pageNo"
:total="tableDataTotal" :total="tableDataTotal"
@@ -120,8 +120,16 @@
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<!--查看讲师费详情 --> <!--查看讲师费详情 -->
<a-drawer v-model:visible="teachingdialog" placement="right" <a-drawer :closable="false" v-model:visible="teachingdialog" placement="right"
@closa="cancelTeachingDialog" :maskClosable="true" width="60%" title="查看讲师费用"> @closa="cancelTeachingDialog" width="60%" :title="false">
<div class="headers">
<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 class="line"></span>
<span>讲师费用详情</span> <span>讲师费用详情</span>
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter"> <a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
@@ -139,7 +147,7 @@
<div style="padding: 10px 0;"> <div style="padding: 10px 0;">
<div style="display: flex;margin-bottom: 20px;"> <div style="display: flex;margin-bottom: 20px;">
<div style="margin-right:20px;"> <div style="margin-right:20px;">
<a-input style="height:40px;border-radius:8px;" v-model:value="userNoOrName" placeholder="请输入工号/讲师名称进行搜索" /> <a-input @pressEnter="searchTeacherFeeApprovalList()" style="height:40px;border-radius:8px;" v-model:value="userNoOrName" placeholder="请输入工号/讲师名称进行搜索" />
</div> </div>
<div style="margin-right:20px;"> <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" /> <a-range-picker style="height:40px;border-radius:8px;" @change="seeDateChange" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="seeDateValue" />
@@ -370,11 +378,11 @@
]) ])
//认证状态0待确认 1待提交 2审核中 3审核通过 4.审核拒绝 //认证状态0待确认 1待提交 2审核中 3审核通过 4.审核拒绝
const AuthenticationStatusList = ref([ const AuthenticationStatusList = ref([
{ value: 0, label: "待确认" }, // { value: 0, label: "待确认" },
{ value: 1, label: "待提交" }, { value: 1, label: "待提交" },
{ value: 2, label: "审核中" }, { value: 2, label: "审核中" },
{ value: 3, label: "审核通过" },
{ value: 4, label: "审核拒绝" }, { value: 4, label: "审核拒绝" },
{ value: 3, label: "已审核" },
]) ])
//状态 //状态
@@ -421,7 +429,7 @@
width: 120, width: 120,
}, },
{ {
title: '汇总周期 ', title: '汇总时间 ',
dataIndex: 'summaryDate', dataIndex: 'summaryDate',
key: 'summaryDate', key: 'summaryDate',
ellipsis: true, ellipsis: true,
@@ -614,7 +622,7 @@
const submit = (record) => { const submit = (record) => {
console.log(record,'record') console.log(record,'record')
dialog({ dialog({
content: '确定要提交此条数据吗?', content: '请仔细核对讲师费信息,确认无误后,将自动进入(BPM系统)审批流程',
ok: () => { ok: () => {
isConfirm({ isConfirm({
id: record.id, id: record.id,
@@ -795,8 +803,8 @@
}, },
{ {
title: '培训发生组织', title: '培训发生组织',
dataIndex: 'trainOrg', dataIndex: 'trainOrgName',
key: 'trainOrg', key: 'trainOrgName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
@@ -809,12 +817,18 @@
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
customRender:(value)=>{
return (
<div>
{(value.record?.teachingTime/60).toFixed(2)}小时
</div>
)
}
}, },
{ {
title: '授课时间 ', title: '授课时间 ',
dataIndex: 'teachingTime', dataIndex: 'teachingDate',
key: 'teachingTime', key: 'teachingDate',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
@@ -822,32 +836,32 @@
}, },
{ {
title: '讲师体系', title: '讲师体系',
dataIndex: 'systemName', dataIndex: 'tsystemName',
key: 'systemName', key: 'tsystemName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
}, },
{ {
title: '讲师级别 ', title: '讲师级别 ',
dataIndex: 'levelName', dataIndex: 'tlevelName',
key: 'levelName', key: 'tlevelName',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
}, },
{ {
title: '发薪地 ', title: '发薪地 ',
dataIndex: 'teacherpayrollPlace', dataIndex: 'payrollPlace',
key: 'teacherpayrollPlace', key: 'payrollPlace',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
}, },
{ {
title: '基准课酬 ', title: '基准课酬 ',
dataIndex: 'teacherlevelPay', dataIndex: 'levelPay',
key: 'teacherlevelPay', key: 'levelPay',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
@@ -862,16 +876,16 @@
}, },
{ {
title: '参训人数 ', title: '参训人数 ',
dataIndex: 'studentNum', dataIndex: 'studys',
key: 'studentNum', key: 'studys',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
}, },
{ {
title: '评分 ', title: '评分 ',
dataIndex: 'courseAssess', dataIndex: 'score',
key: 'courseAssess', key: 'score',
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
@@ -886,12 +900,14 @@
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{value.record. courseType == "1" || value.record. courseType == "2"|| value.record.courseTypeype == "3" {String(value.record. courseType)
? { ? {
"1": "项目开课", "0": "在线课",
"2": "路径开课", "1": "面授课",
"3": "面授开课", "2": "课程开发",
}[value.record. courseType + ""] || "" "3": "作业员入模培训",
"4": "其他",
}[value.record. courseType + ""]
: "-"} : "-"}
</div> </div>
) )
@@ -972,7 +988,24 @@
.select .ant-picker { .select .ant-picker {
width: 410px !important; 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 { .addTimeBox {
position: relative; position: relative;
display: flex; display: flex;

View File

@@ -66,12 +66,12 @@
v-on:keydown.enter="enterPressHadlerSearch"> v-on:keydown.enter="enterPressHadlerSearch">
</a-select> </a-select>
</a-form-item> </a-form-item>
<!-- <a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear <a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.status" placeholder="请选择状态" allowClear
:options="AuthenticationStatusList" :options="AuthenticationStatusList"
v-on:keydown.enter="enterPressHadlerSearch"> v-on:keydown.enter="enterPressHadlerSearch">
</a-select> </a-select>
</a-form-item> --> </a-form-item>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px ;margin-bottom:20px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId" allowClear <a-select style="width: 235px ;margin-bottom:20px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId" allowClear
:options="lecturerSystemList" :options="lecturerSystemList"
@@ -79,7 +79,7 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.tLevelId" placeholder="请选择讲师级别" allowClear <a-select style="width: 235px ;margin-bottom:20px" v-model:value="searchParam.tLevelName" placeholder="请选择讲师级别" allowClear
:options="getLevelList" :options="getLevelList"
v-on:keydown.enter="enterPressHadlerSearch"> v-on:keydown.enter="enterPressHadlerSearch">
</a-select> </a-select>
@@ -293,18 +293,17 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="评分" name="score"> <a-form-item label="评分" name="score">
<a-input class="draitem" v-model:value="formParam.score" placeholder="请输入评分" <a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="10" :controls="false" :min="0" :precision="2" placeholder="请输入评分"
@blur="clearscoreNumber" allowClear allowClear >
showSearch > </a-input-number>
</a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课酬基准" name="levelPay"> <a-form-item label="课酬基准" name="levelPay">
<a-input v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" <a-input-number v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" :max="99999999" :controls="false" :min="0" :precision="2"
@blur="clearlevelPayNumber" @change="clearlevelPayNumber"
allowClear showSearch class="draitem"> allowClear showSearch class="draitem">
</a-input> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -319,9 +318,9 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="应发费用" name="payableExpense"> <a-form-item label="应发费用" name="payableExpense">
<a-input @blur="payExpense" v-model:value="formParam.payableExpense" class="draitem" <a-input-number :max="99999999" :controls="false" :min="0" :precision="2" v-model:value="formParam.payableExpense" class="draitem"
placeholder="请输入应发费用" allowClear showSearch> placeholder="请输入应发费用" allowClear>
</a-input> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -402,7 +401,7 @@
<!-- <a-descriptions-item label="课程类型">{{formParam.courseType==1?'项目开课' :formParam.courseType==2 ?'路径开课':formParam.courseType==3 ?'面授开课':'-'}}</a-descriptions-item> --> <!-- <a-descriptions-item label="课程类型">{{formParam.courseType==1?'项目开课' :formParam.courseType==2 ?'路径开课':formParam.courseType==3 ?'面授开课':'-'}}</a-descriptions-item> -->
<a-descriptions-item label="课程名称">{{formParam.courseName || '-'}}</a-descriptions-item> <a-descriptions-item label="课程名称">{{formParam.courseName || '-'}}</a-descriptions-item>
<a-descriptions-item label="培训发生组织">{{formParam.trainOrgName || '-'}}</a-descriptions-item> <a-descriptions-item label="培训发生组织">{{formParam.trainOrgName || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课时间 ">{{formParam.teachingDate || '-'}}</a-descriptions-item> <a-descriptions-item label="授课时间 ">{{(formParam.teachingDate) || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">{{formParam.teachingTime || '-'}} <span v-if="formParam.teachingTime">({{(formParam.teachingTime/60).toFixed(2)}}小时)</span></a-descriptions-item> <a-descriptions-item label="授课时长 ">{{formParam.teachingTime || '-'}} <span v-if="formParam.teachingTime">({{(formParam.teachingTime/60).toFixed(2)}}小时)</span></a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{formParam.studys || '-'}}</a-descriptions-item> <a-descriptions-item label="参训人数 ">{{formParam.studys || '-'}}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{formParam.score || '-'}}</a-descriptions-item> <a-descriptions-item label="评分 ">{{formParam.score || '-'}}</a-descriptions-item>
@@ -533,7 +532,7 @@
name:null, name:null,
trainOrgId:null, trainOrgId:null,
tSystemId:null, tSystemId:null,
tLevelId:null, tLevelName:null,
courseType:null, courseType:null,
certStatus:null, certStatus:null,
salaryName:null, salaryName:null,
@@ -593,8 +592,11 @@
]) ])
//认证状态 //认证状态
const AuthenticationStatusList = ref([ const AuthenticationStatusList = ref([
{ value: 0, label: "未认证" }, { value: 0, label: "待提交" },
{ value: 1, label: "已认证" }, { value: 1, label: "待审核" },
{ value: 2, label: "审核中" },
{ value: 4, label: "审核拒绝" },
{ value: 3, label: "审核通过" },
]) ])
const lecturerSystemList = ref([ const lecturerSystemList = ref([
@@ -631,7 +633,7 @@ getAllLevelList().then((res) => {
let array = []; let array = [];
arr.map((value) => { arr.map((value) => {
let obj = { let obj = {
value: value.id, value: value.levelName,
label: value.levelName, label: value.levelName,
}; };
array.push(obj); array.push(obj);
@@ -914,7 +916,7 @@ getAllLevelList().then((res) => {
beginTime:null, beginTime:null,
userNo:null, userNo:null,
tSystemId:null, tSystemId:null,
tLevelId:null, tLevelName:null,
courseType:null, courseType:null,
certStatus:null, certStatus:null,
salaryName:null, salaryName:null,
@@ -972,7 +974,7 @@ getAllLevelList().then((res) => {
//修改讲师费信息弹窗 //修改讲师费信息弹窗
const handleModify = (record) => { const handleModify = (record) => {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改信息' state.teacherdialogtitle = '编辑讲师费'
state.id= record.id state.id= record.id
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()
@@ -1011,6 +1013,13 @@ getAllLevelList().then((res) => {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "" state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : ""
state.formParam.tsystemName = state.tSystemNames.systemName state.formParam.tsystemName = state.tSystemNames.systemName
state.formParam.tsystemId = state.tSystemNames.systemId state.formParam.tsystemId = state.tSystemNames.systemId
state.formParam.courseName = state.formParam.courseName?.trim()
if(state.formParam.score){
state.formParam.score = String(state.formParam.score)
}
if(state.formParam.levelPay){
state.formParam.levelPay = String(state.formParam.levelPay)
}
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); const result = await validateField(formItemNames[i]);
@@ -1168,6 +1177,7 @@ getAllLevelList().then((res) => {
state.teachingDate = dayjs(res.data.data.teachingDate) state.teachingDate = dayjs(res.data.data.teachingDate)
state.formParam.payrollPlaceId = res.data.data.payrollPlaceId state.formParam.payrollPlaceId = res.data.data.payrollPlaceId
state.formParam.orgNames = state.formParam.orgName state.formParam.orgNames = state.formParam.orgName
state.formParam.teachingDate = dayjs(state.formParam.teachingDate).format("YYYY-MM-DD HH:mm")
}) })
.catch((err) => { .catch((err) => {
message.destroy() message.destroy()
@@ -1261,11 +1271,14 @@ getAllLevelList().then((res) => {
state.formParam.payableExpense == 0 && (state.formParam.payableExpense = null); state.formParam.payableExpense == 0 && (state.formParam.payableExpense = null);
} }
const clearlevelPayNumber = () => { const clearlevelPayNumber = () => {
state.formParam.levelPay = state.formParam.levelPay?.replace(/\D/g, ''); // state.formParam.levelPay = state.formParam.levelPay?.replace(/\D/g, '');
state.formParam.levelPay = state.formParam.levelPay?.slice(0,8); // state.formParam.levelPay = state.formParam.levelPay?.slice(0,8);
state.formParam.levelPay == 0 && (state.formParam.levelPay = null); state.formParam.levelPay == 0 && (state.formParam.levelPay = null);
state.formParam.levelPay&&state.formParam.teachingTime && (state.formParam.expense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2)) state.formParam.levelPay&&state.formParam.teachingTime && (state.formParam.expense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2))
} }
watch(()=>state.formParam.levelPay,(val)=>{
state.formParam.levelPay&&state.formParam.teachingTime && (state.formParam.expense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2))
})
const rules = { const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }], name: [{ required: true, message:'',log: '讲师不能为空' }],
userNo: [{ required: true, message: '',log:'讲师工号不能为空' }], userNo: [{ required: true, message: '',log:'讲师工号不能为空' }],
@@ -1274,8 +1287,8 @@ getAllLevelList().then((res) => {
tlevelName: [{ required: true, message:'',log: ' 讲师级别不能为空' }], tlevelName: [{ required: true, message:'',log: ' 讲师级别不能为空' }],
payrollPlace: [{ required: true, message:'',log: '讲师发薪地不能为空' }], payrollPlace: [{ required: true, message:'',log: '讲师发薪地不能为空' }],
courseType: [{ required: true, message: '',log:'费用类型不能为空' }], courseType: [{ required: true, message: '',log:'费用类型不能为空' }],
courseName: [{ required: true, message:'',log: '课程归属组织不能为空' }], courseName: [{ required: true, message:'',log: '课程名称不能为空' }],
trainOrgId: [{ required: true, message: '',log:'费用来源不能为空' }], trainOrgId: [{ required: true, message: '',log:'培训发生组织不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }], teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }],
teachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }], teachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }],
studys: [{ required: true, message: '',log:' 参训人数不能为空' }], studys: [{ required: true, message: '',log:' 参训人数不能为空' }],
@@ -1484,7 +1497,7 @@ const column = ref([
const handleExport = ()=>{ const handleExport = ()=>{
window.open ( window.open (
`${process.env.VUE_APP_BASE_API}/admin/export/exportTeacherExpense?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : "" `${process.env.VUE_APP_BASE_API}/admin/export/exportTeacherExpense?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""
}&trainOrgId=${ state.searchParam.trainOrgId ? state.searchParam.trainOrgId : ""}&type=${state.searchParam.type ? state.searchParam.type : ""}&tsystemId=${ state.searchParam.tSystemId ? state.searchParam.tSystemId : ""}&levelId=${ state.searchParam.tLevelId ? state.searchParam.tLevelId : ""}&beginTime=${state.searchParam.beginTime ? state.searchParam.beginTime : ""}&endTime=${state.searchParam.endTime ? state.searchParam.endTime : ""}` }&trainOrgId=${ state.searchParam.trainOrgId ? state.searchParam.trainOrgId : ""}&type=${state.searchParam.type ? state.searchParam.type : ""}&tsystemId=${ state.searchParam.tSystemId ? state.searchParam.tSystemId : ""}&tLevelName=${ state.searchParam.tLevelName ? state.searchParam.tLevelName : ""}&beginTime=${state.searchParam.beginTime ? state.searchParam.beginTime : ""}&endTime=${state.searchParam.endTime ? state.searchParam.endTime : ""}`
); );
// this.download('lesson_records/export', { // this.download('lesson_records/export', {
// ...state.searchParam // ...state.searchParam