分页调整

This commit is contained in:
wangxuemei
2024-10-30 10:06:18 +08:00
parent 1f358f0059
commit 9c38b1632f
12 changed files with 130 additions and 85 deletions

View File

@@ -1,12 +1,19 @@
import http from "./config"; import http from "./config";
// 列表查看讲师费月度统计 // 列表查看讲师费统计
// export const queryTeacherFeeTotalList = (params) => http.get('teacher/fee/queryTeacherFeeTotalList',{ params }) export const TeacherFeeTotalList = (params) => http.get('/admin/expenseSummary/list',{ params })
export const queryTeacherFeeTotalList = (obj) => http.post ('teacher/fee/queryTeacherFeeTotalList',obj) //讲师费统计详情
export const TeacherFeequeryById = (params) => http.get('/admin/expenseSummary/queryById',{ params })
//查看月度讲师费详情
export const TeacherFeequeryDetailId = (params) => http.get('/admin/expenseSummary/queryDetailId',{ params })
//讲师费汇总上月数据
export const createMonthSummary = (obj) => http.post('/admin/expenseSummary/CreateMonthSummary', obj)
// export const queryTeacherFeeTotalList = (obj) => http.post ('/admin/expenseSummary/list',obj)
// 列表查看讲师费月度统计详情 // 列表查看讲师费月度统计详情
export const queryTeacherFeeMonthly = (obj) => http.post('teacher/fee/queryTeacherFeeMonthly', obj) export const queryTeacherFeeMonthly = (obj) => http.get('/admin/expenseSummary/queryDetailId', obj)
////讲师费月度统计--明细 ////讲师费月度统计--明细
export const getTeacherFeeDetailListByTeacherNo = (params) => http.get('teacher/fee/getTeacherFeeDetailListByTeacherNo',{ params }) export const getTeacherFeeDetailListByTeacherNo = (params) => http.get('teacher/fee/getTeacherFeeDetailListByTeacherNo',{ params })
//讲师费明细 //讲师费明细
export const getTeacherFeeListByTeacherNo = (obj) => http.post('teacher/fee/getTeacherFeeListByTeacherNo', obj) export const getTeacherFeeListByTeacherNo = (obj) => http.get('teacher/fee/getTeacherFeeListByTeacherNo', { params })
//讲师费汇总上月数据 //讲师费汇总上月数据
export const getPreviousTeacherfee = (params) => http.get('teacher/fee/getPreviousTeacherFee', {params}) export const getPreviousTeacherfee = (obj) => http.post('teacher/fee/getPreviousTeacherFee', obj)

View File

@@ -630,6 +630,8 @@ export default {
// // 翻页 // // 翻页
const changePagination = (page) => { const changePagination = (page) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
// state.pageNo = page;
state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
// 新增讲师 // 新增讲师

View File

@@ -831,8 +831,8 @@ export default {
// // 翻页 // // 翻页
const changePagination = (page, pageSize) => { const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
state.currentPage1 = page; // state.pageNo = page;
state.pageSize1 = pageSize; state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
// 新增授课 // 新增授课

View File

@@ -101,8 +101,8 @@
<div style="float: right;"> <div style="float: right;">
<a-pagination <a-pagination
v-if="tableDataTotal > 10" v-if="tableDataTotal > 10"
:showSizeChanger="false" :showSizeChanger="true "
:showQuickJumper="true" :showQuickJumper="false"
:hideOnSinglePage="true" :hideOnSinglePage="true"
:pageSize="searchParam.pageSize" :pageSize="searchParam.pageSize"
:current="searchParam.pageNo" :current="searchParam.pageNo"
@@ -489,9 +489,9 @@
// // 翻页 // // 翻页
const changePagination = (page,pageSize) => { const changePagination = (page,pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
state.currentPage1 = page; // state.pageNo = page;
state.pageSize1 = pageSize; state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
// 新增讲师 // 新增讲师
const addTeacher = () => { const addTeacher = () => {
@@ -628,9 +628,7 @@
//导出功能 //导出功能
const handleExport = ()=>{ const handleExport = ()=>{
window.open ( window.open (
`${process.env.VUE_APP_BASE_API}/teacher/fee/exportTeacherFee?pageNo=${ `${process.env.VUE_APP_BASE_API}/teacher/fee/exportTeacherFee?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&teacherNo=${
state.currentPage1
}&pageSize=${state.pageSize1}&teacherNo=${
state.searchParam.teacherNo ? state.searchParam.teacherNo : "" state.searchParam.teacherNo ? state.searchParam.teacherNo : ""
}&tsystemName=${ state.searchParam.tsystemName ? state.searchParam.tsystemName : ""}&levelId=${ }&tsystemName=${ state.searchParam.tsystemName ? state.searchParam.tsystemName : ""}&levelId=${
state.searchParam.levelId ? state.searchParam.levelId : "" state.searchParam.levelId ? state.searchParam.levelId : ""

View File

@@ -838,9 +838,9 @@ console.log( "讲师体系id" +val);
// // 翻页 // // 翻页
const changePagination = (page,pageSize) => { const changePagination = (page,pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
state.currentPage1 = page; // state.pageNo = page;
state.pageSize1 = pageSize; state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
// 添加讲师费 // 添加讲师费
const addTeacher = () => { const addTeacher = () => {

View File

@@ -46,18 +46,10 @@
</div> </div>
<!-- 翻页 --> <!-- 翻页 -->
<div class="tableBox "> <div class="tableBox ">
<div style="float: right;"> <div class="pa">
<a-pagination <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
v-if="tableDataTotal > 10" :hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal"
:showSizeChanger="false" class="pagination" @change="changePagination" />
:showQuickJumper="true"
:hideOnSinglePage="true"
:pageSize="searchParam.pageSize"
:current="searchParam.pageNo"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div> </div>
</div> </div>
<!-- 二级页面弹窗组件 --> <!-- 二级页面弹窗组件 -->
@@ -181,9 +173,9 @@ import { message } from "ant-design-vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { getOrganization } from "../../api/Teaching"; import { getOrganization } from "../../api/Teaching";
import { queryTeacherFeeMonthly, getTeacherFeeDetailListByTeacherNo, getTeacherFeeListByTeacherNo} from "../../api/lecturerFeeStatistics" import { queryTeacherFeeMonthly, getTeacherFeeDetailListByTeacherNo, getTeacherFeeListByTeacherNo,TeacherFeeTotalList,createMonthSummary} from "../../api/lecturerFeeStatistics"
; ;
import {getTeacherFeeList,getTrainOrg} from "../../api/lecturerFeeManagement"; import {getTrainOrg} from "../../api/lecturerFeeManagement";
export default { export default {
name: "LecturerFeeStatistics", name: "LecturerFeeStatistics",
components: { components: {
@@ -258,8 +250,8 @@ export default {
}, },
{ {
title: '汇总日期 ', title: '汇总日期 ',
dataIndex: 'summaryTime', dataIndex: 'summaryDate',
key: 'summaryTime', key: 'summaryDate',
elipsis: true, elipsis: true,
align: "center", align: "center",
width: 200, width: 200,
@@ -306,7 +298,7 @@ export default {
let objA = { ...state.searchParam }; let objA = { ...state.searchParam };
objA.searchdate=state.searchdate!==null? state.searchdate: "", objA.searchdate=state.searchdate!==null? state.searchdate: "",
console.log(objA) console.log(objA)
getTeacherFeeList(objA) TeacherFeeTotalList(objA)
.then((res) => { .then((res) => {
tableData.value = res.data.data.records tableData.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total); state.tableDataTotal = Number(res.data.data.total);
@@ -317,19 +309,19 @@ export default {
//重新汇总上月数据 //重新汇总上月数据
const searchResetPrevious=()=>{ const searchResetPrevious=()=>{
state.tableLoading = true state.tableLoading = true
const now = new Date(); // const now = new Date();
const year = now.getFullYear(); // const year = now.getFullYear();
const month = now.getMonth(); // const month = now.getMonth();
const lastMonthStart = new Date(year, month - 1, 1); // 上个月的月初 // const lastMonthStart = new Date(year, month - 1, 1); // 上个月的月初
const lastMonthEnd = new Date(year, month, 1); // 上个月的月末 // const lastMonthEnd = new Date(year, month, 1); // 上个月的月末
let obj = { // let obj = {
beginTime:'', // beginTime:'',
endTime:'', // endTime:'',
} // }
obj.beginTime = lastMonthStart.toISOString().split('T')[0]; // obj.beginTime = lastMonthStart.toISOString().split('T')[0];
obj.endTime = lastMonthEnd.toISOString().split('T')[0]; // obj.endTime = lastMonthEnd.toISOString().split('T')[0];
getTeacherFeeList(obj).then((res)=>{ createMonthSummary().then((res)=>{
tableData.value = res.data.data.records tableData.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total); state.tableDataTotal = Number(res.data.data.total);
state.tableLoading = false state.tableLoading = false
@@ -349,6 +341,8 @@ export default {
// // 翻页 // // 翻页
const changePagination = (page, pageSize) => { const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
// state.pageNo = page;
state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
//二级列表翻页 //二级列表翻页
@@ -431,7 +425,7 @@ export default {
} }
//表格内查看数据操作 //表格内查看数据操作
const handleLook = (record) => { const handleLook = (record) => {
let id = record.summaryDate let id = record.id
router.push({ path: '/MonthlyStatistics', query: { id } }) router.push({ path: '/MonthlyStatistics', query: { id } })
// state.teacherdialog = true; // state.teacherdialog = true;
// state.teacherdialogtitle = '讲师费月度统计详情' // state.teacherdialogtitle = '讲师费月度统计详情'
@@ -1136,5 +1130,23 @@ export default {
border: 0px !important; border: 0px !important;
border-radius: 50%!important; border-radius: 50%!important;
} }
.tableBox {
padding-bottom: 20px;
margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
display: inline-block;
}
::v-deep .ant-select-selection-item{
margin-left: 3px;
}
::v-deep .ant-pagination-options-size-changer.ant-select{
width: 84px;
}
.pa {
width: 100%;
display: flex;
justify-content: right;
}
}
</style> </style>

View File

@@ -301,7 +301,9 @@ export default {
}; };
// // 翻页 // // 翻页
const changePagination = (page, pageSize) => { const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
// state.pageNo = page;
state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
//删除弹窗 //删除弹窗

View File

@@ -254,6 +254,8 @@ export default{
//授课翻页 //授课翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;
// state.pageNo = page;
state.teacherrecords.pageSize = pageSize;
getteacherrecordstableData(); getteacherrecordstableData();
}; };
return{ return{

View File

@@ -309,6 +309,8 @@ export default{
//授课翻页 //授课翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;
// state.pageNo = page;
state.teacherrecords.pageSize = pageSize;
getteacherrecordstableData(); getteacherrecordstableData();
}; };
//晋级记录翻页 //晋级记录翻页

View File

@@ -159,6 +159,8 @@ export default{
//翻页 //翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;
// state.pageNo = page;
state.teacherrecords.pageSize = pageSize;
getteacherrecordstableData(); getteacherrecordstableData();
}; };
return{ return{

View File

@@ -27,9 +27,21 @@
:options="PlaceOfPayList" allowClear showSearch/> :options="PlaceOfPayList" allowClear showSearch/>
</a-form-item> </a-form-item>
<a-form-item class="select " > <a-form-item class="select " >
<a-select style="width: 276px" v-model:value="searchParam.trainorgId" placeholder="培训发生组织" <a-tree-select style="width: 230px"
:options="trainOrglist" allowClear showSearch> :fieldNames="{
</a-select> children: 'children',
label: 'name',
value: 'code',
}"
allow-clear
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="searchParam.courseTypeId"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类"
tree-default-expand-all
:tree-data="sysTypeOptions">
</a-tree-select>
</a-form-item> </a-form-item>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button> <a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
@@ -124,7 +136,8 @@
</div> </div>
</template> </template>
<script lang="jsx"> <script lang="jsx">
import { reactive, toRefs, ref, watch } from "vue"; import { reactive, toRefs, ref, watch,computed } from "vue";
import { useStore } from "vuex";
import { useRouter,useRoute } from "vue-router"; import { useRouter,useRoute } from "vue-router";
import { import {
UploadOutlined, UploadOutlined,
@@ -132,7 +145,6 @@ import {
import { getPayRollPlace } from "../../api/Lecturer"; import { getPayRollPlace } from "../../api/Lecturer";
import { getOrganization } from "../../api/Teaching"; import { getOrganization } from "../../api/Teaching";
import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManager from "@/components/project/ProjectManagerNew";
import {getTrainOrg} from "../../api/lecturerFeeManagement";
import {queryTeacherFeeMonthly} from "../../api/lecturerFeeStatistics"; import {queryTeacherFeeMonthly} from "../../api/lecturerFeeStatistics";
import {CostDetails} from "../lecturer/CostDetails.vue" import {CostDetails} from "../lecturer/CostDetails.vue"
// import * as api from '@/api/Lecturer' // import * as api from '@/api/Lecturer'
@@ -164,12 +176,12 @@ export default {
searchParam: { searchParam: {
pageNo: "1", pageNo: "1",
pageSize: "10", pageSize: "10",
teacherNo: null, name: null,
payrollPlaceId: null, payrollPlaceId: null,
departId: null, departId: null,
summaryDate:null, summaryDate:null,
}, },
teacherNo:null, name:null,
drawer: { drawer: {
name: null, name: null,
drawersearchdate: null, drawersearchdate: null,
@@ -179,6 +191,9 @@ export default {
}) })
watch( watch(
) )
//获取内容分类
const store = useStore();
const sysTypeOptions = computed(() => store.state.content_type);
const columns = ref([ const columns = ref([
{ {
title: '讲师姓名 ', title: '讲师姓名 ',
@@ -190,8 +205,8 @@ export default {
}, },
{ {
title: '讲师工号', title: '讲师工号',
dataIndex: 'teacherNo', dataIndex: 'name',
key: 'teacherNo', key: 'name',
align: "center", align: "center",
elipsis: true, elipsis: true,
width: 200, width: 200,
@@ -262,25 +277,7 @@ export default {
const searchSubmit = () => { const searchSubmit = () => {
getTableDate(); getTableDate();
}; };
const trainOrglist=ref([])
//获取培训发生组织
const trainOrglista =() => {
getTrainOrg().then((res)=>{
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
arr.map((value) => {
let obj = {
value: value.trainorgId,
label: value.trainOrg,
};
array.push(obj);
});
trainOrglist.value = array;
}
})
}
trainOrglista()
const PlaceOfPayList = ref([ const PlaceOfPayList = ref([
]) ])
//获取讲师发薪地列表 //获取讲师发薪地列表
@@ -344,15 +341,17 @@ export default {
} }
const changePagination = (page, pageSize) => { const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
// state.pageNo = page;
state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
// 导出 // 导出
const handleFeeMonthly = () => { const handleFeeMonthly = () => {
window.open( window.open(
`${process.env.VUE_APP_BASE_API}/teacher/fee/exportTeacherMonthlyFee?pageNo=${state.searchParam.currentPage `${process.env.VUE_APP_BASE_API}/admin/export/exportTeacherSummary?pageNo=${state.searchParam.pageNo
}&pageSize=${state.searchParam.pageSize} }&pageSize=${state.searchParam.pageSize}
&userNo=${state.searchParam.payrollPlaceId ? state.searchParam.payrollPlaceId : ""} &userNo=${state.searchParam.payrollPlaceId ? state.searchParam.payrollPlaceId : ""}
&teacherNo=${state.searchParam.teacherNo ? state.searchParam.teacherNo : ""} &name=${state.searchParam.name ? state.searchParam.name : ""}
&departId=${state.searchParam.trainorgId ? state.searchParam.trainorgId : ""}`) &departId=${state.searchParam.trainorgId ? state.searchParam.trainorgId : ""}`)
} }
//重置 //重置
@@ -360,7 +359,7 @@ export default {
state.searchParam = { state.searchParam = {
pageNo: "1", pageNo: "1",
pageSize: "10", pageSize: "10",
teacherNo: null, name : null,
payrollPlaceId: null, payrollPlaceId: null,
departId: null, departId: null,
summaryDate:null, summaryDate:null,
@@ -496,12 +495,10 @@ export default {
}; };
return { return {
...toRefs(state), ...toRefs(state),
trainOrglist,
tableDatas, tableDatas,
column, column,
cancelTeachingDialog, cancelTeachingDialog,
searchReset, searchReset,
trainOrglista,
handleFeeMonthly, handleFeeMonthly,
handleLook, handleLook,
changePagination, changePagination,
@@ -513,7 +510,8 @@ export default {
PlaceOfPayLista, PlaceOfPayLista,
getOrganizationList, getOrganizationList,
getOrganizationLista, getOrganizationLista,
searchResetdrawer searchResetdrawer,
sysTypeOptions,
} }
}, },
}; };
@@ -896,5 +894,23 @@ export default {
font-size: 14px; font-size: 14px;
} }
} }
tableBox {
padding-bottom: 20px;
margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
display: inline-block;
}
::v-deep .ant-select-selection-item{
margin-left: 3px;
}
::v-deep .ant-pagination-options-size-changer.ant-select{
width: 84px;
}
.pa {
width: 100%;
display: flex;
justify-content: right;
}
}
</style> </style>

View File

@@ -400,7 +400,9 @@ const getTableDate = (obj) => {
}; };
// // 翻页 // // 翻页
const changePagination = (page, pageSize) => { const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page; state.searchParam.pageNo = page;
// state.pageNo = page;
state.searchParam.pageSize = pageSize;
getTableDate(); getTableDate();
}; };
//删除弹窗 //删除弹窗