讲师管理bug

This commit is contained in:
zhangsir
2024-12-13 18:08:51 +08:00
parent 6ded08e300
commit f1ad9b18da
9 changed files with 128 additions and 57 deletions

View File

@@ -61,7 +61,7 @@
</div>
<div class="btnn">
<button class="btn1" @click="config">确认提交审批</button>
<button class="btn1" @click="qureyDrawer"></button>
<button class="btn1" @click="qureyDrawer">认至审批中心</button>
<button class="btn2" @click="closeDrawer">取消</button>
</div>
</div>
@@ -87,7 +87,7 @@
<span>操作确认</span>
<div class="close_exit" @click="close"></div>
</div>
<div class="title">本月可提交审批次数 <span style="color:#4ea6ff"> {{ numTime }} / 10 </span></div>
<!-- <div class="title">本月可提交审批次数 <span style="color:#4ea6ff"> {{ numTime }} / 10 </span></div> -->
<div class="body">
<div>
<span>请仔细核对讲师费信息确认无误后将自动进入(BPM系统)审批流程</span>
@@ -132,12 +132,12 @@ const close = () => {
modalVisible.value = false;
}
const handleConfirm = () => {
if(numTime.value >= 10){
message.error('提交审批次数已达上限')
return
}
numTime.value+=1
localStorage.setItem('numTime',numTime.value)
// if(numTime.value >= 10){
// message.error('提交审批次数已达上限')
// return
// }
// numTime.value+=1
// localStorage.setItem('numTime',numTime.value)
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
if(!ids.length){
return message.error('暂无可提交的数据')
@@ -177,7 +177,7 @@ const clickItem = (item,i) => {
watch(()=>props.visible,(val)=>{
if(val){
loadingData.value = true
numTime.value = Number(localStorage.getItem('numTime')||0)
// numTime.value = Number(localStorage.getItem('numTime')||0)
api.getListByAffiliation(
{
name: '',
@@ -486,9 +486,9 @@ const config = () => {
.body {
width: 100%;
padding: 0 30px;
padding: 0 50px;
margin: 34px auto 56px auto;
margin-top: 10px;
margin-top: 40px;
display: flex;
justify-content: center;
align-items: center;
@@ -646,7 +646,7 @@ const config = () => {
.btn1 {
cursor: pointer;
width: 100px;
width: 120px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;

View File

@@ -224,12 +224,14 @@ const searchMember = (keyword) => {
avatar: item.avatar,
gender: item.gender
}
})
}) || []
}else{
options.value = []
loading.value = false
}
}).catch(()=>{
loading.value = false
options.value = []
})
const params = {
pageNo: 1,

View File

@@ -73,7 +73,7 @@
@click="cancelTeacherDialog"
/>
</div>
<a-form style="padding-left:12px;padding-right: 46px;" :model="formParam" :rules="rules" layout="vertical" ref="formRef" >
<a-form style="padding-left:12px;padding-right: 46px;" :model="formParam" layout="vertical" ref="formRef" >
<!-- 基本信息 -->
<a-row>
<a-col :span="24">
@@ -106,7 +106,15 @@
<!-- 讲师名称 ,手机号码-->
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师姓名" name="name">
<a-form-item name="name">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师姓名
</template>
<a-input v-model:value="formParam.name" class="draitem" :maxlength="20" showCount
@blur="sendName"
placeholder="请输入讲师姓名" allowClear showSearch>
@@ -114,7 +122,15 @@
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="供应商" name="supplier">
<a-form-item name="supplier">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
供应商
</template>
<a-input v-model:value="formParam.supplier" class="draitem" :maxlength="30" showCount
placeholder="请输入供应商" allowClear showSearch>
</a-input>
@@ -542,8 +558,9 @@ export default {
state.formParam.supplier = state.formParam?.supplier?.trim()
const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]);
if (result) {
// const result = await validateField(formItemNames[i]);
const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log)
}
}
@@ -708,7 +725,7 @@ export default {
console.log("外部讲师详情", res.data);
state.formParam = res.data.data
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
// state.formParam.photo = state.formParam.photo === null ? userInfo.value?.avatar : state.formParam.photo
state.formParam.photo = state.formParam.photo == null ? null : state.formParam.photo.includes('upload') ? res.data.data.photo : '/upload'+res.data.data.photo
})
.catch((err) => {
message.destroy()

View File

@@ -3,7 +3,7 @@
<div>
<!-- 搜索框及按钮 -->
<div class="filter">
<a-form layout="inline" style="min-width: 1380px;">
<a-form layout="inline" style="min-width: 1056px;">
<a-form-item class="select">
<!-- v-model:value="searchParam.name" -->
<!-- <a-input v-model:value="searchParam.userNo" style="width: 276px; height: 40px; border-radius: 8px"

View File

@@ -2,7 +2,7 @@
<template>
<div>
<!-- 搜索框及按钮 -->
<div class="filter" style="min-width: 1270px;">
<div class="filter" style="min-width: 1056px;">
<a-form layout="inline">
<a-form-item class="select">
<!-- v-model:value="searchParam.name" -->
@@ -124,7 +124,7 @@
/>
</div>
<div ref="drawerContent" style="padding-left: 15px;padding-right: 46px;">
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<a-form :model="formParam" layout="vertical" ref="formRef">
<a-row>
<a-col :span="24">
<span class="line"></span><span style="color:#333333;font-weight: 600;font-size:16px;">基本信息</span>
@@ -158,7 +158,15 @@
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师姓名" name="name">
<a-form-item name="name">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师姓名
</template>
<SearchTeacher @tlevel="teacherTlevel" :lecturer="true" :disabled="!!id" v-model:value="formParam.name" v-model:lable="formParam.orgNames" v-model:orgId="formParam.orgId" v-model:id="formParam.id"
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher>
</a-form-item>
@@ -177,7 +185,15 @@
</a-col>
</a-row>
<a-col :span="24">
<a-form-item label="讲师体系" name="tsystemName">
<a-form-item name="tsystemName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师体系
</template>
<!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear
@change="changetlevel" .:options="LecturerSystemList">
</a-select> -->
@@ -188,7 +204,15 @@
</a-col>
<a-col :span="24">
<!-- <div @click="handleformlevel"> -->
<a-form-item label="讲师级别" name="tlevelId">
<a-form-item name="tlevelId">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师级别
</template>
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear disableda
:options="tSystemNames.levelVoList" @change="handleformlevel">
</a-select>
@@ -197,10 +221,18 @@
</a-col>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="初始授课时长" name="defaultTeachingTime">
<a-form-item name="defaultTeachingTime">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
初始授课时长
</template>
<a-input v-model:value="formParam.defaultTeachingTime" style="width:100%; height: 40px; border-radius: 8px; "
:maxLength="8"
@change="clearNonNumber" placeholder="请输入初始授课时长" allowClear suffix="分钟">
@change="clearNonNumber" @blur="blurNumber" @focus="focusNumber" placeholder="请输入初始授课时长" allowClear suffix="分钟">
</a-input>
<!-- <span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime === null">0.00小时</span>
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime != null">{{
@@ -989,14 +1021,19 @@ export default {
}
const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]);
if (result) {
// const result = await validateField(formItemNames[i]);
const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log)
}
}
if(state.formParam.certStatus&&!state.formParam.certificationName){
return message.error('请上传认证凭证')
}
if(!state.formParam.certStatus){
state.formParam.certification = null
state.formParam.certificationName = null
}
if(state.formParam.name){
const nameNo = state.formParam?.name?.split('/')
state.formParam.name = nameNo[0]
@@ -1141,8 +1178,8 @@ export default {
};
watch(() => state.formParam.certStatus,(val)=>{
if(!val){
state.formParam.certification = null
state.formParam.certificationName = null
// state.formParam.certification = null
// state.formParam.certificationName = null
}
})
//清空数据
@@ -1177,6 +1214,12 @@ export default {
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.slice(0,8)
}
const blurNumber = () => {
!state.formParam.defaultTeachingTime && (state.formParam.defaultTeachingTime = '0')
}
const focusNumber = () => {
state.formParam.defaultTeachingTime==0 && (state.formParam.defaultTeachingTime = null)
}
const rules = {
name: [{ required: true, message: '',log:'讲师不能为空' }],
// newdepartId: [{ required: true, message: '组织不能为空' }],
@@ -1320,6 +1363,8 @@ export default {
handleformlevel,
// customPreview,
clearNonNumber,
blurNumber,
focusNumber,
// managerChange,
headers,
beforeUpload,
@@ -1378,15 +1423,21 @@ export default {
};
</script>
<style lang="scss" scoped>
::v-deep .ant-form-item-with-help .ant-form-item-explain{
min-height: 0 !important;
}
::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
border-color: #40a9ff !important;
}
::v-deep .search .ant-select-focused .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
border-color: #40a9ff !important;
}
// ::v-deep .ant-form-item-with-help .ant-form-item-explain{
// min-height: 0 !important;
// }
// ::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
// border-color: #40a9ff !important;
// }
// ::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector {
// border-color: #40a9ff !important;
// }
// ::v-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
// border-color: #40a9ff !important;
// }
// ::v-deep .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{
// border-color: #40a9ff !important;
// }
.ant-form-item{
margin-bottom: 12px;
}

View File

@@ -3,14 +3,14 @@
<div>
<!-- 搜索框及按钮 -->
<div class="filter">
<a-form layout="inline" style="min-width: 1380px;">
<a-form layout="inline" style="min-width: 1056px;">
<a-form-item class="select">
<a-input v-model:value="searchParam.name" style="width: 235px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.name" style="width: 235px; margin-bottom:20px;height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</a-form-item>
<a-form-item class="select">
<a-input v-model:value="searchParam.courseName" style="width: 235px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.courseName" style="width: 235px; margin-bottom:20px;height: 40px; border-radius: 8px"
placeholder="请输入课程名称进行搜索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input>
</a-form-item>
@@ -33,12 +33,12 @@
</a-select>
</a-form-item>
<a-form-item class="select">
<a-select style="width: 200px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
<a-select style="width: 200px;margin-bottom:20px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
:options="AuthenticationStatusList" a llowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId"
<a-select style="width: 235px;margin-bottom:20px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId"
:options="LecturerSystemList" allowClear showSearch @change="changetlevel"
v-on:keydown.enter="enterPressHadlerSearch">
</a-select>
@@ -52,7 +52,7 @@
></OrgClass>
</a-form-item>
<a-form-item class="select" v-if="moreid == 2">
<a-tree-select style="width: 235px" :fieldNames="{
<a-tree-select style="width: 235px;margin-bottom:20px" :fieldNames="{
children: 'children',
label: 'name',
value: 'code',
@@ -114,7 +114,7 @@
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'teaching'">
<a-space style="display:flex ;justify-content: space-around; ">
<span>{{ (record?.teaching / 60).toFixed(2) +'小时'|| '-' }}</span>
<span>{{ record?.teaching ?record?.teaching+'分钟': '-' }}</span>
</a-space>
</template>
<template v-if="column.key === 'operation'">
@@ -311,10 +311,11 @@
</div>
<span class="line"></span>
<span style="font-weight:600;">讲师信息</span>
<a-descriptions style="margin-top:15px;" bordered :column="2" :contentStyle="rowCenter" :labelStyle="{'width':'160px'}">
<a-descriptions style="margin-top:15px;" bordered :column="2" :contentStyle="{'maxWidth':'300px'}" :labelStyle="{'width':'160px'}">
<a-descriptions-item label="讲师名称">{{ formParam.teacherName ||'-'}}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{ formParam.userNo||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师组织" :span="2">{{ formParam.orgName||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师组织">{{ formParam.orgName||'-' }}</a-descriptions-item>
<a-descriptions-item label="培训发生组织">{{ formParam.trainOrg||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{ formParam.tsystemName||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{ formParam.tlevelName||'-'
}}</a-descriptions-item>
@@ -764,7 +765,7 @@ export default {
width: 120,
},
{
title: '授课时长(H) ',
title: '授课时长(分钟) ',
dataIndex: 'teaching',
key: 'teaching',
ellipsis: true, align: "center",

View File

@@ -3,7 +3,7 @@
width="60%" :title="false">
<div class="appedit">
<div class="header" style="margin-top: -24px;">
<div class="headerTitle">编辑讲师费审批</div>
<div class="headerTitle">汇总讲师费</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@@ -13,7 +13,7 @@
<div class="content">
<div class="title">
<div class="line"></div>
<div class="text">基本信息</div>
<div class="text">汇总信息</div>
</div>
<div class="desc">
<a-descriptions :column="2" bordered>
@@ -28,7 +28,7 @@
</div>
<div class="title">
<div class="line"></div>
<div class="text">基本信息</div>
<div class="text">讲师费列表</div>
</div>
<div class="desc">
<div class="input_box">

View File

@@ -123,7 +123,7 @@
<a-drawer :closable="false" v-model:visible="teachingdialog" placement="right"
@closa="cancelTeachingDialog" width="60%" :title="false">
<div class="headers" style="margin-top:-24px;">
<div class="headerTitle">查看讲师费</div>
<div class="headerTitle">汇总讲师费详情</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@@ -131,7 +131,7 @@
/>
</div>
<span class="line"></span>
<span style="font-weight:600;">讲师费用详情</span>
<span style="font-weight:600;">汇总信息</span>
<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>
@@ -141,7 +141,7 @@
<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>
<!-- <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;">

View File

@@ -3,7 +3,7 @@
<div >
<!-- 搜索框及按钮 -->
<div class="filter" >
<a-form layout="inline" style="min-width: 1380px;">
<a-form layout="inline" style="min-width: 1056px;">
<a-form-item class="select">
<!-- v-model:value="searchParam.name" -->
<!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"