时间日期调整

This commit is contained in:
wangxuemei
2024-10-25 17:27:40 +08:00
parent 01e569ead6
commit 435b673144
4 changed files with 67 additions and 63 deletions

View File

@@ -31,7 +31,7 @@
<div class="text">上传</div>
<div class="right">
<div style="height: 176px; margin-bottom: 20px">
<a-upload-dragger v-model:fileList="fileList" :action="importHomeWork" name="file" :multiple="true"
<a-upload-dragger v-model:fileList="fileList" :action="importHomeWork" name="uploadFile"
:headers="headers"
@change="handleChange" :showUploadList="false">
<p class="ant-upload-drag-icon">

View File

@@ -173,8 +173,8 @@
<!-- 授课日期 beginTime 授课时长defaultTeachingTime-->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="授课/课程日期 :" name="formParamdate">
<a-date-picker class="draitem" v-model:value="formParamdate" style="width:100%" format="YYYY-MM-DD"
<a-form-item label="授课/课程日期 :" name="teachingDate">
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD"
placeholder="请选择课程日期" />
</a-form-item>
</a-col>
@@ -350,7 +350,7 @@ export default {
pageSize: 10,
beginTime: null, //开始时间
endTime: null, //结束时间
formParamdate: undefined, //选择时间
teachingDate: undefined, //选择时间
tableDataTotal: -1,//table列表总条数
formParam: {
status: 1,
@@ -390,7 +390,7 @@ export default {
courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
status: [{ required: true, message:'',log: '讲开课状态不能为空' }],
duration: [{ required: true, message: '',log:'授课时长不能为空' }],
formParamdate: [{ required: true, message:'',log: '授课日期不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }],
}
//获取开课场地
@@ -685,7 +685,7 @@ export default {
}
}
state.formParam = {...state.formParam}
state.formParam.beginTime=state.formParamdate ? dayjs(state.formParamdate).format("YYYY-MM-DD") : ""
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => {
message.success("修改成功");
@@ -773,7 +773,7 @@ export default {
score: null,
remark: null,
}
state.formParamdate=null
state.teachingDate=null
}
//展开切换
const handlemoreid = () => {

View File

@@ -218,8 +218,8 @@
<!-- 授课日期 beginTime 开课状态 courseStatus -->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="授课/课程日期 :" name="formParamdate">
<a-date-picker class="draitem" v-model:value="formParamdate" style="width:100%" format="YYYY-MM-DD"
<a-form-item label="授课/课程日期 :" name="teachingDate">
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD"
placeholder="请选择课程日期" />
<!-- @change="editTimeChange" -->
</a-form-item>
@@ -438,7 +438,7 @@ export default {
pageSize: 10,
tableDataTotal: -1,//table列表总条数
searchdate: undefined, //选择时间
formParamdate: undefined, //选择时间
teachingDate: undefined, //选择时间
beginTime: null, //开始时间
endTime: null, //结束时间
tSystemNames:{
@@ -866,7 +866,7 @@ export default {
}
}
state.formParam = {...state.formParam,...state.tSystemNames}
state.formParam.beginTime=state.formParamdate ? dayjs(state.formParamdate).format("YYYY-MM-DD") : ""
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => {
message.success("修改成功");
@@ -939,7 +939,7 @@ export default {
offcourseId: null,
createFrom: null,
}
state.formParamdate=null
state.teachingDate=null
state.tSystemNames = {
systemName:null,
levelVoList: []
@@ -1099,7 +1099,7 @@ export default {
tSystemName: [{ required: true, message: '',log:'讲师体系不能为空' }],
courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
formParamdate: [{ required: true, message: '',log:'授课/课程日期不能为空' }],
teachingDate: [{ required: true, message: '',log:'授课/课程日期不能为空' }],
duration: [{ required: true, message:'',log: '授课时长不能为空' }],
courseStatus: [{ required: true, message: '',log:'开课状态不能为空' }],
}

View File

@@ -153,15 +153,15 @@
<!-- 讲师姓名 name 讲师工号 userNo-->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="teacher">
<a-form-item label="讲师名称" name="name">
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName"
v-model:system="tSystemNames" v-model:level="formParam.tLevelId"></SearchTeacher>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="讲师工号" name="name">
<a-input class="draitem" v-model:value="searchParam.name" disabled
placeholder="请输入讲师工号" allowClear showSearch>
<a-form-item label="讲师工号" name="teacherId">
<a-input class="draitem" v-model:value="searchParam.teacherId" disabled
placeholder="请输入讲师工号" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
@@ -169,7 +169,6 @@
<!-- 讲师组织 departId 讲师体系 systemId -->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师组织" name="departId">
<a-form-item label="讲师组织" name="orgName">
<a-popover>
<template #content>
@@ -181,7 +180,6 @@
</a-input>
</a-popover>
</a-form-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="讲师体系" name="tSystemName">
@@ -204,8 +202,8 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="讲师发薪地" name="payrollPlaceName ">
<a-input disabled v-model:value="formParam.payrollPlaceName" class="draitem"
<a-form-item label="讲师发薪地" name="payrollPlace ">
<a-input disabled v-model:value="formParam.payrollPlace" class="draitem"
placeholder="自动带出讲师发薪地" allowClear showSearch >
</a-input>
</a-form-item>
@@ -221,14 +219,16 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课程名称" name=" courseName ">
<a-form-item label="课程名称" name="courseName ">
<!-- <a-radio-group v-model:value="formParam.courseName">
<a-radio :value="0">面授课</a-radio>
<a-radio :value="1">在线课</a-radio>
</a-radio-group> -->
<a-select class="draitem" v-model:value="formParam.courseName" placeholder="请选择输入或选择面授课" style="width:63%" allowClear
<!-- <a-select class="draitem" v-model:value="formParam.courseName" placeholder="请选择输入或选择面授课" style="width:63%" allowClear
:options="getLevelList">
</a-select>
</a-select> -->
<a-input v-model:value="formParam.courseName" placeholder="请输入面授课名称" class="draitem">
</a-input>
</a-form-item>
</a-col>
</a-row>
@@ -236,8 +236,8 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate">
<a-input v-model:value="formParam.teachingDate" disabled placeholder="" class="draitem">
</a-input>
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD"
placeholder="请选择课程日期" />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -256,14 +256,14 @@
<a-col :span="12">
<a-form-item label="参训人数" name="studys">
<a-input v-model:value="formParam.studys" class="draitem"
placeholder="0 " allowClear showSearch disabled >
placeholder="0 " allowClear showSearch >
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="评分" name="score">
<a-input class="draitem" v-model:value="formParam.score" placeholder="0" allowClear
showSearch disabled>
showSearch >
</a-input>
</a-form-item>
</a-col>
@@ -271,15 +271,15 @@
<!-- 课酬基准 计划费用 expense-->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="课酬基准" name="teacherlevelPay">
<a-input v-model:value="formParam.teacherlevelPay" placeholder="可手动更改"
<a-form-item label="课酬基准" name="levelPay">
<a-input v-model:value="formParam.levelPay" placeholder="可手动更改"
allowClear showSearch class="draitem">
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="计划费用" name="expense">
<a-input class="draitem" v-model:value="formParam.expense" placeholder="" allowClear disabled
<a-input class="draitem" v-model:value="formParam.expense" placeholder="" allowClear
showSearch>
{{ defaultTeachingTime * expense}}
</a-input>
@@ -371,8 +371,7 @@
<a-descriptions-item label="课酬基准 ">{{formParam.teacherlevelPay}}</a-descriptions-item>
<a-descriptions-item label="计划费用 ">{{formParam.expense}}</a-descriptions-item>
<a-descriptions-item label="应发费用 ">{{formParam.payableExpense}}</a-descriptions-item>
<a-descriptions-item label="状态">{{formParam.status=="A10"?'待审核' :formParam.status=="A20"?'已提交':formParam.status== "A30" ?'审核中':formParam.status== "E10" ?'审核打回':formParam.status=="S20"?'审核通过':''}}</a-descriptions-item>
<a-descriptions-item label="状态">{{formParam.status=="0"?'待确认' :formParam.status=="1"?'待提交':formParam.status== "2" ?'审核中':formParam.status== "3"?'审核通过':''}}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{formParam.remark}}</a-descriptions-item>
</a-descriptions>
<span class="line"></span>
@@ -494,6 +493,7 @@
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
pageSize: 10,
tableDataTotal: -1,//table列表总条数
teachingDate:null,
formParam: {
teachingDate:null ,
defaultTeachingTime:null,
@@ -613,11 +613,10 @@ console.log( "讲师体系id" +val);
// PlaceOfPayLista()
//状态
const AccountStatusList = ref([
{ value:"A10", label: "待审核", },
{ value:"A20", label: "提交", },
{ value:"A30", label: "审核中", },
{ value:"E10", label: "审核打回", },
{ value:"S20", label: "审核通过", },
{ value:"0", label: "待确认", },
{ value:"1", label: "提交", },
{ value:"2", label: "审核中", },
{ value:"3", label: "审核通过", },
])
watch(
)
@@ -771,13 +770,12 @@ console.log( "讲师体系id" +val);
customRender: (value) => {
return (
<div>
{value.record.status == "A10" || value.record.status == "A20" ||value.record.status == "A30" ||value.record.status == "E10"||value.record.status == "S20"
{value.record.status== "0" || value.record.status == "1" ||value.record.status == "2" ||value.record.status == "3"
? {
"A10": "待审核",
"A20": "提交",
"A30": "审核中",
"E10": "审核打回",
"S20": "审核通过",
"0": "待确认",
"1": "提交",
"2": "审核中",
"3": "审核通过",
}[value.record.status + ""] || ""
: "-"}
</div>
@@ -886,6 +884,7 @@ console.log( "讲师体系id" +val);
id:item.id
}
array.push(arr)
return array
})
confirm(array)
.then((res) => {
@@ -917,6 +916,7 @@ console.log( "讲师体系id" +val);
}
}
state.formParam = {...state.formParam,...state.tSystemNames}
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD") : ""
if (state.vf == false) {
updateTeacherFee(state.formParam).then(response => {
message.success("修改成功");
@@ -1000,25 +1000,30 @@ console.log( "讲师体系id" +val);
//清空数据
const cancel = () => {
state.formParam ={
teacher:null,
userNo:null,
departId:null,
tsystemId:null,
levelId:null,
payrollPlaceName:null,
tSystemName: null,
teacherpayrollPlace:null,
name:null,
teacherId:null,
orgName:null,
tSystemName:null,
tLevelId:null,
payrollPlace:null,
courseType: null,
courseName:null,
teachingDate:null,
defaultTeachingTime:null,
courseType:null,
studys:null,
teacherlevelPay:null,
score:null,
trainOrg:null,
levelPay:null,
payableExpense:null,
expense:null,
remark:null,
}
state.teachingDate=null
state.tSystemNames = {
systemName:null,
levelVoList: []
}
}
//表格内查看数据操作
const handleLook = (record) => {
@@ -1092,18 +1097,18 @@ console.log( "讲师体系id" +val);
}
const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }],
userNo: [{ required: true, message: '',log:'讲师工号不能为空' }],
departId: [{ required: true, message: '',log:'讲师组织不能为空' }],
teacherId: [{ required: true, message: '',log:'讲师工号不能为空' }],
orgName: [{ required: true, message: '',log:'讲师组织不能为空' }],
tSystemName: [{ required: true, message:'',log: '讲师体系不能为空' }],
tLevelId: [{ required: true, message:'',log: ' 讲师级别 不能为空' }],
payrollPlaceName: [{ required: true, message:'',log: '讲师发薪地 不能为空' }],
payrollPlace: [{ required: true, message:'',log: '讲师发薪地 不能为空' }],
courseType: [{ required: true, message: '',log:'费用类型不能为空' }],
courseName: [{ required: true, message:'',log: '课程名称不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }],
defaultTeachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }],
studys: [{ required: true, message: '',log:' 参训人数不能为空' }],
score: [{ required: true, message:'',log: ' 评分不能为空' }],
score: [{ required: true, message:'',log: '课酬基准 不能为空' }],
levelPay: [{ required: true, message:'',log: '课酬基准 不能为空' }],
expense: [{ required: true, message: '',log:'计划费用不能为空' }],
}
@@ -1284,13 +1289,12 @@ const column = ref([
customRender: (value) => {
return (
<div>
{value.record.status == "A10" || value.record.status == "A20" ||value.record.status == "A30" ||value.record.status == "E10"||value.record.status == "S20"
{value.record.status== "0" || value.record.status == "1" ||value.record.status == "2" ||value.record.status == "3"
? {
"A10": "待审核",
"A20": "提交",
"A30": "审核中",
"E10": "审核打回",
"S20": "审核通过",
"0": "待确认",
"1": "提交",
"2": "审核中",
"3": "审核通过",
}[value.record.status + ""] || ""
: "-"}
</div>