mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 23:36:46 +08:00
讲师费时间筛选调整
This commit is contained in:
@@ -22,8 +22,18 @@
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item class="select ">
|
||||
<a-range-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']" @change="searchTimeChange" />
|
||||
<div class="select addTimeBox">
|
||||
<div class="addTime" >创建时间:</div>
|
||||
<a-range-picker
|
||||
v-model:value="searchdate"
|
||||
style="width: 420px"
|
||||
@change="searchTimeChange"
|
||||
format="YYYY-MM-DD"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
|
||||
@@ -65,7 +75,7 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item class="select" v-if="moreid == 2">
|
||||
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.tlevelId" placeholder="请选择讲师级别" allowClear :disabled="getLevelList.length!==0 ? false:true"
|
||||
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.levelId" placeholder="请选择讲师级别" allowClear :disabled="getLevelList.length!==0 ? false:true"
|
||||
:options="getLevelList">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
@@ -86,7 +96,7 @@
|
||||
:show-upload-list="false"
|
||||
:before-upload="beforeUpload2"
|
||||
>
|
||||
<a-button class="resetbtn">
|
||||
<a-button class="resetbtn" @click="handleImport()">
|
||||
<DownloadOutlined /> 导入
|
||||
</a-button>
|
||||
</a-upload>
|
||||
@@ -94,7 +104,7 @@
|
||||
<UploadOutlined /> 导出
|
||||
</a-button>
|
||||
|
||||
<div v-if="moreid == 2" style="line-height: 40px;" >当前页面汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">1,230,490</span>元 当前总汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">9,230,490</span>元</div>
|
||||
<div style="line-height: 40px;" >当前页面汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">1,230,490</span>元 当前总汇总金额:<span style="line-height: 40px; font-size: 24px; color: rgb(207, 34, 34) ;font-weight: 600;">9,230,490</span>元</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div style="padding: 10px 0">
|
||||
@@ -143,7 +153,7 @@
|
||||
<!-- 弹窗组件 -->
|
||||
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" dropdown-style="drawaer"
|
||||
width="60%" :title="teacherdialogtitle">
|
||||
<a-form :model="formParam" :rules="rules" layout="vertical">
|
||||
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef" >
|
||||
<!-- 讲师姓名 name 讲师工号 teacherNo-->
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
@@ -384,7 +394,9 @@
|
||||
</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<ImportWork v-model:showWork="showWork" :url="'/importTeacherCourseRecord'"></ImportWork>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref ,watch} from "vue";
|
||||
@@ -397,6 +409,7 @@
|
||||
FolderAddOutlined,
|
||||
DownloadOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import ImportWork from "../../components/project/ImportWork.vue";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew"
|
||||
import {getTeacherFeeList,getTeacherFeeDetail,addTeacherFee ,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTrainOrg,getTeacherLevel} from "../../api/lecturerFeeManagement";4
|
||||
import { getTeacherExpertise,getTeacherSystemList,getLevel,getPayRollPlace,fileUp } from "../../api/Lecturer";
|
||||
@@ -414,8 +427,11 @@
|
||||
ProjectManager
|
||||
},
|
||||
setup() {
|
||||
const formRef = ref();
|
||||
const state = reactive({
|
||||
teachingdialog:false,
|
||||
showWork: false,
|
||||
vf:true,
|
||||
moreid:1,
|
||||
byPid:null,
|
||||
currentPage1: 1,
|
||||
@@ -442,12 +458,13 @@
|
||||
defaultTeachingTime:0,
|
||||
courseName:0
|
||||
},
|
||||
searchdate: null, //选择时间
|
||||
searchParam: {
|
||||
teacherNo:null,
|
||||
teacherName:null,
|
||||
trainorgId:null,
|
||||
kid:null,
|
||||
tlevelId:null,
|
||||
levelId:null,
|
||||
courseType:null,
|
||||
certStatus:null,
|
||||
salaryName:null,
|
||||
@@ -775,12 +792,13 @@ console.log( "讲师体系id" +val);
|
||||
};
|
||||
//重置
|
||||
const searchReset = () => {
|
||||
state.searchdate= null,
|
||||
state.searchParam = {
|
||||
endDate:null,
|
||||
startDate:null,
|
||||
teacherNo:null,
|
||||
kid:null,
|
||||
tlevelId:null,
|
||||
levelId:null,
|
||||
courseType:null,
|
||||
certStatus:null,
|
||||
salaryName:null,
|
||||
@@ -792,16 +810,16 @@ console.log( "讲师体系id" +val);
|
||||
getTableDate();
|
||||
};
|
||||
//修改时间
|
||||
const searchTimeChange = (e, date) => {
|
||||
let startTime = date[0] + " 00:00:00";
|
||||
let endTime = date[1] + " 23:59:59";
|
||||
function searchTimeChange(time, timeStr) {
|
||||
let startTime = timeStr[0]
|
||||
let endTime = timeStr[1] ;
|
||||
state.startTime = new Date(startTime).getTime();
|
||||
state.endTime = new Date(endTime).getTime();
|
||||
// state.searchParam.startDate = new Date(startDate).getTime() ;
|
||||
// state.searchParam.endDate = new Date(endDate).getTime() ;
|
||||
state.searchParam.startDate = state.startTime ? state.startTime : null,
|
||||
state.searchParam.endDate = state.endTime ? state.endTime : null
|
||||
};
|
||||
}
|
||||
// List接口数据
|
||||
const getTableDate = (obj) => {
|
||||
state.tableLoading=true
|
||||
@@ -824,9 +842,10 @@ console.log( "讲师体系id" +val);
|
||||
state.pageSize1 = pageSize;
|
||||
getTableDate();
|
||||
};
|
||||
// 新增讲师
|
||||
// 添加讲师费
|
||||
const addTeacher = () => {
|
||||
state.teacherdialog = true;
|
||||
state.vf = true
|
||||
state.teacherdialogtitle = '添加讲师费'
|
||||
|
||||
}
|
||||
@@ -835,28 +854,39 @@ console.log( "讲师体系id" +val);
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '修改信息'
|
||||
state.kid= record.kid
|
||||
state.vf = false
|
||||
TeacherSystem()
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = () => {
|
||||
state.formParam.teachingDate= state.formParam.teachingDate!==null? dayjs(new Date(state.formParam.teachingDate).getTime()).format("YYYY-MM-DD"): "",
|
||||
console.log(state.formParam);
|
||||
if (state.formParam.kid != undefined) {
|
||||
updateTeacherFee (state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
});
|
||||
}
|
||||
else {
|
||||
formRef.value
|
||||
.validate()
|
||||
.then(() => {
|
||||
if (state.vf == false) {
|
||||
updateTeacherFee(state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
state.teacherdialog = false;
|
||||
cancel()
|
||||
getTableDate();
|
||||
});
|
||||
}
|
||||
else {
|
||||
addTeacherFee(state.formParam)
|
||||
.then((res) => {
|
||||
message.success("保存成功");
|
||||
}).catch((err) => {
|
||||
state.teacherdialog = false;
|
||||
cancel()
|
||||
getTableDate();
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
state.teacherdialog = false;
|
||||
getTableDate();
|
||||
};
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log('error', error);
|
||||
});
|
||||
};
|
||||
//删除弹窗
|
||||
// const deleteModal = (record) => {
|
||||
// state.deleteInTeacherdialog = true
|
||||
@@ -909,6 +939,7 @@ console.log( "讲师体系id" +val);
|
||||
}
|
||||
//取消按钮 清空输入的数据
|
||||
const cancelTeacherDialog = () => {
|
||||
formRef.value.resetFields();
|
||||
state.teacherdialog = false
|
||||
cancel()
|
||||
};
|
||||
@@ -944,14 +975,14 @@ console.log( "讲师体系id" +val);
|
||||
const handleLook = (record) => {
|
||||
state.teachingdialog = true;
|
||||
state.teacherdialogtitle = '查看详情'
|
||||
state.kid= record.kid
|
||||
state.kid= record.id
|
||||
// alert(record.grade)
|
||||
TeacherSystem()
|
||||
// getteacherrecordstableData ()
|
||||
}
|
||||
//详情
|
||||
const TeacherSystem=()=>{
|
||||
getTeacherFeeDetail({kid : state.kid}).then((res) => {
|
||||
getTeacherFeeDetail({id : state.kid}).then((res) => {
|
||||
// state.formParam=Object.assign({} ,res.data.data)
|
||||
state.formParam=res.data.data
|
||||
// tableDataFeeDetail.value = res.data.data.records
|
||||
@@ -1029,6 +1060,9 @@ console.log( "讲师体系id" +val);
|
||||
state.searchParam.teacherNo = d;
|
||||
state.searchParam.teacherName = t;
|
||||
// state.searchParam.trainorgName=orgName
|
||||
}
|
||||
const handleImport = () => {
|
||||
state.showWork = true
|
||||
}
|
||||
//导出功能
|
||||
const handleExport = ()=>{
|
||||
@@ -1037,8 +1071,8 @@ console.log( "讲师体系id" +val);
|
||||
state.currentPage1
|
||||
}&pageSize=${state.pageSize1}&teacherNo=${
|
||||
state.searchParam.teacherNo ? state.searchParam.teacherNo : ""
|
||||
}&kid=${ state.searchParam.kid ? state.searchParam.kid : ""}&tlevelId=${
|
||||
state.searchParam.tlevelId ? state.searchParam.tlevelId : ""
|
||||
}&kid=${ state.searchParam.kid ? state.searchParam.kid : ""}&levelId=${
|
||||
state.searchParam.levelId ? state.searchParam.levelId : ""
|
||||
}&courseType=${ state.searchParam.courseType ? state.searchParam.courseType : ""}&certStatus=${
|
||||
state.searchParam.certStatus ? state.searchParam.certStatus : ""
|
||||
}&salaryName=${state.searchParam.salaryName ? state.searchParam.salaryName : ""}&payrollPlaceId=${state.searchParam.payrollPlaceId ? state.searchParam.payrollPlaceId : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}&startDate=${state.searchParam.startDate ? state.searchParam.startDate : ""}&endDate=${state.searchParam.endDate ? state.searchParam.endDate : ""}`
|
||||
@@ -1081,6 +1115,8 @@ console.log( "讲师体系id" +val);
|
||||
return {
|
||||
...toRefs(state),
|
||||
rules,
|
||||
formRef,
|
||||
handleImport,
|
||||
beforeUpload2,
|
||||
closeDeleteTeacher,
|
||||
cancelTeachingDialog,
|
||||
@@ -1132,18 +1168,28 @@ console.log( "讲师体系id" +val);
|
||||
}
|
||||
|
||||
.addTimeBox {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.addTime {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
margin-left: 10px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.addTime {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
margin-left: 10px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.ant-picker {
|
||||
padding-left: 85px;
|
||||
}
|
||||
|
||||
::v-deep .ant-picker-range .ant-picker-active-bar {
|
||||
margin-left: 85px !important;
|
||||
}
|
||||
}
|
||||
.addTimeBox .ant-picker{
|
||||
padding-left: 85px;
|
||||
}
|
||||
|
||||
//导出按钮icon
|
||||
.daochu {
|
||||
width: 16px;
|
||||
|
||||
Reference in New Issue
Block a user