讲师管理修改

This commit is contained in:
zhangsir
2024-10-30 14:37:02 +08:00
parent 1efd0901da
commit cbc1b28809
8 changed files with 173 additions and 92 deletions

View File

@@ -232,7 +232,7 @@
</a-form-item>
</a-col>
</a-row>
<!-- 授课日期 teachingDate 授课时长 defaultTeachingTime -->
<!-- 授课日期 teachingDate 授课时长 teachingTime -->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate">
@@ -241,13 +241,13 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授课时长" name="defaultTeachingTime">
<a-input v-model:value="formParam.defaultTeachingTime" style="width:80%; height: 40px; border-radius: 8px; "
<a-form-item label="授课时长" name="teachingTime">
<a-input v-model:value="formParam.teachingTime" style="width:80%; height: 40px; border-radius: 8px; "
@blur="clearNonNumber" placeholder="0" allowClear showSearch suffix="分钟">
</a-input>
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime != null">{{
(formParam.defaultTeachingTime / 60).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime == null">0.00小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teachingTime != null">{{
(formParam.teachingTime / 60).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teachingTime == null">0.00小时</span>
</a-form-item>
</a-col>
</a-row>
@@ -467,7 +467,7 @@
teachingDate:null,
formParam: {
teachingDate:null ,
defaultTeachingTime:null,
teachingTime:null,
name: null,
userNo: null
},
@@ -499,6 +499,7 @@
},
tSystemNames:{
systemName:null,
systemId: null,
levelVoList: []
},
})
@@ -878,6 +879,7 @@ console.log( "讲师体系id" +val);
state.formParam.expense = String(state.formParam.expense)
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
state.formParam.tSystemName = state.tSystemNames.systemName
state.formParam.tSystemId = state.tSystemNames.systemId
const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]);
@@ -979,7 +981,7 @@ console.log( "讲师体系id" +val);
courseType: null,
courseName:null,
teachingDate:null,
defaultTeachingTime:null,
teachingTime:null,
courseType:null,
studys:null,
teacherlevelPay:null,
@@ -1063,8 +1065,8 @@ console.log( "讲师体系id" +val);
state.teachingdialog = false
};
const clearNonNumber = () => {
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
state.formParam.teachingTime = state.formParam.teachingTime.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.teachingTime
}
const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
@@ -1074,7 +1076,7 @@ console.log( "讲师体系id" +val);
}
const clearlevelPayNumber = () => {
state.formParam.levelPay = state.formParam.levelPay.replace(/\D/g, '');
state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
state.formParam.expense = state.formParam.levelPay*state.formParam.teachingTime
}
const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }],
@@ -1086,7 +1088,7 @@ console.log( "讲师体系id" +val);
courseType: [{ required: true, message: '',log:'费用类型不能为空' }],
courseName: [{ required: true, message:'',log: '课程名称不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }],
defaultTeachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }],
teachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }],
studys: [{ required: true, message: '',log:' 参训人数不能为空' }],
score: [{ required: true, message:'',log: ' 评分不能为空' }],
levelPay: [{ required: true, message:'',log: '课酬基准 不能为空' }],