讲师费验证调整

This commit is contained in:
wangxuemei
2024-10-26 18:05:56 +08:00
parent 523c44525c
commit aaec88f706

View File

@@ -154,13 +154,13 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师名称" name="name"> <a-form-item label="讲师名称" name="name">
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName" <SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName" v-model:user="formParam.userNo"
v-model:system="tSystemNames" v-model:level="formParam.tLevelId"></SearchTeacher> v-model:system="tSystemNames" v-model:level="formParam.tLevelId" ></SearchTeacher>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师工号" name="teacherId"> <a-form-item label="讲师工号" name="userNo">
<a-input class="draitem" v-model:value="searchParam.teacherId" disabled <a-input class="draitem" v-model:value="formParam.userNo" disabled
placeholder="请输入讲师工号" allowClear showSearch> placeholder="请输入讲师工号" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
@@ -255,14 +255,15 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="参训人数" name="studys"> <a-form-item label="参训人数" name="studys">
<a-input v-model:value="formParam.studys" class="draitem" <a-input v-model:value="formParam.studys" class="draitem" @blur="clearstudysNumber"
placeholder="0 " allowClear showSearch > placeholder="0 " allowClear showSearch >
</a-input> </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="score"> <a-form-item label="评分" name="score">
<a-input class="draitem" v-model:value="formParam.score" placeholder="0" allowClear <a-input class="draitem" v-model:value="formParam.score" placeholder="0"
@blur="clearscoreNumber" allowClear
showSearch > showSearch >
</a-input> </a-input>
</a-form-item> </a-form-item>
@@ -273,15 +274,15 @@
<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 v-model:value="formParam.levelPay" placeholder="可手动更改"
@blur="clearlevelPayNumber"
allowClear showSearch class="draitem"> allowClear showSearch class="draitem">
</a-input> </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="expense"> <a-form-item label="计划费用" name="expense">
<a-input class="draitem" v-model:value="formParam.expense" placeholder="" allowClear <a-input class="draitem" v-model:value="formParam.expense" placeholder="" allowClear disabled
showSearch> showSearch>
{{ defaultTeachingTime * expense}}
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -391,9 +392,9 @@
</a-button> </a-button>
</div> </div>
</a-drawer> </a-drawer>
<!--批量确认 --> <!--一键确认 -->
<a-drawer v-model:visible="allFeedialog" placement="right" <a-drawer v-model:visible="allFeedialog" placement="right" style="min-width:1666px"
@closa="cancelallFeedialog" :maskClosable="true" width="60%" title="批量审核"> @closa="cancelallFeedialog" :maskClosable="true" width="60%" title="确认讲师费">
<a-form layout="inline"> <a-form layout="inline">
<a-form-item class="select"> <a-form-item class="select">
<a-input v-model:value="searchall.name" style="width: 276px; height: 40px; border-radius: 8px" <a-input v-model:value="searchall.name" style="width: 276px; height: 40px; border-radius: 8px"
@@ -401,9 +402,17 @@
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item class="select "> <a-form-item class="select ">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchall.status" placeholder="请选择所属组织" allowClear <div class="select addTimeBox">
:options="AuthenticationStatusList"> <div class="addTime" >创建时间</div>
</a-select> <a-range-picker
v-model:value="allsearchdate"
style="width: 420px"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div>
</a-form-item> </a-form-item>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<a-button @click="searchSubmitdrawer()" type="primary" class="resetbtn">查询 </a-button> <a-button @click="searchSubmitdrawer()" type="primary" class="resetbtn">查询 </a-button>
@@ -412,6 +421,7 @@
</a-form> </a-form>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="column" :data-source="tableDatas" :scroll="{ x: 1500 }" :loading="tableLoadings" :pagination="false"> <a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="column" :data-source="tableDatas" :scroll="{ x: 1500 }" :loading="tableLoadings" :pagination="false">
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
</template> </template>
</a-table> </a-table>
<div :style="{ <div :style="{
@@ -447,7 +457,7 @@
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
import ImportWork from "../../components/project/ImportWork.vue"; import ImportWork from "../../components/project/ImportWork.vue";
import SearchTeacher from "@/components/project/SearchTeacher"; import SearchTeacher from "@/components/project/SearchTeacher";
import {getTeacherFeeList,getTeacherFeeDetail,addTeacherFee ,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement"; import {getTeacherFeeList,getTeacherFeeDetail,addTeacherFee ,getListByIds,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTeacherLevel,deleteInTeacher,confirm} from "../../api/lecturerFeeManagement";
import {getTeacherSystemList, getLevel,getPayRollPlace,fileUp } from "../../api/Lecturer"; import {getTeacherSystemList, getLevel,getPayRollPlace,fileUp } from "../../api/Lecturer";
// lecturerFeeManagement // lecturerFeeManagement
// import {getProjSt} from "../../api/indexProjStu"; // import {getProjSt} from "../../api/indexProjStu";
@@ -497,8 +507,11 @@
formParam: { formParam: {
teachingDate:null , teachingDate:null ,
defaultTeachingTime:null, defaultTeachingTime:null,
name: null,
userNo: null
}, },
searchdate: null, //选择时间 searchdate: null, //选择时间
allsearchdate: null, //选择时间
searchParam: { searchParam: {
userNo:null, userNo:null,
name:null, name:null,
@@ -515,9 +528,11 @@
beginTime: null, beginTime: null,
endTime: null, endTime: null,
}, },
//一键确认
searchall:{ searchall:{
name:null, name:null,
status:null, beginTime: null,
endTime: null,
pageNo: "1", pageNo: "1",
pageSize: "10", pageSize: "10",
}, },
@@ -618,8 +633,11 @@ console.log( "讲师体系id" +val);
{ value:"2", label: "审核中", }, { value:"2", label: "审核中", },
{ value:"3", label: "审核通过", }, { value:"3", label: "审核通过", },
]) ])
watch( watch(()=>state.formParam.name,(val)=>{
state.formParam.userNo = val?.split('/')[1]
}
) )
//切换筛选 //切换筛选
const handlemoreid=()=>{ const handlemoreid=()=>{
if(state.moreid==1){ if(state.moreid==1){
@@ -863,6 +881,7 @@ console.log( "讲师体系id" +val);
}; };
// 添加讲师费 // 添加讲师费
const addTeacher = () => { const addTeacher = () => {
cancel()
state.teacherdialog = true; state.teacherdialog = true;
state.vf = true state.vf = true
state.teacherdialogtitle = '添加讲师费' state.teacherdialogtitle = '添加讲师费'
@@ -907,6 +926,7 @@ console.log( "讲师体系id" +val);
} }
//保存 //保存
const createTeacherDialog = async () => { const createTeacherDialog = async () => {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
state.formParam.tSystemName = state.tSystemNames.systemName state.formParam.tSystemName = state.tSystemNames.systemName
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++){
@@ -916,7 +936,6 @@ console.log( "讲师体系id" +val);
} }
} }
state.formParam = {...state.formParam,...state.tSystemNames} state.formParam = {...state.formParam,...state.tSystemNames}
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
if (state.vf == false) { if (state.vf == false) {
updateTeacherFee(state.formParam).then(response => { updateTeacherFee(state.formParam).then(response => {
message.success("修改成功"); message.success("修改成功");
@@ -1001,7 +1020,7 @@ console.log( "讲师体系id" +val);
const cancel = () => { const cancel = () => {
state.formParam ={ state.formParam ={
name:null, name:null,
teacherId:null, userNo:null,
orgName:null, orgName:null,
tSystemName:null, tSystemName:null,
tLevelId:null, tLevelId:null,
@@ -1094,10 +1113,21 @@ console.log( "讲师体系id" +val);
}; };
const clearNonNumber = () => { const clearNonNumber = () => {
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, ''); state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
}
const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
}
const clearscoreNumber= () => {
state.formParam.score = state.formParam.score.replace(/\D/g, '');
}
const clearlevelPayNumber = () => {
state.formParam.levelPay = state.formParam.levelPay.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
} }
const rules = { const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }], name: [{ required: true, message:'',log: '讲师不能为空' }],
teacherId: [{ required: true, message: '',log:'讲师工号不能为空' }], userNo: [{ required: true, message: '',log:'讲师工号不能为空' }],
orgName: [{ required: true, message: '',log:'讲师组织不能为空' }], orgName: [{ required: true, message: '',log:'讲师组织不能为空' }],
tSystemName: [{ required: true, message:'',log: '讲师体系不能为空' }], tSystemName: [{ required: true, message:'',log: '讲师体系不能为空' }],
tLevelId: [{ required: true, message:'',log: ' 讲师级别 不能为空' }], tLevelId: [{ required: true, message:'',log: ' 讲师级别 不能为空' }],
@@ -1112,12 +1142,7 @@ console.log( "讲师体系id" +val);
expense: [{ required: true, message: '',log:'计划费用不能为空' }], expense: [{ required: true, message: '',log:'计划费用不能为空' }],
} }
function managerChange(e, l, d, t, orgName) {
console.log(e, l);
state.searchParam.userNo = d;
state.searchParam.userNo = t;
// state.searchParam.trainorgName=orgName
}
const handleImport = () => { const handleImport = () => {
state.showWork = true state.showWork = true
} }
@@ -1130,7 +1155,8 @@ const cancelallFeedialog= ()=>{
const searchResetdrawer=()=>{ const searchResetdrawer=()=>{
state.searchall={ state.searchall={
name:null, name:null,
status:null, beginTime: null,
endTime: null,
pageNo: "1", pageNo: "1",
pageSize: "10", pageSize: "10",
} }
@@ -1141,7 +1167,9 @@ const searchSubmitdrawer=()=>{
} }
const allFeeList=()=>{ const allFeeList=()=>{
state.tableLoadings=true state.tableLoadings=true
let objA = {...state.searchall}; let objA = { ...state.searchall };
objA.beginTime = state.allsearchdate ? dayjs(state.allsearchdate[0]).format("YYYY-MM-DD") : "",
objA.endTime = state.allsearchdate ? dayjs(state.allsearchdate[1]).format("YYYY-MM-DD") : "",
getTeacherFeeList(objA) getTeacherFeeList(objA)
.then((res) => { .then((res) => {
tableDatas.value = res.data.data.records tableDatas.value = res.data.data.records
@@ -1376,7 +1404,6 @@ const column = ref([
beforeUpload2, beforeUpload2,
closeDeleteTeacher, closeDeleteTeacher,
cancelTeachingDialog, cancelTeachingDialog,
managerChange,
courseTypeList, courseTypeList,
// searchTimeChange, // searchTimeChange,
handlemoreid, handlemoreid,
@@ -1418,6 +1445,9 @@ const column = ref([
tableDatas, tableDatas,
handleformlevel, handleformlevel,
validateField, validateField,
clearstudysNumber,
clearscoreNumber,
clearlevelPayNumber,
} }
}, },
}; };